Skip to content

Instantly share code, notes, and snippets.

@shtnkgm
Created June 15, 2021 00:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shtnkgm/a7ed38b94ea8109be6092c986cd11926 to your computer and use it in GitHub Desktop.
Save shtnkgm/a7ed38b94ea8109be6092c986cd11926 to your computer and use it in GitHub Desktop.
BauhausBookDesign.swift
import SwiftUI
struct ContentView: View {
let width: CGFloat = 80
var body: some View {
VStack(spacing: 0) {
Spacer()
HStack {
Color.blue.frame(width: width)
Spacer()
VStack {
Text("bauhaus").font(.system(size: 52, weight: .heavy))
HStack {
Text("bauhaus-srchiv berlin").font(.system(size: 10, weight: .bold))
Text("magdelena droste").font(.system(size: 10, weight: .bold))
}
}
}
.frame(height: 160)
HStack(spacing: 0) {
Color.blue.frame(width: width, height: width)
Color.yellow.frame(height: width)
}
HStack(spacing: 0) {
Color.blue.frame(width: width)
ZStack(alignment: .bottom) {
Color.black.frame(maxWidth: .infinity)
VStack {
Text("1919")
Text("1933")
}
.font(.system(size: 16, weight: .bold))
.foregroundColor(.white)
.padding(.bottom, 20)
}
Color.red.frame(width: width)
}
.frame(height: 200)
HStack(spacing: 0) {
Color.gray.frame(height: width).frame(maxWidth: .infinity)
Color.red.frame(width: width, height: width)
}
VStack {
Text("TASCHEN")
.font(.system(size: 18, weight: .bold))
.kerning(-0.3)
Text("Bibliotheca Universalis")
.font(.system(size: 12, weight: .semibold, design: .serif))
.italic()
}
.padding(8)
Spacer()
}
.padding()
}
}
struct ContentView_Previews: PreviewProvider {
static var previews: some View {
ContentView()
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment