summaryrefslogtreecommitdiff
path: root/build-page
blob: 805c78ca210a7db66a98d945456ec6bba6064765 (plain)
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
#!/bin/sh

filename="${1}"
title=$(< "${filename}" head -n1 | sed 's/<!-- Title: //; s/-->//')

cat << EOF
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
	<meta name="viewport" content="width=1024">
	<link rel='stylesheet' type='text/css' href="/style.css">
	<title>${title}</title>
</head>
<body>
	<table id="bar">
	<tr>
		<td id='header-link'>Suleyman Farajli</td>
		<td id='quote'></td>
	</tr>
	</table>
	<script>
		let quotes = ["Uncensored", "Oh mamma mia!", "Memento Mori!", "Oh là là!", "C'est légal parce que je le veux"];
		let randomQuote = quotes[Math.floor(Math.random() * quotes.length)];
		document.getElementById("quote").innerText = randomQuote;
	</script>

	<hr class="separator">

<div class="menu">
	<a class="menu_item" href="/home/index.html">Home/</a>
	<a class="menu_item" href="/software/software.html">Software/</a>
	<a class="menu_item" href="/wiki/wiki.html">Wiki/</a>
<a class="menu_item right_menu_item" href="https://git.farajli.net">Git</a>
</div>
<div class="text">
	$(sed '1 s/<!--.*-->//' "${filename}" | smu)
</div>
<p id="copyleft"><br>copyleft (c) 2024 Suleyman Farajli</p>

</body>
</html>
EOF