diff --git a/Toki Trainer/Assets.xcassets/CardColor.colorset/Contents.json b/Toki Trainer/Assets.xcassets/CardColor.colorset/Contents.json new file mode 100644 index 0000000..33cebc0 --- /dev/null +++ b/Toki Trainer/Assets.xcassets/CardColor.colorset/Contents.json @@ -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 + } +} diff --git a/Toki Trainer/Assets.xcassets/CardColorBack.colorset/Contents.json b/Toki Trainer/Assets.xcassets/CardColorBack.colorset/Contents.json new file mode 100644 index 0000000..b55cdf2 --- /dev/null +++ b/Toki Trainer/Assets.xcassets/CardColorBack.colorset/Contents.json @@ -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 + } +} diff --git a/Toki Trainer/Assets.xcassets/CardLogoDark.imageset/Contents.json b/Toki Trainer/Assets.xcassets/CardLogoDark.imageset/Contents.json new file mode 100644 index 0000000..67601f9 --- /dev/null +++ b/Toki Trainer/Assets.xcassets/CardLogoDark.imageset/Contents.json @@ -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 + } +} diff --git a/Toki Trainer/Assets.xcassets/CardLogoDark.imageset/Toki translate dark transparent-1.png b/Toki Trainer/Assets.xcassets/CardLogoDark.imageset/Toki translate dark transparent-1.png new file mode 100644 index 0000000..556076b Binary files /dev/null and b/Toki Trainer/Assets.xcassets/CardLogoDark.imageset/Toki translate dark transparent-1.png differ diff --git a/Toki Trainer/Assets.xcassets/CardLogoDark.imageset/Toki translate dark transparent-2.png b/Toki Trainer/Assets.xcassets/CardLogoDark.imageset/Toki translate dark transparent-2.png new file mode 100644 index 0000000..556076b Binary files /dev/null and b/Toki Trainer/Assets.xcassets/CardLogoDark.imageset/Toki translate dark transparent-2.png differ diff --git a/Toki Trainer/Assets.xcassets/CardLogoDark.imageset/Toki translate dark transparent.png b/Toki Trainer/Assets.xcassets/CardLogoDark.imageset/Toki translate dark transparent.png new file mode 100644 index 0000000..556076b Binary files /dev/null and b/Toki Trainer/Assets.xcassets/CardLogoDark.imageset/Toki translate dark transparent.png differ diff --git a/Toki Trainer/Assets.xcassets/CardLogoLight.imageset/Contents.json b/Toki Trainer/Assets.xcassets/CardLogoLight.imageset/Contents.json new file mode 100644 index 0000000..fec63a5 --- /dev/null +++ b/Toki Trainer/Assets.xcassets/CardLogoLight.imageset/Contents.json @@ -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 + } +} diff --git a/Toki Trainer/Assets.xcassets/CardLogoLight.imageset/Toki translate light transparent-1.png b/Toki Trainer/Assets.xcassets/CardLogoLight.imageset/Toki translate light transparent-1.png new file mode 100644 index 0000000..eed2153 Binary files /dev/null and b/Toki Trainer/Assets.xcassets/CardLogoLight.imageset/Toki translate light transparent-1.png differ diff --git a/Toki Trainer/Assets.xcassets/CardLogoLight.imageset/Toki translate light transparent-2.png b/Toki Trainer/Assets.xcassets/CardLogoLight.imageset/Toki translate light transparent-2.png new file mode 100644 index 0000000..eed2153 Binary files /dev/null and b/Toki Trainer/Assets.xcassets/CardLogoLight.imageset/Toki translate light transparent-2.png differ diff --git a/Toki Trainer/Assets.xcassets/CardLogoLight.imageset/Toki translate light transparent.png b/Toki Trainer/Assets.xcassets/CardLogoLight.imageset/Toki translate light transparent.png new file mode 100644 index 0000000..eed2153 Binary files /dev/null and b/Toki Trainer/Assets.xcassets/CardLogoLight.imageset/Toki translate light transparent.png differ diff --git a/Toki Trainer/Views/FlashCardView.swift b/Toki Trainer/Views/FlashCardView.swift index 96f39f1..87b7976 100644 --- a/Toki Trainer/Views/FlashCardView.swift +++ b/Toki Trainer/Views/FlashCardView.swift @@ -268,19 +268,25 @@ struct CardFlipModifier: AnimatableModifier { func body(content: Content) -> some View { return ZStack { RoundedRectangle(cornerRadius: 20.0) - .fill(rotationAngle < 90 ? Color.blue : Color.cyan) + .fill(rotationAngle < 90 ? Color("CardColor") : Color("CardColorBack")) .animation(.none, value: rotationAngle) .overlay( RoundedRectangle(cornerRadius: 20) - .stroke(.cyan, lineWidth: 5)) + .stroke(Color("CardColorBack"), lineWidth: 5)) .animation(.none, value: rotationAngle) + Image("CardLogoDark") + .resizable() + .frame(width: 180, height: 180, alignment: .center) + .opacity(0.5) Text(frontText) .font(.title) + .foregroundColor(.white) .opacity(rotationAngle < 90 ? 1.0 : 0.0) .animation(.none, value: rotationAngle) Text(backText) .font(.subheadline) .padding() + .foregroundColor(.white) .opacity(rotationAngle < 90 ? 0.0 : 1.0) .animation(.none, value: rotationAngle) .scaleEffect(CGSize(width: -1.0, height: 1.0))