Retheme of cards

This commit is contained in:
Avery Pace 2021-11-07 17:52:36 -05:00
parent e4c5c2df05
commit 06c2d156c9
11 changed files with 130 additions and 2 deletions

View File

@ -0,0 +1,38 @@
{
"colors" : [
{
"color" : {
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "0x65",
"green" : "0x43",
"red" : "0x64"
}
},
"idiom" : "universal"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "dark"
}
],
"color" : {
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "0xB3",
"green" : "0x8B",
"red" : "0xB2"
}
},
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}

View File

@ -0,0 +1,38 @@
{
"colors" : [
{
"color" : {
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "0.702",
"green" : "0.545",
"red" : "0.698"
}
},
"idiom" : "universal"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "dark"
}
],
"color" : {
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "0.396",
"green" : "0.263",
"red" : "0.392"
}
},
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}

View File

@ -0,0 +1,23 @@
{
"images" : [
{
"filename" : "Toki translate dark transparent.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "Toki translate dark transparent-1.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "Toki translate dark transparent-2.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 54 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 54 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 54 KiB

View File

@ -0,0 +1,23 @@
{
"images" : [
{
"filename" : "Toki translate light transparent.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "Toki translate light transparent-1.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "Toki translate light transparent-2.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 55 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 55 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 55 KiB

View File

@ -268,19 +268,25 @@ struct CardFlipModifier: AnimatableModifier {
func body(content: Content) -> some View { func body(content: Content) -> some View {
return ZStack { return ZStack {
RoundedRectangle(cornerRadius: 20.0) RoundedRectangle(cornerRadius: 20.0)
.fill(rotationAngle < 90 ? Color.blue : Color.cyan) .fill(rotationAngle < 90 ? Color("CardColor") : Color("CardColorBack"))
.animation(.none, value: rotationAngle) .animation(.none, value: rotationAngle)
.overlay( .overlay(
RoundedRectangle(cornerRadius: 20) RoundedRectangle(cornerRadius: 20)
.stroke(.cyan, lineWidth: 5)) .stroke(Color("CardColorBack"), lineWidth: 5))
.animation(.none, value: rotationAngle) .animation(.none, value: rotationAngle)
Image("CardLogoDark")
.resizable()
.frame(width: 180, height: 180, alignment: .center)
.opacity(0.5)
Text(frontText) Text(frontText)
.font(.title) .font(.title)
.foregroundColor(.white)
.opacity(rotationAngle < 90 ? 1.0 : 0.0) .opacity(rotationAngle < 90 ? 1.0 : 0.0)
.animation(.none, value: rotationAngle) .animation(.none, value: rotationAngle)
Text(backText) Text(backText)
.font(.subheadline) .font(.subheadline)
.padding() .padding()
.foregroundColor(.white)
.opacity(rotationAngle < 90 ? 0.0 : 1.0) .opacity(rotationAngle < 90 ? 0.0 : 1.0)
.animation(.none, value: rotationAngle) .animation(.none, value: rotationAngle)
.scaleEffect(CGSize(width: -1.0, height: 1.0)) .scaleEffect(CGSize(width: -1.0, height: 1.0))