Begin refactoring structure
This commit is contained in:
16
app/frontend/templates/base.html
Normal file
16
app/frontend/templates/base.html
Normal file
@ -0,0 +1,16 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>SiteName - {{ template "pageTitle" }}</title>
|
||||
<link href="/app/frontend/staticyle.css" rel="stylesheet">
|
||||
</head>
|
||||
<body>
|
||||
{{ template "content" . }}
|
||||
<div class="footer-container">
|
||||
<footer>
|
||||
<p>SiteName - Powered by GoWeb!</p>
|
||||
</footer>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
5
app/frontend/templates/pages/home.html
Normal file
5
app/frontend/templates/pages/home.html
Normal file
@ -0,0 +1,5 @@
|
||||
{{ define "pageTitle" }}Home{{ end }}
|
||||
|
||||
{{ define "content" }}
|
||||
{{ .Test }}
|
||||
{{ end }}
|
18
app/frontend/templates/pages/login.html
Normal file
18
app/frontend/templates/pages/login.html
Normal file
@ -0,0 +1,18 @@
|
||||
{{ define "pageTitle" }}Login{{ end }}
|
||||
|
||||
{{ define "content" }}
|
||||
<h1>Login</h1>
|
||||
<div class="container">
|
||||
<form action="/login-handle" method="post">
|
||||
<input name="csrf_token" type="hidden" value="{{ .CsrfToken }}">
|
||||
|
||||
<label for="username">Username:</label><br>
|
||||
<input id="username" name="username" placeholder="John" type="text"><br><br>
|
||||
<label for="password">Password:</label><br>
|
||||
<input id="password" name="password" type="password"><br><br>
|
||||
<label for="remember">Remember Me:</label>
|
||||
<input id="remember" name="remember" type="checkbox"><br><br>
|
||||
<input type="submit" value="Submit">
|
||||
</form>
|
||||
</div>
|
||||
{{ end }}
|
16
app/frontend/templates/pages/register.html
Normal file
16
app/frontend/templates/pages/register.html
Normal file
@ -0,0 +1,16 @@
|
||||
{{ define "pageTitle" }}Register{{ end }}
|
||||
|
||||
{{ define "content" }}
|
||||
<h1>Register</h1>
|
||||
<div class="container">
|
||||
<form action="/register-handle" method="post">
|
||||
<input name="csrf_token" type="hidden" value="{{ .CsrfToken }}">
|
||||
|
||||
<label for="username">Username:</label><br>
|
||||
<input id="username" name="username" placeholder="John" type="text"><br><br>
|
||||
<label for="password">Password:</label><br>
|
||||
<input id="password" name="password" type="password"><br><br>
|
||||
<input type="submit" value="Submit">
|
||||
</form>
|
||||
</div>
|
||||
{{ end }}
|
Reference in New Issue
Block a user