added layouts, db support
This commit is contained in:
@ -1,29 +1,14 @@
|
||||
<!-- views/index.etlua -->
|
||||
<script src="/static/htmx.min.js"></script>
|
||||
|
||||
<h1>Hello world</h1>
|
||||
<p>Welcome to my page</p>
|
||||
<p>The missile guidance system works as follows</p>
|
||||
|
||||
<form>
|
||||
<fieldset>
|
||||
<legend>Give Us Money</legend>
|
||||
<input type="file"></input>
|
||||
<input type="text"></input>
|
||||
</fieldset>
|
||||
<fieldset>
|
||||
<label>Do it</label>
|
||||
<input type="number"></input>
|
||||
</fieldset>
|
||||
</form>
|
||||
<br>
|
||||
|
||||
<button hx-post="/clickme" hx-target="#clickable">Click me</button>
|
||||
<button hx-post="/clickme" hx-target="#clickable">Start</button>
|
||||
<p id="clickable"></p>
|
||||
|
||||
<ol>
|
||||
<!--
|
||||
<p><% for i, thing in pairs(text) do %>
|
||||
<li><%= thing %></li>
|
||||
<% end %>
|
||||
</p>
|
||||
</ol>
|
||||
-->
|
||||
|
12
views/layout.etlua
Normal file
12
views/layout.etlua
Normal file
@ -0,0 +1,12 @@
|
||||
<!DOCTYPE HTML>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title><%= page_title or "My Page" %></title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<h1>Peradventure</h1>
|
||||
<% content_for("inner") %>
|
||||
</body>
|
||||
</html>
|
Reference in New Issue
Block a user