Retheme of cards
This commit is contained in:
@@ -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))
|
||||
|
Reference in New Issue
Block a user