aboutsummaryrefslogtreecommitdiff
path: root/pkg/tpl/layout.templ
blob: d96aa50e5f25f7ba5f5f15cb65fad2c90e531afd (plain) (blame)
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
54
55
56
57
58
59
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">
				<nav>
					<ul>
						<li><a href="/"><strong>ШОргРу</strong></a></li>
					</ul>
					<ul hx-boost="true" hx-indicator=".loader">
						<span aria-busy="true" class="loader htmx-indicator">Загрузка...</span>
						<li><a href="/">Главная</a></li>
						<li><a href="/random">Случайные</a></li>
						<li><a href="/top">Топ</a></li>
						<li><a href="/add">Добавить цитату</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>
		<script src="/js/htmx.min.js"></script>
	</html>
}

type HeaderParams struct {
	Title       string
	URL         string
	Description string
}