Merge branch 'main' into progress_update
This commit is contained in:
@ -3,13 +3,13 @@
|
||||
|
||||
<div class="columns">
|
||||
<div class="column block">
|
||||
{% include 'snippets/about.html' with site_settings=site_settings %}
|
||||
{% include 'snippets/about.html' %}
|
||||
</div>
|
||||
|
||||
<div class="column block">
|
||||
<h2 class="title">Code of Conduct</h2>
|
||||
<div class="content">
|
||||
{{ site_settings.code_of_conduct | safe }}
|
||||
{{ site.code_of_conduct | safe }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1,18 +1,36 @@
|
||||
{% extends 'layout.html' %}
|
||||
{% load fr_display %}
|
||||
{% load bookwyrm_tags %}
|
||||
{% block content %}
|
||||
<div class="block">
|
||||
<h1 class="title">{{ author.display_name }}</h1>
|
||||
<div class="columns">
|
||||
<div class="column">
|
||||
<h1 class="title">{{ author.name }}</h1>
|
||||
</div>
|
||||
{% if request.user.is_authenticated and perms.bookwyrm.edit_book %}
|
||||
<div class="column is-narrow">
|
||||
<a href="{{ author.local_path }}/edit">
|
||||
<span class="icon icon-pencil">
|
||||
<span class="is-sr-only">Edit Author</span>
|
||||
</span>
|
||||
</a>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="block">
|
||||
{% if author.bio %}
|
||||
<p>
|
||||
{{ author.bio }}
|
||||
{{ author.bio | to_markdown | safe }}
|
||||
</p>
|
||||
{% endif %}
|
||||
{% if author.wikipedia_link %}
|
||||
<p><a href="{{ author.wikipedia_link }}" rel=”noopener” target="_blank">Wikipedia</a></p>
|
||||
{% endif %}
|
||||
</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 %}
|
||||
|
@ -1,16 +1,27 @@
|
||||
{% extends 'layout.html' %}
|
||||
{% load fr_display %}
|
||||
{% load bookwyrm_tags %}
|
||||
{% load humanize %}
|
||||
{% block content %}
|
||||
|
||||
<div class="block">
|
||||
<div class="level">
|
||||
<h1 class="title level-left">
|
||||
<span>{% include 'snippets/book_titleby.html' with book=book %}</span>
|
||||
</h1>
|
||||
<div class="columns">
|
||||
<div class="column">
|
||||
<h1 class="title">
|
||||
{{ book.title }}{% if book.subtitle %}:
|
||||
<small>{{ book.subtitle }}</small>{% endif %}
|
||||
{% if book.series %}
|
||||
<small class="has-text-grey-dark">({{ book.series }}{% if book.series_number %} #{{ book.series_number }}{% endif %})</small><br>
|
||||
{% endif %}
|
||||
</h1>
|
||||
{% if book.authors %}
|
||||
<h2 class="subtitle">
|
||||
by {% include 'snippets/authors.html' with book=book %}
|
||||
</h2>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
{% if request.user.is_authenticated and perms.bookwyrm.edit_book %}
|
||||
<div class="level-right">
|
||||
<div class="column is-narrow">
|
||||
<a href="{{ book.id }}/edit">
|
||||
<span class="icon icon-pencil">
|
||||
<span class="is-sr-only">Edit Book</span>
|
||||
@ -41,19 +52,44 @@
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<dl class="content">
|
||||
{% for field in info_fields %}
|
||||
{% if field.value %}
|
||||
<dt>{{ field.name }}:</dt>
|
||||
<dd>{{ field.value }}</dd>
|
||||
<section class="content">
|
||||
<dl>
|
||||
{% if book.isbn_13 %}
|
||||
<div class="is-flex is-justify-content-space-between">
|
||||
<dt>ISBN:</dt>
|
||||
<dd>{{ book.isbn_13 }}</dd>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if book.oclc_number %}
|
||||
<div class="is-flex is-justify-content-space-between">
|
||||
<dt>OCLC Number:</dt>
|
||||
<dd>{{ book.oclc_number }}</dd>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if book.asin %}
|
||||
<div class="is-flex is-justify-content-space-between">
|
||||
<dt>ASIN:</dt>
|
||||
<dd>{{ book.asin }}</dd>
|
||||
</div>
|
||||
{% endif %}
|
||||
</dl>
|
||||
|
||||
<p>
|
||||
{% if book.physical_format %}{{ book.physical_format | title }}{% if book.pages %},<br>{% endif %}{% endif %}
|
||||
{% if book.pages %}{{ book.pages }} pages{% endif %}
|
||||
</p>
|
||||
|
||||
{% if book.openlibrary_key %}
|
||||
<p><a href="https://openlibrary.org/books/{{ book.openlibrary_key }}" target="_blank" rel="noopener">View on OpenLibrary</a></p>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</dl>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
<div class="column">
|
||||
<div class="block">
|
||||
<h3 class="field is-grouped">{% include 'snippets/stars.html' with rating=rating %} ({{ reviews|length }} review{{ reviews|length|pluralize }})</h3>
|
||||
<h3 class="field is-grouped">{% include 'snippets/stars.html' with rating=rating %} ({{ review_count }} review{{ reviews|length|pluralize }})</h3>
|
||||
|
||||
{% include 'snippets/trimmed_text.html' with full=book|book_description %}
|
||||
|
||||
@ -86,143 +122,56 @@
|
||||
{% 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>
|
||||
|
||||
{% for readthrough in readthroughs %}
|
||||
<div class="content block">
|
||||
<input class="toggle-control" type="radio" name="show-edit-readthrough" id="show-readthrough-{{ readthrough.id }}" checked>
|
||||
<div class="toggle-content hidden">
|
||||
<dl>
|
||||
{% if readthrough.start_date %}
|
||||
<dt>Started reading:</dt>
|
||||
<dd>{{ readthrough.start_date | naturalday }}</dd>
|
||||
{% endif %}
|
||||
{% if readthrough.finish_date %}
|
||||
<dt>Finished reading:</dt>
|
||||
<dd>{{ readthrough.finish_date | naturalday }}</dd>
|
||||
{% elif readthrough.progress %}
|
||||
<dt>Progress:</dt>
|
||||
{% if readthrough.progress_mode == 'PG' %}
|
||||
<dd>on page {{ readthrough.progress }} of {{ book.pages }}</dd>
|
||||
{% else %}
|
||||
<dd>{{ readthrough.progress }}%</dd>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</dl>
|
||||
<div class="field is-grouped">
|
||||
<label class="button is-small" for="edit-readthrough-{{ readthrough.id }}" role="button" tabindex="0">
|
||||
<span class="icon icon-pencil">
|
||||
<span class="is-sr-only">Edit read-through dates</span>
|
||||
</span>
|
||||
</label>
|
||||
<label class="button is-small" for="delete-readthrough-{{ readthrough.id }}" role="button" tabindex="0">
|
||||
<span class="icon icon-x">
|
||||
<span class="is-sr-only">Delete this read-through</span>
|
||||
</span>
|
||||
</label>
|
||||
</div>
|
||||
{% if show_progress %}
|
||||
Progress Updates:
|
||||
<ul>
|
||||
{% if readthrough.finish_date %}
|
||||
<li>{{ readthrough.start_date | naturalday }}: finished</li>
|
||||
{% endif %}
|
||||
{% for progress_update in readthrough.progress_updates %}
|
||||
<li>
|
||||
{{ progress_update.created_date | naturalday }}:
|
||||
{% if progress_update.mode == 'PG' %}
|
||||
page {{ progress_update.progress }} of {{ book.pages }}
|
||||
{% else %}
|
||||
{{ progress_update.progress }}%
|
||||
{% endif %}
|
||||
</li>
|
||||
{% endfor %}
|
||||
<li>{{ readthrough.start_date | naturalday }}: started</li>
|
||||
</ul>
|
||||
{% elif readthrough.progress_updates|length %}
|
||||
<a href="?showprogress">Show {{ readthrough.progress_updates|length }} Progress Updates</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
{# user's relationship to the book #}
|
||||
<div class="block">
|
||||
{% for shelf in user_shelves %}
|
||||
<p>
|
||||
This edition is on your <a href="/user/{{ user.localname }}/shelf/{{ shelf.shelf.identifier }}">{{ shelf.shelf.name }}</a> shelf.
|
||||
{% include 'snippets/shelf_selector.html' with current=shelf.shelf %}
|
||||
</p>
|
||||
{% endfor %}
|
||||
{% for shelf in other_edition_shelves %}
|
||||
<p>
|
||||
A <a href="/book/{{ shelf.book.id }}">different edition</a> of this book is on your <a href="/user/{{ user.localname }}/shelf/{{ shelf.shelf.identifier }}">{{ shelf.shelf.name }}</a> shelf.
|
||||
{% include 'snippets/switch_edition_button.html' with edition=book %}
|
||||
</p>
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
||||
{% if readthroughs.exists %}
|
||||
<div>
|
||||
<h2 class="title is-5">Your reading activity</h2>
|
||||
{% for readthrough in readthroughs %}
|
||||
{% include 'snippets/readthrough.html' with readthrough=readthrough %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="block">
|
||||
<input class="toggle-control" type="radio" name="show-edit-readthrough" id="edit-readthrough-{{ readthrough.id }}">
|
||||
<div class="toggle-content hidden">
|
||||
<div class="box">
|
||||
<form name="edit-readthrough" action="/edit-readthrough" method="post">
|
||||
{% csrf_token %}
|
||||
<input type="hidden" name="id" value="{{ readthrough.id }}">
|
||||
<div class="field">
|
||||
<label class="label">
|
||||
Started reading
|
||||
<input type="date" name="start_date" class="input" id="id_start_date-{{ readthrough.id }}" value="{{ readthrough.start_date | date:"Y-m-d" }}">
|
||||
</label>
|
||||
</div>
|
||||
<div class="columns">
|
||||
<div class="column">
|
||||
<div class="field">
|
||||
<label class="label">
|
||||
Progress
|
||||
<input type="number" name="progress" class="input" id="id_progress-{{ readthrough.id }}" value="{{ readthrough.progress }}">
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="column">
|
||||
<div class="control mt-5">
|
||||
<label class="radio">
|
||||
<input type="radio" name="progress_mode" id="id_progress_mode-{{ readthrough.id }}" value="PG" {% if readthrough.progress_mode == 'PG' %}checked{% endif %}>
|
||||
pages
|
||||
</label>
|
||||
<label class="radio">
|
||||
<input type="radio" name="progress_mode" id="id_progress_mode-{{ readthrough.id }}" value="PCT" {% if readthrough.progress_mode == 'PCT' %}checked{% endif %}>
|
||||
percent
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="field">
|
||||
<label class="label">
|
||||
Finished reading
|
||||
<input type="date" name="finish_date" class="input" id="id_finish_date-{{ readthrough.id }}" value="{{ readthrough.finish_date | date:"Y-m-d" }}">
|
||||
</label>
|
||||
</div>
|
||||
<div>
|
||||
<input type="radio" class="toggle-control" name="add-readthrough-form" id="hide-create-readthrough" checked>
|
||||
<div class="toggle-content hidden">
|
||||
<label class="button" for="add-readthrough" class="button" role="button" tabindex="0">Add read dates</label>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<input type="radio" class="toggle-control" id="add-readthrough" name="add-readthrough-form">
|
||||
<div class="toggle-content hidden box">
|
||||
<form name="add-readthrough" action="/create-readthrough" method="post">
|
||||
{% include 'snippets/readthrough_form.html' with readthrough=None %}
|
||||
<div class="field is-grouped">
|
||||
<button class="button is-primary" type="submit">Save</button>
|
||||
<label class="button" for="show-readthrough-{{ readthrough.id }}" role="button" tabindex="0">Cancel</label>
|
||||
<button class="button is-primary" type="submit">Create</button>
|
||||
<label class="button" for="hide-create-readthrough" role="button" tabindex="0">Cancel</label>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<input class="toggle-control" type="checkbox" name="delete-readthrough-{{ readthrough.id }}" id="delete-readthrough-{{ readthrough.id }}">
|
||||
<div class="modal toggle-content hidden">
|
||||
<div class="modal-background"></div>
|
||||
<div class="modal-card">
|
||||
<header class="modal-card-head">
|
||||
<p class="modal-card-title">Delete this read-though?</p>
|
||||
<label class="delete" for="delete-readthrough-{{ readthrough.id }}" aria-label="close"></label>
|
||||
</header>
|
||||
<footer class="modal-card-foot">
|
||||
<form name="delete-readthrough-{{ readthrough.id }}" action="/delete-readthrough" method="POST">
|
||||
{% csrf_token %}
|
||||
<input type="hidden" name="id" value="{{ readthrough.id }}">
|
||||
<button class="button is-danger is-light" type="submit">
|
||||
Delete
|
||||
</button>
|
||||
<label for="delete-readthrough-{{ readthrough.id }}" class="button" role="button" tabindex="0">Cancel</button>
|
||||
</form>
|
||||
</footer>
|
||||
</div>
|
||||
<label class="modal-close is-large" for="delete-readthrough-{{ readthrough.id }}" aria-label="close"></label>
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
|
||||
{% if request.user.is_authenticated %}
|
||||
<div class="box">
|
||||
{% include 'snippets/create_status.html' with book=book hide_cover=True %}
|
||||
@ -248,16 +197,32 @@
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="column is-narrow">
|
||||
{% if book.subjects %}
|
||||
<section class="content block">
|
||||
<h2 class="title is-5">Subjects</h2>
|
||||
<ul>
|
||||
{% for subject in book.subjects %}
|
||||
<li>{{ subject }}</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</section>
|
||||
{% endif %}
|
||||
|
||||
{% if book.subject_places %}
|
||||
<section class="content block">
|
||||
<h2 class="title is-5">Places</h2>
|
||||
<ul>
|
||||
{% for place in book.subject_placess %}
|
||||
<li>{{ place }}</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</section>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
{% if not reviews %}
|
||||
<div class="block">
|
||||
<p>No reviews yet!</p>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<div class="block">
|
||||
{% for review in reviews %}
|
||||
<div class="block">
|
||||
@ -265,14 +230,14 @@
|
||||
</div>
|
||||
{% endfor %}
|
||||
|
||||
<div class="block columns">
|
||||
<div class="block is-flex is-flex-wrap-wrap">
|
||||
{% for rating in ratings %}
|
||||
<div class="column">
|
||||
<div class="block mr-5">
|
||||
<div class="media">
|
||||
<div class="media-left">{% include 'snippets/avatar.html' %}</div>
|
||||
<div class="media-left">{% include 'snippets/avatar.html' with user=rating.user %}</div>
|
||||
<div class="media-content">
|
||||
<div>
|
||||
{% include 'snippets/username.html' %}
|
||||
{% include 'snippets/username.html' with user=rating.user %}
|
||||
</div>
|
||||
<div class="field is-grouped mb-0">
|
||||
<div>rated it</div>
|
||||
@ -288,6 +253,5 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
{% endblock %}
|
||||
|
||||
|
37
bookwyrm/templates/direct_messages.html
Normal file
37
bookwyrm/templates/direct_messages.html
Normal 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 %}
|
80
bookwyrm/templates/discover.html
Normal file
80
bookwyrm/templates/discover.html
Normal file
@ -0,0 +1,80 @@
|
||||
{% extends 'layout.html' %}
|
||||
{% block content %}
|
||||
|
||||
{% if not request.user.is_authenticated %}
|
||||
<div class="block">
|
||||
<h1 class="title has-text-centered">{{ site.name }}: {{ site.instance_tagline }}</h1>
|
||||
</div>
|
||||
|
||||
<section class="tile is-ancestor">
|
||||
<div class="tile is-7 is-parent">
|
||||
<div class="tile is-child box">
|
||||
{% include 'snippets/about.html' %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="tile is-5 is-parent">
|
||||
<div class="tile is-child box has-background-primary-light content">
|
||||
{% if site.allow_registration %}
|
||||
<h2 class="title">Join {{ site.name }}</h2>
|
||||
<form name="register" method="post" action="/user-register">
|
||||
{% include 'snippets/register_form.html' %}
|
||||
</form>
|
||||
{% else %}
|
||||
<h2 class="title">This instance is closed</h2>
|
||||
<p>{{ site.registration_closed_text | safe}}</p>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
{% else %}
|
||||
<div class="block">
|
||||
<h1 class="title has-text-centered">Discover</h1>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<div class="block is-hidden-tablet">
|
||||
<h2 class="title has-text-centered">Recent Books</h2>
|
||||
</div>
|
||||
|
||||
<section class="tile is-ancestor">
|
||||
<div class="tile is-vertical">
|
||||
<div class="tile is-parent">
|
||||
<div class="tile is-child box has-background-white-ter">
|
||||
{% include 'snippets/discover/large-book.html' with book=books.0 %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="tile">
|
||||
<div class="tile is-parent is-6">
|
||||
<div class="tile is-child box has-background-white-ter">
|
||||
{% include 'snippets/discover/small-book.html' with book=books.1 %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="tile is-parent is-6">
|
||||
<div class="tile is-child box has-background-white-ter">
|
||||
{% include 'snippets/discover/small-book.html' with book=books.2 %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="tile is-vertical">
|
||||
<div class="tile">
|
||||
<div class="tile is-parent is-6">
|
||||
<div class="tile is-child box has-background-white-ter">
|
||||
{% include 'snippets/discover/small-book.html' with book=books.3 %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="tile is-parent is-6">
|
||||
<div class="tile is-child box has-background-white-ter">
|
||||
{% include 'snippets/discover/small-book.html' with book=books.4 %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="tile is-parent">
|
||||
<div class="tile is-child box has-background-white-ter">
|
||||
{% include 'snippets/discover/large-book.html' with book=books.5 %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
{% endblock %}
|
89
bookwyrm/templates/edit_author.html
Normal file
89
bookwyrm/templates/edit_author.html
Normal file
@ -0,0 +1,89 @@
|
||||
{% extends 'layout.html' %}
|
||||
{% load humanize %}
|
||||
{% block content %}
|
||||
<div class="block">
|
||||
<div class="level">
|
||||
<h1 class="title level-left">
|
||||
Edit "{{ author.name }}"
|
||||
</h1>
|
||||
<div class="level-right">
|
||||
<a href="/author/{{ author.id }}">
|
||||
<span class="edit-link icon icon-close">
|
||||
<span class="is-sr-only">Close</span>
|
||||
</span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<p>Added: {{ author.created_date | naturaltime }}</p>
|
||||
<p>Updated: {{ author.updated_date | naturaltime }}</p>
|
||||
<p>Last edited by: <a href="{{ author.last_edited_by.remote_id }}">{{ author.last_edited_by.display_name }}</a></p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% if form.non_field_errors %}
|
||||
<div class="block">
|
||||
<p class="notification is-danger">{{ form.non_field_errors }}</p>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<form class="block" name="edit-author" action="/edit-author/{{ author.id }}" method="post">
|
||||
{% csrf_token %}
|
||||
<input type="hidden" name="last_edited_by" value="{{ request.user.id }}">
|
||||
|
||||
<div class="columns">
|
||||
<div class="column">
|
||||
<h2 class="title is-4">Metadata</h2>
|
||||
<p><label class="label" for="id_name">Name:</label> {{ form.name }}</p>
|
||||
{% for error in form.name.errors %}
|
||||
<p class="help is-danger">{{ error | escape }}</p>
|
||||
{% endfor %}
|
||||
|
||||
<p><label class="label" for="id_bio">Bio:</label> {{ form.bio }}</p>
|
||||
{% for error in form.bio.errors %}
|
||||
<p class="help is-danger">{{ error | escape }}</p>
|
||||
{% endfor %}
|
||||
|
||||
<p><label class="label" for="id_wikipedia_link">Wikipedia link:</label> {{ form.wikipedia_link }}</p>
|
||||
{% for error in form.wikipedia_link.errors %}
|
||||
<p class="help is-danger">{{ error | escape }}</p>
|
||||
{% endfor %}
|
||||
|
||||
<p><label class="label" for="id_born">Birth date:</label> {{ form.born }}</p>
|
||||
{% for error in form.born.errors %}
|
||||
<p class="help is-danger">{{ error | escape }}</p>
|
||||
{% endfor %}
|
||||
|
||||
<p><label class="label" for="id_died">Death date:</label> {{ form.died }}</p>
|
||||
{% for error in form.died.errors %}
|
||||
<p class="help is-danger">{{ error | escape }}</p>
|
||||
{% endfor %}
|
||||
</div>
|
||||
<div class="column">
|
||||
<h2 class="title is-4">Author Identifiers</h2>
|
||||
<p><label class="label" for="id_openlibrary_key">Openlibrary key:</label> {{ form.openlibrary_key }}</p>
|
||||
{% for error in form.openlibrary_key.errors %}
|
||||
<p class="help is-danger">{{ error | escape }}</p>
|
||||
{% endfor %}
|
||||
|
||||
<p><label class="label" for="id_librarything_key">Librarything key:</label> {{ form.librarything_key }}</p>
|
||||
{% for error in form.librarything_key.errors %}
|
||||
<p class="help is-danger">{{ error | escape }}</p>
|
||||
{% endfor %}
|
||||
|
||||
<p><label class="label" for="id_goodreads_key">Goodreads key:</label> {{ form.goodreads_key }}</p>
|
||||
{% for error in form.goodreads_key.errors %}
|
||||
<p class="help is-danger">{{ error | escape }}</p>
|
||||
{% endfor %}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="block">
|
||||
<button class="button is-primary" type="submit">Save</button>
|
||||
<a class="button" href="/author/{{ author.id }}">Cancel</a>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
{% endblock %}
|
||||
|
@ -17,63 +17,47 @@
|
||||
<div>
|
||||
<p>Added: {{ book.created_date | naturaltime }}</p>
|
||||
<p>Updated: {{ book.updated_date | naturaltime }}</p>
|
||||
<p>Last edited by: <a href="{{ book.last_edited_by.remote_id }}">{{ book.last_edited_by.display_name }}</a></p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% if login_form.non_field_errors %}
|
||||
{% if form.non_field_errors %}
|
||||
<div class="block">
|
||||
<p class="notification is-danger">{{ login_form.non_field_errors }}</p>
|
||||
<p class="notification is-danger">{{ form.non_field_errors }}</p>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<form class="block" name="edit-book" action="/edit-book/{{ book.id }}" method="post" enctype="multipart/form-data">
|
||||
{% csrf_token %}
|
||||
<div class="block">
|
||||
<h2 class="title is-4">Data sync
|
||||
<p class="subtitle is-6">If sync is enabled, any changes will be over-written</p>
|
||||
</h2>
|
||||
<div class="columns">
|
||||
<div class="column is-narrow">
|
||||
<label class="checkbox" for="id_sync"><input class="checkbox" type="checkbox" name="sync" id="id_sync"> Sync</label>
|
||||
</div>
|
||||
<div class="column is-narrow">
|
||||
<label class="checkbox" for="id_sync_cover"><input class="checkbox" type="checkbox" name="sync_cover" id="id_sync_cover"> Sync cover</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<input type="hidden" name="last_edited_by" value="{{ request.user.id }}">
|
||||
<div class="columns">
|
||||
<div class="column">
|
||||
<h2 class="title is-4">Metadata</h2>
|
||||
<p class="fields is-grouped"><label class="label"for="id_title">Title:</label> {{ form.title }} </p>
|
||||
<p class="fields is-grouped"><label class="label" for="id_title">Title:</label> {{ form.title }} </p>
|
||||
{% for error in form.title.errors %}
|
||||
<p class="help is-danger">{{ error | escape }}</p>
|
||||
{% endfor %}
|
||||
<p class="fields is-grouped"><label class="label"for="id_sort_title">Sort title:</label> {{ form.sort_title }} </p>
|
||||
{% for error in form.sort_title.errors %}
|
||||
<p class="help is-danger">{{ error | escape }}</p>
|
||||
{% endfor %}
|
||||
<p class="fields is-grouped"><label class="label"for="id_subtitle">Subtitle:</label> {{ form.subtitle }} </p>
|
||||
<p class="fields is-grouped"><label class="label" for="id_subtitle">Subtitle:</label> {{ form.subtitle }} </p>
|
||||
{% for error in form.subtitle.errors %}
|
||||
<p class="help is-danger">{{ error | escape }}</p>
|
||||
{% endfor %}
|
||||
<p class="fields is-grouped"><label class="label"for="id_description">Description:</label> {{ form.description }} </p>
|
||||
<p class="fields is-grouped"><label class="label" for="id_description">Description:</label> {{ form.description }} </p>
|
||||
{% for error in form.description.errors %}
|
||||
<p class="help is-danger">{{ error | escape }}</p>
|
||||
{% endfor %}
|
||||
<p class="fields is-grouped"><label class="label"for="id_series">Series:</label> {{ form.series }} </p>
|
||||
<p class="fields is-grouped"><label class="label" for="id_series">Series:</label> {{ form.series }} </p>
|
||||
{% for error in form.series.errors %}
|
||||
<p class="help is-danger">{{ error | escape }}</p>
|
||||
{% endfor %}
|
||||
<p class="fields is-grouped"><label class="label"for="id_series_number">Series number:</label> {{ form.series_number }} </p>
|
||||
<p class="fields is-grouped"><label class="label" for="id_series_number">Series number:</label> {{ form.series_number }} </p>
|
||||
{% for error in form.series_number.errors %}
|
||||
<p class="help is-danger">{{ error | escape }}</p>
|
||||
{% endfor %}
|
||||
<p class="fields is-grouped"><label class="label"for="id_first_published_date">First published date:</label> {{ form.first_published_date }} </p>
|
||||
<p class="fields is-grouped"><label class="label" for="id_first_published_date">First published date:</label> {{ form.first_published_date }} </p>
|
||||
{% for error in form.first_published_date.errors %}
|
||||
<p class="help is-danger">{{ error | escape }}</p>
|
||||
{% endfor %}
|
||||
<p class="fields is-grouped"><label class="label"for="id_published_date">Published date:</label> {{ form.published_date }} </p>
|
||||
<p class="fields is-grouped"><label class="label" for="id_published_date">Published date:</label> {{ form.published_date }} </p>
|
||||
{% for error in form.published_date.errors %}
|
||||
<p class="help is-danger">{{ error | escape }}</p>
|
||||
{% endfor %}
|
||||
@ -97,7 +81,7 @@
|
||||
|
||||
<div class="block">
|
||||
<h2 class="title is-4">Physical Properties</h2>
|
||||
<p class="fields is-grouped"><label class="label"for="id_physical_format">Format:</label> {{ form.physical_format }} </p>
|
||||
<p class="fields is-grouped"><label class="label" for="id_physical_format">Format:</label> {{ form.physical_format }} </p>
|
||||
{% for error in form.physical_format.errors %}
|
||||
<p class="help is-danger">{{ error | escape }}</p>
|
||||
{% endfor %}
|
||||
@ -105,7 +89,7 @@
|
||||
<p class="help is-danger">{{ error | escape }}</p>
|
||||
{% endfor %}
|
||||
|
||||
<p class="fields is-grouped"><label class="label"for="id_pages">Pages:</label> {{ form.pages }} </p>
|
||||
<p class="fields is-grouped"><label class="label" for="id_pages">Pages:</label> {{ form.pages }} </p>
|
||||
{% for error in form.pages.errors %}
|
||||
<p class="help is-danger">{{ error | escape }}</p>
|
||||
{% endfor %}
|
||||
@ -113,24 +97,24 @@
|
||||
|
||||
<div class="block">
|
||||
<h2 class="title is-4">Book Identifiers</h2>
|
||||
<p class="fields is-grouped"><label class="label"for="id_isbn_13">ISBN 13:</label> {{ form.isbn_13 }} </p>
|
||||
<p class="fields is-grouped"><label class="label" for="id_isbn_13">ISBN 13:</label> {{ form.isbn_13 }} </p>
|
||||
{% for error in form.isbn_13.errors %}
|
||||
<p class="help is-danger">{{ error | escape }}</p>
|
||||
{% endfor %}
|
||||
<p class="fields is-grouped"><label class="label"for="id_isbn_10">ISBN 10:</label> {{ form.isbn_10 }} </p>
|
||||
<p class="fields is-grouped"><label class="label" for="id_isbn_10">ISBN 10:</label> {{ form.isbn_10 }} </p>
|
||||
{% for error in form.isbn_10.errors %}
|
||||
<p class="help is-danger">{{ error | escape }}</p>
|
||||
{% endfor %}
|
||||
<p class="fields is-grouped"><label class="label"for="id_openlibrary_key">Openlibrary key:</label> {{ form.openlibrary_key }} </p>
|
||||
<p class="fields is-grouped"><label class="label" for="id_openlibrary_key">Openlibrary key:</label> {{ form.openlibrary_key }} </p>
|
||||
{% for error in form.openlibrary_key.errors %}
|
||||
<p class="help is-danger">{{ error | escape }}</p>
|
||||
{% endfor %}
|
||||
<p class="fields is-grouped"><label class="label"for="id_librarything_key">Librarything key:</label> {{ form.librarything_key }} </p>
|
||||
{% for error in form.librarything_key.errors %}
|
||||
<p class="fields is-grouped"><label class="label" for="id_librarything_key">OCLC Number:</label> {{ form.oclc_number }} </p>
|
||||
{% for error in form.oclc_number.errors %}
|
||||
<p class="help is-danger">{{ error | escape }}</p>
|
||||
{% endfor %}
|
||||
<p class="fields is-grouped"><label class="label"for="id_goodreads_key">Goodreads key:</label> {{ form.goodreads_key }} </p>
|
||||
{% for error in form.goodreads_key.errors %}
|
||||
<p class="fields is-grouped"><label class="label" for="id_asin">ASIN:</label> {{ form.asin }} </p>
|
||||
{% for error in form.ASIN.errors %}
|
||||
<p class="help is-danger">{{ error | escape }}</p>
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
@ -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>
|
||||
|
@ -1,5 +1,5 @@
|
||||
{% extends 'layout.html' %}
|
||||
{% load fr_display %}
|
||||
{% load bookwyrm_tags %}
|
||||
{% block content %}
|
||||
|
||||
<div class="columns">
|
||||
@ -44,26 +44,38 @@
|
||||
<div>
|
||||
<input class="toggle-control" type="radio" name="recent-books" id="book-{{ book.id }}" {% if shelf_counter == 1 and forloop.first %}checked{% endif %}>
|
||||
<div class="toggle-content hidden" role="tabpanel" id="book-{{ book.id }}-panel">
|
||||
<div class="block">
|
||||
{% include 'snippets/book_titleby.html' with book=book %}
|
||||
<div class="columns is-gapless">
|
||||
<div class="column is-narrow">
|
||||
{% include 'snippets/shelve_button.html' with book=book %}
|
||||
{% active_shelf book as active_shelf %}
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<p class="card-header-title">
|
||||
<span>{% include 'snippets/book_titleby.html' with book=book %}</span>
|
||||
</>
|
||||
<div class="card-header-icon is-hidden-tablet">
|
||||
<label class="delete" for="no-book" aria-label="close" role="button"></label>
|
||||
</div>
|
||||
{% if active_shelf.identifier == 'reading' and book.latest_readthrough %}
|
||||
<div class="column">
|
||||
{% include 'snippets/progress_update.html' with readthrough=book.latest_readthrough %}
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="card-content">
|
||||
<div class="columns is-gapless">
|
||||
<div class="column is-narrow">
|
||||
{% include 'snippets/shelve_button.html' with book=book %}
|
||||
{% active_shelf book as active_shelf %}
|
||||
</div>
|
||||
{% if active_shelf.identifier == 'reading' and book.latest_readthrough %}
|
||||
<div class="column">
|
||||
{% include 'snippets/progress_update.html' with readthrough=book.latest_readthrough %}
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% include 'snippets/create_status.html' with book=book %}
|
||||
</div>
|
||||
</div>
|
||||
{% include 'snippets/create_status.html' with book=book %}
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
{% endwith %}
|
||||
{% endfor %}
|
||||
<div>
|
||||
<input class="toggle-control" type="radio" name="recent-books" id="no-book">
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
{% extends 'layout.html' %}
|
||||
{% load fr_display %}
|
||||
{% load bookwyrm_tags %}
|
||||
{% block content %}
|
||||
<div class="block">
|
||||
<h1 class="title">
|
||||
|
@ -1,5 +1,5 @@
|
||||
{% extends 'layout.html' %}
|
||||
{% load fr_display %}
|
||||
{% load bookwyrm_tags %}
|
||||
{% block content %}
|
||||
<div class="block">
|
||||
<h1 class="title">
|
||||
@ -31,7 +31,7 @@
|
||||
</div>
|
||||
{% endfor %}
|
||||
{% if not following.count %}
|
||||
<div>No one is following {{ user|username }}</div>
|
||||
<div>{{ user|username }} isn't following any users</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
|
@ -21,8 +21,6 @@
|
||||
</div>
|
||||
<button class="button is-primary" type="submit">Import</button>
|
||||
</form>
|
||||
<p>
|
||||
Imports are limited in size, and only the first {{ limit }} items will be imported.
|
||||
</div>
|
||||
|
||||
<div class="content block">
|
||||
|
@ -1,5 +1,5 @@
|
||||
{% extends 'layout.html' %}
|
||||
{% load fr_display %}
|
||||
{% load bookwyrm_tags %}
|
||||
{% load humanize %}
|
||||
{% block content %}
|
||||
<div class="block">
|
||||
@ -8,7 +8,7 @@
|
||||
<p>
|
||||
Import started: {{ job.created_date | naturaltime }}
|
||||
</p>
|
||||
{% if task.successful %}
|
||||
{% if job.complete %}
|
||||
<p>
|
||||
Import completed: {{ task.date_done | naturaltime }}
|
||||
</p>
|
||||
@ -18,7 +18,7 @@
|
||||
</div>
|
||||
|
||||
<div class="block">
|
||||
{% if not task.ready %}
|
||||
{% if not job.complete %}
|
||||
Import still in progress.
|
||||
<p>
|
||||
(Hit reload to update!)
|
||||
|
@ -3,7 +3,8 @@
|
||||
|
||||
<div class="columns">
|
||||
<div class="column">
|
||||
<div class="block login">
|
||||
<div class="block">
|
||||
{% if valid %}
|
||||
<h1 class="title">Create an Account</h1>
|
||||
<div>
|
||||
<form name="register" method="post" action="/user-register">
|
||||
@ -11,11 +12,17 @@
|
||||
{% include 'snippets/register_form.html' %}
|
||||
</form>
|
||||
</div>
|
||||
{% else %}
|
||||
<div class="content">
|
||||
<h1 class="title">Permission Denied</h1>
|
||||
<p>Sorry! This invite code is no longer valid.</p>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="column">
|
||||
<div class="block">
|
||||
{% include 'snippets/about.html' with site_settings=site_settings %}
|
||||
{% include 'snippets/about.html' %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1,29 +1,30 @@
|
||||
{% load fr_display %}
|
||||
{% load bookwyrm_tags %}
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>{% if title %}{{ title }} | {% endif %}BookWyrm</title>
|
||||
<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">
|
||||
<link rel="shortcut icon" type="image/x-icon" href="{% if site.favicon %}/images/{{ site.favicon }}{% else %}/static/images/favicon.ico{% endif %}">
|
||||
|
||||
<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">
|
||||
<meta name="twitter:title" content="{% if title %}{{ title }} | {% endif %}{{ site.name }}">
|
||||
<meta name="og:title" content="{% if title %}{{ title }} | {% endif %}{{ site.name }}">
|
||||
<meta name="twitter:description" content="{{ site.instance_tagline }}">
|
||||
<meta name="og:description" content="{{ site.instance_tagline }}">
|
||||
|
||||
<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">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<nav class="navbar" role="navigation" aria-label="main navigation">
|
||||
<nav class="navbar container" 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">
|
||||
<img class="image logo" src="{% if site.logo_small %}/images/{{ site.logo_small }}{% else %}/static/images/logo-small.png{% endif %}" alt="Home page">
|
||||
</a>
|
||||
<form class="navbar-item column" action="/search/">
|
||||
<div class="field has-addons">
|
||||
@ -65,30 +66,45 @@
|
||||
<div class="navbar-end">
|
||||
{% if request.user.is_authenticated %}
|
||||
<div class="navbar-item has-dropdown is-hoverable">
|
||||
<div class="navbar-link"><p>
|
||||
<div class="navbar-link" role="button" aria-expanded=false" onclick="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>
|
||||
<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="/import" class="navbar-item">
|
||||
Import books
|
||||
</a>
|
||||
<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 %}
|
||||
<a href="/invite" class="navbar-item">
|
||||
Invites
|
||||
</a>
|
||||
<li>
|
||||
<a href="/invite" class="navbar-item">
|
||||
Invites
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
<hr class="navbar-divider">
|
||||
<a href="/logout" class="navbar-item">
|
||||
Log out
|
||||
</a>
|
||||
</div>
|
||||
<li>
|
||||
<a href="/logout" class="navbar-item">
|
||||
Log out
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="navbar-item">
|
||||
<a href="/notifications">
|
||||
@ -104,29 +120,77 @@
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
{% else %}
|
||||
{% else %}
|
||||
<div class="navbar-item">
|
||||
<div class="buttons">
|
||||
<a href="/login" class="button is-primary">
|
||||
Join
|
||||
</a>
|
||||
{% if request.path != '/login' and request.path != '/login/' and request.path != '/user-login' %}
|
||||
<div class="columns">
|
||||
<div class="column">
|
||||
<form name="login" method="post" action="/user-login">
|
||||
{% csrf_token %}
|
||||
<div class="field is-grouped">
|
||||
<div class="control">
|
||||
<label class="is-sr-only" for="id_localname">Username:</label>
|
||||
<input type="text" name="localname" maxlength="150" class="input" required="" id="id_localname" 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>
|
||||
{% if site.allow_registration and request.path != '' and request.path != '/' %}
|
||||
<div class="column is-narrow">
|
||||
<a href="/" class="button is-link">
|
||||
Join
|
||||
</a>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
|
||||
<div class="section">
|
||||
<div class="section container">
|
||||
{% block content %}
|
||||
{% endblock %}
|
||||
</div>
|
||||
|
||||
<footer class="footer">
|
||||
<div class="container">
|
||||
<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>
|
||||
</footer>
|
||||
|
||||
<script>
|
||||
var csrf_token = '{{ csrf_token }}';
|
||||
</script>
|
||||
<script src="/static/js/shared.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
@ -11,9 +11,9 @@
|
||||
<form name="login" method="post" action="/user-login">
|
||||
{% csrf_token %}
|
||||
<div class="field">
|
||||
<label class="label" for="id_username">Username:</label>
|
||||
<label class="label" for="id_localname">Username:</label>
|
||||
<div class="control">
|
||||
{{ login_form.username }}
|
||||
{{ login_form.localname }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="field">
|
||||
@ -30,13 +30,13 @@
|
||||
<button class="button is-primary" type="submit">Log in</button>
|
||||
</div>
|
||||
<div class="control">
|
||||
<small><a href="/reset-password">Forgot your password?</a></small>
|
||||
<small><a href="/password-reset">Forgot your password?</a></small>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="box has-background-primary-light">
|
||||
{% if site_settings.allow_registration %}
|
||||
{% if site.allow_registration %}
|
||||
<h2 class="title">Create an Account</h2>
|
||||
<form name="register" method="post" action="/user-register">
|
||||
{% include 'snippets/register_form.html' %}
|
||||
@ -50,7 +50,7 @@
|
||||
|
||||
<div class="column">
|
||||
<div class="block">
|
||||
{% include 'snippets/about.html' with site_settings=site_settings %}
|
||||
{% include 'snippets/about.html' %}
|
||||
|
||||
<p class="block">
|
||||
<a href="/about/">More about this site</a>
|
||||
|
@ -1,5 +1,6 @@
|
||||
{% extends 'layout.html' %}
|
||||
{% load humanize %}l
|
||||
{% load humanize %}
|
||||
{% load bookwyrm_tags %}
|
||||
{% block content %}
|
||||
<div class="block">
|
||||
<h1 class="title">Notifications</h1>
|
||||
@ -12,50 +13,89 @@
|
||||
|
||||
<div class="block">
|
||||
{% for notification in notifications %}
|
||||
<div class="notification level{% if notification.id in unread %} is-primary{% endif %}">
|
||||
<div class="level-left">
|
||||
<p>
|
||||
{% if notification.related_user %}
|
||||
{% include 'snippets/avatar.html' with user=notification.related_user %}
|
||||
{% include 'snippets/username.html' with user=notification.related_user %}
|
||||
{% if notification.notification_type == 'FAVORITE' %}
|
||||
favorited your
|
||||
<a href="{{ notification.related_status.remote_id}}">status</a>
|
||||
|
||||
{% elif notification.notification_type == 'MENTION' %}
|
||||
mentioned you in a
|
||||
<a href="{{ notification.related_status.remote_id}}">status</a>
|
||||
|
||||
{% related_status notification as related_status %}
|
||||
<div class="notification {% if notification.id in unread %} is-primary{% endif %}">
|
||||
<div class="columns is-mobile">
|
||||
<div class="column is-narrow is-size-3 {% if notification.id in unread%}has-text-white{% else %}has-text-grey{% endif %}">
|
||||
{% if notification.notification_type == 'MENTION' %}
|
||||
<span class="icon icon-comment"></span>
|
||||
{% elif notification.notification_type == 'REPLY' %}
|
||||
<a href="{{ notification.related_status.remote_id}}">replied</a>
|
||||
to your
|
||||
<a href="{{ notification.related_status.reply_parent.remote_id}}">status</a>
|
||||
|
||||
{% elif notification.notification_type == 'FOLLOW' %}
|
||||
followed you
|
||||
|
||||
{% elif notification.notification_type == 'FOLLOW_REQUEST' %}
|
||||
sent you a follow request
|
||||
<div class="row shrink">
|
||||
{% include 'snippets/follow_request_buttons.html' with user=notification.related_user %}
|
||||
</div>
|
||||
|
||||
<span class="icon icon-comments"></span>
|
||||
{% elif notification.notification_type == 'FOLLOW' or notification.notification_type == 'FOLLOW_REQUEST' %}
|
||||
<span class="icon icon-local"></span>
|
||||
{% elif notification.notification_type == 'BOOST' %}
|
||||
boosted your <a href="{{ notification.related_status.remote_id}}">status</a>
|
||||
<span class="icon icon-boost"></span>
|
||||
{% elif notification.notification_type == 'FAVORITE' %}
|
||||
<span class="icon icon-heart"></span>
|
||||
{% elif notification.notification_type == 'IMPORT' %}
|
||||
<span class="icon icon-list"></span>
|
||||
{% endif %}
|
||||
{% else %}
|
||||
your <a href="/import-status/{{ notification.related_import.id }}">import</a> completed.
|
||||
</div>
|
||||
<div class="column">
|
||||
<div class="block">
|
||||
<p>
|
||||
{# DESCRIPTION #}
|
||||
{% if notification.related_user %}
|
||||
{% include 'snippets/avatar.html' with user=notification.related_user %}
|
||||
{% include 'snippets/username.html' with user=notification.related_user %}
|
||||
{% if notification.notification_type == 'FAVORITE' %}
|
||||
favorited your
|
||||
<a href="{{ related_status.local_path }}">{{ related_status | status_preview_name|safe }}</a>
|
||||
|
||||
{% elif notification.notification_type == 'MENTION' %}
|
||||
mentioned you in a
|
||||
<a href="{{ related_status.local_path }}">{{ related_status | status_preview_name|safe }}</a>
|
||||
|
||||
{% elif notification.notification_type == 'REPLY' %}
|
||||
<a href="{{ related_status.local_path }}">replied</a>
|
||||
to your
|
||||
<a href="{{ related_status.reply_parent.local_path }}">{{ related_status | status_preview_name|safe }}</a>
|
||||
{% elif notification.notification_type == 'FOLLOW' %}
|
||||
followed you
|
||||
{% include 'snippets/follow_button.html' with user=notification.related_user %}
|
||||
{% elif notification.notification_type == 'FOLLOW_REQUEST' %}
|
||||
sent you a follow request
|
||||
<div class="row shrink">
|
||||
{% include 'snippets/follow_request_buttons.html' with user=notification.related_user %}
|
||||
</div>
|
||||
|
||||
{% elif notification.notification_type == 'BOOST' %}
|
||||
boosted your <a href="{{ related_status.local_path }}">{{ related_status | status_preview_name|safe }}</a>
|
||||
{% endif %}
|
||||
{% else %}
|
||||
your <a href="/import-status/{{ notification.related_import.id }}">import</a> completed.
|
||||
{% endif %}
|
||||
</p>
|
||||
</div>
|
||||
{% if related_status %}
|
||||
<div class="block">
|
||||
{# PREVIEW #}
|
||||
<div class="notification py-2 {% if notification.id in unread %}is-primary is-light{% else %}has-background-white{% if notification.notification_type == 'REPLY' or notification.notification_type == 'MENTION' %} has-text-black{% else %}-bis has-text-grey-dark{% endif %}{% endif %}">
|
||||
<div class="columns">
|
||||
<div class="column">
|
||||
{% if related_status.content %}
|
||||
<a href="{{ related_status.local_path }}">{{ related_status.content | safe | truncatewords_html:10 }}</a>
|
||||
{% elif related_status.quote %}
|
||||
<a href="{{ related_status.local_path }}">{{ related_status.quote | safe | truncatewords_html:10 }}</a>
|
||||
{% elif related_status.rating %}
|
||||
{% include 'snippets/stars.html' with rating=related_status.rating %}
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="column is-narrow {% if notification.notification_type == 'REPLY' or notification.notification_type == 'MENTION' %}has-text-black{% else %}has-text-grey-dark{% endif %}">
|
||||
{{ related_status.published_date | post_date }}
|
||||
{% include 'snippets/privacy-icons.html' with item=related_status %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<p class="level-right">{{ notification.created_date | naturaltime }}</p>
|
||||
</div>
|
||||
{% endfor %}
|
||||
|
||||
{% if not notifications %}
|
||||
<p>You're all caught up!</p>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
||||
|
@ -34,7 +34,7 @@
|
||||
|
||||
<div class="column">
|
||||
<div class="block">
|
||||
{% include 'snippets/about.html' with site_settings=site_settings %}
|
||||
{% include 'snippets/about.html' %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
{% extends 'layout.html' %}
|
||||
{% load fr_display %}
|
||||
{% load bookwyrm_tags %}
|
||||
{% block content %}
|
||||
|
||||
<div class="columns">
|
||||
@ -106,6 +106,8 @@
|
||||
<label class="label" for="id_name">Name:</label>
|
||||
<input type="text" name="name" maxlength="100" class="input" required="true" value="{{ shelf.name }}" id="id_name">
|
||||
</div>
|
||||
{% else %}
|
||||
<input type="hidden" name="name" required="true" value="{{ shelf.name }}">
|
||||
{% endif %}
|
||||
|
||||
<label class="label">
|
||||
@ -122,7 +124,7 @@
|
||||
|
||||
<div class="block">
|
||||
<div>
|
||||
{% include 'snippets/shelf.html' with shelf=shelf ratings=ratings %}
|
||||
{% include 'snippets/shelf.html' with shelf=shelf books=books ratings=ratings %}
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
@ -1,7 +1,12 @@
|
||||
<h1 class="title">About {{ site_settings.name }}</h1>
|
||||
<div class="block">
|
||||
<img src="/static/images/logo.png" alt="BookWyrm">
|
||||
<div class="columns">
|
||||
<div class="column is-narrow is-hidden-mobile">
|
||||
<figure class="block">
|
||||
<img src="{% if site.logo_small %}/images/{{ site.logo }}{% else %}/static/images/logo.png{% endif %}" alt="BookWyrm logo">
|
||||
</figure>
|
||||
</div>
|
||||
<div class="content">
|
||||
<p class="block">
|
||||
{{ site.instance_description | safe }}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<p class="block">
|
||||
{{ site_settings.instance_description }}
|
||||
</p>
|
||||
|
@ -1 +1 @@
|
||||
<a href="/author/{{ book.authors.first.id }}" class="author">{{ book.authors.first.display_name }}</a>
|
||||
{% for author in book.authors.all %}<a href="/author/{{ author.id }}" class="author">{{ author.name }}</a>{% if not forloop.last %}, {% endif %}{% endfor %}
|
||||
|
@ -1,3 +1,3 @@
|
||||
{% load fr_display %}
|
||||
<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 }}">
|
||||
{% 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="{{ user.alt_text }}">
|
||||
|
||||
|
@ -1,13 +1,13 @@
|
||||
{% 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 %}">
|
||||
<img class="book-cover" src="/images/{{ book.cover }}" alt="{{ book.alt_text }}" title="{{ book.alt_text }}">
|
||||
{% else %}
|
||||
<div class="no-cover book-cover">
|
||||
<img class="book-cover" src="/static/images/no_cover.jpg" alt="No cover">
|
||||
<div>
|
||||
<p>{{ book.title }}</p>
|
||||
<p>({{ book|edition_info }})</p>
|
||||
<p>({{ book.edition_info }})</p>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
@ -1,4 +1,4 @@
|
||||
{% load fr_display %}
|
||||
{% load bookwyrm_tags %}
|
||||
<div class="columns">
|
||||
<div class="column is-narrow">
|
||||
<div>
|
||||
|
@ -1,16 +1,11 @@
|
||||
<div class="columns">
|
||||
<div class="columns is-multiline">
|
||||
{% for book in books %}
|
||||
{% if forloop.counter0|divisibleby:"4" %}
|
||||
</div>
|
||||
<div class="columns">
|
||||
{% endif %}
|
||||
<div class="column is-narrow">
|
||||
<div class="box">
|
||||
<a href="/book/{{ book.id }}">
|
||||
{% include 'snippets/book_cover.html' with book=book %}
|
||||
</a>
|
||||
{% include 'snippets/rate_action.html' with user=request.user book=book %}
|
||||
{% include 'snippets/shelve_button.html' with book=book %}
|
||||
{% include 'snippets/shelve_button.html' with book=book switch_mode=True %}
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
|
@ -1,9 +1,5 @@
|
||||
<span>
|
||||
<a href="/book/{{ book.id }}">{{ book.title }}</a>
|
||||
</span>
|
||||
<a href="/book/{{ book.id }}">{{ book.title }}</a>
|
||||
{% if book.authors %}
|
||||
<span>
|
||||
by {% include 'snippets/authors.html' with book=book %}
|
||||
</span>
|
||||
by {% include 'snippets/authors.html' with book=book %}
|
||||
{% endif %}
|
||||
|
||||
|
@ -1,8 +1,9 @@
|
||||
{% 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 %}
|
||||
<button class="button is-small" type="submit">
|
||||
<button class="button is-small" type="submit" {% if not status.boostable %}disabled{% endif %}>
|
||||
<span class="icon icon-boost">
|
||||
<span class="is-sr-only">Boost status</span>
|
||||
</span>
|
||||
|
20
bookwyrm/templates/snippets/content_warning_field.html
Normal file
20
bookwyrm/templates/snippets/content_warning_field.html
Normal file
@ -0,0 +1,20 @@
|
||||
{% load bookwyrm_tags %}
|
||||
{% with 0|uuid as uuid %}
|
||||
<div class="control">
|
||||
<div>
|
||||
<input type="radio" class="toggle-control" name="sensitive" value="false" id="hide-spoilers-{{ uuid }}" {% if not parent_status.content_warning %}checked{% endif %}>
|
||||
<div class="toggle-content hidden">
|
||||
<label class="button is-small" role="button" tabindex="0" for="include-spoilers-{{ uuid }}">Add spoilers/content warning</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<input type="radio" class="toggle-control" id="include-spoilers-{{ uuid }}" name="sensitive" value="true" {% if parent_status.content_warning %}checked{% endif %}>
|
||||
<div class="toggle-content hidden">
|
||||
<label class="button is-small" role="button" tabindex="0" for="hide-spoilers-{{ uuid }}">Remove spoilers/content warning</label>
|
||||
<label class="is-sr-only" for="id_content_warning_{{ uuid }}">Spoilers/content warning:</label>
|
||||
<input type="text" name="content_warning" maxlength="255" class="input" id="id_content_warning_{{ uuid }}" placeholder="Spoilers ahead!"{% if parent_status.content_warning %} value="{{ parent_status.content_warning }}"{% endif %}>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endwith %}
|
@ -1,2 +0,0 @@
|
||||
{% load fr_display %}
|
||||
'{{ book.title }}' Cover ({{ book|edition_info }})
|
@ -1,5 +1,5 @@
|
||||
{% load humanize %}
|
||||
{% load fr_display %}
|
||||
{% load bookwyrm_tags %}
|
||||
|
||||
<div class="tabs is-boxed">
|
||||
<ul role="tablist">
|
||||
|
@ -26,6 +26,9 @@
|
||||
</div>
|
||||
</fieldset>
|
||||
{% endif %}
|
||||
|
||||
{% include 'snippets/content_warning_field.html' %}
|
||||
|
||||
{% if type == 'quote' %}
|
||||
<textarea name="quote" class="textarea" id="id_quote_{{ book.id }}_{{ type }}" placeholder="{{ placeholder }}" required></textarea>
|
||||
{% else %}
|
||||
|
18
bookwyrm/templates/snippets/discover/large-book.html
Normal file
18
bookwyrm/templates/snippets/discover/large-book.html
Normal file
@ -0,0 +1,18 @@
|
||||
{% load bookwyrm_tags %}
|
||||
{% if book %}
|
||||
<div class="columns">
|
||||
<div class="column is-narrow">
|
||||
{% include 'snippets/book_cover.html' with book=book size="large" %}
|
||||
{% include 'snippets/stars.html' with rating=ratings|dict_key:book.id %}
|
||||
</div>
|
||||
<div class="column">
|
||||
<h3 class="title is-5"><a href="/book/{{ book.id }}">{{ book.title }}</a></h3>
|
||||
{% if book.authors %}
|
||||
<p class="subtitle is-5">by {% include 'snippets/authors.html' with book=book %}</p>
|
||||
{% endif %}
|
||||
{% if book|book_description %}
|
||||
<blockquote class="content">{{ book|book_description|to_markdown|safe|truncatewords_html:50 }}</blockquote>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
11
bookwyrm/templates/snippets/discover/small-book.html
Normal file
11
bookwyrm/templates/snippets/discover/small-book.html
Normal file
@ -0,0 +1,11 @@
|
||||
{% load bookwyrm_tags %}
|
||||
{% if book %}
|
||||
{% include 'snippets/book_cover.html' with book=book %}
|
||||
{% include 'snippets/stars.html' with rating=ratings|dict_key:book.id %}
|
||||
|
||||
<h3 class="title is-6"><a href="/book/{{ book.id }}">{{ book.title }}</a></h3>
|
||||
{% if book.authors %}
|
||||
<p class="subtitle is-6">by {% include 'snippets/authors.html' with book=book %}</p>
|
||||
{% endif %}
|
||||
|
||||
{% endif %}
|
@ -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 %}
|
||||
|
@ -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">
|
||||
|
@ -11,9 +11,9 @@ Follow request already sent.
|
||||
{% csrf_token %}
|
||||
<input type="hidden" name="user" value="{{ user.username }}">
|
||||
{% if user.manually_approves_followers %}
|
||||
<button class="button is-small is-primary" type="submit">Send follow request</button>
|
||||
<button class="button is-small is-link" type="submit">Send follow request</button>
|
||||
{% else %}
|
||||
<button class="button is-small is-primary" type="submit">Follow</button>
|
||||
<button class="button is-small is-link" type="submit">Follow</button>
|
||||
{% endif %}
|
||||
</form>
|
||||
<form action="/unfollow/" method="POST" onsubmit="interact(event)" class="follow-{{ user.id }} {% if not request.user in user.followers.all %}hidden{%endif %}" data-id="follow-{{ user.id }}">
|
||||
|
@ -1,13 +1,15 @@
|
||||
{% load fr_display %}
|
||||
{% load bookwyrm_tags %}
|
||||
{% if request.user|follow_request_exists:user %}
|
||||
<form action="/accept-follow-request/" method="POST">
|
||||
{% csrf_token %}
|
||||
<input type="hidden" name="user" value="{{ user.username }}">
|
||||
<button class="button is-primary is-small" type="submit">Accept</button>
|
||||
</form>
|
||||
<form action="/delete-follow-request/" method="POST">
|
||||
{% csrf_token %}
|
||||
<input type="hidden" name="user" value="{{ user.username }}">
|
||||
<button class="button is-danger is-light is-small" type="submit" class="warning">Delete</button>
|
||||
</form>
|
||||
<div class="field is-grouped">
|
||||
<form action="/accept-follow-request/" method="POST">
|
||||
{% csrf_token %}
|
||||
<input type="hidden" name="user" value="{{ user.username }}">
|
||||
<button class="button is-link is-small" type="submit">Accept</button>
|
||||
</form>
|
||||
<form action="/delete-follow-request/" method="POST">
|
||||
{% csrf_token %}
|
||||
<input type="hidden" name="user" value="{{ user.username }}">
|
||||
<button class="button is-danger is-light is-small" type="submit" class="warning">Delete</button>
|
||||
</form>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
@ -1,4 +1,4 @@
|
||||
{% load fr_display %}
|
||||
{% load bookwyrm_tags %}
|
||||
<div class="select">
|
||||
{% with 0|uuid as uuid %}
|
||||
{% if not no_label %}
|
||||
|
@ -1,10 +1,13 @@
|
||||
{% load fr_display %}
|
||||
{% load bookwyrm_tags %}
|
||||
{% if request.user.is_authenticated %}
|
||||
<span class="is-sr-only">Leave a rating</span>
|
||||
<div class="field is-grouped stars rate-stars">
|
||||
{% for i in '12345'|make_list %}
|
||||
<form name="rate" action="/rate/" method="POST" onsubmit="return rate_stars(event)">
|
||||
<form name="rate" action="/rate/" method="POST">
|
||||
{% csrf_token %}
|
||||
<input type="hidden" name="user" value="{{ request.user.id }}">
|
||||
<input type="hidden" name="book" value="{{ book.id }}">
|
||||
<input type="hidden" name="privacy" value="public">
|
||||
<input type="hidden" name="rating" value="{{ forloop.counter }}">
|
||||
<button type="submit" class="icon icon-star-{% if book|rating:user < forloop.counter %}empty{% else %}full{% endif %}">
|
||||
<span class="is-sr-only">{{ forloop.counter }} star{{ forloop.counter | pluralize }}</span>
|
||||
@ -12,3 +15,4 @@
|
||||
</form>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
101
bookwyrm/templates/snippets/readthrough.html
Normal file
101
bookwyrm/templates/snippets/readthrough.html
Normal file
@ -0,0 +1,101 @@
|
||||
{% load humanize %}
|
||||
<div class="content block">
|
||||
<input class="toggle-control" type="radio" name="show-edit-readthrough-{{ readthrough.id }}" id="show-readthrough-{{ readthrough.id }}" checked>
|
||||
<div class="toggle-content hidden">
|
||||
<dl class="mb-1">
|
||||
{% if readthrough.start_date %}
|
||||
<div class="is-flex">
|
||||
<dt>Started reading:</dt>
|
||||
<dd>{{ readthrough.start_date | naturalday }}</dd>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if readthrough.finish_date %}
|
||||
<div class="is-flex">
|
||||
<dt>Finished reading:</dt>
|
||||
<dd>{{ readthrough.finish_date | naturalday }}</dd>
|
||||
</div>
|
||||
{% elif readthrough.progress %}
|
||||
<div class="is-flex">
|
||||
<dt>Progress:</dt>
|
||||
{% if readthrough.progress_mode == 'PG' %}
|
||||
<dd>on page {{ readthrough.progress }} of {{ book.pages }}</dd>
|
||||
{% else %}
|
||||
<dd>{{ readthrough.progress }}%</dd>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endif %}
|
||||
</dl>
|
||||
<div class="field is-grouped">
|
||||
<label class="button is-small" for="edit-readthrough-{{ readthrough.id }}" role="button" tabindex="0">
|
||||
<span class="icon icon-pencil">
|
||||
<span class="is-sr-only">Edit read-through dates</span>
|
||||
</span>
|
||||
</label>
|
||||
<label class="button is-small" for="delete-readthrough-{{ readthrough.id }}" role="button" tabindex="0">
|
||||
<span class="icon icon-x">
|
||||
<span class="is-sr-only">Delete this read-through</span>
|
||||
</span>
|
||||
</label>
|
||||
</div>
|
||||
{% if show_progress %}
|
||||
Progress Updates:
|
||||
<ul>
|
||||
{% if readthrough.finish_date %}
|
||||
<li>{{ readthrough.start_date | naturalday }}: finished</li>
|
||||
{% endif %}
|
||||
{% for progress_update in readthrough.progress_updates %}
|
||||
<li>
|
||||
{{ progress_update.created_date | naturalday }}:
|
||||
{% if progress_update.mode == 'PG' %}
|
||||
page {{ progress_update.progress }} of {{ book.pages }}
|
||||
{% else %}
|
||||
{{ progress_update.progress }}%
|
||||
{% endif %}
|
||||
</li>
|
||||
{% endfor %}
|
||||
<li>{{ readthrough.start_date | naturalday }}: started</li>
|
||||
</ul>
|
||||
{% elif readthrough.progress_updates|length %}
|
||||
<a href="?showprogress">Show {{ readthrough.progress_updates|length }} Progress Updates</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="block">
|
||||
<input class="toggle-control" type="radio" name="show-edit-readthrough-{{ readthrough.id }}" id="edit-readthrough-{{ readthrough.id }}">
|
||||
<div class="toggle-content hidden">
|
||||
<div class="box">
|
||||
<form name="edit-readthrough" action="/edit-readthrough" method="post">
|
||||
{% include 'snippets/readthrough_form.html' with readthrough=readthrough %}
|
||||
<div class="field is-grouped">
|
||||
<button class="button is-primary" type="submit">Save</button>
|
||||
<label class="button" for="show-readthrough-{{ readthrough.id }}" role="button" tabindex="0">Cancel</label>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<input class="toggle-control" type="checkbox" name="delete-readthrough-{{ readthrough.id }}" id="delete-readthrough-{{ readthrough.id }}">
|
||||
<div class="modal toggle-content hidden">
|
||||
<div class="modal-background"></div>
|
||||
<div class="modal-card">
|
||||
<header class="modal-card-head">
|
||||
<p class="modal-card-title">Delete this read-though?</p>
|
||||
<label class="delete" for="delete-readthrough-{{ readthrough.id }}" aria-label="close"></label>
|
||||
</header>
|
||||
<footer class="modal-card-foot">
|
||||
<form name="delete-readthrough-{{ readthrough.id }}" action="/delete-readthrough" method="POST">
|
||||
{% csrf_token %}
|
||||
<input type="hidden" name="id" value="{{ readthrough.id }}">
|
||||
<button class="button is-danger is-light" type="submit">
|
||||
Delete
|
||||
</button>
|
||||
<label for="delete-readthrough-{{ readthrough.id }}" class="button" role="button" tabindex="0">Cancel</button>
|
||||
</form>
|
||||
</footer>
|
||||
</div>
|
||||
<label class="modal-close is-large" for="delete-readthrough-{{ readthrough.id }}" aria-label="close"></label>
|
||||
</div>
|
||||
</div>
|
37
bookwyrm/templates/snippets/readthrough_form.html
Normal file
37
bookwyrm/templates/snippets/readthrough_form.html
Normal file
@ -0,0 +1,37 @@
|
||||
{% csrf_token %}
|
||||
<input type="hidden" name="id" value="{{ readthrough.id }}">
|
||||
<input type="hidden" name="book" value="{{ book.id }}">
|
||||
<div class="field">
|
||||
<label class="label">
|
||||
Started reading
|
||||
<input type="date" name="start_date" class="input" id="id_start_date-{{ readthrough.id }}" value="{{ readthrough.start_date | date:"Y-m-d" }}">
|
||||
</label>
|
||||
</div>
|
||||
<div class="columns">
|
||||
<div class="column">
|
||||
<div class="field">
|
||||
<label class="label">
|
||||
Progress
|
||||
<input type="number" name="progress" class="input" id="id_progress-{{ readthrough.id }}" value="{{ readthrough.progress }}">
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="column">
|
||||
<div class="control mt-5">
|
||||
<label class="radio">
|
||||
<input type="radio" name="progress_mode" id="id_progress_mode-{{ readthrough.id }}" value="PG" {% if readthrough.progress_mode == 'PG' %}checked{% endif %}>
|
||||
pages
|
||||
</label>
|
||||
<label class="radio">
|
||||
<input type="radio" name="progress_mode" id="id_progress_mode-{{ readthrough.id }}" value="PCT" {% if readthrough.progress_mode == 'PCT' %}checked{% endif %}>
|
||||
percent
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="field">
|
||||
<label class="label">
|
||||
Finished reading
|
||||
<input type="date" name="finish_date" class="input" id="id_finish_date-{{ readthrough.id }}" value="{{ readthrough.finish_date | date:"Y-m-d" }}">
|
||||
</label>
|
||||
</div>
|
@ -1,10 +1,10 @@
|
||||
{% csrf_token %}
|
||||
<div class="field">
|
||||
<label class="label" for="id_username_register">Username:</label>
|
||||
<label class="label" for="id_localname_register">Username:</label>
|
||||
<div class="control">
|
||||
<input type="text" name="username" maxlength="150" class="input" required="" id="id_username_register" value="{% if register_form.username.value %}{{ register_form.username.value }} {% endif %}">
|
||||
<input type="text" name="localname" maxlength="150" class="input" required="" id="id_localname_register" value="{% if register_form.localname.value %}{{ register_form.localname.value }}{% endif %}">
|
||||
</div>
|
||||
{% for error in register_form.username.errors %}
|
||||
{% for error in register_form.localname.errors %}
|
||||
<p class="help is-danger">{{ error | escape }}</p>
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
@ -1,19 +1,21 @@
|
||||
{% load fr_display %}
|
||||
{% with activity.id|uuid as uuid %}
|
||||
{% load bookwyrm_tags %}
|
||||
{% with status.id|uuid as uuid %}
|
||||
<form class="is-flex-grow-1" name="reply" action="/reply" method="post" onsubmit="return reply(event)">
|
||||
<div class="columns">
|
||||
{% csrf_token %}
|
||||
<input type="hidden" name="reply_parent" value="{{ activity.id }}">
|
||||
<input type="hidden" name="reply_parent" value="{{ status.id }}">
|
||||
<input type="hidden" name="user" value="{{ request.user.id }}">
|
||||
<div class="column">
|
||||
|
||||
{% include 'snippets/content_warning_field.html' with parent_status=status %}
|
||||
<label for="id_content_{{ status.id }}-{{ uuid }}" class="is-sr-only">Reply</label>
|
||||
<div class="field">
|
||||
<textarea class="textarea" name="content" placeholder="Leave a comment..." id="id_content_{{ activity.id }}-{{ uuid }}" required="true"></textarea>
|
||||
<textarea class="textarea" name="content" placeholder="Leave a comment..." id="id_content_{{ status.id }}-{{ uuid }}" required="true"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="column is-narrow">
|
||||
<div class="field">
|
||||
{% include 'snippets/privacy_select.html' %}
|
||||
{% include 'snippets/privacy_select.html' with current=status.privacy %}
|
||||
</div>
|
||||
<div class="field">
|
||||
<button class="button is-primary" type="submit">
|
||||
|
@ -1,6 +1,6 @@
|
||||
{% load humanize %}
|
||||
{% load fr_display %}
|
||||
{% if shelf.books.all|length > 0 %}
|
||||
{% load bookwyrm_tags %}
|
||||
{% if books|length > 0 %}
|
||||
<table class="table is-striped is-fullwidth">
|
||||
|
||||
<tr class="book-preview">
|
||||
@ -34,7 +34,7 @@
|
||||
</th>
|
||||
{% endif %}
|
||||
</tr>
|
||||
{% for book in shelf.books.all %}
|
||||
{% for book in books %}
|
||||
<tr class="book-preview">
|
||||
<td>
|
||||
{% include 'snippets/book_cover.html' with book=book size="small" %}
|
||||
@ -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 %}
|
||||
|
@ -1,27 +1,31 @@
|
||||
{% load fr_display %}
|
||||
{% load bookwyrm_tags %}
|
||||
{% if request.user.is_authenticated %}
|
||||
|
||||
{% with book.id|uuid as uuid %}
|
||||
{% active_shelf book as active_shelf %}
|
||||
<div class="field is-grouped">
|
||||
{% if active_shelf.identifier == 'read' %}
|
||||
{% if switch_mode and active_shelf.book != book %}
|
||||
{% include 'snippets/switch_edition_button.html' with edition=book size='is-small' %}
|
||||
{% else %}
|
||||
|
||||
{% if active_shelf.shelf.identifier == 'read' %}
|
||||
<button class="button is-small" disabled>
|
||||
<span>Read</span> <span class="icon icon-check"></span>
|
||||
</button>
|
||||
{% elif active_shelf.identifier == 'reading' %}
|
||||
{% elif active_shelf.shelf.identifier == 'reading' %}
|
||||
<label class="button is-small" for="finish-reading-{{ uuid }}" role="button" tabindex="0">
|
||||
I'm done!
|
||||
</label>
|
||||
{% include 'snippets/finish_reading_modal.html' %}
|
||||
{% elif active_shelf.identifier == 'to-read' %}
|
||||
{% include 'snippets/finish_reading_modal.html' with book=active_shelf.book %}
|
||||
{% elif active_shelf.shelf.identifier == 'to-read' %}
|
||||
<label class="button is-small" for="start-reading-{{ uuid }}" role="button" tabindex="0">
|
||||
Start reading
|
||||
</label>
|
||||
{% include 'snippets/start_reading_modal.html' %}
|
||||
{% include 'snippets/start_reading_modal.html' with book=active_shelf.book %}
|
||||
{% else %}
|
||||
<form name="shelve" action="/shelve/" method="post">
|
||||
{% csrf_token %}
|
||||
<input type="hidden" name="book" value="{{ book.id }}">
|
||||
<input type="hidden" name="book" value="{{ active_shelf.book.id }}">
|
||||
<input type="hidden" name="shelf" value="to-read">
|
||||
<button class="button is-small" type="submit">Want to read</button>
|
||||
</form>
|
||||
@ -40,17 +44,17 @@
|
||||
<ul class="dropdown-content">
|
||||
{% for shelf in request.user.shelf_set.all %}
|
||||
<li role="menuitem">
|
||||
{% if shelf.identifier == 'to-read' %}
|
||||
{% if active_shelf.shelf.identifier != 'reading' and shelf.identifier == 'reading' %}
|
||||
<div class="dropdown-item pt-0 pb-0">
|
||||
<label class="button is-small" for="start-reading-{{ uuid }}" role="button" tabindex="0">
|
||||
Start reading
|
||||
</label>
|
||||
{% include 'snippets/start_reading_modal.html' %}
|
||||
{% include 'snippets/start_reading_modal.html' with book=active_shelf.book %}
|
||||
</div>
|
||||
{% else %}
|
||||
<form class="dropdown-item pt-0 pb-0" name="shelve" action="/shelve/" method="post">
|
||||
{% csrf_token %}
|
||||
<input type="hidden" name="book" value="{{ book.id }}">
|
||||
<input type="hidden" name="book" value="{{ active_shelf.book.id }}">
|
||||
<button class="button is-small" name="shelf" type="submit" value="{{ shelf.identifier }}" {% if shelf in book.shelf_set.all %} disabled {% endif %}>
|
||||
<span>{{ shelf.name }}</span>
|
||||
{% if shelf in book.shelf_set.all %}<span class="icon icon-check"></span>{% endif %}
|
||||
@ -62,6 +66,7 @@
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endwith %}
|
||||
{% endif %}
|
||||
|
@ -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 %}
|
||||
|
@ -1,10 +1,10 @@
|
||||
{% load fr_display %}
|
||||
{% load bookwyrm_tags %}
|
||||
{% load humanize %}
|
||||
|
||||
{% if not status.deleted %}
|
||||
<div class="card">
|
||||
<article class="card">
|
||||
<header class="card-header">
|
||||
<div class="card-header-title">
|
||||
<div class="card-header-title has-background-white-ter">
|
||||
<div class="columns">
|
||||
<div class="column is-narrow">
|
||||
{% include 'snippets/status_header.html' with status=status %}
|
||||
@ -13,12 +13,12 @@
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<div class="card-content">
|
||||
<section class="card-content">
|
||||
{% include 'snippets/status_content.html' with status=status %}
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<footer>
|
||||
<div class="card-footer">
|
||||
<div class="card-footer has-background-white-bis">
|
||||
<div class="card-footer-item">
|
||||
{% if request.user.is_authenticated %}
|
||||
<label class="button is-small" for="show-comment-{{ status.id }}">
|
||||
@ -57,7 +57,7 @@
|
||||
</div>
|
||||
{% if status.user == request.user %}
|
||||
<div class="card-footer-item">
|
||||
<label class="button" for="more-info-{{ status.id }}">
|
||||
<label class="button is-small" for="more-info-{{ status.id }}">
|
||||
<div class="icon icon-dots-three">
|
||||
<span class="is-sr-only">More options</span>
|
||||
</div>
|
||||
@ -95,9 +95,9 @@
|
||||
</div>
|
||||
{% endif %}
|
||||
</footer>
|
||||
</div>
|
||||
</article>
|
||||
{% else %}
|
||||
<div class="card">
|
||||
<article class="card">
|
||||
<header class="card-header">
|
||||
<p>
|
||||
{% include 'snippets/avatar.html' with user=status.user %}
|
||||
@ -105,5 +105,5 @@
|
||||
deleted this status
|
||||
</p>
|
||||
</header>
|
||||
</div>
|
||||
</article>
|
||||
{% endif %}
|
||||
|
@ -1,43 +1,62 @@
|
||||
{% load fr_display %}
|
||||
{% load bookwyrm_tags %}
|
||||
<div class="block">
|
||||
{% if status.status_type == 'Review' %}
|
||||
<h3>
|
||||
{% if status.name %}{{ status.name }}<br>{% endif %}
|
||||
{% include 'snippets/stars.html' with rating=status.rating %}
|
||||
</h3>
|
||||
{% endif %}
|
||||
|
||||
{% if status.quote %}
|
||||
<div class="quote block">
|
||||
<blockquote>{{ status.quote }}</blockquote>
|
||||
|
||||
<p> — {% include 'snippets/book_titleby.html' with book=status.book %}</p>
|
||||
<div>
|
||||
<h3 class="title is-5 has-subtitle">
|
||||
{% if status.name %}<span dir="auto">{{ status.name }}</span><br>{% endif %}
|
||||
</h3>
|
||||
<p class="subtitle">{% include 'snippets/stars.html' with rating=status.rating %}</p>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if status.content and status.status_type != 'GeneratedNote' and status.status_type != 'Boost' %}
|
||||
{% include 'snippets/trimmed_text.html' with full=status.content|safe %}
|
||||
{% endif %}
|
||||
{% if status.attachments %}
|
||||
<div class="block">
|
||||
<div class="columns">
|
||||
{% for attachment in status.attachments.all %}
|
||||
<div class="column is-narrow">
|
||||
<figure class="image is-128x128">
|
||||
<a href="/images/{{ attachment.image }}" target="_blank" aria-label="open image in new window">
|
||||
<img src="/images/{{ attachment.image }}" alt="{{ attachment.caption }}">
|
||||
</a>
|
||||
</figure>
|
||||
</div>
|
||||
{% endfor %}
|
||||
{% if status.content_warning %}
|
||||
<div class="toggle-content">
|
||||
<p>{{ status.content_warning }}</p>
|
||||
<input class="toggle-control" type="radio" name="toggle-status-cw-{{ status.id }}" id="hide-status-cw-{{ status.id }}" checked>
|
||||
<div class="toggle-content hidden">
|
||||
<label class="button is-small" for="show-status-cw-{{ status.id }}" tabindex="0" role="button">Show More</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<input class="toggle-control" type="radio" name="toggle-status-cw-{{ status.id }}" id="show-status-cw-{{ status.id }}">
|
||||
{% endif %}
|
||||
<div{% if status.content_warning %} class="toggle-content hidden"{% endif %}>
|
||||
{% if status.content_warning %}
|
||||
<label class="button is-small" for="hide-status-cw-{{ status.id }}" tabindex="0" role="button">Show Less</label>
|
||||
{% endif %}
|
||||
|
||||
{% if status.quote %}
|
||||
<div class="quote block">
|
||||
<blockquote dir="auto">{{ status.quote | safe }}</blockquote>
|
||||
|
||||
<p> — {% include 'snippets/book_titleby.html' with book=status.book %}</p>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if status.content and status.status_type != 'GeneratedNote' and status.status_type != 'Boost' %}
|
||||
{% include 'snippets/trimmed_text.html' with full=status.content|safe %}
|
||||
{% endif %}
|
||||
{% if status.attachments %}
|
||||
<div class="block">
|
||||
<div class="columns">
|
||||
{% for attachment in status.attachments.all %}
|
||||
<div class="column is-narrow">
|
||||
<figure class="image is-128x128">
|
||||
<a href="/images/{{ attachment.image }}" target="_blank" aria-label="open image in new window">
|
||||
<img src="/images/{{ attachment.image }}"{% if attachment.caption %} alt="{{ attachment.caption }}" title="{{ attachment.caption }}"{% endif %}>
|
||||
</a>
|
||||
</figure>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% if not hide_book %}
|
||||
{% if status.book or status.mention_books.count %}
|
||||
<div class="{% if status.status_type != 'GeneratedNote' %}box{% endif %}">
|
||||
<div class="{% if status.status_type != 'GeneratedNote' %}box has-background-white-bis{% endif %}">
|
||||
{% if status.book %}
|
||||
{% include 'snippets/book_preview.html' with book=status.book %}
|
||||
{% elif status.mention_books.count %}
|
||||
|
@ -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 %}
|
||||
|
||||
|
5
bookwyrm/templates/snippets/switch_edition_button.html
Normal file
5
bookwyrm/templates/snippets/switch_edition_button.html
Normal file
@ -0,0 +1,5 @@
|
||||
<form name="switch-edition" action="/switch-edition" method="POST">
|
||||
{% csrf_token %}
|
||||
<input type="hidden" name="edition" value="{{ edition.id }}">
|
||||
<button class="button {{ size }}">Switch to this edition</button>
|
||||
</form>
|
@ -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.local_path }}">
|
||||
{{ 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>
|
||||
|
@ -1,4 +1,4 @@
|
||||
{% load fr_display %}
|
||||
{% load bookwyrm_tags %}
|
||||
<div class="block">
|
||||
|
||||
{% with depth=depth|add:1 %}
|
||||
|
@ -1,23 +1,23 @@
|
||||
{% 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>
|
||||
<blockquote class="content toggle-content hidden">{{ trimmed }}
|
||||
<blockquote class="content toggle-content hidden"><span dir="auto">{{ trimmed | to_markdown | safe }}</span>
|
||||
<label class="button is-small" for="hide-{{ uuid }}"><div role="button" tabindex="0">show more</div></label>
|
||||
</blockquote>
|
||||
</div>
|
||||
<div>
|
||||
<input type="radio" name="show-hide-{{ uuid }}" id="hide-{{ uuid }}" class="toggle-control">
|
||||
<blockquote class="content toggle-content hidden">{{ full }}
|
||||
<blockquote class="content toggle-content hidden"><span dir="auto">{{ full | to_markdown | safe }}</span>
|
||||
<label class="button is-small" for="show-{{ uuid }}"><div role="button" tabindex="0">show less</div></label>
|
||||
</blockquote>
|
||||
</div>
|
||||
{% else %}
|
||||
<blockquote class="content">{{ full }}</blockquote>
|
||||
<blockquote class="content"><span dir="auto">{{ full | to_markdown | safe }}</span></blockquote>
|
||||
{% endif %}
|
||||
{% endwith %}
|
||||
|
||||
|
@ -1,11 +1,11 @@
|
||||
{% load humanize %}
|
||||
{% load fr_display %}
|
||||
{% load bookwyrm_tags %}
|
||||
<div class="block">
|
||||
<div class="columns">
|
||||
<div class="column is-narrow">
|
||||
<div class="media">
|
||||
<div class="media-left">
|
||||
<a href="/user/{{ user|username }}">
|
||||
<a href="{{ user.local_path }}">
|
||||
{% include 'snippets/avatar.html' with user=user large=True %}
|
||||
</a>
|
||||
</div>
|
||||
@ -14,8 +14,8 @@
|
||||
<p><a href="{{ user.remote_id }}">{{ user.username }}</a></p>
|
||||
<p>Joined {{ user.created_date | naturaltime }}</p>
|
||||
<p>
|
||||
<a href="/user/{{ user | username }}/followers">{{ user.followers.count }} follower{{ user.followers.count | pluralize }}</a>,
|
||||
<a href="/user/{{ user | username }}/following">{{ user.following.count }} following</a>
|
||||
<a href="{{ user.local_path }}/followers">{{ user.followers.count }} follower{{ user.followers.count | pluralize }}</a>,
|
||||
<a href="{{ user.local_path }}/following">{{ user.following.count }} following</a>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
@ -23,7 +23,14 @@
|
||||
|
||||
<div class="column">
|
||||
{% if user.summary %}
|
||||
<blockquote><span class="icon icon-quote-open"></span>{{ user.summary | safe }}</blockquote>
|
||||
<div class="columns">
|
||||
<div class="column is-narrow">
|
||||
<span class="icon icon-quote-open"></span>
|
||||
</div>
|
||||
<div class="column">
|
||||
<blockquote>{{ user.summary | to_markdown | safe }}</blockquote>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1,2 +1,2 @@
|
||||
{% load fr_display %}
|
||||
<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 %}
|
||||
{% load bookwyrm_tags %}
|
||||
<a href="{{ user.local_path }}" 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 %}
|
||||
|
@ -1,5 +1,5 @@
|
||||
{% extends 'layout.html' %}
|
||||
{% load fr_display %}
|
||||
{% load bookwyrm_tags %}
|
||||
{% block content %}
|
||||
|
||||
<div class="block">
|
||||
|
@ -24,11 +24,11 @@
|
||||
{% for shelf in shelves %}
|
||||
<div class="column is-narrow">
|
||||
<h3>{{ shelf.name }}
|
||||
{% if shelf.size > 3 %}<small>(<a href="{{ shelf.remote_id }}">See all {{ shelf.size }}</a>)</small>{% endif %}</h3>
|
||||
{% if shelf.size > 3 %}<small>(<a href="{{ shelf.local_path }}">See all {{ shelf.size }}</a>)</small>{% endif %}</h3>
|
||||
<div class="is-mobile field is-grouped">
|
||||
{% for book in shelf.books %}
|
||||
<div class="control">
|
||||
<a href="/book/{{ book.id }}">
|
||||
<a href="{{ book.local_path }}">
|
||||
{% include 'snippets/book_cover.html' with book=book size="medium" %}
|
||||
</a>
|
||||
</div>
|
||||
@ -37,7 +37,7 @@
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
<small><a href="/user/{{ user.localname }}/shelves">See all {{ shelf_count }} shelves</a></small>
|
||||
<small><a href="{{ user.local_path }}/shelves">See all {{ shelf_count }} shelves</a></small>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
|
Reference in New Issue
Block a user