comparison 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
comparison
equal deleted inserted replaced
1650:cc3b10a94612 1651:5b8f056527a3
1 local Luan = require "luan:Luan.luan"
2 local error = Luan.error
3 local ipairs = Luan.ipairs or error()
4
5
6 local Shared = {}
7
8 function Shared.head()
9 %>
10 <meta name="viewport" content="width=device-width, initial-scale=1">
11 <style>
12 @import "/site.css";
13 </style>
14 <%
15 end
16
17 function Shared.header(crumbs)
18 %>
19 <div header>
20 <a href="/">Luan</a>
21 <% for _, crumb in ipairs(crumbs or {}) do %>
22 / <%=crumb%>
23 <% end %>
24 </div>
25 <%
26 end
27
28 return Shared