Specify accent color in style
This commit is contained in:
@ -4,6 +4,8 @@ struct TitledCareerSection: View {
|
||||
|
||||
let style: CVStyle.Section
|
||||
|
||||
let accent: Color
|
||||
|
||||
let content: Titled<CareerStation>
|
||||
|
||||
var body: some View {
|
||||
@ -12,7 +14,8 @@ struct TitledCareerSection: View {
|
||||
CareerStationView(
|
||||
info: item,
|
||||
borderSpacing: style.borderSpacing,
|
||||
borderWidth: style.borderWidth)
|
||||
borderWidth: style.borderWidth,
|
||||
accent: accent)
|
||||
.padding(.bottom, style.bottomSpacing)
|
||||
}
|
||||
}
|
||||
@ -23,6 +26,7 @@ struct TitledItemSection_Previews: PreviewProvider {
|
||||
static var previews: some View {
|
||||
TitledCareerSection(
|
||||
style: .init(),
|
||||
accent: .orange,
|
||||
content: .init(
|
||||
title: "Work experience",
|
||||
items: [
|
||||
|
@ -7,6 +7,8 @@ struct TopView: View {
|
||||
|
||||
let style: HeaderStyle
|
||||
|
||||
let accent: Color
|
||||
|
||||
var body: some View {
|
||||
GeometryReader { geo in
|
||||
let sideWidth = max(0, (geo.size.width - geo.size.height) / 2)
|
||||
@ -14,7 +16,7 @@ struct TopView: View {
|
||||
VStack(alignment: .leading, spacing: 0) {
|
||||
Text(info.name)
|
||||
.font(.title)
|
||||
.foregroundColor(.accentColor)
|
||||
.foregroundColor(accent)
|
||||
Spacer(minLength: 0)
|
||||
Text(info.tagLine)
|
||||
.font(.subheadline)
|
||||
@ -22,7 +24,6 @@ struct TopView: View {
|
||||
Spacer(minLength: 0)
|
||||
HStack {
|
||||
RightImageLabel(info.place, systemSymbol: .house)
|
||||
.padding(.leading, -4)
|
||||
RightImageLabel(info.ageText, systemSymbol: .hourglass)
|
||||
Spacer()
|
||||
}.font(.subheadline)
|
||||
@ -71,7 +72,8 @@ struct TopView_Previews: PreviewProvider {
|
||||
email: "jobs@christophhagen.de",
|
||||
phone: "Upon Request",
|
||||
github: "github.com/christophhagen"),
|
||||
style: HeaderStyle())
|
||||
style: HeaderStyle(),
|
||||
accent: .orange)
|
||||
.previewLayout(.fixed(width: 540, height: 120))
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user