Catches a couple translations, hides profile box when empty
This commit is contained in:
parent
577f5db37b
commit
e2622d0594
|
@ -54,11 +54,11 @@
|
||||||
<div class="tile is-child box has-background-white-bis">
|
<div class="tile is-child box has-background-white-bis">
|
||||||
<h2 class="title is-4">{% trans "Your Account" %}</h2>
|
<h2 class="title is-4">{% trans "Your Account" %}</h2>
|
||||||
{% include 'user/user_preview.html' with user=request.user %}
|
{% include 'user/user_preview.html' with user=request.user %}
|
||||||
<div class="box content">
|
|
||||||
{% if request.user.summary %}
|
{% if request.user.summary %}
|
||||||
|
<div class="box content">
|
||||||
{{ request.user.summary | to_markdown | safe }}
|
{{ request.user.summary | to_markdown | safe }}
|
||||||
{% endif %}
|
|
||||||
</div>
|
</div>
|
||||||
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
{% load bookwyrm_tags %}
|
{% load bookwyrm_tags %}
|
||||||
|
{% load i18n %}
|
||||||
{% if book %}
|
{% if book %}
|
||||||
<div class="columns">
|
<div class="columns">
|
||||||
<div class="column is-narrow">
|
<div class="column is-narrow">
|
||||||
|
@ -8,7 +9,7 @@
|
||||||
<div class="column">
|
<div class="column">
|
||||||
<h3 class="title is-5"><a href="/book/{{ book.id }}">{{ book.title }}</a></h3>
|
<h3 class="title is-5"><a href="/book/{{ book.id }}">{{ book.title }}</a></h3>
|
||||||
{% if book.authors %}
|
{% if book.authors %}
|
||||||
<p class="subtitle is-5">by {% include 'snippets/authors.html' with book=book %}</p>
|
<p class="subtitle is-5">{% trans "by" %} {% include 'snippets/authors.html' with book=book %}</p>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if book|book_description %}
|
{% if book|book_description %}
|
||||||
<blockquote class="content">{{ book|book_description|to_markdown|safe|truncatewords_html:50 }}</blockquote>
|
<blockquote class="content">{{ book|book_description|to_markdown|safe|truncatewords_html:50 }}</blockquote>
|
||||||
|
|
|
@ -1,11 +1,12 @@
|
||||||
{% load bookwyrm_tags %}
|
{% load bookwyrm_tags %}
|
||||||
|
{% load i18n %}
|
||||||
{% if book %}
|
{% if book %}
|
||||||
<a href="{{ book.local_path }}">{% include 'snippets/book_cover.html' with book=book %}</a>
|
<a href="{{ book.local_path }}">{% include 'snippets/book_cover.html' with book=book %}</a>
|
||||||
{% include 'snippets/stars.html' with rating=book|rating:request.user %}
|
{% include 'snippets/stars.html' with rating=book|rating:request.user %}
|
||||||
|
|
||||||
<h3 class="title is-6"><a href="/book/{{ book.id }}">{{ book.title }}</a></h3>
|
<h3 class="title is-6"><a href="/book/{{ book.id }}">{{ book.title }}</a></h3>
|
||||||
{% if book.authors %}
|
{% if book.authors %}
|
||||||
<p class="subtitle is-6">by {% include 'snippets/authors.html' with book=book %}</p>
|
<p class="subtitle is-6">{% trans "by" %} {% include 'snippets/authors.html' with book=book %}</p>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
|
@ -149,12 +149,12 @@
|
||||||
<div class="columns is-variable is-1">
|
<div class="columns is-variable is-1">
|
||||||
<div class="column">
|
<div class="column">
|
||||||
<label class="is-sr-only" for="id_localname">{% trans "Username:" %}</label>
|
<label class="is-sr-only" for="id_localname">{% trans "Username:" %}</label>
|
||||||
<input type="text" name="localname" maxlength="150" class="input" required="" id="id_localname" placeholder="username">
|
<input type="text" name="localname" maxlength="150" class="input" required="" id="id_localname" placeholder="{% trans 'username' %}">
|
||||||
</div>
|
</div>
|
||||||
<div class="column">
|
<div class="column">
|
||||||
<label class="is-sr-only" for="id_password">{% trans "Username:" %}</label>
|
<label class="is-sr-only" for="id_password">{% trans "Username:" %}</label>
|
||||||
<input type="password" name="password" maxlength="128" class="input" required="" id="id_password" placeholder="password">
|
<input type="password" name="password" maxlength="128" class="input" required="" id="id_password" placeholder="{% trans 'password' %}">
|
||||||
<p class="help"><a href="/password-reset">Forgot your password?</a></p>
|
<p class="help"><a href="/password-reset">{% trans "Forgot your password?" %}</a></p>
|
||||||
</div>
|
</div>
|
||||||
<div class="column is-narrow">
|
<div class="column is-narrow">
|
||||||
<button class="button is-primary" type="submit">{% trans "Log in" %}</button>
|
<button class="button is-primary" type="submit">{% trans "Log in" %}</button>
|
||||||
|
@ -165,7 +165,7 @@
|
||||||
{% if site.allow_registration and request.path != '' and request.path != '/' %}
|
{% if site.allow_registration and request.path != '' and request.path != '/' %}
|
||||||
<div class="column is-narrow">
|
<div class="column is-narrow">
|
||||||
<a href="/" class="button is-link">
|
<a href="/" class="button is-link">
|
||||||
Join
|
{% trans "Join" %}
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
@ -199,7 +199,7 @@
|
||||||
{% if site.support_link %}
|
{% if site.support_link %}
|
||||||
<div class="column">
|
<div class="column">
|
||||||
<span class="icon icon-heart"></span>
|
<span class="icon icon-heart"></span>
|
||||||
Support {{ site.name }} on <a href="{{ site.support_link }}" target="_blank">{{ site.support_title }}</a>
|
{% blocktrans %}Support {{ site.name }} on <a href="{{ site.support_link }}" target="_blank">{{ site.support_title }}</a>{% endblocktrans %}
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<div class="column">
|
<div class="column">
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
<{% if anchor %}a href="{{ user.local_path }}"{% else %}span{% endif %}
|
<{% if anchor %}a href="{{ user.local_path }}"{% else %}span{% endif %}
|
||||||
class="user ml-1"
|
class="user ml-1"
|
||||||
>
|
>
|
||||||
{{ user.name|default:user|username }}
|
{{ user.display_name }}
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
{% if possessive %}'s{% endif %}
|
{% if possessive %}'s{% endif %}
|
||||||
|
|
|
@ -17,11 +17,11 @@
|
||||||
{% include 'user/user_preview.html' with user=user %}
|
{% include 'user/user_preview.html' with user=user %}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="column box has-background-white-bis content">
|
|
||||||
{% if user.summary %}
|
{% if user.summary %}
|
||||||
|
<div class="column box has-background-white-bis content">
|
||||||
{{ user.summary | to_markdown | safe }}
|
{{ user.summary | to_markdown | safe }}
|
||||||
{% endif %}
|
|
||||||
</div>
|
</div>
|
||||||
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
{% if not is_self and request.user.is_authenticated %}
|
{% if not is_self and request.user.is_authenticated %}
|
||||||
{% include 'snippets/follow_button.html' with user=user %}
|
{% include 'snippets/follow_button.html' with user=user %}
|
||||||
|
|
Loading…
Reference in New Issue