@@ -9,9 +9,9 @@ import Vue
99public struct HomePage : Page , Sendable {
1010 public let title = " Portfolio | Erik Bautista Santibanez "
1111
12- @Vue . Reactive let codeLang : CodeLang ?
12+ @Vue . Reactive let codeLang : CodeLang
1313
14- public init ( codeLang: CodeLang ? = . swift ) {
14+ public init ( codeLang: CodeLang ) {
1515 self . codeLang = codeLang
1616 }
1717
@@ -34,7 +34,7 @@ public struct HomePage: Page, Sendable {
3434private struct UserView : HTML {
3535 @Dependency ( \. activityClient) private var activityClient
3636
37- let selected : Vue . Expression < CodeLang ? >
37+ let selected : Vue . Expression < CodeLang >
3838
3939 var location : ActivityClient . Location ? {
4040 self . activityClient. location ( )
@@ -118,7 +118,7 @@ private struct UserView: HTML {
118118 > println!( " {} " , user.about());
119119 // \( Self . aboutDescription)
120120 """
121- case . none :
121+ case . markdown :
122122 h1 ( . aria. label ( " name " ) ) {
123123 span { " # " }
124124 . inlineStyle ( " color " , " #808080 " )
@@ -229,15 +229,15 @@ private struct UserView: HTML {
229229 struct ConditionalCodeLabel : HTML {
230230 let label : String
231231 let value : String
232- let selected : Vue . Expression < CodeLang ? >
232+ let selected : Vue . Expression < CodeLang >
233233
234234 var body : some HTML {
235235 CodeLang . conditionalCases ( initial: selected) { lang in
236236 code {
237- if let lang {
238- " user. \( label) () \( lang. hasSemiColon ? " ; " : " " ) "
239- } else {
237+ if lang == . markdown {
240238 " [ \( label) ]( \( value) ) "
239+ } else {
240+ " user. \( label) () \( lang. hasSemiColon ? " ; " : " " ) "
241241 }
242242 }
243243 }
@@ -246,7 +246,7 @@ private struct UserView: HTML {
246246}
247247
248248private struct PostsView : HTML {
249- let selected : Vue . Expression < CodeLang ? >
249+ let selected : Vue . Expression < CodeLang >
250250
251251 static let description = " A curated list of projects I've worked on. "
252252
@@ -268,7 +268,7 @@ private struct PostsView: HTML {
268268 // \( Self . description)
269269 let logs = fetch(Filter::All).await;
270270 """
271- case . none :
271+ case . markdown :
272272 h1 {
273273 span { " # " }
274274 . inlineStyle ( " color " , " #808080 " )
@@ -293,7 +293,7 @@ private struct PostsView: HTML {
293293 struct PostView : HTML {
294294 let number : Int
295295 let post : Post
296- let selected : Vue . Expression < CodeLang ? >
296+ let selected : Vue . Expression < CodeLang >
297297
298298 var body : some HTML {
299299 article ( . id( self . post. slug) ) {
@@ -308,10 +308,10 @@ private struct PostsView: HTML {
308308 pre {
309309 a ( . href( " # \( self . post. slug) " ) ) {
310310 CodeLang . conditionalCases ( initial: selected) { lang in
311- code ( . class( " hljs \( " language- \( lang? . rawValue ?? " markdown " ) " ) " ) ) {
311+ code ( . class( " hljs \( " language- \( lang. rawValue) " ) " ) ) {
312312 switch lang {
313- case . none : " log- \( self . number) .md "
314- case . some : " logs[ \( self . number) ] "
313+ case . markdown : " log- \( self . number) .md "
314+ default : " logs[ \( self . number) ] "
315315 }
316316 }
317317 }
0 commit comments