First pass at internationalization and localization
This commit is contained in:
@ -1,21 +0,0 @@
|
||||
<section class="level is-mobile">
|
||||
<div class="level-item has-text-centered">
|
||||
<div>
|
||||
<p class="title has-text-weight-normal"><span class="icon icon-graphic-paperplane"></span></p>
|
||||
<p class="heading">Decentralized</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="level-item has-text-centered">
|
||||
<div>
|
||||
<p class="title has-text-weight-normal"><span class="icon icon-graphic-heart"></span></p>
|
||||
<p class="heading">Friendly</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="level-item has-text-centered">
|
||||
<div>
|
||||
<p class="title has-text-weight-normal"><span class="icon icon-graphic-banknote"></span></p>
|
||||
<p class="heading">Anti-Corporate</p>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
@ -1,5 +1,5 @@
|
||||
{% extends 'layout.html' %}
|
||||
{% load humanize %}
|
||||
{% load i18n %}
|
||||
{% load bookwyrm_tags %}
|
||||
{% block content %}
|
||||
|
||||
@ -8,7 +8,26 @@
|
||||
<h2 class="subtitle">{{ site.instance_tagline }}</h2>
|
||||
</header>
|
||||
|
||||
{% include 'discover/icons.html' %}
|
||||
<section class="level is-mobile">
|
||||
<div class="level-item has-text-centered">
|
||||
<div>
|
||||
<p class="title has-text-weight-normal"><span class="icon icon-graphic-paperplane"></span></p>
|
||||
<p class="heading">{% trans "Decentralized" %}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="level-item has-text-centered">
|
||||
<div>
|
||||
<p class="title has-text-weight-normal"><span class="icon icon-graphic-heart"></span></p>
|
||||
<p class="heading">{% trans "Friendly" %}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="level-item has-text-centered">
|
||||
<div>
|
||||
<p class="title has-text-weight-normal"><span class="icon icon-graphic-banknote"></span></p>
|
||||
<p class="heading">{% trans "Anti-Corporate" %}</p>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section class="tile is-ancestor">
|
||||
<div class="tile is-7 is-parent">
|
||||
@ -20,37 +39,22 @@
|
||||
{% if not request.user.is_authenticated %}
|
||||
<div class="tile is-child box has-background-primary-light content">
|
||||
{% if site.allow_registration %}
|
||||
<h2 class="title">Join {{ site.name }}</h2>
|
||||
<h2 class="title">{% blocktrans with name=site.name %}Join {{ name }}{% endblocktrans %}</h2>
|
||||
<form name="register" method="post" action="/register">
|
||||
{% include 'snippets/register_form.html' %}
|
||||
</form>
|
||||
{% else %}
|
||||
<h2 class="title">This instance is closed</h2>
|
||||
<h2 class="title">{% trans "This instance is closed" %}</h2>
|
||||
<p>{{ site.registration_closed_text | safe}}</p>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% else %}
|
||||
<div class="tile is-child box has-background-white-bis">
|
||||
<h2 class="title is-4">Your Account</h2>
|
||||
<div class="media block">
|
||||
<div class="media-left">
|
||||
<a href="{{ user.local_path }}">
|
||||
{% include 'snippets/avatar.html' with user=user large=True %}
|
||||
</a>
|
||||
</div>
|
||||
<div class="media-content">
|
||||
<p>{% if user.name %}{{ user.name }}{% else %}{{ user.localname }}{% endif %}</p>
|
||||
<p><a href="{{ user.remote_id }}">{{ user.username }}</a></p>
|
||||
<p>Joined {{ user.created_date | naturaltime }}</p>
|
||||
<p>
|
||||
<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>
|
||||
<h2 class="title is-4">{% trans "Your Account" %}</h2>
|
||||
{% include 'user/user_preview.html' with user=request.user %}
|
||||
<div class="box content">
|
||||
{% if user.summary %}
|
||||
{{ user.summary | to_markdown | safe }}
|
||||
{% if request.user.summary %}
|
||||
{{ request.user.summary | to_markdown | safe }}
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1,4 +1,5 @@
|
||||
{% extends 'layout.html' %}
|
||||
{% load i18n %}
|
||||
{% load humanize %}
|
||||
{% load bookwyrm_tags %}
|
||||
|
||||
@ -11,22 +12,7 @@
|
||||
<div class="block">
|
||||
<div class="columns">
|
||||
<div class="column is-two-fifths">
|
||||
<div class="media">
|
||||
<div class="media-left">
|
||||
<a href="{{ user.local_path }}">
|
||||
{% include 'snippets/avatar.html' with user=user large=True %}
|
||||
</a>
|
||||
</div>
|
||||
<div class="media-content">
|
||||
<p>{% if user.name %}{{ user.name }}{% else %}{{ user.localname }}{% endif %}</p>
|
||||
<p><a href="{{ user.remote_id }}">{{ user.username }}</a></p>
|
||||
<p>Joined {{ user.created_date | naturaltime }}</p>
|
||||
<p>
|
||||
<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>
|
||||
{% include 'user/user_preview.html' with user=user %}
|
||||
</div>
|
||||
|
||||
<div class="column box has-background-white-bis content">
|
||||
@ -41,7 +27,7 @@
|
||||
|
||||
{% if is_self and user.follower_requests.all %}
|
||||
<div class="follow-requests">
|
||||
<h2>Follow Requests</h2>
|
||||
<h2>{% trans "Follow Requests" %}</h2>
|
||||
{% for requester in user.follower_requests.all %}
|
||||
<div class="row shrink">
|
||||
<p>
|
||||
@ -59,25 +45,25 @@
|
||||
<ul>
|
||||
{% url 'user-feed' user|username as url %}
|
||||
<li{% if url == request.path or url == request.path|add:'/' %} class="is-active"{% endif %}>
|
||||
<a href="{{ url }}">Activity</a>
|
||||
<a href="{{ url }}">{% trans "Activity" %}</a>
|
||||
</li>
|
||||
{% if is_self or user.goal.exists %}
|
||||
{% now 'Y' as year %}
|
||||
{% url 'user-goal' user|username year as url %}
|
||||
<li{% if url in request.path %} class="is-active"{% endif %}>
|
||||
<a href="{{ url }}">Reading Goal</a>
|
||||
<a href="{{ url }}">{% trans "Reading Goal" %}</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% if is_self or user.lists.exists %}
|
||||
{% url 'user-lists' user|username as url %}
|
||||
<li{% if url in request.path %} class="is-active"{% endif %}>
|
||||
<a href="{{ url }}">Lists</a>
|
||||
<a href="{{ url }}">{% trans "Lists" %}</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% if user.shelf_set.exists %}
|
||||
{% url 'user-shelves' user|username as url %}
|
||||
<li{% if url in request.path %} class="is-active"{% endif %}>
|
||||
<a href="{{ url }}">Shelves</a>
|
||||
<a href="{{ url }}">{% trans "Shelves" %}</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
|
20
bookwyrm/templates/user/user_preview.html
Normal file
20
bookwyrm/templates/user/user_preview.html
Normal file
@ -0,0 +1,20 @@
|
||||
{% load i18n %}
|
||||
{% load humanize %}
|
||||
|
||||
<div class="media block">
|
||||
<div class="media-left">
|
||||
<a href="{{ user.local_path }}">
|
||||
{% include 'snippets/avatar.html' with user=user large=True %}
|
||||
</a>
|
||||
</div>
|
||||
<div class="media-content">
|
||||
<p>{% if user.name %}{{ user.name }}{% else %}{{ user.localname }}{% endif %}</p>
|
||||
<p><a href="{{ user.remote_id }}">{{ user.username }}</a></p>
|
||||
<p>{% blocktrans with date=user.created_date|naturaltime %}Joined {{ date }}{% endblocktrans %}</p>
|
||||
<p>
|
||||
<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>
|
||||
|
Reference in New Issue
Block a user