diff options
Diffstat (limited to 'pkg/tpl/layout.templ')
-rw-r--r-- | pkg/tpl/layout.templ | 51 |
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 +} |