@@ -27,33 +27,46 @@ public struct HomePage: Page {
27
27
link ( . rel( . stylesheet) , . href( " https://cdnjs.cloudflare.com/ajax/libs/modern-normalize/3.0.1/modern-normalize.min.css " ) )
28
28
style { HTMLRaw ( " .xml .hljs-meta{color:#6C7986}.hljs-comment,.hljs-quote{color:#6C7986}.hljs-tag,.hljs-attribute,.hljs-keyword,.hljs-selector-tag,.hljs-literal,.hljs-name{color:#FC5FA3}.hljs-variable,.hljs-template-variable{color:#FC5FA3}.hljs-code,.hljs-string,.hljs-meta-string{color:#FC6A5D}.hljs-regexp,.hljs-link{color:#5482FF}.hljs-title,.hljs-symbol,.hljs-bullet,.hljs-number{color:#41A1C0}.hljs-section,.hljs-meta{color:#FC5FA3}.hljs-class .hljs-title,.hljs-type,.hljs-built_in,.hljs-builtin-name,.hljs-params{color:#D0A8FF}.hljs-attr{color:#BF8555}.hljs-subst{color:#FFF}.hljs-formula{font-style:italic}.hljs-selector-id,.hljs-selector-class{color:#9b703f}.hljs-doctag,.hljs-strong{font-weight:bold}.hljs-emphasis{font-style:italic} " ) }
29
29
style ( self . styling)
30
- script ( . src( " https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/highlight.min.js " ) )
31
- script ( . src( " https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/languages/swift.min.js " ) )
32
- script { HTMLRaw ( " hljs.highlightAll(); " ) }
33
- VueScript ( )
34
- }
35
- body ( . v. scope ( " { showCode: true, selection: undefined } " ) ) {
36
- header ( . class( " wrapped " ) ) {
37
- // TODO: Allow changing from swift-syntax based language to plain text, and other languages?
38
- div ( . class( " container " ) , . style( " height: 3rem " ) ) { }
39
- }
40
- main {
41
- UserHero ( )
42
- // ExperienceSection()
43
- PostsSection ( )
44
- }
45
- footer ( . aria. label ( " Credits " ) , . class( " wrapped " ) , . style( " text-align: center; " ) ) {
46
- div ( . id( " end-footer " ) , . class( " container " ) ) {
47
- p { " © \( Self . copyrightDateFormatter. string ( from: Date . now) ) Erik Bautista Santibanez " }
48
- p {
49
- " Made with \u{2764} using "
50
- a ( . target( . blank) , . rel( " noopener noreferrer " ) , . href( " https://swift.org " ) ) { " Swift " }
51
- " + "
52
- a ( . target( . blank) , . rel( " noopener noreferrer " ) , . href( " https://hummingbird.codes " ) ) { " Hummingbird " }
53
- " . "
30
+ script ( . src( " https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/highlight.min.js " ) , . defer)
31
+ script ( . src( " https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/languages/swift.min.js " ) , . defer)
32
+ script ( . type( . module) ) { HTMLRaw ( " hljs.highlightAll(); " ) }
33
+ }
34
+ body {
35
+ div ( . v. scope ( " { showCode: true, selection: undefined } " ) ) {
36
+ // header(.class("wrapped")) {
37
+ // // TODO: Allow changing from swift-syntax based language to plain text, and other languages?
38
+ // div(.class("container spacer")) {}
39
+ // }
40
+ Spacer ( )
41
+ main {
42
+ UserHero ( )
43
+ Spacer ( )
44
+ // ExperienceSection()
45
+ PostsSection ( )
46
+ }
47
+ Spacer ( )
48
+ footer ( . aria. label ( " Credits " ) , . class( " wrapped " ) , . style( " text-align: center; " ) ) {
49
+ div ( . id( " end-footer " ) , . class( " container " ) ) {
50
+ p { " © \( Self . copyrightDateFormatter. string ( from: Date . now) ) Erik Bautista Santibanez " }
51
+ p {
52
+ " Made with \u{2764} using "
53
+ a ( . target( . blank) , . rel( " noopener noreferrer " ) , . href( " https://swift.org " ) ) { " Swift " }
54
+ " + "
55
+ a ( . target( . blank) , . rel( " noopener noreferrer " ) , . href( " https://hummingbird.codes " ) ) { " Hummingbird " }
56
+ " . "
57
+ }
54
58
}
55
59
}
56
60
}
61
+ VueScript ( )
62
+ }
63
+ }
64
+ }
65
+
66
+ private struct Spacer : HTML {
67
+ var content : some HTML {
68
+ div ( . class( " wrapped " ) ) {
69
+ div ( . class( " container spacer " ) ) { }
57
70
}
58
71
}
59
72
}
@@ -410,6 +423,12 @@ extension HomePage {
410
423
AnyProperty ( " padding-right " , " 1.5rem " )
411
424
AnyProperty ( " padding-bottom " , " 1rem " )
412
425
}
426
+
427
+ Class ( " spacer " ) => {
428
+ AnyProperty ( " height " , " 1.25rem " )
429
+ AnyProperty ( " background " , " repeating-linear-gradient(45deg, transparent 0% 35%, #333 35% 50%, transparent 50% 85%, #333 85% 100%) " )
430
+ AnyProperty ( " background-size " , " 5px 5px " )
431
+ }
413
432
}
414
433
415
434
@CSSBuilder func heroStyles( ) -> some Rule {
0 commit comments