summaryrefslogtreecommitdiffhomepage
path: root/templates/navbar_templ.go
blob: c2132e1b0ac02d92ab0e5d27c0d02e9e6ba36784 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
// Code generated by templ - DO NOT EDIT.

// templ: version: v0.2.747
package templates

//lint:file-ignore SA4006 This context is only used if a nested component is present.

import "github.com/a-h/templ"
import templruntime "github.com/a-h/templ/runtime"

import "git.thomasvoss.com/euro-cash.eu/i18n"

func navbar() templ.Component {
	return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
		templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
		templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W)
		if !templ_7745c5c3_IsBuffer {
			defer func() {
				templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer)
				if templ_7745c5c3_Err == nil {
					templ_7745c5c3_Err = templ_7745c5c3_BufErr
				}
			}()
		}
		ctx = templ.InitializeContext(ctx)
		templ_7745c5c3_Var1 := templ.GetChildren(ctx)
		if templ_7745c5c3_Var1 == nil {
			templ_7745c5c3_Var1 = templ.NopComponent
		}
		ctx = templ.ClearChildren(ctx)
		p := ctx.Value("printer").(i18n.Printer)
		_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<nav><menu><li><a href=\"/\">")
		if templ_7745c5c3_Err != nil {
			return templ_7745c5c3_Err
		}
		var templ_7745c5c3_Var2 string
		templ_7745c5c3_Var2, templ_7745c5c3_Err = templ.JoinStringErrs(p.T("Home"))
		if templ_7745c5c3_Err != nil {
			return templ.Error{Err: templ_7745c5c3_Err, FileName: `navbar.templ`, Line: 10, Col: 32}
		}
		_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var2))
		if templ_7745c5c3_Err != nil {
			return templ_7745c5c3_Err
		}
		_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</a></li><li><a href=\"#TODO\">")
		if templ_7745c5c3_Err != nil {
			return templ_7745c5c3_Err
		}
		var templ_7745c5c3_Var3 string
		templ_7745c5c3_Var3, templ_7745c5c3_Err = templ.JoinStringErrs(p.T("News"))
		if templ_7745c5c3_Err != nil {
			return templ.Error{Err: templ_7745c5c3_Err, FileName: `navbar.templ`, Line: 11, Col: 36}
		}
		_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var3))
		if templ_7745c5c3_Err != nil {
			return templ_7745c5c3_Err
		}
		_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</a></li><li><a href=\"#TODO\">")
		if templ_7745c5c3_Err != nil {
			return templ_7745c5c3_Err
		}
		var templ_7745c5c3_Var4 string
		templ_7745c5c3_Var4, templ_7745c5c3_Err = templ.JoinStringErrs(p.T("Coin Collecting"))
		if templ_7745c5c3_Err != nil {
			return templ.Error{Err: templ_7745c5c3_Err, FileName: `navbar.templ`, Line: 12, Col: 47}
		}
		_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var4))
		if templ_7745c5c3_Err != nil {
			return templ_7745c5c3_Err
		}
		_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</a></li><li><a href=\"#TODO\">")
		if templ_7745c5c3_Err != nil {
			return templ_7745c5c3_Err
		}
		var templ_7745c5c3_Var5 string
		templ_7745c5c3_Var5, templ_7745c5c3_Err = templ.JoinStringErrs(p.T("Coins"))
		if templ_7745c5c3_Err != nil {
			return templ.Error{Err: templ_7745c5c3_Err, FileName: `navbar.templ`, Line: 13, Col: 37}
		}
		_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var5))
		if templ_7745c5c3_Err != nil {
			return templ_7745c5c3_Err
		}
		_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</a></li><li><a href=\"#TODO\">")
		if templ_7745c5c3_Err != nil {
			return templ_7745c5c3_Err
		}
		var templ_7745c5c3_Var6 string
		templ_7745c5c3_Var6, templ_7745c5c3_Err = templ.JoinStringErrs(p.T("Banknotes"))
		if templ_7745c5c3_Err != nil {
			return templ.Error{Err: templ_7745c5c3_Err, FileName: `navbar.templ`, Line: 14, Col: 41}
		}
		_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var6))
		if templ_7745c5c3_Err != nil {
			return templ_7745c5c3_Err
		}
		_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</a></li><li><a href=\"#TODO\">")
		if templ_7745c5c3_Err != nil {
			return templ_7745c5c3_Err
		}
		var templ_7745c5c3_Var7 string
		templ_7745c5c3_Var7, templ_7745c5c3_Err = templ.JoinStringErrs(p.T("Jargon"))
		if templ_7745c5c3_Err != nil {
			return templ.Error{Err: templ_7745c5c3_Err, FileName: `navbar.templ`, Line: 15, Col: 38}
		}
		_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var7))
		if templ_7745c5c3_Err != nil {
			return templ_7745c5c3_Err
		}
		_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</a></li></menu> <menu><li><a href=\"https://discord.gg/DCaXfRcy9C\" target=\"_blank\">")
		if templ_7745c5c3_Err != nil {
			return templ_7745c5c3_Err
		}
		var templ_7745c5c3_Var8 string
		templ_7745c5c3_Var8, templ_7745c5c3_Err = templ.JoinStringErrs(p.T("Discord"))
		if templ_7745c5c3_Err != nil {
			return templ.Error{Err: templ_7745c5c3_Err, FileName: `navbar.templ`, Line: 24, Col: 21}
		}
		_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var8))
		if templ_7745c5c3_Err != nil {
			return templ_7745c5c3_Err
		}
		_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</a></li><li><a href=\"/about\">")
		if templ_7745c5c3_Err != nil {
			return templ_7745c5c3_Err
		}
		var templ_7745c5c3_Var9 string
		templ_7745c5c3_Var9, templ_7745c5c3_Err = templ.JoinStringErrs(p.T("About"))
		if templ_7745c5c3_Err != nil {
			return templ.Error{Err: templ_7745c5c3_Err, FileName: `navbar.templ`, Line: 27, Col: 38}
		}
		_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var9))
		if templ_7745c5c3_Err != nil {
			return templ_7745c5c3_Err
		}
		_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</a></li><li id=\"nav-icon-lang\"><a href=\"/language\"><svg version=\"1.1\" width=\"19\" height=\"19\" viewBox=\"0 0 19 19\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"><circle cx=\"9.5\" cy=\"9.5\" r=\"9\" stroke-linejoin=\"round\"></circle> <path d=\"M 9.5   .5\n\t\t\t\t\t\t\t   C 9.5   .5\n\t\t\t\t\t\t\t\t 6.0  3.5\n\t\t\t\t\t\t\t\t 6.0  9.5\n\t\t\t\t\t\t\t   C 6.0 15.5\n\t\t\t\t\t\t\t\t 9.5 18.5\n\t\t\t\t\t\t\t\t 9.5 18.5\" stroke-linejoin=\"round\"></path> <path d=\"M  9.5   .5\n\t\t\t\t\t\t\t   C  9.5   .5\n\t\t\t\t\t\t\t\t 13.0  3.5\n\t\t\t\t\t\t\t\t 13.0  9.5\n\t\t\t\t\t\t\t   C 13.0 15.5\n\t\t\t\t\t\t\t\t  9.5 18.5\n\t\t\t\t\t\t\t\t  9.5 18.5\" stroke-linejoin=\"round\"></path> <path d=\"M   .5  9.5 H 18.5\" stroke-linejoin=\"round\"></path> <path d=\"M 17.0  5.0 H  2.0\" stroke-linejoin=\"round\"></path> <path d=\"M 17.0 14.0 H  2.0\" stroke-linejoin=\"round\"></path></svg> ")
		if templ_7745c5c3_Err != nil {
			return templ_7745c5c3_Err
		}
		var templ_7745c5c3_Var10 string
		templ_7745c5c3_Var10, templ_7745c5c3_Err = templ.JoinStringErrs(p.T("Language"))
		if templ_7745c5c3_Err != nil {
			return templ.Error{Err: templ_7745c5c3_Err, FileName: `navbar.templ`, Line: 66, Col: 22}
		}
		_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var10))
		if templ_7745c5c3_Err != nil {
			return templ_7745c5c3_Err
		}
		_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</a></li><li id=\"nav-icon-theme\">")
		if templ_7745c5c3_Err != nil {
			return templ_7745c5c3_Err
		}
		var templ_7745c5c3_Var11 = []any{noMargin()}
		templ_7745c5c3_Err = templ.RenderCSSItems(ctx, templ_7745c5c3_Buffer, templ_7745c5c3_Var11...)
		if templ_7745c5c3_Err != nil {
			return templ_7745c5c3_Err
		}
		_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<form class=\"")
		if templ_7745c5c3_Err != nil {
			return templ_7745c5c3_Err
		}
		var templ_7745c5c3_Var12 string
		templ_7745c5c3_Var12, templ_7745c5c3_Err = templ.JoinStringErrs(templ.CSSClasses(templ_7745c5c3_Var11).String())
		if templ_7745c5c3_Err != nil {
			return templ.Error{Err: templ_7745c5c3_Err, FileName: `navbar.templ`, Line: 1, Col: 0}
		}
		_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var12))
		if templ_7745c5c3_Err != nil {
			return templ_7745c5c3_Err
		}
		_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("\" action=\"/theme\" method=\"POST\"><button><svg version=\"1.1\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">")
		if templ_7745c5c3_Err != nil {
			return templ_7745c5c3_Err
		}
		if ctx.Value("theme").(string) == "dark" {
			_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<path d=\"M 7.28451 10.3333\n\t\t\t\t\t\t\t\t\t   C 7.10026 10.8546\n\t\t\t\t\t\t\t\t\t\t 7       11.4156\n\t\t\t\t\t\t\t\t\t\t 7       12\n\t\t\t\t\t\t\t\t\t   C 7       14.7614\n\t\t\t\t\t\t\t\t\t\t 9.23858 17\n\t\t\t\t\t\t\t\t\t\t 12      17\n\t\t\t\t\t\t\t\t\t   C 14.7614 17\n\t\t\t\t\t\t\t\t\t\t 17      14.7614\n\t\t\t\t\t\t\t\t\t\t 17      12\n\t\t\t\t\t\t\t\t\t   C 17      9.23858\n\t\t\t\t\t\t\t\t\t\t 14.7614 7\n\t\t\t\t\t\t\t\t\t\t 12      7\n\t\t\t\t\t\t\t\t\t   C 11.4156 7\n\t\t\t\t\t\t\t\t\t\t 10.8546 7.10026\n\t\t\t\t\t\t\t\t\t\t 10.3333 7.28451\" stroke-width=\"1.5\" stroke-linecap=\"round\"></path> <path d=\"M 12 2 V 4\" stroke-width=\"1.5\" stroke-linecap=\"round\"></path> <path d=\"M 12 20 V 22\" stroke-width=\"1.5\" stroke-linecap=\"round\"></path> <path d=\"M 4 12 L 2 12\" stroke-width=\"1.5\" stroke-linecap=\"round\"></path> <path d=\"M 22 12 L 20 12\" stroke-width=\"1.5\" stroke-linecap=\"round\"></path> <path d=\"M 19.7778 4.22266 L 17.5558 6.25424\" stroke-width=\"1.5\" stroke-linecap=\"round\"></path> <path d=\"M 4.22217 4.22266 L 6.44418 6.25424\" stroke-width=\"1.5\" stroke-linecap=\"round\"></path> <path d=\"M 6.44434 17.5557 L 4.22211 19.7779\" stroke-width=\"1.5\" stroke-linecap=\"round\"></path> <path d=\"M 19.7778 19.7773 L 17.5558 17.5551\" stroke-width=\"1.5\" stroke-linecap=\"round\"></path>")
			if templ_7745c5c3_Err != nil {
				return templ_7745c5c3_Err
			}
		} else {
			_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<path d=\"M 21.0672 11.8568\n\t\t\t\t\t\t\t\t\t\t L 20.4253 11.469\n\t\t\t\t\t\t\t\t\t\t L 21.0672 11.8568\n\t\t\t\t\t\t\t\t\t\t Z\n\t\t\t\t\t\t\t\t\t\t M 12.1432 2.93276\n\t\t\t\t\t\t\t\t\t\t L 11.7553 2.29085\n\t\t\t\t\t\t\t\t\t\t V 2.29085\n\t\t\t\t\t\t\t\t\t\t L 12.1432 2.93276\n\t\t\t\t\t\t\t\t\t\t Z\n\t\t\t\t\t\t\t\t\t\t M 7.37554 20.013\n\t\t\t\t\t\t\t\t\t\t C 7.017 19.8056 6.5582 19.9281 6.3508 20.2866\n\t\t\t\t\t\t\t\t\t\t C 6.14339 20.6452 6.26591 21.104 6.62446 21.3114\n\t\t\t\t\t\t\t\t\t\t L 7.37554 20.013\n\t\t\t\t\t\t\t\t\t\t Z\n\t\t\t\t\t\t\t\t\t\t M 2.68862 17.3755\n\t\t\t\t\t\t\t\t\t\t C 2.89602 17.7341 3.35482 17.8566 3.71337 17.6492\n\t\t\t\t\t\t\t\t\t\t C 4.07191 17.4418 4.19443 16.983 3.98703 16.6245\n\t\t\t\t\t\t\t\t\t\t L 2.68862 17.3755\n\t\t\t\t\t\t\t\t\t\t Z\n\t\t\t\t\t\t\t\t\t\t M 21.25 12\n\t\t\t\t\t\t\t\t\t\t C 21.25 17.1086 17.1086 21.25 12 21.25\n\t\t\t\t\t\t\t\t\t\t V 22.75\n\t\t\t\t\t\t\t\t\t\t C 17.9371 22.75 22.75 17.9371 22.75 12\n\t\t\t\t\t\t\t\t\t\t H 21.25\n\t\t\t\t\t\t\t\t\t\t Z\n\t\t\t\t\t\t\t\t\t\t M 2.75 12\n\t\t\t\t\t\t\t\t\t\t C 2.75 6.89137 6.89137 2.75 12 2.75\n\t\t\t\t\t\t\t\t\t\t V 1.25\n\t\t\t\t\t\t\t\t\t\t C 6.06294 1.25 1.25 6.06294 1.25 12\n\t\t\t\t\t\t\t\t\t\t H 2.75\n\t\t\t\t\t\t\t\t\t\t Z\n\t\t\t\t\t\t\t\t\t\t M 15.5 14.25\n\t\t\t\t\t\t\t\t\t\t C 12.3244 14.25 9.75 11.6756 9.75 8.5\n\t\t\t\t\t\t\t\t\t\t H 8.25\n\t\t\t\t\t\t\t\t\t\t C 8.25 12.5041 11.4959 15.75 15.5 15.75\n\t\t\t\t\t\t\t\t\t\t V 14.25\n\t\t\t\t\t\t\t\t\t\t Z\n\t\t\t\t\t\t\t\t\t\t M 20.4253 11.469\n\t\t\t\t\t\t\t\t\t\t C 19.4172 13.1373 17.5882 14.25 15.5 14.25\n\t\t\t\t\t\t\t\t\t\t V 15.75\n\t\t\t\t\t\t\t\t\t\t C 18.1349 15.75 20.4407 14.3439 21.7092 12.2447\n\t\t\t\t\t\t\t\t\t\t L 20.4253 11.469\n\t\t\t\t\t\t\t\t\t\t Z\n\t\t\t\t\t\t\t\t\t\t M 9.75 8.5\n\t\t\t\t\t\t\t\t\t\t C 9.75 6.41182 10.8627 4.5828 12.531 3.57467\n\t\t\t\t\t\t\t\t\t\t L 11.7553 2.29085\n\t\t\t\t\t\t\t\t\t\t C 9.65609 3.5593 8.25 5.86509 8.25 8.5\n\t\t\t\t\t\t\t\t\t\t H 9.75\n\t\t\t\t\t\t\t\t\t\t Z\n\t\t\t\t\t\t\t\t\t\t M 12 2.75\n\t\t\t\t\t\t\t\t\t\t C 11.9115 2.75 11.8077 2.71008 11.7324 2.63168\n\t\t\t\t\t\t\t\t\t\t C 11.6686 2.56527 11.6538 2.50244 11.6503 2.47703\n\t\t\t\t\t\t\t\t\t\t C 11.6461 2.44587 11.6482 2.35557 11.7553 2.29085\n\t\t\t\t\t\t\t\t\t\t L 12.531 3.57467\n\t\t\t\t\t\t\t\t\t\t C 13.0342 3.27065 13.196 2.71398 13.1368 2.27627\n\t\t\t\t\t\t\t\t\t\t C 13.0754 1.82126 12.7166 1.25 12 1.25\n\t\t\t\t\t\t\t\t\t\t V 2.75\n\t\t\t\t\t\t\t\t\t\t Z\n\t\t\t\t\t\t\t\t\t\t M 21.7092 12.2447\n\t\t\t\t\t\t\t\t\t\t C 21.6444 12.3518 21.5541 12.3539 21.523 12.3497\n\t\t\t\t\t\t\t\t\t\t C 21.4976 12.3462 21.4347 12.3314 21.3683 12.2676\n\t\t\t\t\t\t\t\t\t\t C 21.2899 12.1923 21.25 12.0885 21.25 12\n\t\t\t\t\t\t\t\t\t\t H 22.75\n\t\t\t\t\t\t\t\t\t\t C 22.75 11.2834 22.1787 10.9246 21.7237 10.8632\n\t\t\t\t\t\t\t\t\t\t C 21.286 10.804 20.7293 10.9658 20.4253 11.469\n\t\t\t\t\t\t\t\t\t\t L 21.7092 12.2447\n\t\t\t\t\t\t\t\t\t\t Z\n\t\t\t\t\t\t\t\t\t\t M 12 21.25\n\t\t\t\t\t\t\t\t\t\t C 10.3139 21.25 8.73533 20.7996 7.37554 20.013\n\t\t\t\t\t\t\t\t\t\t L 6.62446 21.3114\n\t\t\t\t\t\t\t\t\t\t C 8.2064 22.2265 10.0432 22.75 12 22.75\n\t\t\t\t\t\t\t\t\t\t V 21.25\n\t\t\t\t\t\t\t\t\t\t Z\n\t\t\t\t\t\t\t\t\t\t M 3.98703 16.6245\n\t\t\t\t\t\t\t\t\t\t C 3.20043 15.2647 2.75 13.6861 2.75 12\n\t\t\t\t\t\t\t\t\t\t H 1.25\n\t\t\t\t\t\t\t\t\t\t C 1.25 13.9568 1.77351 15.7936 2.68862 17.3755\n\t\t\t\t\t\t\t\t\t\t L 3.98703 16.6245\n\t\t\t\t\t\t\t\t\t\t Z\n\t\t\t\t\t\t\t\t\t \"></path>")
			if templ_7745c5c3_Err != nil {
				return templ_7745c5c3_Err
			}
		}
		_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</svg></button></form></li></menu></nav>")
		if templ_7745c5c3_Err != nil {
			return templ_7745c5c3_Err
		}
		return templ_7745c5c3_Err
	})
}

func noMargin() templ.CSSClass {
	templ_7745c5c3_CSSBuilder := templruntime.GetBuilder()
	templ_7745c5c3_CSSBuilder.WriteString(`margin:0;`)
	templ_7745c5c3_CSSID := templ.CSSID(`noMargin`, templ_7745c5c3_CSSBuilder.String())
	return templ.ComponentCSSClass{
		ID:    templ_7745c5c3_CSSID,
		Class: templ.SafeCSS(`.` + templ_7745c5c3_CSSID + `{` + templ_7745c5c3_CSSBuilder.String() + `}`),
	}
}