Mercurial Hosting > luan
diff 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 |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/website/src/lib/Shared.luan Thu Mar 31 16:13:32 2022 -0600 @@ -0,0 +1,28 @@ +local Luan = require "luan:Luan.luan" +local error = Luan.error +local ipairs = Luan.ipairs or error() + + +local Shared = {} + +function Shared.head() +%> + <meta name="viewport" content="width=device-width, initial-scale=1"> + <style> + @import "/site.css"; + </style> +<% +end + +function Shared.header(crumbs) +%> + <div header> + <a href="/">Luan</a> +<% for _, crumb in ipairs(crumbs or {}) do %> + / <%=crumb%> +<% end %> + </div> +<% +end + +return Shared