annotate src/lib/Shared.luan @ 67:b1982e401900

security
author Franklin Schmidt <fschmidt@gmail.com>
date Sun, 15 Sep 2024 08:09:27 -0600
parents c385a4f75b10
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
1 local Luan = require "luan:Luan.luan"
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
2 local error = Luan.error
1
Franklin Schmidt <fschmidt@gmail.com>
parents: 0
diff changeset
3 local ipairs = Luan.ipairs or error()
0
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
4
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
5
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
6 local Shared = {}
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
7
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
8 function Shared.head()
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
9 %>
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
10 <meta name="viewport" content="width=device-width, initial-scale=1">
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
11 <style>
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
12 @import "/site.css";
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
13 </style>
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
14 <%
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
15 end
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
16
1
Franklin Schmidt <fschmidt@gmail.com>
parents: 0
diff changeset
17 local function header(crumbs)
0
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
18 %>
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
19 <div header>
31
Franklin Schmidt <fschmidt@gmail.com>
parents: 1
diff changeset
20 <span breadcrumbs>
Franklin Schmidt <fschmidt@gmail.com>
parents: 1
diff changeset
21 <a href="/">Reactionary Software</a>
1
Franklin Schmidt <fschmidt@gmail.com>
parents: 0
diff changeset
22 <% for _, crumb in ipairs(crumbs or {}) do %>
31
Franklin Schmidt <fschmidt@gmail.com>
parents: 1
diff changeset
23 / <%=crumb%>
1
Franklin Schmidt <fschmidt@gmail.com>
parents: 0
diff changeset
24 <% end %>
31
Franklin Schmidt <fschmidt@gmail.com>
parents: 1
diff changeset
25 </span>
34
c385a4f75b10 add java fork
Franklin Schmidt <fschmidt@gmail.com>
parents: 31
diff changeset
26 <span>by <a href="https://linkmy.style/fschmidt">fschmidt</a></span>
0
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
27 </div>
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
28 <%
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
29 end
1
Franklin Schmidt <fschmidt@gmail.com>
parents: 0
diff changeset
30 Shared.header = header
Franklin Schmidt <fschmidt@gmail.com>
parents: 0
diff changeset
31
Franklin Schmidt <fschmidt@gmail.com>
parents: 0
diff changeset
32 function Shared.existing_header()
Franklin Schmidt <fschmidt@gmail.com>
parents: 0
diff changeset
33 header{[[<a href="/existing.html">Existing</a>]]}
Franklin Schmidt <fschmidt@gmail.com>
parents: 0
diff changeset
34 end
Franklin Schmidt <fschmidt@gmail.com>
parents: 0
diff changeset
35
Franklin Schmidt <fschmidt@gmail.com>
parents: 0
diff changeset
36 function Shared.needed_header()
Franklin Schmidt <fschmidt@gmail.com>
parents: 0
diff changeset
37 header{[[<a href="/needed.html">Needed</a>]]}
Franklin Schmidt <fschmidt@gmail.com>
parents: 0
diff changeset
38 end
0
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
39
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
40 return Shared