Initial Prototype
This commit is contained in:
48
templates/index.html
Normal file
48
templates/index.html
Normal file
@@ -0,0 +1,48 @@
|
||||
{{ block "index" . }}
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>First page</title>
|
||||
<script src="https://unpkg.com/htmx.org@latest"></script>
|
||||
<link rel="icon" type="image/x-icon" href="static/favicon.ico">
|
||||
<link rel="stylesheet" type="text/css" href="static/css/site.css" />
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="main-container">
|
||||
<div class="content">
|
||||
<h1> This is an input </h1>
|
||||
<div class="row" style="display: flex;">
|
||||
<div class="column" style="flex: 50%;">
|
||||
<textarea name="email_input" id="typebox" rows="32" cols="64" style="resize: none;"
|
||||
hx-trigger="keyup changed delay:500ms" hx-post="/mail-content" hx-target="#email-preview"
|
||||
placeholder="Type out your email here..."></textarea>
|
||||
</div>
|
||||
|
||||
<div class=" column" id="email-preview" style="flex: 50%;"></div>
|
||||
</div>
|
||||
|
||||
<div class="row" style="display: flex; align-items: center;">
|
||||
<div class="column" style="flex: 50%;">
|
||||
<h1>Current Mailing List Subscribers</h1>
|
||||
</div>
|
||||
<div class="column" style="flex: 50%;">
|
||||
<button hx-get="/mailing_list" hx-target="#mailing_list"> Refresh Mailing List</button>
|
||||
</div>
|
||||
</div>
|
||||
<ul style="columns: 2;" id="mailing_list" hx-trigger="load" hx-get="/mailing_list"></ul>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
{{ end }}
|
||||
|
||||
{{ block "mailing_list" . }}
|
||||
{{ range .Emails }}
|
||||
<li> {{.}} </li>
|
||||
{{end}}
|
||||
{{end}}
|
||||
Reference in New Issue
Block a user