Renamed views directory to templates.
This commit is contained in:
parent
d0caa8119e
commit
299774c0c7
12 changed files with 1 additions and 1 deletions
40
templates/layouts/main.gohtml
Normal file
40
templates/layouts/main.gohtml
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
{{template "metatags" .}}
|
||||
{{template "css" .}}
|
||||
{{template "js" .}}
|
||||
</head>
|
||||
<body>
|
||||
<nav class="navbar is-dark">
|
||||
<div class="container">
|
||||
<div class="navbar-brand">
|
||||
<a href="{{call .Reverse "home"}}" class="navbar-item">{{.AppName}}</a>
|
||||
</div>
|
||||
<div id="navbarMenu" class="navbar-menu">
|
||||
<div class="navbar-end">
|
||||
{{link (call .Reverse "home") "Home" .Path "navbar-item"}}
|
||||
{{link (call .Reverse "about") "About" .Path "navbar-item"}}
|
||||
{{link (call .Reverse "contact") "Contact" .Path "navbar-item"}}
|
||||
{{- if .IsAuth}}
|
||||
{{link (call .Reverse "logout") "Logout" .Path "navbar-item"}}
|
||||
{{- else}}
|
||||
{{link (call .Reverse "login") "Login" .Path "navbar-item"}}
|
||||
{{- end}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<section class="section">
|
||||
<div class="container">
|
||||
{{- if .Title}}
|
||||
<h1 class="title">{{.Title}}</h1>
|
||||
{{- end}}
|
||||
|
||||
{{template "messages" .}}
|
||||
{{template "content" .}}
|
||||
</div>
|
||||
</section>
|
||||
</body>
|
||||
</html>
|
||||
Loading…
Add table
Add a link
Reference in a new issue