11import Elementary
2+ import Dependencies
3+ import EnvVars
24
35struct HeaderView : HTML {
6+ @Dependency ( \. envVars) var envVars
7+
48 var content : some HTML {
59 header {
610 hgroup {
7- code { " erikb.dev() " }
8- . inlineStyle ( " font-size " , " 0.84em " )
9- . inlineStyle ( " color " , " #AAA " )
11+ a ( . href( " / " ) ) {
12+ code { " erikb.dev() " }
13+ . inlineStyle ( " font-size " , " 0.84em " )
14+ . inlineStyle ( " color " , " #AAA " )
15+ . inlineStyle ( " font-weight " , " bold " )
16+ }
17+ . inlineStyle ( " text-decoration " , " none " )
1018 // TODO: Add buttons to allow switching between code styling or plain text
19+
20+ // CodeStyleSelector()
1121 }
1222 . containerStyling ( )
1323 . inlineStyle ( " display " , " flex " )
24+ . inlineStyle ( " flex " , " none " )
25+ . inlineStyle ( " justify-content " , " space-between " )
26+ . inlineStyle ( " flex-direction " , " row " )
1427 . inlineStyle ( " padding " , " 0.75rem 1.5rem " )
1528 }
1629 . wrappedStyling ( )
1730 }
1831}
32+
33+ private struct CodeStyleSelector : VueComponent {
34+ // @VueState var visible = false
35+
36+ var body : some HTML {
37+ div {
38+ button {
39+ code { " </> " }
40+ . inlineStyle ( " color " , " #AAA " )
41+ }
42+ . inlineStyle ( " font-weight " , " bold " )
43+ . inlineStyle ( " font-size " , " 0.7em " )
44+ . inlineStyle ( " background " , " unset " )
45+ . inlineStyle ( " border " , " 1px solid #444 " )
46+ . inlineStyle ( " border-radius " , " 0.2rem " )
47+ . inlineStyle ( " padding " , " 0.2rem 0.35rem " )
48+
49+ // ul(.v.show("visible")) {
50+ // li { "Plain Text" }
51+ // li { "Swift" }
52+ // li { "Rust" }
53+ // li { "TypeScript" }
54+ // }
55+ }
56+ }
57+ }
0 commit comments