aboutsummaryrefslogtreecommitdiff
path: root/pkg/tpl/layout.templ
diff options
context:
space:
mode:
authorAlexander Neonxp Kiryukhin <i@neonxp.ru>2024-10-06 17:04:37 +0300
committerAlexander Neonxp Kiryukhin <i@neonxp.ru>2024-10-06 17:04:37 +0300
commit6160b4fdc5f37e4ceaa6b3c5acc855f466049d61 (patch)
treeb6e41f9cad22515a61cc50b0a82d98ee55e0c3e3 /pkg/tpl/layout.templ
parent81b13617c4d0ca68afb181d1105386f0c339864d (diff)
Первая версия
Diffstat (limited to 'pkg/tpl/layout.templ')
-rw-r--r--pkg/tpl/layout.templ51
1 files changed, 51 insertions, 0 deletions
diff --git a/pkg/tpl/layout.templ b/pkg/tpl/layout.templ
new file mode 100644
index 0000000..fc9314e
--- /dev/null
+++ b/pkg/tpl/layout.templ
@@ -0,0 +1,51 @@
+package tpl
+
+templ Layout(params HeaderParams) {
+ <!DOCTYPE html>
+ <html lang="en">
+ <head>
+ <meta charset="utf-8"/>
+ <meta name="viewport" content="width=device-width, initial-scale=1"/>
+ <meta name="color-scheme" content="light dark"/>
+ <link rel="stylesheet" href="/css/pico.css"/>
+ <link rel="stylesheet" href="/css/style.css"/>
+ <link rel="stylesheet" href="/css/fork-awesome.min.css"/>
+ <meta property="og:title" content={ params.Title }/>
+ <meta property="og:url" content={ params.URL }/>
+ <meta property="og:description" content={ params.Description }/>
+ <title>ШОргРу</title>
+ </head>
+ <body>
+ <main class="container">
+ <nav>
+ <ul>
+ <li><a href="/"><strong>ШОргРу</strong></a></li>
+ </ul>
+ <ul>
+ <li><a href="/add">Добавить цитату</a></li>
+ <li><a href="/random">Случайные</a></li>
+ </ul>
+ </nav>
+ { children... }
+ </main>
+ </body>
+ <footer>
+ <main class="container">
+ <nav>
+ <ul>
+ <li>Сделал <a href="https://neonxp.ru/">NeonXP</a> в 2024 году.</li>
+ </ul>
+ <ul>
+ <a href="https://gitrepo.ru/NeonXP/ShOrgRu">Исходный код</a>
+ </ul>
+ </nav>
+ </main>
+ </footer>
+ </html>
+}
+
+type HeaderParams struct {
+ Title string
+ URL string
+ Description string
+}