Merge branch 'main' into switch-edition

This commit is contained in:
Mouse Reeve
2020-12-13 21:10:37 -08:00
113 changed files with 3354 additions and 1578 deletions

View File

@ -1,8 +1,8 @@
{% extends 'layout.html' %}
{% load fr_display %}
{% load bookwyrm_tags %}
{% block content %}
<div class="block">
<h1 class="title">{{ author.display_name }}</h1>
<h1 class="title">{{ author.name }}</h1>
{% if author.bio %}
<p>
@ -12,7 +12,7 @@
</div>
<div class="block">
<h3 class="title is-4">Books by {{ author.display_name }}</h3>
<h3 class="title is-4">Books by {{ author.name }}</h3>
{% include 'snippets/book_tiles.html' with books=books %}
</div>
{% endblock %}

View File

@ -1,5 +1,5 @@
{% extends 'layout.html' %}
{% load fr_display %}
{% load bookwyrm_tags %}
{% load humanize %}
{% block content %}
@ -86,8 +86,8 @@
{% endif %}
{% if book.parent_work.edition_set.count > 1 %}
<p><a href="/book/{{ book.parent_work.id }}/editions">{{ book.parent_work.edition_set.count }} editions</a></p>
{% if book.parent_work.editions.count > 1 %}
<p><a href="/book/{{ book.parent_work.id }}/editions">{{ book.parent_work.editions.count }} editions</a></p>
{% endif %}
</div>

View File

@ -0,0 +1,37 @@
{% extends 'layout.html' %}
{% block content %}
<div class="block">
<h1 class="title">Direct Messages</h1>
{% if not activities %}
<p>You have no messages right now.</p>
{% endif %}
{% for activity in activities %}
<div class="block">
{% include 'snippets/status.html' with status=activity %}
</div>
{% endfor %}
<nav class="pagination" role="navigation" aria-label="pagination">
{% if prev %}
<p class="pagination-previous">
<a href="{{ prev }}">
<span class="icon icon-arrow-left"></span>
Previous
</a>
</p>
{% endif %}
{% if next %}
<p class="pagination-next">
<a href="{{ next }}">
Next
<span class="icon icon-arrow-right"></span>
</a>
</p>
{% endif %}
</nav>
</div>
{% endblock %}

View File

@ -1,5 +1,5 @@
{% extends 'layout.html' %}
{% load fr_display %}
{% load bookwyrm_tags %}
{% block content %}
<div class="block">
<h1 class="title">Editions of <a href="/book/{{ work.id }}">"{{ work.title }}"</a></h1>

View File

@ -1,5 +1,5 @@
{% extends 'layout.html' %}
{% load fr_display %}
{% load bookwyrm_tags %}
{% block content %}
<div class="columns">

View File

@ -1,5 +1,5 @@
{% extends 'layout.html' %}
{% load fr_display %}
{% load bookwyrm_tags %}
{% block content %}
<div class="block">
<h1 class="title">

View File

@ -1,5 +1,5 @@
{% extends 'layout.html' %}
{% load fr_display %}
{% load bookwyrm_tags %}
{% block content %}
<div class="block">
<h1 class="title">

View File

@ -1,5 +1,5 @@
{% extends 'layout.html' %}
{% load fr_display %}
{% load bookwyrm_tags %}
{% load humanize %}
{% block content %}
<div class="block">

View File

@ -1,4 +1,4 @@
{% load fr_display %}
{% load bookwyrm_tags %}
<!DOCTYPE html>
<html lang="en">
<head>
@ -68,6 +68,9 @@
{% include 'snippets/username.html' with user=request.user %}
</p></div>
<div class="navbar-dropdown">
<a href="/direct-messages" class="navbar-item">
Direct messages
</a>
<a href="/user/{{request.user.localname}}" class="navbar-item">
Profile
</a>

View File

@ -1,6 +1,6 @@
{% extends 'layout.html' %}
{% load humanize %}
{% load fr_display %}
{% load bookwyrm_tags %}
{% block content %}
<div class="block">
<h1 class="title">Notifications</h1>

