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

filename="${1}"
title=$(cat "${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!"];
		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" href="https://git.farajli.net">Git</a>
</div>
	$(sed '1 s/<!--.*-->//' "${filename}" | smu)
<p id="copyleft"><br>copyleft (c) 2024 Suleyman Farajli</p>

</body>
</html>
EOF