This repository has been archived on 2022-08-26. You can view files and clone it, but cannot push or open issues or pull requests.
gosocial/web/templates/base.html
Noah Petherbridge c43d052665 User Profile and Settings Pages
* Vendor fontawesome icons
* User settings page: to edit profile details (other features not hooked
  up yet)
* Initial user profile page
2022-08-10 20:59:59 -07:00

164 lines
5.9 KiB
HTML

{{define "title"}}Untitled{{end}}
{{define "base"}}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bulma@0.9.4/css/bulma.min.css">
<link rel="stylesheet" href="/static/fontawesome-free-6.1.2-web/css/all.css">
<title>{{template "title" .}} - {{ .Title }}</title>
</head>
<body>
<div class="container is-fullhd">
<nav class="navbar" role="navigation" aria-label="main navigation">
<div class="navbar-brand">
<a class="navbar-item" href="/">
{{ .Title }}
</a>
<a role="button" class="navbar-burger" aria-label="menu" aria-expanded="false" data-target="navbarBasicExample">
<span aria-hidden="true"></span>
<span aria-hidden="true"></span>
<span aria-hidden="true"></span>
</a>
</div>
<div id="navbarBasicExample" class="navbar-menu">
<div class="navbar-start">
<a class="navbar-item" href="/">
Home
</a>
<a class="navbar-item" href="/about">
About
</a>
{{if .LoggedIn}}
<a class="navbar-item" href="/forums">
Forums
</a>
<a class="navbar-item" href="/messages">
Messages
<span class="tag is-warning">42</span>
</a>
{{end}}
<div class="navbar-item has-dropdown is-hoverable">
<a class="navbar-link">
More
</a>
<div class="navbar-dropdown">
<a class="navbar-item">
About
</a>
<a class="navbar-item">
Jobs
</a>
<a class="navbar-item">
Contact
</a>
<hr class="navbar-divider">
<a class="navbar-item">
Report an issue
</a>
</div>
</div>
</div>
<div class="navbar-end">
{{if .LoggedIn }}
<div class="navbar-item has-dropdown is-hoverable">
<a class="navbar-link" href="/me">
<figure class="image is-24x24 mr-2">
<img src="/static/img/shy.png" class="is-rounded has-background-warning">
</figure>
{{.CurrentUser.Username}}
</a>
<div class="navbar-dropdown is-right">
<a class="navbar-item" href="/me">Dashboard</a>
<a class="navbar-item" href="/u/{{.CurrentUser.Username}}">My Profile</a>
<a class="navbar-item" href="/settings">Settings</a>
<a class="navbar-item" href="/logout">Log out</a>
</div>
</div>
{{ else }}
<div class="navbar-item">
<div class="buttons">
<a class="button is-primary" href="/signup">
<strong>Sign up</strong>
</a>
<a class="button is-light" href="/login">
Log in
</a>
</div>
</div>
{{end}}
</div>
</div>
</nav>
{{if .Flashes}}
<div class="notification block is-success">
<!-- <button class="delete"></button> -->
{{range .Flashes}}
<div class="block">{{.}}</div>
{{end}}
</div>
{{end}}
{{if .Errors}}
<div class="notification block is-danger">
<!-- <button class="delete"></button> -->
{{range .Errors}}
<div class="block">{{.}}</div>
{{end}}
</div>
{{end}}
{{template "content" .}}
<div class="block has-text-centered has-text-grey">
&copy; {{.YYYY}} {{.Title}}
<div class="columns">
<div class="column">
<a href="/">Home</a>
</div>
<div class="column">
<a href="/about">About</a>
</div>
{{if .LoggedIn}}
<div class="column">
<a href="/me">User Dashboard</a>
</div>
<div class="column">
<a href="/u/{{.CurrentUser.Username}}">My Profile</a>
</div>
<div class="column">
<a href="/settings">Settings</a>
</div>
<div class="column">
<a href="/logout">Log out</a>
</div>
{{else}}
<div class="column">
<a href="/login">Log in</a>
</div>
<div class="column">
<a href="/signup">Sign up</a>
</div>
{{end}}
</div>
</div>
</div>
<script type="text/javascript" src="/static/js/bulma.js"></script>
</body>
</html>
{{end}}