Repository navigation
Expand file tree
/
Copy pathdocs.templ
More file actions
53 lines (50 loc) · 2.35 KB
/
Copy pathdocs.templ
File metadata and controls
53 lines (50 loc) · 2.35 KB
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
package main
import "github.com/Tend-Stack/TendUI/v2026/components"
templ documentationPage(g guide, navigation, section []components.NavItem, theme string, body templ.Component) {
<!DOCTYPE html>
<html
lang="en"
if theme != "" {
data-theme={ theme }
}
>
<head>
<meta charset="utf-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<meta name="color-scheme" content="dark light"/>
<title>{ g.Title } · TendUI</title>
<meta name="description" content={ g.Summary }/>
<meta property="og:title" content={ g.Title + " · TendUI" }/>
<meta property="og:description" content={ g.Summary }/>
<meta property="og:image" content={ "https://tendui.com" + brandURL("og-image.png") }/>
<meta name="twitter:card" content="summary_large_image"/>
<link rel="canonical" href={ templ.SafeURL("https://tendui.com" + g.Path) }/>
<link rel="stylesheet" href={ templ.SafeURL(libraryStylesheetURL) }/>
@siteHead()
<link rel="stylesheet" href={ templ.SafeURL(docsStylesheetURL) }/>
</head>
<body>
@components.AppShell(components.AppShellProps{
Brand: "TendUI", BrandHref: "/", Navigation: navigation,
Header: siteHeader(g.Path, section), Footer: documentationSidebarFooter(),
}) {
@components.Prose(components.ProseProps{Measure: components.MeasureWide}) {
<p class="eyebrow">TENDUI / DOCUMENTATION</p>
<h1>{ g.Title }</h1>
<p class="doc-lead">{ g.Summary }</p>
@body
<footer class="doc-next" data-prose="off">
<a href="/catalog">Explore the components →</a>
<a href="/playground">Try the playground →</a>
</footer>
}
}
</body>
</html>
}
templ documentationSidebarFooter() {
<img class="docs-mascot" src={ templ.SafeURL(brandURL("mascot-guide.svg")) } alt="" width="88" height="88" loading="lazy"/>
<p>Go-native. HTML-first.<br/>Yours to compose.</p>
<small>Built with TendUI · development</small>
<p><a href="https://github.com/Tend-Stack/TendUI">TendUI source ↗</a></p>
}