First version
This commit is contained in:
53
ResumeBuilder/Elements/CareerStationView.swift
Normal file
53
ResumeBuilder/Elements/CareerStationView.swift
Normal file
@@ -0,0 +1,53 @@
|
||||
import SwiftUI
|
||||
import SFSafeSymbols
|
||||
|
||||
struct CareerStationView: View {
|
||||
|
||||
let info: CareerStation
|
||||
|
||||
let borderSpacing: CGFloat
|
||||
|
||||
let borderWidth: CGFloat
|
||||
|
||||
var body: some View {
|
||||
LeftBorderView(color: .accentColor, spacing: borderSpacing, borderWidth: borderWidth) {
|
||||
VStack(alignment: .leading) {
|
||||
HStack {
|
||||
RightImageLabel(info.time, systemSymbol: .calendar)
|
||||
.padding(.leading, -4)
|
||||
Spacer()
|
||||
RightImageLabel(info.location, systemSymbol: .pin)
|
||||
}
|
||||
.font(.caption)
|
||||
.foregroundColor(.secondary)
|
||||
Text(info.title)
|
||||
.font(.headline)
|
||||
.fontWeight(.regular)
|
||||
if let subtitle = info.subtitle {
|
||||
Text(subtitle)
|
||||
.font(.subheadline)
|
||||
.foregroundColor(.accentColor)
|
||||
}
|
||||
if let text = info.text {
|
||||
Text(text)
|
||||
.font(.caption)
|
||||
.foregroundColor(.secondary)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
struct CareerStationView_Previews: PreviewProvider {
|
||||
static var previews: some View {
|
||||
CareerStationView(info: .init(
|
||||
time: "Jul 2020 - Jul 2023",
|
||||
location: "Braunschweig, Germany",
|
||||
title: "German Aerospace Center",
|
||||
subtitle: "Systems engineer",
|
||||
text: "Responsible for aircraft systems and avionics of a high-altitude solar drone, safety, and software."),
|
||||
borderSpacing: 5,
|
||||
borderWidth: 3)
|
||||
.previewLayout(.fixed(width: 300, height: 100))
|
||||
}
|
||||
}
|
33
ResumeBuilder/Elements/PublicationView.swift
Normal file
33
ResumeBuilder/Elements/PublicationView.swift
Normal file
@@ -0,0 +1,33 @@
|
||||
import SwiftUI
|
||||
|
||||
struct PublicationView: View {
|
||||
|
||||
let info: Publication
|
||||
|
||||
let borderSpacing: CGFloat
|
||||
|
||||
let borderWidth: CGFloat
|
||||
|
||||
var body: some View {
|
||||
LeftBorderView(color: .accentColor, spacing: borderSpacing, borderWidth: borderWidth) {
|
||||
VStack(alignment: .leading) {
|
||||
Text(info.venue)
|
||||
.font(.caption)
|
||||
.foregroundColor(.secondary)
|
||||
Text(info.title)
|
||||
.font(.subheadline)
|
||||
.fontWeight(.regular)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
struct PublicationView_Previews: PreviewProvider {
|
||||
static var previews: some View {
|
||||
PublicationView(info: .init(
|
||||
venue: "My venue",
|
||||
title: "The publication title"),
|
||||
borderSpacing: 5,
|
||||
borderWidth: 3)
|
||||
}
|
||||
}
|
32
ResumeBuilder/Elements/TopViewImage.swift
Normal file
32
ResumeBuilder/Elements/TopViewImage.swift
Normal file
@@ -0,0 +1,32 @@
|
||||
import SwiftUI
|
||||
|
||||
struct TopViewImage: View {
|
||||
|
||||
let image: String
|
||||
|
||||
let shadow: CGFloat
|
||||
|
||||
let lineWidth: CGFloat
|
||||
|
||||
var body: some View {
|
||||
Image(image)
|
||||
.resizable()
|
||||
.aspectRatio(1, contentMode: .fit)
|
||||
.clipShape(Circle())
|
||||
.overlay {
|
||||
Circle().stroke(.gray, lineWidth: lineWidth)
|
||||
}
|
||||
.shadow(radius: shadow)
|
||||
.padding(lineWidth)
|
||||
}
|
||||
}
|
||||
|
||||
struct TopViewImage_Previews: PreviewProvider {
|
||||
static var previews: some View {
|
||||
TopViewImage(
|
||||
image: "Cover",
|
||||
shadow: 5,
|
||||
lineWidth: 2)
|
||||
.previewLayout(.fixed(width: 150, height: 150))
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user