Skip to content

Instantly share code, notes, and snippets.

@regularberry
Created July 23, 2024 13:49
Show Gist options
  • Save regularberry/395327374fe7067ef8181875c1721573 to your computer and use it in GitHub Desktop.
Save regularberry/395327374fe7067ef8181875c1721573 to your computer and use it in GitHub Desktop.
import SwiftUI
struct ContentView: View {
let backgroundGray = Color(
red: 0,
green: 0,
blue: 0,
opacity: 0.25
)
let imageColor = Color(
red: 1.0,
green: 1.0,
blue: 1.0,
opacity: 0.25
)
let circlePadding: CGFloat = 40
let imagePadding: CGFloat = 20
let titleLeftPadding: CGFloat = 90
let titleTopPadding: CGFloat = 55
var body: some View {
ZStack {
HStack {
Image(systemName: "doc.append")
.foregroundStyle(imageColor)
.font(.largeTitle)
.padding(.leading, imagePadding)
Text("To think we were able to reveal the truth behind those stories...")
.font(.largeTitle)
.italic()
.foregroundStyle(Color.white)
.containerRelativeFrame(.horizontal, count: 8, span: 6, spacing: 0)
.frame(maxWidth: .infinity, maxHeight: 200)
Image(systemName: "doc.append")
.foregroundStyle(imageColor)
.font(.largeTitle)
.scaleEffect(x: -1)
.padding(.trailing, imagePadding)
}
.background(
Capsule()
.foregroundStyle(backgroundGray)
)
VStack {
HStack {
Text("Penn")
.italic()
.font(.title)
.foregroundStyle(Color.white)
.padding(.leading, titleLeftPadding)
Spacer()
}
.padding(.top, titleTopPadding)
Spacer()
}
}
.padding()
.background(Color.green)
}
}
#Preview {
ContentView()
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment