Merge branch 'main' into code-scanning

This commit is contained in:
Vivianne Langdon
2022-02-26 17:54:33 -08:00
225 changed files with 14672 additions and 5229 deletions

View File

@ -19,7 +19,7 @@
{% blocktrans with site_name=site.name %}Welcome to {{ site_name }}!{% endblocktrans %}
</h2>
<p class="subtitle notification has-background-primary-light">
<p class="subtitle notification has-background-primary-highlight">
{% blocktrans trimmed with site_name=site.name %}
{{ site_name }} is part of <em>BookWyrm</em>, a network of independent, self-directed communities for readers.
While you can interact seamlessly with users anywhere in the <a href="https://joinbookwyrm.com/instances/" target="_blank">BookWyrm network</a>, this community is unique.
@ -107,7 +107,7 @@
<div class="column">
<div class="card is-stretchable">
{% with role=user.groups.first.name %}
<div class="card-header {% if role == "moderator" %}has-background-info-light{% else %}has-background-success-light{% endif %}">
<div class="card-header {% if role == "moderator" %}has-background-info-highlight{% else %}has-background-success-highlight{% endif %}">
<span class="card-header-title is-size-7 pt-1 pb-1">
{% if role == "moderator" %}
{% trans "Moderator" %}
@ -123,7 +123,7 @@
</div>
{% if request.user.is_authenticated and user.id != request.user.id %}
<div class="has-background-white-bis card-footer">
<div class="has-background-tertiary card-footer">
<div class="card-footer-item">
{% include 'snippets/follow_button.html' with user=user minimal=True %}
</div>

View File

@ -386,6 +386,6 @@
{% endblock %}
{% block scripts %}
<script src="{% static "js/vendor/tabs.js" %}?v={{ js_cache }}"></script>
<script src="{% static "js/tabs.js" %}?v={{ js_cache }}"></script>
<script src="{% static "js/autocomplete.js" %}?v={{ js_cache }}"></script>
{% endblock %}

View File

@ -6,24 +6,24 @@
{% block content %}
<header class="block content">
<header class="block">
<h1 class="title">
{% blocktrans with title=book|book_title %}
Links for "<em>{{ title }}</em>"
{% endblocktrans %}
</h1>
</header>
<nav class="breadcrumb subtitle" aria-label="breadcrumbs">
<ul>
<li><a href="{% url 'book' book.id %}">{{ book|book_title }}</a></li>
<li class="is-active">
<a href="#" aria-current="page">
{% trans "Edit links" %}
</a>
</li>
</ul>
</nav>
<nav class="breadcrumb subtitle" aria-label="breadcrumbs">
<ul>
<li><a href="{% url 'book' book.id %}">{{ book|book_title }}</a></li>
<li class="is-active">
<a href="#" aria-current="page">
{% trans "Edit links" %}
</a>
</li>
</ul>
</nav>
</header>
<section class="block content">
<div class="table-container">

View File

@ -11,7 +11,7 @@
</section>
{% endif %}
<footer class="card-footer has-background-white-bis">
<footer class="card-footer has-background-tertiary">
{% block card-footer %}
{% endblock %}
</footer>

View File

@ -1,6 +1,6 @@
{% load i18n %}
<section class="card {% if not visible %}is-hidden {% endif %}{{ class }}" id="{{ controls_text }}{% if controls_uid %}-{{ controls_uid }}{% endif %}">
<header class="card-header has-background-white-ter">
<header class="card-header has-background-secondary">
<h2 class="card-header-title" tabindex="0" id="{{ controls_text }}{% if controls_uid %}-{{ controls_uid }}{% endif %}_header">
{% block header %}{% endblock %}
</h2>

View File

@ -1,7 +1,7 @@
{% load i18n %}
{% trans "Help" as button_text %}
{% include 'snippets/toggle/open_button.html' with text=button_text class="ml-3 is-rounded is-small is-white p-0 pb-1" icon="question-circle is-size-6" controls_text=controls_text controls_uid=controls_uid %}
{% include 'snippets/toggle/open_button.html' with text=button_text class="ml-3 is-rounded is-small has-background-body p-0 pb-1" icon="question-circle is-size-6" controls_text=controls_text controls_uid=controls_uid %}
<aside class="tooltip notification is-hidden transition-y is-pulled-left mb-2" id="{{ controls_text }}{% if controls_uid %}-{{ controls_uid }}{% endif %}">
{% trans "Close" as button_text %}

View File

@ -15,7 +15,7 @@
</p>
</header>
{% with tile_classes="tile is-child box has-background-white-ter is-clipped" %}
{% with tile_classes="tile is-child box has-background-secondary is-clipped" %}
<div class="tile is-ancestor">
<div class="tile is-6 is-parent">
<div class="{{ tile_classes }}">

View File

@ -30,7 +30,7 @@
<div class="column mt-3-mobile ml-3-tablet">
<div class="media block mb-2">
<figure class="media-left" aria-hidden="true">
<a class="image is-48x48" href="{{ status.user.local_path }}">
<a class="image is-48x48" href="{{ status.user.local_path }}" tabindex="-1">
{% include 'snippets/avatar.html' with user=status.user ariaHide="true" medium="true" %}
</a>
</figure>
@ -45,7 +45,7 @@
{% include 'snippets/follow_button.html' with user=status.user show_username=True minimal=True %}
</div>
<div class="notification has-background-white p-2 mb-2 clip-text">
<div class="notification has-background-body p-2 mb-2 clip-text">
{% include "snippets/status/content_status.html" with hide_book=True trim_length=70 hide_more=True %}
</div>
<a href="{{ status.remote_id }}">

View File

@ -15,7 +15,7 @@
<div class="media block mb-2">
<figure class="media-left" aria-hidden="true">
<a class="image is-48x48" href="{{ status.user.local_path }}">
<a class="image is-48x48" href="{{ status.user.local_path }}" tabindex="-1">
{% include 'snippets/avatar.html' with user=status.user ariaHide="true" medium="true" %}
</a>
</figure>

View File

@ -31,5 +31,5 @@
{% endblock %}
{% block scripts %}
<script src="{% static "js/vendor/tabs.js" %}?v={{ js_cache }}"></script>
<script src="{% static "js/tabs.js" %}?v={{ js_cache }}"></script>
{% endblock %}

View File

@ -9,37 +9,30 @@
{% else %}
{% with active_book=request.GET.book %}
<div class="tab-group">
<div class="tabs is-small">
<ul role="tablist">
{% for shelf in suggested_books %}
{% if shelf.books %}
{% with shelf_counter=forloop.counter %}
<li>
<p>
<div class="bw-tabs is-small is-toggle has-aside-text" role="tablist">
{% for shelf in suggested_books %}
{% if shelf.books %}
{% with shelf_counter=forloop.counter %}
{% for book in shelf.books %}
<a
class="{% if active_book == book.id|stringformat:'d' %}is-active{% elif not active_book and shelf_counter == 1 and forloop.first %}is-active{% endif %}"
href="{{ request.path }}?book={{ book.id }}"
id="tab_book_{{ book.id }}"
role="tab"
aria-label="{{ book.title }}"
aria-selected="{% if active_book == book.id|stringformat:'d' %}true{% elif not active_book and shelf_counter == 1 and forloop.first %}true{% else %}false{% endif %}"
aria-controls="book_{{ book.id }}">
{% if forloop.first %}
<span class="aside-text">
{% include "snippets/translated_shelf_name.html" with shelf=shelf %}
</p>
<div class="tabs is-small is-toggle">
<ul>
{% for book in shelf.books %}
<li class="{% if active_book == book.id|stringformat:'d' %}is-active{% elif not active_book and shelf_counter == 1 and forloop.first %}is-active{% endif %}">
<a
href="{{ request.path }}?book={{ book.id }}"
id="tab_book_{{ book.id }}"
role="tab"
aria-label="{{ book.title }}"
aria-selected="{% if active_book == book.id|stringformat:'d' %}true{% elif shelf_counter == 1 and forloop.first %}true{% else %}false{% endif %}"
aria-controls="book_{{ book.id }}">
{% include 'snippets/book_cover.html' with book=book cover_class='is-h-m' %}
</a>
</li>
{% endfor %}
</ul>
</div>
</li>
{% endwith %}
{% endif %}
</span>
{% endif %}
{% include 'snippets/book_cover.html' with book=book cover_class='is-h-m' %}
</a>
{% endfor %}
</ul>
{% endwith %}
{% endif %}
{% endfor %}
</div>
{% for shelf in suggested_books %}
{% with shelf_counter=forloop.counter %}

View File

@ -37,7 +37,7 @@
<div class="is-multiline is-flex is-flex-grow-0 is-flex-wrap-wrap">
{% for membership in group.memberships.all %}
{% with member=membership.user %}
<div class="box has-text-centered is-shadowless has-background-white-bis my-2 mx-2 member_{{ member.id }}">
<div class="box has-text-centered is-shadowless has-background-tertiary my-2 mx-2 member_{{ member.id }}">
<a href="{{ member.local_path }}" class="has-text-black">
{% include 'snippets/avatar.html' with user=member large=True %}
<span title="{{ member.display_name }}" class="is-block is-6 has-text-weight-bold">{{ member.display_name|truncatechars:10 }}</span>

View File

@ -8,7 +8,7 @@
</h2>
<div class="column is-flex is-flex-grow-0">
{% for user in suggested_users %}
<div class="box has-text-centered is-shadowless has-background-white-bis m-2">
<div class="box has-text-centered is-shadowless has-background-tertiary m-2">
<a href="{{ user.local_path }}" class="has-text-black">
{% include 'snippets/avatar.html' with user=user large=True %}
<span title="{{ user.display_name }}" class="is-block is-6 has-text-weight-bold">{{ user.display_name|truncatechars:10 }}</span>

View File

@ -15,18 +15,18 @@
<section class="tile is-ancestor">
<div class="tile is-vertical is-6">
<div class="tile is-parent">
<div class="tile is-child box has-background-white-ter">
<div class="tile is-child box has-background-secondary">
{% include 'landing/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">
<div class="tile is-child box has-background-secondary">
{% include 'landing/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">
<div class="tile is-child box has-background-secondary">
{% include 'landing/small-book.html' with book=books.2 %}
</div>
</div>
@ -35,18 +35,18 @@
<div class="tile is-vertical is-6">
<div class="tile">
<div class="tile is-parent is-6">
<div class="tile is-child box has-background-white-ter">
<div class="tile is-child box has-background-secondary">
{% include 'landing/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">
<div class="tile is-child box has-background-secondary">
{% include 'landing/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">
<div class="tile is-child box has-background-secondary">
{% include 'landing/large-book.html' with book=books.5 %}
</div>
</div>

View File

@ -78,7 +78,7 @@
{% endif %}
</div>
{% else %}
<div class="tile is-child box has-background-white-bis">
<div class="tile is-child box has-background-tertiary">
<h2 class="title is-4">{% trans "Your Account" %}</h2>
{% include 'user/user_preview.html' with user=request.user %}
{% if request.user.summary %}

View File

@ -1,14 +1,14 @@
{% load layout %}
{% load i18n %}
{% load static %}
{% load sass_tags %}
<!DOCTYPE html>
<html lang="{% get_lang %}">
<head>
<title>{% block title %}BookWyrm{% endblock %} - {{ site.name }}</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="{% static "css/vendor/bulma.min.css" %}">
<link rel="stylesheet" href="{% static "css/vendor/icons.css" %}">
<link rel="stylesheet" href="{% static "css/bookwyrm.css" %}">
<link href="{% sass_src 'css/bookwyrm.scss' %}" rel="stylesheet" type="text/css" />
<link rel="search" type="application/opensearchdescription+xml" href="{% url 'opensearch' %}" title="{% blocktrans with site_name=site.name %}{{ site_name }} search{% endblocktrans %}" />
@ -32,6 +32,7 @@
{% block head_links %}{% endblock %}
</head>
<body>
{% block body %}
<nav class="navbar" aria-label="main navigation">
<div class="container">
<div class="navbar-brand">
@ -212,7 +213,7 @@
</div>
{% endif %}
<div class="section is-flex-grow-1">
<main class="section is-flex-grow-1">
<div class="container">
{# almost every view needs to know the user shelves #}
{% with request.user.shelf_set.all as user_shelves %}
@ -220,7 +221,7 @@
{% endblock %}
{% endwith %}
</div>
</div>
</main>
<div role="region" aria-live="polite" id="live-messages">
<p id="status-success-message" class="live-message is-sr-only is-hidden">{% trans "Successfully posted status" %}</p>
@ -262,6 +263,7 @@
</div>
</div>
</footer>
{% endblock %}
<script>
var csrf_token = '{{ csrf_token }}';

View File

@ -92,7 +92,7 @@
<summary>
<span role="heading" aria-level="3">
{% trans "Edit notes" %}
<span class="details-close icon icon-pencil" aria-hidden></span>
<span class="details-close icon icon-pencil" aria-hidden="true"></span>
</span>
</summary>
{% include "lists/edit_item_form.html" with book=item.book %}
@ -107,7 +107,7 @@
<summary>
<span role="heading" aria-level="3">
{% trans "Add notes" %}
<span class="details-close icon icon-plus" aria-hidden></span>
<span class="details-close icon icon-plus" aria-hidden="true"></span>
</span>
</summary>
{% include "lists/edit_item_form.html" with book=item.book %}
@ -115,7 +115,7 @@
</div>
{% endif %}
</div>
<div class="card-footer is-stacked-mobile has-background-white-bis is-align-items-stretch">
<div class="card-footer is-stacked-mobile has-background-tertiary is-align-items-stretch">
<div class="card-footer-item">
<p>
{% blocktrans trimmed with username=item.user.display_name user_path=item.user.local_path %}

View File

@ -47,7 +47,7 @@
{% block preview %}
<div class="notification py-2 {% if notification.id in unread %}is-primary is-light{% else %}has-background-white has-text-grey-dark{% endif %}">
<div class="notification py-2 {% if notification.id in unread %}is-primary is-light{% else %}has-background-body has-text-grey-dark{% endif %}">
<div class="columns">
<div class="column is-clipped">
{% include 'snippets/status_preview.html' with status=related_status %}

View File

@ -47,7 +47,7 @@
{% block preview %}
<div class="notification py-2 {% if notification.id in unread %}is-primary is-light{% else %}has-background-white has-text-grey-dark{% endif %}">
<div class="notification py-2 {% if notification.id in unread %}is-primary is-light{% else %}has-background-body has-text-grey-dark{% endif %}">
<div class="columns">
<div class="column is-clipped">
{% include 'snippets/status_preview.html' with status=related_status %}

View File

@ -48,7 +48,7 @@
{% block preview %}
<div class="notification py-2 {% if notification.id in unread %}is-primary is-light{% else %}has-background-white has-text-black{% endif %}">
<div class="notification py-2 {% if notification.id in unread %}is-primary is-light{% else %}has-background-body has-text-black{% endif %}">
<div class="columns">
<div class="column is-clipped">
{% include 'snippets/status_preview.html' with status=related_status %}

View File

@ -51,7 +51,7 @@
{% block preview %}
<div class="notification py-2 {% if notification.id in unread %}is-primary is-light{% else %}has-background-white has-text-black{% endif %}">
<div class="notification py-2 {% if notification.id in unread %}is-primary is-light{% else %}has-background-body has-text-black{% endif %}">
<div class="columns">
<div class="column is-clipped">
{% include 'snippets/status_preview.html' with status=related_status %}

View File

@ -3,7 +3,7 @@
{% load tz %}
{% load utilities %}
<div class="content">
<div class="box is-shadowless has-background-white-bis">
<div class="box is-shadowless has-background-tertiary">
<div class="columns">
<div class="column">
{% trans "Progress Updates:" %}

View File

@ -45,7 +45,7 @@
<a href="{{ result_set.connector.base_url }}" target="_blank">{{ result_set.connector.name|default:result_set.connector.identifier }}</a>
</span>
<span class="details-close icon icon-x" aria-hidden></span>
<span class="details-close icon icon-x" aria-hidden="true"></span>
</summary>
{% endif %}

View File

@ -1,17 +1,20 @@
{% extends 'settings/layout.html' %}
{% load i18n %}{% load humanize %}
{% load i18n %}
{% load humanize %}
{% block title %}{% trans "Announcement" %} - {{ announcement.preview }}{% endblock %}
{% block header %}
{% trans "Announcement" %}
<a href="{% url 'settings-announcements' %}" class="has-text-weight-normal help">{% trans "Back to list" %}</a>
{% endblock %}
{% block edit-button %}
{% trans "Edit Announcement" as button_text %}
<div class="field has-addons">
<div class="control">
{% include 'snippets/toggle/open_button.html' with controls_text="edit_announcement" icon_with_text="pencil" text=button_text focus="edit_announcement_header" %}
<a class="button" href="{% url 'settings-announcements-edit' announcement.id %}">
<span class="icon icon-pencil m-0-mobile" aria-hidden="true"></span>
<span class="is-sr-only-mobile">{% trans "Edit" %}</span>
</a>
</div>
<form class="control" action="{% url 'settings-announcements-delete' announcement.id %}" method="post">
{% csrf_token %}
@ -23,12 +26,20 @@
</div>
{% endblock %}
{% block breadcrumbs %}
<nav class="breadcrumb subtitle" aria-label="breadcrumbs">
<ul>
<li><a href="{% url 'settings-announcements' %}">{% trans "Announcements" %}</a></li>
<li class="is-active">
<a href="#" aria-current="page">
{{ announcement.preview|truncatechars:30 }}
</a>
</li>
</ul>
</nav>
{% endblock %}
{% block panel %}
<form name="edit-announcement" method="post" action="{% url 'settings-announcements' announcement.id %}" class="block">
{% include 'settings/announcements/announcement_form.html' with controls_text="edit_announcement" %}
</form>
<div class="block content">
<dl>
<dt class="is-pulled-left mr-5 has-text-weight-bold">{% trans "Visible:" %}</dt>

View File

@ -1,80 +0,0 @@
{% extends 'components/inline_form.html' %}
{% load i18n %}
{% block header %}
{% if announcement %}
{% trans "Edit Announcement" %}
{% else %}
{% trans "Create Announcement" %}
{% endif %}
{% endblock %}
{% block form %}
{% csrf_token %}
<input type="hidden" name="user" value="{{ request.user.id }}">
<p>
<label class="label" for="id_preview">
{% trans "Preview:" %}
</label>
{{ form.preview }}
{% include 'snippets/form_errors.html' with errors_list=form.preview.errors id="desc_preview" %}
</p>
<p>
<label class="label" for="id_content">
{% trans "Content:" %}
</label>
{{ form.content }}
{% include 'snippets/form_errors.html' with errors_list=form.content.errors id="desc_content" %}
</p>
<p>
<label class="label" for="id_event_date">
{% trans "Event date:" %}
</label>
<input type="date" name="event_date" value="{{ form.event_date.value|date:'Y-m-d' }}" class="input" id="id_event_date">
{% include 'snippets/form_errors.html' with errors_list=form.event_date.errors id="desc_event_date" %}
</p>
<hr aria-hidden="true">
<div class="columns">
<div class="column">
<p>
<label class="label" for="id_start_date">
{% trans "Start date:" %}
</label>
<input type="date" name="start_date" class="input" value="{{ form.start_date.value|date:'Y-m-d' }}" id="id_start_date">
{% include 'snippets/form_errors.html' with errors_list=form.start_date.errors id="desc_start_date" %}
</p>
</div>
<div class="column">
<p>
<label class="label" for="id_end_date">
{% trans "End date:" %}
</label>
<input type="date" name="end_date" class="input" id="id_end_date" value="{{ form.end_date.value|date:'Y-m-d' }}">
{% include 'snippets/form_errors.html' with errors_list=form.end_date.errors id="desc_end_date" %}
</p>
</div>
<div class="column is-narrow">
<p>
<label class="label" for="id_active">
{% trans "Active:" %}
</label>
{{ form.active }}
{% include 'snippets/form_errors.html' with errors_list=form.active.errors id="desc_active" %}
</p>
</div>
</div>
<div class="field has-addons">
<div class="control">
<button type="submit" class="button is-primary">
{% trans "Save" %}
</button>
</div>
</div>
{% endblock %}

View File

@ -5,16 +5,15 @@
{% block header %}{% trans "Announcements" %}{% endblock %}
{% block edit-button %}
{% trans "Create Announcement" as button_text %}
{% include 'snippets/toggle/open_button.html' with controls_text="create_announcement" icon_with_text="plus" text=button_text focus="create_announcement_header" %}
<a href="{% url 'settings-announcements-edit' %}">
{% trans "Create Announcement" as text %}
<span class="icon icon-plus" title="{{ text }}" aria-hidden="true"></span>
<span class="is-sr-only-mobile">{{ text }}</span>
</a>
{% endblock %}
{% block panel %}
<form name="create-announcement" method="post" action="{% url 'settings-announcements' %}" class="block">
{% include 'settings/announcements/announcement_form.html' with controls_text="create_announcement" %}
</form>
<div class="block">
<div class="block table-container">
<table class="table is-striped">
<tr>
<th>
@ -38,6 +37,9 @@
{% trans "Status" as text %}
{% include 'snippets/table-sort-header.html' with field="active" sort=sort text=text %}
</th>
<th>
{% trans "Actions" %}
</th>
</tr>
{% for announcement in announcements %}
<tr>
@ -46,6 +48,15 @@
<td>{{ announcement.start_date|naturaltime|default:'' }}</td>
<td>{{ announcement.end_date|naturaltime|default:'' }}</td>
<td>{% if announcement.active %}{% trans "active" %}{% else %}{% trans "inactive" %}{% endif %}</td>
<td>
<form class="control" action="{% url 'settings-announcements-delete' announcement.id %}" method="post">
{% csrf_token %}
<button type="submit" class="button is-danger is-light is-small">
<span class="icon icon-x m-0-mobile" aria-hidden="true"></span>
<span class="is-sr-only-mobile">{% trans "Delete" %}</span>
</button>
</form>
</td>
</tr>
{% endfor %}
{% if not announcements %}

View File

@ -0,0 +1,125 @@
{% extends 'settings/layout.html' %}
{% load i18n %}
{% block header %}
{% if announcement %}
{% trans "Edit Announcement" %}
{% else %}
{% trans "Create Announcement" %}
{% endif %}
{% endblock %}
{% block breadcrumbs %}
<nav class="breadcrumb subtitle" aria-label="breadcrumbs">
<ul>
<li><a href="{% url 'settings-announcements' %}">{% trans "Announcements" %}</a></li>
{% if announcement %}
<li>
<a href="{% url 'settings-announcements' announcement.id %}">
{{ announcement.preview|truncatechars:30 }}
</a>
</li>
{% endif %}
<li class="is-active">
<a href="#" aria-current="page">
Edit
</a>
</li>
</ul>
</nav>
{% endblock %}
{% block panel %}
<form
name="edit-announcement"
method="POST"
{% if announcement.id %}
action="{% url 'settings-announcements-edit' announcement.id %}"
{% else %}
action="{% url 'settings-announcements-edit' %}"
{% endif %}
class="block"
>
{% csrf_token %}
<input type="hidden" name="user" value="{{ request.user.id }}">
<h2 class="title is-4">{% trans "Announcement content" %}</h2>
<div class="box">
<p class="field">
<label class="label" for="id_preview">
{% trans "Summary:" %}
</label>
{{ form.preview }}
{% include 'snippets/form_errors.html' with errors_list=form.preview.errors id="desc_preview" %}
</p>
<p class="field">
<label class="label" for="id_content">
{% trans "Details:" %}
</label>
{{ form.content }}
{% include 'snippets/form_errors.html' with errors_list=form.content.errors id="desc_content" %}
</p>
<p class="field">
<label class="label" for="id_event_date">
{% trans "Event date:" %}
</label>
<input type="date" name="event_date" value="{{ form.event_date.value|date:'Y-m-d' }}" class="input" id="id_event_date">
{% include 'snippets/form_errors.html' with errors_list=form.event_date.errors id="desc_event_date" %}
</p>
</div>
<h2 class="title is-4">{% trans "Display settings" %}</h2>
<div class="box">
<div class="columns">
<div class="column">
<p>
<label class="label" for="id_start_date">
{% trans "Start date:" %}
</label>
<input type="date" name="start_date" class="input" value="{{ form.start_date.value|date:'Y-m-d' }}" id="id_start_date">
{% include 'snippets/form_errors.html' with errors_list=form.start_date.errors id="desc_start_date" %}
</p>
</div>
<div class="column">
<p>
<label class="label" for="id_end_date">
{% trans "End date:" %}
</label>
<input type="date" name="end_date" class="input" id="id_end_date" value="{{ form.end_date.value|date:'Y-m-d' }}">
{% include 'snippets/form_errors.html' with errors_list=form.end_date.errors id="desc_end_date" %}
</p>
</div>
<div class="column is-narrow">
<label class="label" for="id_active">
{% trans "Color:" %}
</label>
<div class="select">
{{ form.display_type }}
</div>
{% include 'snippets/form_errors.html' with errors_list=form.active.errors id="desc_display_type" %}
</div>
</div>
<p class="field">
<label class="label" for="id_active">
{% trans "Active:" %}
{{ form.active }}
</label>
{% include 'snippets/form_errors.html' with errors_list=form.active.errors id="desc_active" %}
</p>
</div>
<div class="field has-addons">
<div class="control">
<button type="submit" class="button is-primary">
{% trans "Save" %}
</button>
</div>
</div>
</form>
{% endblock %}

View File

@ -0,0 +1,130 @@
{% extends 'settings/layout.html' %}
{% load i18n %}
{% load utilities %}
{% block title %}
{% trans "Auto-moderation rules" %}
{% endblock %}
{% block header %}
{% trans "Auto-moderation rules" %}
{% endblock %}
{% block panel %}
<div class="notification content">
<p>
{% trans "Auto-moderation rules will create reports for any local user or status with fields matching the provided string." %}
{% trans "Users or statuses that have already been reported (regardless of whether the report was resolved) will not be flagged." %}
{% trans "At this time, reports are <em>not</em> being generated automatically, and you must manually trigger a scan." %}
</p>
<form name="run-scan" method="POST" action="{% url 'settings-automod-run' %}">
{% csrf_token %}
<button class="button is-warning">{% trans "Run scan" %}</button>
</form>
</div>
{% if success %}
<div class="notification is-success is-light">
<span class="icon icon-check" aria-hidden="true"></span>
<span>
{% trans "Successfully added rule" %}
</span>
</div>
{% endif %}
<div class="block content">
<h2 class="title is-4">{% trans "Add Rule" %}</h2>
<div class="box">
<form action="{% url 'settings-automod' %}" method="POST">
{% csrf_token %}
<input type="hidden" value="{{ request.user.id }}" name="created_by">
<div class="columns">
<div class="column">
<div class="field">
<label class="label" for="id_string_match">{% trans "String match" %}</label>
{{ form.string_match }}
{% include 'snippets/form_errors.html' with errors_list=form.string_match.errors id="desc_string_match" %}
</div>
</div>
<div class="column">
<div class="field">
<label class="label" for="id_flag_users">
{{ form.flag_users }}
{% trans "Flag users" %}
</label>
</div>
<div class="field">
<label class="label" for="id_flag_statuses">
{{ form.flag_statuses }}
{% trans "Flag statuses" %}
</label>
</div>
</div>
</div>
<div class="field">
<button type="submit" class="button is-primary">{% trans "Add rule" %}</button>
</div>
</form>
</div>
</div>
<div class="block content">
<h2 class="title is-4">{% trans "Current Rules" %}</h2>
<details class="details-panel">
<summary>
<span class="title is-5" role="heading" aria-level="3">
{% trans "Show rules" %} ({{ rules.count }})
</span>
<span class="details-close icon icon-x" aria-hidden="true"></span>
</summary>
<div class="table-container">
<table class="table is-striped">
<tr>
<th>
<label for="id_string_match">{% trans "String match" %}</label>
</th>
<th>
<label for="id_flag_users">{% trans "Flag users" %}</label>
</th>
<th>
<label for="id_flag_statuses">{% trans "Flag statuses" %}</label>
</th>
<th>
</th>
</tr>
{% for rule in rules %}
<tr>
<td>
<code>{{ rule.string_match }}</code>
</td>
<td>
{{ rule.flag_users|yesno }}
</td>
<td>
{{ rule.flag_statuses|yesno }}
</td>
<td>
<form action="{% url 'settings-automod-delete' rule.id %}" method="POST">
{% csrf_token %}
<div class="control">
<button type="submit" class="button is-danger is-light is-small">
<span class="icon icon-x m-0-mobile" aria-hidden="true"></span>
<span class="is-sr-only-mobile">{% trans "Remove rule" %}</span>
</button>
</div>
</form>
</td>
</tr>
{% endfor %}
</table>
</div>
</details>
</div>
{% endblock %}

View File

@ -48,6 +48,7 @@
</a>
</div>
{% endif %}
{% if pending_domains %}
<div class="column">
<a href="{% url 'settings-link-domain' %}" class="notification is-primary is-block">
@ -59,9 +60,10 @@
</a>
</div>
{% endif %}
{% if not site.allow_registration and site.allow_invite_requests and invite_requests %}
<div class="column">
<a href="{% url 'settings-invite-requests' %}" class="notification is-block is-success is-light">
<a href="{% url 'settings-invite-requests' %}" class="notification is-block is-success">
{% blocktrans trimmed count counter=invite_requests with display_count=invite_requests|intcomma %}
{{ display_count }} invite request
{% plural %}
@ -70,12 +72,22 @@
</a>
</div>
{% endif %}
{% if current_version %}
<div class="column">
<a href="https://docs.joinbookwyrm.com/updating-your-instance.html" class="notification is-block is-warning" target="_blank">
{% blocktrans trimmed with current=current_version available=available_version %}
An update is available! You're running v{{ current }} and the latest release is {{ available }}.
{% endblocktrans %}
</a>
</div>
{% endif %}
</div>
<div class="block content">
<h2>{% trans "Instance Activity" %}</h2>
<form method="get" action="{% url 'settings-dashboard' %}" class="notification has-background-white-bis scroll-x">
<form method="get" action="{% url 'settings-dashboard' %}" class="notification has-background-tertiary scroll-x">
<div class="is-flex is-align-items-flex-end">
<div class="ml-1 mr-1">
<label class="label" for="id_start">

View File

@ -9,6 +9,7 @@
<div class="columns is-mobile">
<div class="column">
<h1 class="title">{% block header %}{% endblock %}</h1>
{% block breadcrumbs %}{% endblock %}
</div>
<div class="column is-narrow">
{% block edit-button %}{% endblock %}
@ -16,6 +17,7 @@
</div>
</header>
<div class="block columns">
<nav class="menu column is-one-quarter">
<h2 class="menu-label">
@ -54,6 +56,10 @@
{% url 'settings-reports' as url %}
<a href="{{ url }}"{% if url in request.path %} class="is-active" aria-selected="true"{% endif %}>{% trans "Reports" %}</a>
</li>
<li>
{% url 'settings-automod' as url %}
<a href="{{ url }}"{% if url in request.path %} class="is-active" aria-selected="true"{% endif %}>{% trans "Auto-moderation rules" %}</a>
</li>
<li>
{% url 'settings-email-blocks' as url %}
<a href="{{ url }}"{% if url in request.path %} class="is-active" aria-selected="true"{% endif %}>{% trans "Email Blocklist" %}</a>

View File

@ -53,7 +53,7 @@
{% trans "View links" %}
({{ domain.links.count }})
</span>
<span class="details-close icon icon-x" aria-hidden></span>
<span class="details-close icon icon-x" aria-hidden="true"></span>
</summary>
<div class="table-container mt-4">

View File

@ -1,6 +1,7 @@
{% extends 'settings/layout.html' %}
{% load i18n %}
{% load humanize %}
{% load feed_page_tags %}
{% block title %}
{% include "settings/reports/report_header.html" with report=report %}
@ -21,7 +22,7 @@
<details class="details-panel box">
<summary>
<span class="title is-4">{% trans "Message reporter" %}</span>
<span class="details-close icon icon-x" aria-hidden></span>
<span class="details-close icon icon-x" aria-hidden="true"></span>
</summary>
<div class="box">
{% trans "Update on your report:" as dm_template %}
@ -30,20 +31,14 @@
</details>
</div>
{% if report.statuses.exists %}
{% if report.status %}
<div class="block">
<h3 class="title is-4">{% trans "Reported statuses" %}</h3>
<ul>
{% for status in report.statuses.select_subclasses.all %}
<li>
{% if status.deleted %}
<em>{% trans "Status has been deleted" %}</em>
{% else %}
{% include 'snippets/status/status.html' with status=status moderation_mode=True %}
{% endif %}
</li>
{% endfor %}
</ul>
<h3 class="title is-4">{% trans "Reported status" %}</h3>
{% if report.status.deleted %}
<em>{% trans "Status has been deleted" %}</em>
{% else %}
{% include 'snippets/status/status.html' with status=report.status|load_subclass moderation_mode=True %}
{% endif %}
</div>
{% endif %}

View File

@ -1,7 +1,7 @@
{% load i18n %}
{% load utilities %}
{% if report.statuses.exists %}
{% if report.status %}
{% blocktrans trimmed with report_id=report.id username=report.user|username %}
Report #{{ report_id }}: Status posted by @{{ username }}

View File

@ -4,7 +4,7 @@
{% load utilities %}
{% block card-header %}
<h2 class="card-header-title has-background-white-ter is-block">
<h2 class="card-header-title has-background-secondary is-block">
<a href="{% url 'settings-report' report.id %}">
{% include "settings/reports/report_header.html" with report=report %}
</a>

View File

@ -15,6 +15,24 @@
{% endblock %}
{% block panel %}
{% if success %}
<div class="notification is-success is-light">
<span class="icon icon-check" aria-hidden="true"></span>
<span>
{% trans "Settings saved" %}
</span>
</div>
{% endif %}
{% if site_form.errors %}
<div class="notification is-danger is-light">
<span class="icon icon-x" aria-hidden="true"></span>
<span>
{% trans "Unable to save settings" %}
</span>
</div>
{% endif %}
<form action="{% url 'settings-site' %}" method="POST" class="content" enctype="multipart/form-data">
{% csrf_token %}
<section class="block" id="instance_info">

View File

@ -8,7 +8,7 @@
<div class="box is-flex-grow-1">
{% include 'user/user_preview.html' with user=user %}
{% if user.summary %}
<div class="box content has-background-white-ter is-shadowless">
<div class="box content has-background-secondary is-shadowless">
{{ user.summary|to_markdown|safe }}
</div>
{% endif %}
@ -108,7 +108,7 @@
</dl>
{% if server.notes %}
<h5>{% trans "Notes" %}</h5>
<div class="box content has-background-white-ter is-shadowless">
<div class="box content has-background-secondary is-shadowless">
{{ server.notes }}
</div>
{% endif %}

View File

@ -0,0 +1,61 @@
{% extends 'setup/layout.html' %}
{% load i18n %}
{% block header %}
<h1 class="title">{% trans "Set up BookWyrm" %}</h1>
<div class="subtitle">
{% trans "Your account as a user and an admin" %}
</div>
{% endblock %}
{% block panel %}
<div class="block content">
<h2 class="title is-4">{% trans "Create your account" %}</h2>
<div class="columns">
<div class="column is-half">
<div class="box has-background-primary-light">
<form name="register" method="post" action="{% url 'setup-admin' %}">
<div class="field">
<label class="label" for="id_admin_key">
{% trans "Admin key:" %}
</label>
<div class="control">
<input
type="password"
name="admin_key"
class="input"
id="id_admin_key"
aria-describedby="desc_admin_key"
required
>
<p class="help" id="desc_admin_key">
{% blocktrans trimmed %}
An admin key was created when you installed BookWyrm.
You can get your admin key by running <code>./bw-dev admin_code</code> from the command line on your server.
{% endblocktrans %}
</p>
</div>
</div>
{% include 'snippets/register_form.html' %}
</form>
</div>
</div>
<div class="column">
<p>
{% blocktrans trimmed %}
As an admin, you'll be able to configure the instance name and information, and moderate your instance.
This means you will have access to private information about your users, and are responsible for responding to reports of bad behavior or spam.
{% endblocktrans %}
</p>
<p>
{% trans "Once the instance is set up, you can promote other users to moderator or admin roles from the admin panel." %}
</p>
<p>
<a href="https://docs.joinbookwyrm.com/moderation.html" target="_blank">
{% trans "Learn more about moderation" %}
</a>
</p>
</div>
</div>
</div>
{% endblock %}

View File

@ -0,0 +1,154 @@
{% extends 'setup/layout.html' %}
{% load i18n %}
{% block header %}
<h1 class="title">{% trans "Instance Configuration" %}</h1>
<div class="subtitle">
{% trans "Make sure everything looks right before proceeding" %}
</div>
{% endblock %}
{% block panel %}
<div class="block content">
{% if warnings.debug %}
<div class="notification is-danger is-flex is-align-items-start">
<span class="icon icon-warning is-size-4 pr-3" aria-hidden="true"></span>
<span>
{% blocktrans trimmed %}
You are running BookWyrm in <strong>debug</strong> mode.
This should <strong>never</strong> be used in a production environment.
{% endblocktrans %}
</span>
</div>
{% endif %}
{% if warnings.invalid_domain %}
<div class="notification is-danger is-flex is-align-items-start">
<span class="icon icon-warning is-size-4 pr-3" aria-hidden="true"></span>
<span>
{% blocktrans trimmed %}
Your domain appears to be misconfigured.
It should not include protocol or slashes.
{% endblocktrans %}
</span>
</div>
{% endif %}
{% if warnings.protocol %}
<div class="notification is-danger is-flex is-align-items-start">
<span class="icon icon-warning is-size-4 pr-3" aria-hidden="true"></span>
<span>
{% blocktrans trimmed %}
You are running BookWyrm in production mode without https.
<strong>USE_HTTPS</strong> should be enabled in production.
{% endblocktrans %}
</span>
</div>
{% endif %}
<div class="columns">
<div class="column is-half is-flex is-flex-direction-column">
<h2 class="title is-4">{% trans "Settings" %}</h2>
<div class="notification is-flex-grow-1">
<dl>
<dt class="is-pulled-left mr-5 has-text-weight-bold">
{% trans "Instance domain:" %}
</dt>
<dd>
{{ info.domain }}
</dd>
<dt class="is-pulled-left mr-5 has-text-weight-bold">
{% trans "Protocol:" %}
</dt>
<dd>
{% if info.use_https %}
<span class="tag is-success">https</span>
{% else %}
<span class="tag is-danger">http</span>
{% endif %}
</dd>
<dt class="is-pulled-left mr-5 has-text-weight-bold">
{% trans "Software version:" %}
</dt>
<dd>
{{ info.version }}
</dd>
<dt class="is-pulled-left mr-5 has-text-weight-bold">
{% trans "Using S3:" %}
</dt>
<dd>
{{ info.use_s3|yesno }}
</dd>
</dl>
</div>
</div>
<div class="column is-half is-flex is-flex-direction-column">
<h2 class="title is-4">{% trans "Display" %}</h2>
<div class="notification is-flex-grow-1">
<dl>
<dt class="is-pulled-left mr-5 has-text-weight-bold">
{% trans "Default interface language:" %}
</dt>
<dd>
{{ info.language }}
</dd>
<dt class="is-pulled-left mr-5 has-text-weight-bold">
{% trans "Email sender:" %}
</dt>
<dd>
{{ info.email_sender }}
</dd>
<dt class="is-pulled-left mr-5 has-text-weight-bold">
{% trans "Enable preview images:" %}
</dt>
<dd>
{{ info.preview_images|yesno }}
</dd>
<dt class="is-pulled-left mr-5 has-text-weight-bold">
{% trans "Enable image thumbnails:" %}
</dt>
<dd>
{{ info.thumbnails|yesno }}
</dd>
</dl>
</div>
</div>
</div>
</div>
<div class="block content">
<h2 class="title is-4">{% trans "Does everything look right?" %}</h2>
<p class="subtitle help">
{% blocktrans trimmed %}
This is your last chance to set your domain and protocol.
{% endblocktrans %}
</p>
<div class="box">
<div class="control">
<a class="button is-primary" href="{% url 'setup-admin' %}">
<span class="icon icon-check" aria-hidden="true"></span>
<span>{% trans "Continue" %}</span>
</a>
</div>
<p>
{% blocktrans trimmed %}
You can change your instance settings in the <code>.env</code> file on your server.
{% endblocktrans %}
<a href="https://docs.joinbookwyrm.com/installing-in-production.html" target="_blank">
{% trans "View installation instructions" %}
</a>
</p>
</div>
</div>
{% endblock %}

View File

@ -0,0 +1,37 @@
{% extends 'layout.html' %}
{% load i18n %}
{% load static %}
{% block title %}{% trans "Instance Setup" %}{% endblock %}
{% block body %}
<nav class="navbar" aria-label="main navigation">
<div class="container">
<div class="navbar-brand is-flex-grow-1">
<span class="navbar-item" href="/">
<img class="image logo" src="{% if site.logo_small %}{% get_media_prefix %}{{ site.logo_small }}{% else %}{% static "images/logo-small.png" %}{% endif %}" alt="{% blocktrans with site_name=site.name %}{{ site_name }} home page{% endblocktrans %}">
</span>
<div class="navbar-item is-align-items-start pt-5 is-flex-grow-1">
{% trans "Installing BookWyrm" %}
</div>
<div class="navbar-item is-align-items-start pt-5">
<a href="https://joinbookwyrm.com/get-involved/#dev-chat" target="_blank">{% trans "Need help?" %}</a>
</div>
</div>
</div>
</nav>
<div class="section is-flex-grow-1">
<div class="container">
<header class="block content">
{% block header %}{% endblock %}
</header>
<div class="block">
{% block panel %}{% endblock %}
</div>
</div>
</div>
{% endblock %}

View File

@ -1,32 +1,29 @@
{% load humanize %}{% load i18n %}{% load utilities %}
{% with announcement.id|uuid as uuid %}
<aside
class="notification mb-1 p-3{% if not admin_mode %} is-hidden{% endif %} transition-y"
class="notification mb-1 p-3{% if not admin_mode %} is-hidden{% endif %} transition-y has-background-{{ announcement.display_type }}"
{% if not admin_mode %}data-hide="hide_announcement_{{ announcement.id }}"{% endif %}
>
<div class="columns mb-0 is-mobile">
<div class="column pb-0">
<details>
<summary>
{% if announcement.event_date %}
<strong>{{ announcement.event_date|naturalday|title }}:</strong>
{% endif %}
{{ announcement.preview }}
</div>
{{ announcement.preview|safe }}
{% if announcement.content %}
<span class="details-close mt-4 mr-4 icon icon-x is-small" aria-hidden></span>
{% endif %}
</summary>
{% if announcement.content %}
<div class="column is-narrow pb-0">
{% trans "Open" as button_text %}
{% include 'snippets/toggle/open_button.html' with text=button_text controls_text="announcement" class="is-small" controls_uid=uuid icon_with_text="arrow-down" %}
{% trans "Close" as button_text %}
{% include 'snippets/toggle/close_button.html' with text=button_text controls_text="announcement" class="is-small" controls_uid=uuid icon_with_text="arrow-up" %}
<div class="mb-2 mt-2" id="announcement_{{ uuid }}">
<div class="box is-shadowless mb-0">
{{ announcement.content|safe }}
</div>
</div>
{% endif %}
</div>
{% if announcement.content %}
<div class="mb-2 mt-2 {% if not pressed %}is-hidden{% endif %}" id="announcement_{{ uuid }}">
<div class="box is-shadowless mb-0">
{{ announcement.content|safe }}
</div>
</div>
{% endif %}
</details>
<div class="is-flex mt-0 help">
<p>{% blocktrans with user_path=announcement.user.local_path username=announcement.user.display_name %}Posted by <a href="{{ user_path }}">{{ username }}</a>{% endblocktrans %}</p>
{% if not admin_mode %}

View File

@ -3,8 +3,9 @@
{% load cache %}
{% spaceless %}
{% get_current_language as LANGUAGE_CODE %}
{# 6 month cache #}
{% cache 15552000 titleby book.id %}
{% cache 15552000 titleby LANGUAGE_CODE book.id %}
{% if book.authors.exists %}
{% blocktrans trimmed with path=book.local_path title=book|book_title %}

View File

@ -4,42 +4,37 @@
{% with status_type=request.GET.status_type %}
<div class="tab-group">
<div class="tabs is-boxed" role="tablist">
<ul>
<li class="{% if status_type == 'review' or not status_type %}is-active{% endif %}">
<a
href="{{ request.path }}?status_type=review&book={{ book.id }}"
id="tab_review_{{ book.id }}"
role="tab"
aria-selected="{% if status_type == 'review' or not status_type %}true{% else %}false{% endif %}"
aria-controls="review_{{ book.id }}"
data-category="tab-option-{{ book.id }}">
{% trans "Review" %}
</a>
</li>
<li class="{% if status_type == 'comment' %}is-active{% endif %}">
<a
href="{{ request.path }}?status_type=comment&book={{ book.id}}"
id="tab_comment_{{ book.id }}"
role="tab"
aria-selected="{% if status_type == 'comment' %}true{% else %}false{% endif %}"
aria-controls="comment_{{ book.id}}"
data-category="tab-option-{{ book.id }}">
{% trans "Comment" %}
</a>
</li>
<li class="{% if status_type == 'quote' %}is-active{% endif %}">
<a
href="{{ request.path }}?status_type=quote&book={{ book.id }}"
id="tab_quote_{{ book.id }}"
role="tab"
aria-selected="{% if status_type == 'quote' %}true{% else %}false{% endif %}"
aria-controls="quote_{{ book.id }}"
data-category="tab-option-{{ book.id }}">
{% trans "Quote" %}
</a>
</li>
</ul>
<div class="bw-tabs is-boxed" role="tablist">
<a
class="{% if status_type == 'review' or not status_type %}is-active{% endif %}"
role="tab"
href="{{ request.path }}?status_type=review&book={{ book.id }}"
id="tab_review_{{ book.id }}"
aria-selected="{% if status_type == 'review' or not status_type %}true{% else %}false{% endif %}"
aria-controls="review_{{ book.id }}"
data-category="tab-option-{{ book.id }}">
{% trans "Review" %}
</a>
<a
class="{% if status_type == 'comment' %}is-active{% endif %}"
role="tab"
href="{{ request.path }}?status_type=comment&book={{ book.id}}"
id="tab_comment_{{ book.id }}"
aria-selected="{% if status_type == 'comment' %}true{% else %}false{% endif %}"
aria-controls="comment_{{ book.id}}"
data-category="tab-option-{{ book.id }}">
{% trans "Comment" %}
</a>
<a
class="{% if status_type == 'quote' %}is-active{% endif %}"
role="tab"
href="{{ request.path }}?status_type=quote&book={{ book.id }}"
id="tab_quote_{{ book.id }}"
aria-selected="{% if status_type == 'quote' %}true{% else %}false{% endif %}"
aria-controls="quote_{{ book.id }}"
data-category="tab-option-{{ book.id }}">
{% trans "Quote" %}
</a>
</div>
<div class="tab-option-{{ book.id }}" id="review_{{ book.id }}" role="tabpanel" aria-labelledby="tab_review_{{ book.id }}" {% if status_type and status_type != "review" %}hidden{% endif %}>

View File

@ -22,7 +22,7 @@
</span>
{% endif %}
<span class="details-close icon icon-x is-{{ size|default:'normal' }}" aria-hidden></span>
<span class="details-close icon icon-x is-{{ size|default:'normal' }}" aria-hidden="true"></span>
</summary>
<div class="mt-3">

View File

@ -3,27 +3,61 @@
<div class="field">
<label class="label" for="id_localname_register">{% trans "Username:" %}</label>
<div class="control">
<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 %}" aria-describedby="desc_localname_register">
{% include 'snippets/form_errors.html' with errors_list=register_form.localname.errors id="desc_localname_register" %}
<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 %}"
aria-describedby="desc_localname_register_panel"
>
<div id="desc_localname_register_panel">
<p class="help">
{% trans "Choose wisely! Your username cannot be changed." %}
</p>
{% include 'snippets/form_errors.html' with errors_list=register_form.localname.errors id="desc_localname_register" %}
</div>
</div>
</div>
<div class="field">
<label class="label" for="id_email_register">{% trans "Email address:" %}</label>
<div class="control">
<input type="email" name="email" maxlength="254" class="input" id="id_email_register" value="{% if register_form.email.value %}{{ register_form.email.value }}{% endif %}" required aria-describedby="desc_email_register">
<input
type="email"
name="email"
maxlength="254"
class="input"
id="id_email_register"
value="{% if register_form.email.value %}{{ register_form.email.value }}{% endif %}"
required
aria-describedby="desc_email_register"
>
{% include 'snippets/form_errors.html' with errors_list=register_form.email.errors id="desc_email_register" %}
</div>
</div>
<div class="field">
<label class="label" for="id_password_register">{% trans "Password:" %}</label>
<div class="control">
<input type="password" name="password" maxlength="128" class="input" required="" id="id_password_register" aria-describedby="desc_password_register">
<input
type="password"
name="password"
maxlength="128"
class="input"
required=""
id="id_password_register"
aria-describedby="desc_password_register"
>
{% include 'snippets/form_errors.html' with errors_list=register_form.password.errors id="desc_password_register" %}
</div>
</div>
<div class="field is-grouped">
<div class="control">
<button class="button is-primary" type="submit">

View File

@ -12,6 +12,6 @@
>
{% trans "Report" %}
</button>
{% include 'snippets/report_modal.html' with user=user id=modal_id status=status.id %}
{% include 'snippets/report_modal.html' with user=user id=modal_id status_id=status.id %}
{% endwith %}

View File

@ -23,7 +23,7 @@
<input type="hidden" name="reporter" value="{{ request.user.id }}">
<input type="hidden" name="user" value="{{ user.id }}">
{% if status_id %}
<input type="hidden" name="statuses" value="{{ status_id }}">
<input type="hidden" name="status" value="{{ status_id }}">
{% endif %}
{% if link %}
<input type="hidden" name="links" value="{{ link.id }}">

View File

@ -23,7 +23,7 @@
<input type="hidden" name="change-shelf-from" value="{{ current.identifier }}">
<input type="hidden" name="shelf" value="{{ shelf.identifier }}">
<button class="button is-fullwidth is-small shelf-option is-radiusless is-white" type="submit" {% if shelf.identifier == current.identifier %}disabled{% endif %}>
<button class="button is-fullwidth is-small shelf-option is-radiusless has-background-body" type="submit" {% if shelf.identifier == current.identifier %}disabled{% endif %}>
<span>
{% include "snippets/translated_shelf_name.html" with shelf=shelf %}
</span>
@ -32,7 +32,7 @@
</li>
{% else%}
{% comparison_bool shelf.identifier active_shelf.shelf.identifier as is_current %}
{% with button_class="is-fullwidth is-small shelf-option is-radiusless is-white" %}
{% with button_class="is-fullwidth is-small shelf-option is-radiusless has-background-body" %}
<li role="menuitem" class="dropdown-item p-0">
{% if shelf.identifier == 'reading' %}

View File

@ -7,5 +7,5 @@
{% endblock %}
{% block dropdown-list %}
{% include 'snippets/shelve_button/shelve_button_dropdown_options.html' with active_shelf=active_shelf shelves=user_shelves dropdown=True class="shelf-option is-fullwidth is-small is-radiusless is-white" %}
{% include 'snippets/shelve_button/shelve_button_dropdown_options.html' with active_shelf=active_shelf shelves=user_shelves dropdown=True class="shelf-option is-fullwidth is-small is-radiusless has-background-body" %}
{% endblock %}

View File

@ -5,7 +5,7 @@
<div class="media">
<figure class="media-left" aria-hidden="true">
<a class="image is-48x48" href="{{ status.user.local_path }}">
<a class="image is-48x48" href="{{ status.user.local_path }}" tabindex="-1">
{% include 'snippets/avatar.html' with user=status.user ariaHide="true" medium="true" %}
</a>
</figure>

View File

@ -1,7 +1,9 @@
{% load cache %}
{% load i18n %}
{# Three day cache #}
{% cache 259200 generated_note_header status.id %}
{% get_current_language as LANGUAGE_CODE %}
{% cache 259200 generated_note_header LANGUAGE_CODE status.id %}
{% if status.content == 'wants to read' %}
{% include 'snippets/status/headers/to_read.html' with book=status.mention_books.first %}
{% elif status.content == 'finished reading' %}

View File

@ -4,7 +4,7 @@
{% block card-header %}
<div
class="card-header-title has-background-white-ter is-block"
class="card-header-title has-background-secondary is-block"
{% if main %}id="anchor-{{ status.id }}"{% endif %}
>
{% include 'snippets/status/header.html' with status=status %}

View File

@ -31,7 +31,7 @@
{# things you can do to other people's statuses #}
<li role="menuitem" class="dropdown-item p-0">
<span class="control">
<a href="{% url 'direct-messages-user' status.user|username %}" class="button is-small is-white is-radiusless is-fullwidth">
<a href="{% url 'direct-messages-user' status.user|username %}" class="button is-small has-background-body is-radiusless is-fullwidth">
{% trans "Send direct message" %}
</a>
</span>

View File

@ -4,7 +4,7 @@
<div class="columns is-mobile scroll-x mb-0">
{% for user in suggested_users %}
<div class="column is-flex is-flex-grow-0">
<div class="box has-text-centered is-shadowless has-background-white-bis m-0">
<div class="box has-text-centered is-shadowless has-background-tertiary m-0">
<a href="{{ user.local_path }}" class="has-text-black">
{% include 'snippets/avatar.html' with user=user large=True %}
<span title="{{ user.display_name }}" class="is-block is-6 has-text-weight-bold">{{ user.display_name|truncatechars:10 }}</span>

View File

@ -30,7 +30,7 @@
{% if user.summary %}
{% spaceless %}
<div class="column box has-background-white-bis content preserve-whitespace">
<div class="column box has-background-tertiary content preserve-whitespace">
{{ user.summary|to_markdown|safe }}
</div>
{% endspaceless %}