Create settings page placeholder, add auth pattern
This adds a pattern for creating pages that require authentication. The settings page is currently empty, but it's helpful to figure out how to do this pattern.
This commit is contained in:
parent
ae4be91d52
commit
20186f65bf
8 changed files with 288 additions and 18 deletions
|
|
@ -76,8 +76,7 @@
|
|||
<span class="me-2">{{ .DisplayName }}</span>
|
||||
</a>
|
||||
<ul class="dropdown-menu dropdown-menu-end" aria-labelledby="userDropdown">
|
||||
<li><a class="dropdown-item" href="profile.html">Profile</a></li>
|
||||
<li><a class="dropdown-item" href="settings.html">Settings</a></li>
|
||||
<li><a class="dropdown-item" href="/settings">Settings</a></li>
|
||||
<li><hr class="dropdown-divider"></li>
|
||||
<li><a class="dropdown-item text-danger" href="login.html">Logout</a></li>
|
||||
</ul>
|
||||
|
|
|
|||
7
templates/empty-auth.html
Normal file
7
templates/empty-auth.html
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
{{template "authenticated.html" .}}
|
||||
|
||||
{{define "title"}}Dash{{end}}
|
||||
{{define "style"}}
|
||||
{{end}}
|
||||
{{define "content"}}
|
||||
{{end}}
|
||||
8
templates/settings.html
Normal file
8
templates/settings.html
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
{{template "authenticated.html" .}}
|
||||
|
||||
{{define "title"}}Dash{{end}}
|
||||
{{define "style"}}
|
||||
{{end}}
|
||||
{{define "content"}}
|
||||
<p>Imagine settings here</p>
|
||||
{{end}}
|
||||
Loading…
Add table
Add a link
Reference in a new issue