moviewyrm/bookwyrm/templates/layout.html
2020-09-30 09:00:33 -07:00

125 lines
4.3 KiB
HTML

{% load fr_display %}
<!DOCTYPE html>
<html lang="en">
<head>
<title>BookWyrm</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link type="text/css" rel="stylesheet" href="/static/css/bulma.min.css">
<link type="text/css" rel="stylesheet" href="/static/css/format.css">
<link type="text/css" rel="stylesheet" href="/static/css/icons.css">
<link rel="shortcut icon" type="image/x-icon" href="/static/images/favicon.ico">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="BookWyrm">
<meta name="og:title" content="BookWyrm">
<meta name="twitter:description" content="Federated Social Reading">
<meta name="og:description" content="Federated Social Reading">
<meta name="twitter:creator" content="@tripofmice">
<meta name="twitter:site" content="@tripofmice">
</head>
<body>
<nav class="navbar" role="navigation" aria-label="main navigation">
<div class="navbar-brand">
<a class="navbar-item" href="/">
<img src="/static/images/logo-small.png" alt="BookWyrm" width="112" height="28">
</a>
<form class="navbar-item" action="/search/">
<div class="field is-grouped">
<input class="input" type="text" name="q" placeholder="Search for a book or user">
<button class="button" type="submit">
<span class="icon icon-search">
<span class="hidden-text">search</span>
</span>
</button>
</div>
</form>
<label for="main-nav" role="button" class="navbar-burger burger" aria-label="menu" aria-expanded="false" data-target="mainNav">
<span aria-hidden="true"></span>
<span aria-hidden="true"></span>
<span aria-hidden="true"></span>
</label>
</div>
<input class="toggle-control" type="checkbox" id="main-nav">
<div id="mainNav" class="navbar-menu toggle-content">
<div class="navbar-start">
{% if request.user.is_authenticated %}
<a href="" class="navbar-item">
Lists
</a>
<a href="" class="navbar-item">
Groups
</a>
{% endif %}
</div>
<div class="navbar-end">
{% if request.user.is_authenticated %}
<div class="navbar-item has-dropdown is-hoverable">
<div class="navbar-link"><p>
{% include 'snippets/avatar.html' with user=user %}
{% include 'snippets/username.html' with user=request.user %}
</p></div>
<div class="navbar-dropdown">
<a href="/user/{{request.user.localname}}" class="navbar-item">
Profile
</a>
<a href="/user-edit" class="navbar-item">
Settings
</a>
<a href="/invite" class="navbar-item">
Invites
</a>
<a href="/import" class="navbar-item">
Import books
</a>
<hr class="navbar-divider">
<a href="/logout" class="navbar-item">
Log out
</a>
</div>
</div>
<div class="navbar-item">
<div class="buttons">
<a href="/notifications">
<span class="icon icon-bell">
<span class="hidden-text">Notitications</span>
</span>
{% if request.user|notification_count %}
<span class="bubble">{{ request.user | notification_count }}</span>
{% endif %}
</a>
</div>
</div>
{% else %}
<div class="navbar-item">
<div class="buttons">
<a href="/register" class="button is-primary">
<strong>Sign up</strong>
</a>
<a href="/login" class="button is-light">
Log in
</a>
</div>
</div>
{% endif %}
</div>
</div>
</nav>
<div class="section">
{% block content %}
{% endblock %}
</div>
<script>
var csrf_token = '{{ csrf_token }}';
</script>
<script src="/static/js/shared.js"></script>
</body>
</html>