forked from mirrors/bookwyrm
187 lines
7.6 KiB
HTML
187 lines
7.6 KiB
HTML
{% load bookwyrm_tags %}
|
|
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<title>{% if title %}{{ title }} | {% endif %}{{ site.name }}</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="{{ site.name }}">
|
|
<meta name="og:title" content="{{ site.name }}">
|
|
<meta name="twitter:description" content="Federated Social Reading">
|
|
<meta name="og:description" content="Federated Social Reading">
|
|
</head>
|
|
<body>
|
|
|
|
<nav class="navbar" role="navigation" aria-label="main navigation">
|
|
<div class="navbar-brand">
|
|
<a class="navbar-item" href="/">
|
|
<img class="image logo" src="/static/images/logo-small.png" alt="Home page">
|
|
</a>
|
|
<form class="navbar-item column" action="/search/">
|
|
<div class="field has-addons">
|
|
<div class="control">
|
|
<input aria-label="Search for a book or user" id="search-input" class="input" type="text" name="q" placeholder="Search for a book or user" value="{{ query }}">
|
|
</div>
|
|
<div class="control">
|
|
<button class="button" type="submit">
|
|
<span class="icon icon-search">
|
|
<span class="is-sr-only">search</span>
|
|
</span>
|
|
</button>
|
|
</div>
|
|
</div>
|
|
</form>
|
|
|
|
<label for="main-nav" role="button" class="navbar-burger" aria-label="menu" aria-expanded="false" data-target="mainNav" onclick="toggleMenu(this)" tabindex="0">
|
|
<div class="navbar-item mt-3">
|
|
<div class="icon icon-dots-three-vertical">
|
|
<span class="is-sr-only">Main navigation menu</span>
|
|
</div>
|
|
</div>
|
|
</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="/user/{{ request.user.localname }}/shelves" class="navbar-item">
|
|
Your shelves
|
|
</a>
|
|
<a href="/#feed" class="navbar-item">
|
|
Feed
|
|
</a>
|
|
{% endif %}
|
|
</div>
|
|
|
|
<div class="navbar-end">
|
|
{% if request.user.is_authenticated %}
|
|
<div class="navbar-item has-dropdown is-hoverable">
|
|
<div class="navbar-link" role="button" aria-expanded=false" onmouseover="toggleMenu(this)" tabindex="0" aria-haspopup="true" aria-controls="navbar-dropdown"><p>
|
|
{% include 'snippets/avatar.html' with user=request.user %}
|
|
{% include 'snippets/username.html' with user=request.user %}
|
|
</p></div>
|
|
<ul class="navbar-dropdown" id="navbar-dropdown">
|
|
<li>
|
|
<a href="/direct-messages" class="navbar-item">
|
|
Direct messages
|
|
</a>
|
|
</li>
|
|
<li>
|
|
<a href="/user/{{request.user.localname}}" class="navbar-item">
|
|
Profile
|
|
</a>
|
|
</li>
|
|
<li>
|
|
<a href="/user-edit" class="navbar-item">
|
|
Settings
|
|
</a>
|
|
</li>
|
|
<li>
|
|
<a href="/import" class="navbar-item">
|
|
Import books
|
|
</a>
|
|
</li>
|
|
{% if perms.bookwyrm.create_invites %}
|
|
<li>
|
|
<a href="/invite" class="navbar-item">
|
|
Invites
|
|
</a>
|
|
</li>
|
|
{% endif %}
|
|
<hr class="navbar-divider">
|
|
<li>
|
|
<a href="/logout" class="navbar-item">
|
|
Log out
|
|
</a>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
<div class="navbar-item">
|
|
<a href="/notifications">
|
|
<div class="tags has-addons">
|
|
<span class="tag is-medium">
|
|
<span class="icon icon-bell">
|
|
<span class="is-sr-only">Notifications</span>
|
|
</span>
|
|
</span>
|
|
{% if request.user|notification_count %}
|
|
<span class="tag is-danger is-medium">{{ request.user | notification_count }}</span>
|
|
{% endif %}
|
|
</div>
|
|
</a>
|
|
</div>
|
|
{% else %}
|
|
<div class="navbar-item">
|
|
<div class="columns">
|
|
<div class="column">
|
|
<form name="login" method="post" action="/user-login">
|
|
<div class="field is-grouped">
|
|
<div class="control">
|
|
<label class="is-sr-only" for="id_username">Username:</label>
|
|
<input type="text" name="username" maxlength="150" class="input" required="" id="id_username" placeholder="username">
|
|
</div>
|
|
<div class="control">
|
|
<label class="is-sr-only" for="id_password">Username:</label>
|
|
<input type="password" name="password" maxlength="128" class="input" required="" id="id_password" placeholder="password">
|
|
<p class="help"><a href="/password-reset">Forgot your password?</a></p>
|
|
</div>
|
|
<button class="button is-primary" type="submit">Log in</button>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
<div class="column is-narrow">
|
|
<a href="/login" class="button is-link">
|
|
Join
|
|
</a>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{% endif %}
|
|
</div>
|
|
</div>
|
|
</nav>
|
|
|
|
|
|
<div class="section">
|
|
{% block content %}
|
|
{% endblock %}
|
|
</div>
|
|
|
|
<div class="footer">
|
|
<div class="columns">
|
|
<div class="column">
|
|
<p>
|
|
<a href="/about">About this server</a>
|
|
</p>
|
|
{% if site.admin_email %}
|
|
<p>
|
|
<a href="mailto:{{ site.admin_email }}">Contact site admin</a>
|
|
</p>
|
|
{% endif %}
|
|
</div>
|
|
{% if site.support_link %}
|
|
<div class="column">
|
|
<span class="icon icon-heart"></span>
|
|
Support {{ site.name }} on <a href="{{ site.support_link }}" target="_blank">{{ site.support_title }}</a>
|
|
</div>
|
|
{% endif %}
|
|
<div class="column">
|
|
BookWyrm is open source software. You can contribute or report issues on <a href="https://github.com/mouse-reeve/bookwyrm">GitHub</a>.
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<script>
|
|
var csrf_token = '{{ csrf_token }}';
|
|
</script>
|
|
<script src="/static/js/shared.js"></script>
|
|
</body>
|
|
</html>
|
|
|