annotate website/src/lib/Shared.luan @ 1651:5b8f056527a3

docs work
author Franklin Schmidt <fschmidt@gmail.com>
date Thu, 31 Mar 2022 16:13:32 -0600
parents
children d5779a264a4a
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1651
5b8f056527a3 docs work
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
1 local Luan = require "luan:Luan.luan"
5b8f056527a3 docs work
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
2 local error = Luan.error
5b8f056527a3 docs work
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
3 local ipairs = Luan.ipairs or error()
5b8f056527a3 docs work
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
4
5b8f056527a3 docs work
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
5
5b8f056527a3 docs work
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
6 local Shared = {}
5b8f056527a3 docs work
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
7
5b8f056527a3 docs work
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
8 function Shared.head()
5b8f056527a3 docs work
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
9 %>
5b8f056527a3 docs work
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
10 <meta name="viewport" content="width=device-width, initial-scale=1">
5b8f056527a3 docs work
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
11 <style>
5b8f056527a3 docs work
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
12 @import "/site.css";
5b8f056527a3 docs work
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
13 </style>
5b8f056527a3 docs work
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
14 <%
5b8f056527a3 docs work
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
15 end
5b8f056527a3 docs work
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
16
5b8f056527a3 docs work
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
17 function Shared.header(crumbs)
5b8f056527a3 docs work
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
18 %>
5b8f056527a3 docs work
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
19 <div header>
5b8f056527a3 docs work
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
20 <a href="/">Luan</a>
5b8f056527a3 docs work
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
21 <% for _, crumb in ipairs(crumbs or {}) do %>
5b8f056527a3 docs work
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
22 / <%=crumb%>
5b8f056527a3 docs work
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
23 <% end %>
5b8f056527a3 docs work
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
24 </div>
5b8f056527a3 docs work
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
25 <%
5b8f056527a3 docs work
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
26 end
5b8f056527a3 docs work
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
27
5b8f056527a3 docs work
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
28 return Shared