1
|
|
|
// Code generated by templ - DO NOT EDIT. |
2
|
|
|
|
3
|
|
|
// templ: version: v0.2.663 |
4
|
|
|
package partials |
5
|
|
|
|
6
|
|
|
//lint:file-ignore SA4006 This context is only used if a nested component is present. |
7
|
|
|
|
8
|
|
|
import "github.com/a-h/templ" |
9
|
|
|
import "context" |
10
|
|
|
import "io" |
11
|
|
|
import "bytes" |
12
|
|
|
|
13
|
|
|
func LogoImg() templ.Component { |
14
|
|
|
return templ.ComponentFunc(func(ctx context.Context, templ_7745c5c3_W io.Writer) (templ_7745c5c3_Err error) { |
15
|
|
|
templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templ_7745c5c3_W.(*bytes.Buffer) |
16
|
|
|
if !templ_7745c5c3_IsBuffer { |
17
|
|
|
templ_7745c5c3_Buffer = templ.GetBuffer() |
18
|
|
|
defer templ.ReleaseBuffer(templ_7745c5c3_Buffer) |
19
|
|
|
} |
20
|
|
|
ctx = templ.InitializeContext(ctx) |
21
|
|
|
templ_7745c5c3_Var1 := templ.GetChildren(ctx) |
22
|
|
|
if templ_7745c5c3_Var1 == nil { |
23
|
|
|
templ_7745c5c3_Var1 = templ.NopComponent |
24
|
|
|
} |
25
|
|
|
ctx = templ.ClearChildren(ctx) |
26
|
|
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<picture><source media=\"(min-width: 768px)\" srcset=\"/static/img/memnix_80x80.avif\" type=\"image/avif\"> <source media=\"(min-width: 768px)\" srcset=\"/static/img/memnix_80x80.webp\" type=\"image/webp\"> <source media=\"(max-width: 767px)\" srcset=\"/static/img/memnix_64x64.avif\" type=\"image/avif\"> <source media=\"(max-width: 767px)\" srcset=\"/static/img/memnix_64x64.webp\" type=\"image/webp\"> <img src=\"/static/img/icon.png\" class=\"circle\" alt=\"Memnix app logo\" width=\"80\" height=\"80\"></picture>") |
27
|
|
|
if templ_7745c5c3_Err != nil { |
28
|
|
|
return templ_7745c5c3_Err |
29
|
|
|
} |
30
|
|
|
if !templ_7745c5c3_IsBuffer { |
31
|
|
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteTo(templ_7745c5c3_W) |
32
|
|
|
} |
33
|
|
|
return templ_7745c5c3_Err |
34
|
|
|
}) |
35
|
|
|
} |
36
|
|
|
|
37
|
|
|
func Navbar(username string, fromProtected bool) templ.Component { |
38
|
|
|
return templ.ComponentFunc(func(ctx context.Context, templ_7745c5c3_W io.Writer) (templ_7745c5c3_Err error) { |
39
|
|
|
templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templ_7745c5c3_W.(*bytes.Buffer) |
40
|
|
|
if !templ_7745c5c3_IsBuffer { |
41
|
|
|
templ_7745c5c3_Buffer = templ.GetBuffer() |
42
|
|
|
defer templ.ReleaseBuffer(templ_7745c5c3_Buffer) |
43
|
|
|
} |
44
|
|
|
ctx = templ.InitializeContext(ctx) |
45
|
|
|
templ_7745c5c3_Var2 := templ.GetChildren(ctx) |
46
|
|
|
if templ_7745c5c3_Var2 == nil { |
47
|
|
|
templ_7745c5c3_Var2 = templ.NopComponent |
48
|
|
|
} |
49
|
|
|
ctx = templ.ClearChildren(ctx) |
50
|
|
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<nav><ul><li><strong>") |
51
|
|
|
if templ_7745c5c3_Err != nil { |
52
|
|
|
return templ_7745c5c3_Err |
53
|
|
|
} |
54
|
|
|
templ_7745c5c3_Err = LogoImg().Render(ctx, templ_7745c5c3_Buffer) |
55
|
|
|
if templ_7745c5c3_Err != nil { |
56
|
|
|
return templ_7745c5c3_Err |
57
|
|
|
} |
58
|
|
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</strong></li></ul><ul><li><a href=\"#\">About</a></li><li><a href=\"#\">Services</a></li><li><button class=\"secondary\">Products</button></li></ul></nav>") |
59
|
|
|
if templ_7745c5c3_Err != nil { |
60
|
|
|
return templ_7745c5c3_Err |
61
|
|
|
} |
62
|
|
|
if !templ_7745c5c3_IsBuffer { |
63
|
|
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteTo(templ_7745c5c3_W) |
64
|
|
|
} |
65
|
|
|
return templ_7745c5c3_Err |
66
|
|
|
}) |
67
|
|
|
} |
68
|
|
|
|