View File

@ -1,5 +1,5 @@
{% extends 'layout.html' %}
{% load fr_display %}
{% load bookwyrm_tags %}
{% block content %}
<div class="columns">

View File

@ -1 +1 @@
<a href="/author/{{ book.authors.first.id }}" class="author">{{ book.authors.first.display_name }}</a>
<a href="/author/{{ book.authors.first.id }}" class="author">{{ book.authors.first.name }}</a>

View File

@ -1,3 +1,3 @@
{% load fr_display %}
{% load bookwyrm_tags %}
<img class="avatar image {% if large %}is-96x96{% else %}is-32x32{% endif %}" src="{% if user.avatar %}/images/{{ user.avatar }}{% else %}/static/images/default_avi.jpg{% endif %}" alt="avatar for {{ user|username }}">

View File

@ -1,4 +1,4 @@
{% load fr_display %}
{% load bookwyrm_tags %}
<div class="cover-container is-{{ size }}">
{% if book.cover %}
<img class="book-cover" src="/images/{{ book.cover }}" alt="{% include 'snippets/cover_alt.html' with book=book %}">

View File

@ -1,4 +1,4 @@
{% load fr_display %}
{% load bookwyrm_tags %}
<div class="columns">
<div class="column is-narrow">
<div>

View File

@ -1,4 +1,4 @@
{% load fr_display %}
{% load bookwyrm_tags %}
{% with status.id|uuid as uuid %}
<form name="boost" action="/boost/{{ status.id }}" method="post" onsubmit="return interact(event)" class="boost-{{ status.id }}-{{ uuid }} {% if request.user|boosted:status %}hidden{% endif %}" data-id="boost-{{ status.id }}-{{ uuid }}">
{% csrf_token %}

View File

@ -1,2 +1,2 @@
{% load fr_display %}
{% load bookwyrm_tags %}
'{{ book.title }}' Cover ({{ book|edition_info }})

View File

@ -1,5 +1,5 @@
{% load humanize %}
{% load fr_display %}
{% load bookwyrm_tags %}
<div class="tabs is-boxed">
<ul role="tablist">

View File

@ -1,4 +1,4 @@
{% load fr_display %}
{% load bookwyrm_tags %}
{% with status.id|uuid as uuid %}
<form name="favorite" action="/favorite/{{ status.id }}" method="POST" onsubmit="return interact(event)" class="fav-{{ status.id }}-{{ uuid }} {% if request.user|liked:status %}hidden{% endif %}" data-id="fav-{{ status.id }}-{{ uuid }}">
{% csrf_token %}

View File

@ -1,4 +1,4 @@
{% load fr_display %}
{% load bookwyrm_tags %}
<div>
<input class="toggle-control" type="checkbox" name="finish-reading-{{ uuid }}" id="finish-reading-{{ uuid }}">
<div class="modal toggle-content hidden">

View File

@ -1,4 +1,4 @@
{% load fr_display %}
{% load bookwyrm_tags %}
{% if request.user|follow_request_exists:user %}
<form action="/accept-follow-request/" method="POST">
{% csrf_token %}

View File

@ -1,4 +1,4 @@
{% load fr_display %}
{% load bookwyrm_tags %}
<div class="select">
{% with 0|uuid as uuid %}
{% if not no_label %}

View File

@ -1,4 +1,4 @@
{% load fr_display %}
{% load bookwyrm_tags %}
<span class="is-sr-only">Leave a rating</span>
<div class="field is-grouped stars rate-stars">
{% for i in '12345'|make_list %}

View File

@ -1,4 +1,4 @@
{% load fr_display %}
{% load bookwyrm_tags %}
{% with activity.id|uuid as uuid %}
<form class="is-flex-grow-1" name="reply" action="/reply" method="post" onsubmit="return reply(event)">
<div class="columns">
@ -13,7 +13,7 @@
<div class="column is-narrow">
<div class="field">
{% include 'snippets/privacy_select.html' %}
{% include 'snippets/privacy_select.html' with current=activity.privacy %}
</div>
<div class="field">
<button class="button is-primary" type="submit">

