From d7c8d854a4b9fd0657e2053b70e23ed58d31b865 Mon Sep 17 00:00:00 2001 From: Wilkin Santana <28665914+wilkinsantana@users.noreply.github.com> Date: Fri, 6 Nov 2026 17:40:46 -0500 Subject: [PATCH 1/2] Serve browser and app icons across all website pages --- docs.templ | 3 +- docs/brand-assets.json | 30 ++++++++ docs_templ.go | 81 +++++++++------------ header.go | 2 +- header_test.go | 52 ++++++++++++++ landing.templ | 3 +- landing_templ.go | 47 +++++-------- main.go | 22 +++++- site_header.templ | 15 +++- site_header_templ.go | 89 +++++++++++++++++++++++- static/brand/android-chrome-192x192.png | Bin 0 -> 15655 bytes static/brand/android-chrome-512x512.png | Bin 0 -> 43943 bytes static/brand/apple-touch-icon.png | Bin 0 -> 14656 bytes static/brand/favicon-32.png | Bin 0 -> 2171 bytes static/brand/favicon.ico | Bin 0 -> 53609 bytes static/header.css | 2 + tests/browser/site.spec.js | 24 +++++++ 17 files changed, 282 insertions(+), 88 deletions(-) create mode 100644 static/brand/android-chrome-192x192.png create mode 100644 static/brand/android-chrome-512x512.png create mode 100644 static/brand/apple-touch-icon.png create mode 100644 static/brand/favicon-32.png create mode 100644 static/brand/favicon.ico diff --git a/docs.templ b/docs.templ index 3ab51a3..b767010 100644 --- a/docs.templ +++ b/docs.templ @@ -21,9 +21,8 @@ templ documentationPage(g guide, navigation, section []components.NavItem, theme - - @headerStylesheet() + @siteHead()
diff --git a/docs/brand-assets.json b/docs/brand-assets.json index f7f5bc8..5a5b91a 100644 --- a/docs/brand-assets.json +++ b/docs/brand-assets.json @@ -42,6 +42,36 @@ "source": "03_web_and_social/github-social-preview-1280x640.png", "bytes": 649151, "processing": "Copied unchanged" + }, + { + "file": "static/brand/favicon.ico", + "source": "02_mascot_icons/favicon.ico", + "bytes": 53609, + "processing": "Copied unchanged" + }, + { + "file": "static/brand/favicon-32.png", + "source": "02_mascot_icons/favicon-32.png", + "bytes": 2171, + "processing": "Copied unchanged" + }, + { + "file": "static/brand/apple-touch-icon.png", + "source": "02_mascot_icons/apple-touch-icon.png", + "bytes": 14656, + "processing": "Copied unchanged" + }, + { + "file": "static/brand/android-chrome-192x192.png", + "source": "02_mascot_icons/android-chrome-192x192.png", + "bytes": 15655, + "processing": "Copied unchanged" + }, + { + "file": "static/brand/android-chrome-512x512.png", + "source": "02_mascot_icons/android-chrome-512x512.png", + "bytes": 43943, + "processing": "Copied unchanged" } ] } diff --git a/docs_templ.go b/docs_templ.go index f23289c..37562de 100644 --- a/docs_templ.go +++ b/docs_templ.go @@ -129,58 +129,45 @@ func documentationPage(g guide, navigation, section []components.NavItem, theme if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 10, "\">") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var10 string - templ_7745c5c3_Var10, templ_7745c5c3_Err = templruntime.NewAttributeExpression(templ.SafeURL(libraryStylesheetURL)).ResolveURL(ctx) - if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `docs.templ`, Line: 25, Col: 77} - } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var10) - if templ_7745c5c3_Err != nil { - return templ_7745c5c3_Err - } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 12, "\">") - if templ_7745c5c3_Err != nil { - return templ_7745c5c3_Err - } - templ_7745c5c3_Err = headerStylesheet().Render(ctx, templ_7745c5c3_Buffer) + templ_7745c5c3_Err = siteHead().Render(ctx, templ_7745c5c3_Buffer) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 13, "") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 13, "\">") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Var12 := templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { + templ_7745c5c3_Var11 := 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 { @@ -192,7 +179,7 @@ func documentationPage(g guide, navigation, section []components.NavItem, theme }() } ctx = templ.InitializeContext(ctx) - templ_7745c5c3_Var13 := templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { + templ_7745c5c3_Var12 := 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 { @@ -204,33 +191,33 @@ func documentationPage(g guide, navigation, section []components.NavItem, theme }() } ctx = templ.InitializeContext(ctx) - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 15, "TENDUI / DOCUMENTATION
TENDUI / DOCUMENTATION
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 15, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var15 string - templ_7745c5c3_Var15, templ_7745c5c3_Err = templ.JoinStringErrs(g.Summary) + var templ_7745c5c3_Var14 string + templ_7745c5c3_Var14, templ_7745c5c3_Err = templ.JoinStringErrs(g.Summary) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `docs.templ`, Line: 37, Col: 51} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `docs.templ`, Line: 36, Col: 51} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var15)) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var14)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 17, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 16, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -238,13 +225,13 @@ func documentationPage(g guide, navigation, section []components.NavItem, theme if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 18, "") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 17, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } return nil }) - templ_7745c5c3_Err = components.Prose(components.ProseProps{Measure: components.MeasureWide}).Render(templ.WithChildren(ctx, templ_7745c5c3_Var13), templ_7745c5c3_Buffer) + templ_7745c5c3_Err = components.Prose(components.ProseProps{Measure: components.MeasureWide}).Render(templ.WithChildren(ctx, templ_7745c5c3_Var12), templ_7745c5c3_Buffer) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -253,11 +240,11 @@ func documentationPage(g guide, navigation, section []components.NavItem, theme templ_7745c5c3_Err = components.AppShell(components.AppShellProps{ Brand: "TendUI", BrandHref: "/", Navigation: navigation, Header: siteHeader(g.Path, section), Footer: documentationSidebarFooter(), - }).Render(templ.WithChildren(ctx, templ_7745c5c3_Var12), templ_7745c5c3_Buffer) + }).Render(templ.WithChildren(ctx, templ_7745c5c3_Var11), templ_7745c5c3_Buffer) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 19, "