view website/src/lib/Shared.luan @ 1652:d5779a264a4a

docs work
author Franklin Schmidt <fschmidt@gmail.com>
date Thu, 31 Mar 2022 19:04:59 -0600
parents 5b8f056527a3
children 418b610e887b
line wrap: on
line source

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

local function header(crumbs)
%>
		<div header>
			<a href="/">Luan</a>
<%	for _, crumb in ipairs(crumbs or {}) do %>
			/ <%=crumb%>
<%	end %>
		</div>
<%
end
Shared.header = header

function Shared.docs_header()
	header{[[<a href="/docs.html">Documentation</a>]]}
end

return Shared