2020-12-12 21:25:04 -05:00
{% load bookwyrm_tags %}
2021-02-27 18:00:19 -05:00
{% load i18n %}
2020-01-25 18:25:19 -05:00
<!DOCTYPE html>
< html lang = "en" >
< head >
2021-02-27 14:07:16 -05:00
< title > {% block title %}BookWyrm{% endblock %} | {{ site.name }}< / title >
2020-01-25 18:25:19 -05:00
< meta name = "viewport" content = "width=device-width, initial-scale=1" >
2021-04-05 10:17:11 -04:00
< link rel = "stylesheet" href = "/static/css/vendor/bulma.min.css" >
< link rel = "stylesheet" href = "/static/css/vendor/icons.css" >
< link rel = "stylesheet" href = "/static/css/bookwyrm.css" >
2020-01-25 18:25:19 -05:00
2021-01-04 15:47:10 -05:00
< link rel = "shortcut icon" type = "image/x-icon" href = "{% if site.favicon %}/images/{{ site.favicon }}{% else %}/static/images/favicon.ico{% endif %}" >
2020-01-25 18:25:19 -05:00
< meta name = "twitter:card" content = "summary" >
2021-01-04 15:47:10 -05:00
< meta name = "twitter:title" content = "{% if title %}{{ title }} | {% endif %}{{ site.name }}" >
< meta name = "og:title" content = "{% if title %}{{ title }} | {% endif %}{{ site.name }}" >
2021-01-04 15:58:31 -05:00
< meta name = "twitter:description" content = "{{ site.instance_tagline }}" >
< meta name = "og:description" content = "{{ site.instance_tagline }}" >
2021-01-04 15:47:10 -05:00
< meta name = "twitter:image" content = "{% if site.logo %}/images/{{ site.logo }}{% else %}/static/images/logo.png{% endif %}" >
< meta name = "og:image" content = "{% if site.logo %}/images/{{ site.logo }}{% else %}/static/images/logo.png{% endif %}" >
< meta name = "twitter:image:alt" content = "BookWyrm Logo" >
2020-01-25 18:25:19 -05:00
< / head >
< body >
2021-03-03 14:10:09 -05:00
< nav class = "navbar container" aria-label = "main navigation" >
2020-09-28 17:47:53 -04:00
< div class = "navbar-brand" >
< a class = "navbar-item" href = "/" >
2021-01-04 15:47:10 -05:00
< img class = "image logo" src = "{% if site.logo_small %}/images/{{ site.logo_small }}{% else %}/static/images/logo-small.png{% endif %}" alt = "Home page" >
2020-09-28 17:47:53 -04:00
< / a >
2020-11-21 00:27:50 -05:00
< form class = "navbar-item column" action = "/search/" >
2020-11-21 00:19:26 -05:00
< div class = "field has-addons" >
< div class = "control" >
2021-02-28 20:10:30 -05:00
< input aria-label = "{% trans 'Search for a book or user' %}" id = "search-input" class = "input" type = "text" name = "q" placeholder = "{% trans 'Search for a book or user' %}" value = "{{ query }}" >
2020-11-21 00:19:26 -05:00
< / div >
< div class = "control" >
< button class = "button" type = "submit" >
2021-02-27 21:48:10 -05:00
< span class = "icon icon-search" title = "{% trans 'Search' %}" >
2021-02-28 11:42:25 -05:00
< span class = "is-sr-only" > {% trans "Search" %}< / span >
2020-11-21 00:19:26 -05:00
< / span >
< / button >
< / div >
2020-11-08 16:23:05 -05:00
< / div >
< / form >
2020-09-28 17:47:53 -04:00
2021-01-17 23:40:33 -05:00
< div role = "button" tabindex = "0" class = "navbar-burger pulldown-menu" data-controls = "main-nav" aria-expanded = "false" >
2020-11-09 19:53:52 -05:00
< div class = "navbar-item mt-3" >
2021-02-27 21:48:10 -05:00
< div class = "icon icon-dots-three-vertical" title = "{% trans 'Main navigation menu' %}" >
2021-02-27 17:22:39 -05:00
< span class = "is-sr-only" > {% trans "Main navigation menu" %}< / span >
2020-11-09 19:53:52 -05:00
< / div >
< / div >
2021-01-17 23:31:37 -05:00
< / div >
2020-09-28 17:47:53 -04:00
< / div >
2021-01-17 23:31:37 -05:00
< div class = "navbar-menu" id = "main-nav" >
2020-09-28 17:47:53 -04:00
< div class = "navbar-start" >
2020-09-29 13:21:10 -04:00
{% if request.user.is_authenticated %}
2021-01-31 00:33:41 -05:00
< a href = "{% url 'user-shelves' request.user.localname %}" class = "navbar-item" >
2021-03-31 12:22:23 -04:00
{% trans "Your books" %}
2020-09-28 17:47:53 -04:00
< / a >
2020-10-28 16:17:02 -04:00
< a href = "/#feed" class = "navbar-item" >
2021-02-27 19:18:24 -05:00
{% trans "Feed" %}
2020-04-01 22:38:07 -04:00
< / a >
2021-01-31 00:33:41 -05:00
< a href = "{% url 'lists' %}" class = "navbar-item" >
2021-02-27 19:18:24 -05:00
{% trans "Lists" %}
2021-01-31 00:33:41 -05:00
< / a >
2021-01-31 14:11:26 -05:00
{% endif %}
2020-04-01 22:38:07 -04:00
< / div >
2020-03-15 17:15:36 -04:00
2020-09-28 17:47:53 -04:00
< div class = "navbar-end" >
2021-03-03 14:10:09 -05:00
{% if request.user.is_authenticated %}
2020-09-28 17:47:53 -04:00
< div class = "navbar-item has-dropdown is-hoverable" >
2021-03-03 14:10:09 -05:00
< a
2021-04-06 16:36:24 -04:00
href="{{ request.user.local_path }}"
2021-03-03 14:10:09 -05:00
class="navbar-link pulldown-menu"
role="button"
aria-expanded="false"
tabindex="0"
aria-haspopup="true"
aria-controls="navbar-dropdown"
>
2020-10-13 19:20:04 -04:00
{% include 'snippets/avatar.html' with user=request.user %}
2021-03-13 18:57:54 -05:00
< span class = "ml-2" > {{ request.user.display_name }}< / span >
2021-03-03 14:10:09 -05:00
< / a >
2021-01-03 13:03:57 -05:00
< ul class = "navbar-dropdown" id = "navbar-dropdown" >
< li >
2021-03-21 19:43:13 -04:00
< a href = "{% url 'direct-messages' %}" class = "navbar-item" >
2021-02-28 20:10:30 -05:00
{% trans "Direct Messages" %}
2021-01-03 13:03:57 -05:00
< / a >
< / li >
< li >
2021-03-21 19:43:13 -04:00
< a href = "{% url 'directory' %}" class = "navbar-item" >
{% trans 'Directory' %}
2021-01-03 13:03:57 -05:00
< / a >
< / li >
< li >
< a href = "/import" class = "navbar-item" >
2021-02-28 20:10:30 -05:00
{% trans 'Import Books' %}
2021-01-03 13:03:57 -05:00
< / a >
< / li >
2021-03-21 19:43:13 -04:00
< li >
< a href = "/preferences/profile" class = "navbar-item" >
{% trans 'Settings' %}
< / a >
< / li >
2021-03-29 11:33:12 -04:00
{% if perms.bookwyrm.create_invites or perms.moderate_users %}
2021-03-03 14:10:09 -05:00
< li class = "navbar-divider" role = "presentation" > < / li >
2021-01-29 18:50:46 -05:00
{% endif %}
2020-10-01 16:09:37 -04:00
{% if perms.bookwyrm.create_invites %}
2021-01-03 13:03:57 -05:00
< li >
2021-03-21 17:50:36 -04:00
< a href = "{% url 'settings-invite-requests' %}" class = "navbar-item" >
2021-02-28 20:10:30 -05:00
{% trans 'Invites' %}
2021-01-03 13:03:57 -05:00
< / a >
< / li >
2021-01-29 18:50:46 -05:00
{% endif %}
2021-03-29 11:33:12 -04:00
{% if perms.bookwyrm.moderate_users %}
2021-01-29 18:50:46 -05:00
< li >
2021-03-29 11:33:12 -04:00
< a href = "{% url 'settings-users' %}" class = "navbar-item" >
2021-03-08 18:49:44 -05:00
{% trans 'Admin' %}
2021-01-29 18:50:46 -05:00
< / a >
< / li >
2020-10-01 16:09:37 -04:00
{% endif %}
2021-03-03 14:10:09 -05:00
< li class = "navbar-divider" role = "presentation" > < / li >
2021-01-03 13:03:57 -05:00
< li >
< a href = "/logout" class = "navbar-item" >
2021-02-28 20:10:30 -05:00
{% trans 'Log out' %}
2021-01-03 13:03:57 -05:00
< / a >
< / li >
< / ul >
2020-09-28 17:47:53 -04:00
< / div >
< div class = "navbar-item" >
2021-01-18 19:52:51 -05:00
< a href = "/notifications" class = "tags has-addons" >
< span class = "tag is-medium" >
2021-02-27 21:48:10 -05:00
< span class = "icon icon-bell" title = "{% trans 'Notifications' %}" >
2021-02-27 17:22:39 -05:00
< span class = "is-sr-only" > {% trans "Notifications" %}< / span >
2020-09-30 14:56:02 -04:00
< / span >
2021-01-18 19:52:51 -05:00
< / span >
2021-04-07 11:31:00 -04:00
< span class = "{% if not request.user|notification_count %}is-hidden {% endif %}tag is-danger is-medium transition-x" data-poll-wrapper >
2021-03-23 15:52:38 -04:00
< span data-poll = "notifications" > {{ request.user | notification_count }}< / span >
2021-01-18 19:52:51 -05:00
< / span >
2020-09-30 14:56:02 -04:00
< / a >
2020-03-15 17:15:36 -04:00
< / div >
2021-01-03 18:41:20 -05:00
{% else %}
2020-09-28 17:47:53 -04:00
< div class = "navbar-item" >
2021-01-12 11:19:08 -05:00
{% if request.path != '/login' and request.path != '/login/' %}
2021-01-03 14:10:04 -05:00
< div class = "columns" >
< div class = "column" >
2021-01-12 11:19:08 -05:00
< form name = "login" method = "post" action = "/login" >
2021-01-03 17:35:28 -05:00
{% csrf_token %}
2021-01-13 22:14:01 -05:00
< div class = "columns is-variable is-1" >
< div class = "column" >
2021-02-27 17:22:39 -05:00
< label class = "is-sr-only" for = "id_localname" > {% trans "Username:" %}< / label >
2021-03-04 17:27:49 -05:00
< input type = "text" name = "localname" maxlength = "150" class = "input" required = "" id = "id_localname" placeholder = "{% trans 'username' %}" >
2021-01-03 14:10:04 -05:00
< / div >
2021-01-13 22:14:01 -05:00
< div class = "column" >
2021-02-27 17:22:39 -05:00
< label class = "is-sr-only" for = "id_password" > {% trans "Username:" %}< / label >
2021-03-04 17:27:49 -05:00
< input type = "password" name = "password" maxlength = "128" class = "input" required = "" id = "id_password" placeholder = "{% trans 'password' %}" >
< p class = "help" > < a href = "/password-reset" > {% trans "Forgot your password?" %}< / a > < / p >
2021-01-03 14:10:04 -05:00
< / div >
2021-01-13 22:14:01 -05:00
< div class = "column is-narrow" >
2021-02-27 17:22:39 -05:00
< button class = "button is-primary" type = "submit" > {% trans "Log in" %}< / button >
2021-01-13 22:14:01 -05:00
< / div >
2021-01-03 14:10:04 -05:00
< / div >
< / form >
< / div >
2021-01-03 18:41:20 -05:00
{% if site.allow_registration and request.path != '' and request.path != '/' %}
2021-01-03 14:10:04 -05:00
< div class = "column is-narrow" >
2021-01-03 18:41:20 -05:00
< a href = "/" class = "button is-link" >
2021-03-04 17:27:49 -05:00
{% trans "Join" %}
2021-01-03 14:10:04 -05:00
< / a >
< / div >
2021-01-03 18:41:20 -05:00
{% endif %}
2020-09-28 17:47:53 -04:00
< / div >
2021-01-03 18:41:20 -05:00
{% endif %}
2020-01-25 18:25:19 -05:00
< / div >
2021-01-03 18:41:20 -05:00
{% endif %}
2020-01-25 18:25:19 -05:00
< / div >
2020-09-28 17:47:53 -04:00
< / div >
< / nav >
2020-01-25 18:25:19 -05:00
2021-01-03 15:53:51 -05:00
< div class = "section container" >
2020-01-28 20:23:38 -05:00
{% block content %}
{% endblock %}
2020-01-25 18:25:19 -05:00
< / div >
2021-01-03 15:53:51 -05:00
< footer class = "footer" >
< div class = "container" >
< div class = "columns" >
< div class = "column" >
< p >
2021-02-27 17:22:39 -05:00
< a href = "/about" > {% trans "About this server" %}< / a >
2021-01-03 15:53:51 -05:00
< / p >
{% if site.admin_email %}
< p >
2021-02-27 17:22:39 -05:00
< a href = "mailto:{{ site.admin_email }}" > {% trans "Contact site admin" %}< / a >
2021-01-03 15:53:51 -05:00
< / p >
{% endif %}
< / div >
{% if site.support_link %}
< div class = "column" >
< span class = "icon icon-heart" > < / span >
2021-03-07 18:42:49 -05:00
{% blocktrans with site_name=site.name support_link=site.support_link support_title=site.support_title %}Support {{ site_name }} on < a href = "{{ support_link }}" target = "_blank" > {{ support_title }}< / a > {% endblocktrans %}
2021-01-03 15:53:51 -05:00
< / div >
2020-12-11 15:31:02 -05:00
{% endif %}
2021-01-03 15:53:51 -05:00
< div class = "column" >
2021-02-28 20:10:30 -05:00
{% trans 'BookWyrm is open source software. You can contribute or report issues on < a href = "https://github.com/mouse-reeve/bookwyrm" > GitHub< / a > .' %}
2021-01-03 15:53:51 -05:00
< / div >
2020-12-11 15:07:37 -05:00
< / div >
< / div >
2021-01-03 15:53:51 -05:00
< / footer >
2020-12-11 15:07:37 -05:00
2020-03-15 17:15:36 -04:00
< script >
2020-03-15 21:12:45 -04:00
var csrf_token = '{{ csrf_token }}';
2020-03-15 17:15:36 -04:00
< / script >
2021-04-05 10:16:48 -04:00
< script src = "/static/js/bookwyrm.js" > < / script >
2021-03-19 13:47:32 -04:00
{% block scripts %}{% endblock %}
2020-01-25 18:25:19 -05:00
< / body >
< / html >