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

@@ -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))