First version
This commit is contained in:
40
ResumeBuilder/Style/CVStyle.swift
Normal file
40
ResumeBuilder/Style/CVStyle.swift
Normal file
@@ -0,0 +1,40 @@
|
||||
import Foundation
|
||||
import SwiftUI
|
||||
|
||||
struct CVStyle {
|
||||
|
||||
struct Section {
|
||||
|
||||
let titleSpacing: CGFloat
|
||||
|
||||
let borderSpacing: CGFloat
|
||||
|
||||
let borderWidth: CGFloat
|
||||
|
||||
let bottomSpacing: CGFloat
|
||||
|
||||
let paragraphSpacing: CGFloat
|
||||
|
||||
init(titleSpacing: CGFloat = 10, borderSpacing: CGFloat = 5, borderWidth: CGFloat = 3, bottomSpacing: CGFloat = 10, paragraphSpacing: CGFloat = 5) {
|
||||
self.titleSpacing = titleSpacing
|
||||
self.borderSpacing = borderSpacing
|
||||
self.borderWidth = borderWidth
|
||||
self.bottomSpacing = bottomSpacing
|
||||
self.paragraphSpacing = paragraphSpacing
|
||||
}
|
||||
}
|
||||
|
||||
let pageWidth: CGFloat
|
||||
|
||||
let header: HeaderStyle
|
||||
|
||||
let columnSpacing: CGFloat
|
||||
|
||||
let section: Section
|
||||
|
||||
let skillStyle: SkillStyle
|
||||
|
||||
var pageHeight: CGFloat {
|
||||
pageWidth * sqrt(2)
|
||||
}
|
||||
}
|
26
ResumeBuilder/Style/HeaderStyle.swift
Normal file
26
ResumeBuilder/Style/HeaderStyle.swift
Normal file
@@ -0,0 +1,26 @@
|
||||
import Foundation
|
||||
|
||||
struct HeaderStyle {
|
||||
|
||||
/// The total height of the header
|
||||
let height: CGFloat
|
||||
|
||||
/// The width of the line beneath the header
|
||||
let lineWidth: CGFloat
|
||||
|
||||
/// The height of the icons
|
||||
let iconHeight: CGFloat
|
||||
|
||||
/// The size of the shadow around the center image
|
||||
let imageShadowSize: CGFloat
|
||||
|
||||
let imageBorderWidth: CGFloat
|
||||
|
||||
init(height: CGFloat = 100, lineWidth: CGFloat = 1, iconHeight: CGFloat = 20, imageShadowSize: CGFloat = 5, imageBorderWidth: CGFloat = 2) {
|
||||
self.height = height
|
||||
self.lineWidth = lineWidth
|
||||
self.iconHeight = iconHeight
|
||||
self.imageShadowSize = imageShadowSize
|
||||
self.imageBorderWidth = imageBorderWidth
|
||||
}
|
||||
}
|
27
ResumeBuilder/Style/SkillStyle.swift
Normal file
27
ResumeBuilder/Style/SkillStyle.swift
Normal file
@@ -0,0 +1,27 @@
|
||||
import Foundation
|
||||
import SwiftUI
|
||||
|
||||
struct SkillStyle {
|
||||
|
||||
let iconSize: CGFloat
|
||||
|
||||
let rowSpacing: CGFloat
|
||||
|
||||
let verticalTagSpacing: CGFloat
|
||||
|
||||
let horizontalGap: CGFloat
|
||||
|
||||
let tagBackground: Color
|
||||
|
||||
let tagRounding: CGFloat
|
||||
|
||||
init(iconSize: CGFloat = 20, rowSpacing: CGFloat = 3, verticalTagSpacing: CGFloat = 3, horizontalGap: CGFloat = 5, tagBackground: Color = .gray, tagRounding: CGFloat = 8) {
|
||||
self.iconSize = iconSize
|
||||
self.rowSpacing = rowSpacing
|
||||
self.verticalTagSpacing = verticalTagSpacing
|
||||
self.horizontalGap = horizontalGap
|
||||
self.tagBackground = tagBackground
|
||||
self.tagRounding = tagRounding
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user