An experimental IndieWeb site built in Go.
1// Code generated by templ - DO NOT EDIT.
2
3// templ: version: v0.2.747
4package components
5
6//lint:file-ignore SA4006 This context is only used if a nested component is present.
7
8import "github.com/a-h/templ"
9import templruntime "github.com/a-h/templ/runtime"
10
11import "github.com/puregarlic/space/storage"
12
13func Head(title string) templ.Component {
14 return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
15 templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
16 templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W)
17 if !templ_7745c5c3_IsBuffer {
18 defer func() {
19 templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer)
20 if templ_7745c5c3_Err == nil {
21 templ_7745c5c3_Err = templ_7745c5c3_BufErr
22 }
23 }()
24 }
25 ctx = templ.InitializeContext(ctx)
26 templ_7745c5c3_Var1 := templ.GetChildren(ctx)
27 if templ_7745c5c3_Var1 == nil {
28 templ_7745c5c3_Var1 = templ.NopComponent
29 }
30 ctx = templ.ClearChildren(ctx)
31 _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<head>")
32 if templ_7745c5c3_Err != nil {
33 return templ_7745c5c3_Err
34 }
35 if len(title) > 0 {
36 _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<title>")
37 if templ_7745c5c3_Err != nil {
38 return templ_7745c5c3_Err
39 }
40 var templ_7745c5c3_Var2 string
41 templ_7745c5c3_Var2, templ_7745c5c3_Err = templ.JoinStringErrs(title)
42 if templ_7745c5c3_Err != nil {
43 return templ.Error{Err: templ_7745c5c3_Err, FileName: `html/components/head.templ`, Line: 8, Col: 17}
44 }
45 _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var2))
46 if templ_7745c5c3_Err != nil {
47 return templ_7745c5c3_Err
48 }
49 _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(" | puregarlic dot space</title>")
50 if templ_7745c5c3_Err != nil {
51 return templ_7745c5c3_Err
52 }
53 } else {
54 _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<title>puregarlic dot space</title>")
55 if templ_7745c5c3_Err != nil {
56 return templ_7745c5c3_Err
57 }
58 }
59 _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<meta name=\"viewport\" content=\"width=device-width, initial-scale=1\"><link rel=\"preconnect\" href=\"https://fonts.googleapis.com\"><link rel=\"preconnect\" href=\"https://fonts.gstatic.com\" crossorigin><link href=\"https://fonts.googleapis.com/css2?family=Recursive:slnt,wght,CASL,CRSV,MONO@-15..0,300..1000,0..1,0..1,0..1&display=swap\" rel=\"stylesheet\">")
60 if templ_7745c5c3_Err != nil {
61 return templ_7745c5c3_Err
62 }
63 for _, rel := range storage.GetRels() {
64 _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<link rel=\"")
65 if templ_7745c5c3_Err != nil {
66 return templ_7745c5c3_Err
67 }
68 var templ_7745c5c3_Var3 string
69 templ_7745c5c3_Var3, templ_7745c5c3_Err = templ.JoinStringErrs(rel.Name)
70 if templ_7745c5c3_Err != nil {
71 return templ.Error{Err: templ_7745c5c3_Err, FileName: `html/components/head.templ`, Line: 17, Col: 23}
72 }
73 _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var3))
74 if templ_7745c5c3_Err != nil {
75 return templ_7745c5c3_Err
76 }
77 _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("\" href=\"")
78 if templ_7745c5c3_Err != nil {
79 return templ_7745c5c3_Err
80 }
81 var templ_7745c5c3_Var4 string
82 templ_7745c5c3_Var4, templ_7745c5c3_Err = templ.JoinStringErrs(rel.HREF)
83 if templ_7745c5c3_Err != nil {
84 return templ.Error{Err: templ_7745c5c3_Err, FileName: `html/components/head.templ`, Line: 17, Col: 41}
85 }
86 _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var4))
87 if templ_7745c5c3_Err != nil {
88 return templ_7745c5c3_Err
89 }
90 _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("\">")
91 if templ_7745c5c3_Err != nil {
92 return templ_7745c5c3_Err
93 }
94 }
95 _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<link rel=\"stylesheet\" href=\"/static/styles.css\"></head>")
96 if templ_7745c5c3_Err != nil {
97 return templ_7745c5c3_Err
98 }
99 return templ_7745c5c3_Err
100 })
101}