aboutsummaryrefslogblamecommitdiff
path: root/pkg/tpl/layout.templ
blob: 40c1b04b129319ce5c9cefa4bf0b98ad121ab461 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12











                                                                                             


                                                                                                              


                                                                                        
                                                                                      



                                                   


                                                                                                     
                                                                                                                               





                                                                                   














                                                                                                                               
                                                       







                          
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"/>
			<link rel="alternate" type="application/rss+xml" title="RSS feed" href="/feed/rss">
			<link rel="alternate" type="application/atom+xml" title="ATOM feed" href="/feed/atom">
			<link rel="alternate" type="application/json" title="json feed" href="/feed/json">
			<meta property="og:title" content={ params.Title }/>
			<meta property="og:url" content={ params.URL }/>
			<meta property="og:description" content={ params.Description }/>
			<meta name="yandex-verification" content="ee0e23da00ce9fe4" />
			<title>ШОргРу</title>
		</head>
		<body>
			<main class="container">
				<div class="header">
					<a href="/"><strong>ШОргРу</strong></a>
					<div class="top-menu" hx-boost="true" hx-indicator=".loader">
						<span aria-busy="true" class="loader htmx-indicator">Загрузка...</span>
						<a href="/">Главная</a>
						<a href="/random">Рандом</a>
						<a href="/top">Топ</a>
						<a href="/add">Добавить</a>
					</div>
				</div>
				{ 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>
		<script src="/js/htmx.min.js"></script>
	</html>
}

type HeaderParams struct {
	Title       string
	URL         string
	Description string
}