@@ -55,6 +55,10 @@ private struct UserView: HTML {
55
55
. joined ( separator: " , " )
56
56
}
57
57
58
+ static let aboutDescription = """
59
+ I'm a passionate software developer who builds applications using Swift and modern web technologies.
60
+ """
61
+
58
62
@HTMLBuilder
59
63
var body : some HTML {
60
64
SectionView ( id: " user " , selected: selected) { lang in
@@ -65,7 +69,10 @@ private struct UserView: HTML {
65
69
name: " Erik Bautista Santibanez " ,
66
70
role: " Mobile & Web Developer " ,
67
71
home: " \( residency ?? . default) " \
68
- \( currentLocation. flatMap { " , \n location: \" Currently in \( $0) \" " } ?? " " )
72
+ \( currentLocation. flatMap { " , \n location: \" Currently in \( $0) \" " } ?? " " ) ,
73
+ about: \" \" \"
74
+ \( Self . aboutDescription)
75
+ \" \" \"
69
76
)
70
77
"""
71
78
case . typescript:
@@ -74,7 +81,8 @@ private struct UserView: HTML {
74
81
name: " Erik Bautista Santibanez " ,
75
82
role: " Mobile & Web Developer " ,
76
83
home: " \( residency ?? . default) " \
77
- \( currentLocation. flatMap { " , \n location: \" Currently in \( $0) \" " } ?? " " )
84
+ \( currentLocation. flatMap { " , \n location: \" Currently in \( $0) \" " } ?? " " ) ,
85
+ about: ` \( Self . aboutDescription) `
78
86
};
79
87
"""
80
88
case . rust:
@@ -83,7 +91,8 @@ private struct UserView: HTML {
83
91
name: " Erik Bautista Santibanez " ,
84
92
role: " Mobile & Web Developer " ,
85
93
home: " \( residency ?? . default) " \
86
- \( currentLocation. flatMap { " , \n location: \" Currently in \( $0) \" " } ?? " " )
94
+ \( currentLocation. flatMap { " , \n location: \" Currently in \( $0) \" " } ?? " " ) ,
95
+ about: " \( Self . aboutDescription) "
87
96
};
88
97
"""
89
98
case . none:
@@ -134,39 +143,77 @@ private struct UserView: HTML {
134
143
. inlineStyle ( " font-weight " , " 700 " )
135
144
}
136
145
}
146
+
147
+ p ( . aria. label ( " about me " ) ) {
148
+ Self . aboutDescription
149
+ }
150
+ . inlineStyle ( " margin-top " , " 0.75rem " )
137
151
}
138
152
. inlineStyle ( " color " , " #d8d8d8 " )
139
153
}
140
154
} content: {
141
- // div {
142
- // p {
143
- // """
144
- // I'm a passionate software developer who builds applications using Swift and modern web technologies.
145
- // """
146
- // }
147
- // div {
148
- // button {
149
- // "Resume"
150
- // }
151
-
152
- // button {
153
- // "GitHub"
154
- // }
155
-
156
- // button {
157
- // "LinkedIn"
158
- // }
159
-
160
- // button {
161
- // "Contact"
162
- // }
163
- // }
164
- // .inlineStyle("display", "flex")
165
- // .inlineStyle("flex-direction", "row")
166
- // .inlineStyle("gap", "1.125rem")
167
- // }
168
- // .inlineStyle("padding", "0 1.5rem 1.5rem")
169
- EmptyHTML ( )
155
+ div {
156
+ div {
157
+ a ( . href( " mailto:me@erikb.dev " ) ) {
158
+ ConditionalCodeLabel (
159
+ label: " email " ,
160
+ value: " me@erikb.dev " ,
161
+ selected: selected
162
+ )
163
+ }
164
+ . primaryButtonStyle ( )
165
+
166
+ a (
167
+ . href( " https://github.com/erikbdev " ) ,
168
+ . target( . blank) ,
169
+ . rel( " noopener noreferrer " )
170
+ ) {
171
+ ConditionalCodeLabel (
172
+ label: " github " ,
173
+ value: " @erikbdev " ,
174
+ selected: selected
175
+ )
176
+ }
177
+ . secondaryButtonStyle ( )
178
+
179
+ a (
180
+ . href( " https://www.linkedin.com/in/erikbautista " ) ,
181
+ . target( . blank) ,
182
+ . rel( " noopener noreferrer " )
183
+ ) {
184
+ ConditionalCodeLabel (
185
+ label: " linkedin " ,
186
+ value: " @erikbautista " ,
187
+ selected: selected
188
+ )
189
+ }
190
+ . secondaryButtonStyle ( )
191
+ }
192
+ . inlineStyle ( " display " , " flex " )
193
+ . inlineStyle ( " flex-direction " , " row " )
194
+ . inlineStyle ( " flex-wrap " , " wrap " )
195
+ . inlineStyle ( " gap " , " 0.625rem " )
196
+ }
197
+ . inlineStyle ( " margin-top " , " -1rem " )
198
+ . inlineStyle ( " padding " , " 0 1.5rem 1.5rem " )
199
+ }
200
+ }
201
+
202
+ struct ConditionalCodeLabel : HTML {
203
+ let label : String
204
+ let value : String
205
+ let selected : Vue . Expression < CodeLang ? >
206
+
207
+ var body : some HTML {
208
+ CodeLang . conditionalCases ( initial: selected) { lang in
209
+ code {
210
+ if let lang {
211
+ " user. \( label) () \( lang. hasSemiColon ? " ; " : " " ) "
212
+ } else {
213
+ " [ \( label) ]( \( value) ) "
214
+ }
215
+ }
216
+ }
170
217
}
171
218
}
172
219
}
@@ -227,7 +274,7 @@ private struct PostsView: HTML {
227
274
// .v.show("!selection || selection == '\(self.post.kind.rawValue)'")
228
275
) {
229
276
header {
230
- section {
277
+ hgroup {
231
278
span { self . post. datePosted. uppercased ( ) }
232
279
. inlineStyle ( " flex-grow " , " 1 " )
233
280
. inlineStyle ( " color " , " #9A9A9A " )
@@ -287,7 +334,7 @@ private struct PostsView: HTML {
287
334
}
288
335
}
289
336
. inlineStyle ( " color " , " #7A7A7A " )
290
- . inlineStyle ( " font-size " , " 0.7em " )
337
+ . inlineStyle ( " font-size " , " 0.73em " )
291
338
. inlineStyle ( " margin-top " , " 0.75rem " )
292
339
}
293
340
}
@@ -374,18 +421,7 @@ private struct PostsView: HTML {
374
421
. svgIconStyling ( )
375
422
}
376
423
}
377
- . inlineStyle ( " all " , " unset " )
378
- . inlineStyle ( " font-size " , " 0.85em " )
379
- . inlineStyle ( " font-weight " , " 550 " )
380
- . inlineStyle ( " align-content " , " center " )
381
- . inlineStyle ( " min-height " , " 1.5rem " )
382
- . inlineStyle ( " min-width " , " 2rem " )
383
- . inlineStyle ( " padding " , " 0.375rem 0.75rem " )
384
- . inlineStyle ( " cursor " , " pointer " )
385
- . inlineStyle ( " border-radius " , " 0.5rem " )
386
- . inlineStyle ( " color " , self . link. role == . primary ? " white " : " black " )
387
- . inlineStyle ( " background " , self . link. role == . primary ? " linear-gradient(to bottom, hsla(0, 0%, 24%, 1), hsla(0, 0%, 16%, 1)) " : " linear-gradient(to bottom, hsl(0deg 0% 100%), hsl(0deg 0% 92.91%)) " )
388
- . inlineStyle ( " box-shadow " , self . link. role == . primary ? " inset 0 1px 1px rgba(255, 255, 255, 0.12) " : " inset 0px -1px 2px 0px hsl(0 0% 50% / 0.5) " )
424
+ . buttonStyle ( isPrimary: self . link. role == . primary)
389
425
}
390
426
}
391
427
}
@@ -408,4 +444,28 @@ private extension HTML {
408
444
. inlineStyle ( " overflow-x " , " auto " , post: " pre " )
409
445
. inlineStyle ( " font-size " , " 0.85em " , post: " pre " )
410
446
}
447
+
448
+ func primaryButtonStyle( ) -> HTMLInlineStyle < Self > {
449
+ self . inlineStyle ( " all " , " unset " )
450
+ . inlineStyle ( " padding " , " 0.5rem 0.625rem " )
451
+ . inlineStyle ( " border " , " #444 1px solid " )
452
+ . inlineStyle ( " font-size " , " 0.8em " )
453
+ . inlineStyle ( " font-weight " , " 500 " )
454
+ . inlineStyle ( " align-items " , " center " )
455
+ . inlineStyle ( " cursor " , " pointer " )
456
+ }
457
+
458
+ func secondaryButtonStyle( ) -> HTMLInlineStyle < Self > {
459
+ self . primaryButtonStyle ( )
460
+ . inlineStyle ( " background-color " , " #f0f0f0 " )
461
+ . inlineStyle ( " color " , " #0f0f0f " )
462
+ }
463
+
464
+ func buttonStyle( isPrimary: Bool = true ) -> HTMLInlineStyle < Self > {
465
+ if isPrimary {
466
+ self . primaryButtonStyle ( )
467
+ } else {
468
+ self . secondaryButtonStyle ( )
469
+ }
470
+ }
411
471
}
0 commit comments