View File

@ -1,5 +1,5 @@
{% load humanize %}
{% load fr_display %}
{% load bookwyrm_tags %}
{% if shelf.books.all|length > 0 %}
<table class="table is-striped is-fullwidth">
@ -43,7 +43,7 @@
<a href="/book/{{ book.id }}">{{ book.title }}</a>
</td>
<td>
{{ book.authors.first.display_name }}
{{ book.authors.first.name }}
</td>
<td>
{% if book.first_published_date %}{{ book.first_published_date }}{% endif %}

View File

@ -1,4 +1,4 @@
{% load fr_display %}
{% load bookwyrm_tags %}
{% if request.user.is_authenticated %}
{% with book.id|uuid as uuid %}

View File

@ -1,4 +1,4 @@
{% load fr_display %}
{% load bookwyrm_tags %}
{% if not status.deleted %}
{% if status.status_type == 'Boost' %}
{% include 'snippets/avatar.html' with user=status.user %}

View File

@ -1,4 +1,4 @@
{% load fr_display %}
{% load bookwyrm_tags %}
{% load humanize %}
{% if not status.deleted %}

View File

@ -1,4 +1,4 @@
{% load fr_display %}
{% load bookwyrm_tags %}
<div class="block">
{% if status.status_type == 'Review' %}
<h3>

View File

@ -1,4 +1,4 @@
{% load fr_display %}
{% load bookwyrm_tags %}
{% include 'snippets/avatar.html' with user=status.user %}
{% include 'snippets/username.html' with user=status.user %}

View File

@ -1,14 +1,14 @@
<div class="control">
<form name="tag" action="/{% if tag.identifier in user_tags %}untag{% else %}tag{% endif %}/" method="post">
<form name="tag" action="/{% if tag.tag.identifier in user_tags %}untag{% else %}tag{% endif %}/" method="post">
{% csrf_token %}
<input type="hidden" name="book" value="{{ book.id }}">
<input type="hidden" name="name" value="{{ tag.name }}">
<input type="hidden" name="name" value="{{ tag.tag.name }}">
<div class="tags has-addons">
<a class="tag" href="/tag/{{ tag.identifier|urlencode }}">
{{ tag.name }}
<a class="tag" href="/tag/{{ tag.tag.identifier|urlencode }}">
{{ tag.tag.name }}
</a>
{% if tag.identifier in user_tags %}
{% if tag.tag.identifier in user_tags %}
<button class="tag is-delete" type="submit">
<span class="is-sr-only">remove tag</span>
</button>

View File

@ -1,4 +1,4 @@
{% load fr_display %}
{% load bookwyrm_tags %}
<div class="block">
{% with depth=depth|add:1 %}

View File

@ -1,8 +1,8 @@
{% load fr_display %}
{% load bookwyrm_tags %}
{% with 0|uuid as uuid %}
{% if full %}
{% with full|text_overflow as trimmed %}
{% with full|truncatewords_html:60 as trimmed %}
{% if trimmed != full %}
<div>
<input type="radio" name="show-hide-{{ uuid }}" id="show-{{ uuid }}" class="toggle-control" checked>

View File

@ -1,5 +1,5 @@
{% load humanize %}
{% load fr_display %}
{% load bookwyrm_tags %}
<div class="block">
<div class="columns">
<div class="column is-narrow">

View File

@ -1,2 +1,2 @@
{% load fr_display %}
{% load bookwyrm_tags %}
<a href="/user/{{ user | username }}" class="user">{% if user.name %}{{ user.name }}{% else %}{{ user | username }}{% endif %}</a>{% if possessive %}'s{% endif %}{% if show_full and user.name or show_full and user.localname %} ({{ user.username }}){% endif %}

View File

@ -1,5 +1,5 @@
{% extends 'layout.html' %}
{% load fr_display %}
{% load bookwyrm_tags %}
{% block content %}
<div class="block">