forked from mirrors/bookwyrm
eea8b4e750
- Have an explicit contextual class on `cover-container`. - Use more flexible, consistent and searchable variable name for passing classes to covers. - Consistently use `'…'` with django variables. - Give the option to not hide covers to screen readers. - consitently give a title to the cover container if `alt_text` exists. - [lists] Remove `.content` which is applying too extensive default styles.
86 lines
2.7 KiB
HTML
86 lines
2.7 KiB
HTML
{% extends 'user/user_layout.html' %}
|
|
{% load i18n %}
|
|
{% load bookwyrm_tags %}
|
|
|
|
{% block title %}{{ user.display_name }}{% endblock %}
|
|
|
|
{% block header %}
|
|
<div class="columns is-mobile">
|
|
<div class="column">
|
|
<h1 class="title">{% trans "User Profile" %}</h1>
|
|
</div>
|
|
{% if is_self %}
|
|
<div class="column is-narrow">
|
|
<a href="/preferences/profile">
|
|
<span class="icon icon-pencil" title="Edit profile">
|
|
<span class="is-sr-only">{% trans "Edit profile" %}</span>
|
|
</span>
|
|
</a>
|
|
</div>
|
|
{% endif %}
|
|
</div>
|
|
{% endblock %}
|
|
|
|
{% block panel %}
|
|
{% if user.bookwyrm_user %}
|
|
<div class="block">
|
|
<h2 class="title">
|
|
{% include 'user/books_header.html' %}
|
|
</h2>
|
|
<div class="columns">
|
|
{% for shelf in shelves %}
|
|
<div class="column is-narrow">
|
|
<h3>{{ shelf.name }}
|
|
{% if shelf.size > 3 %}<small>(<a href="{{ shelf.local_path }}">{% blocktrans with size=shelf.size %}View all {{ size }}{% endblocktrans %}</a>)</small>{% endif %}</h3>
|
|
<div class="is-mobile field is-grouped">
|
|
{% for book in shelf.books %}
|
|
<div class="control">
|
|
<a href="{{ book.local_path }}">
|
|
{% include 'snippets/book_cover.html' with book=book cover_class='is-medium' %}
|
|
</a>
|
|
</div>
|
|
{% endfor %}
|
|
</div>
|
|
</div>
|
|
{% endfor %}
|
|
</div>
|
|
<small><a href="{% url 'user-shelves' user|username %}">{% trans "View all books" %}</a></small>
|
|
</div>
|
|
{% endif %}
|
|
|
|
{% if goal %}
|
|
<div class="block">
|
|
<h2 class="title">{% now 'Y' %} Reading Goal</h2>
|
|
{% include 'snippets/goal_progress.html' with goal=goal %}
|
|
</div>
|
|
{% elif user == request.user %}
|
|
<div class="block">
|
|
{% now 'Y' as year %}
|
|
<h2 class="title is-4"><a href="{{ user.local_path }}/goal/{{ year }}">{% blocktrans %}Set a reading goal for {{ year }}{% endblocktrans %}</a></h2>
|
|
</div>
|
|
{% endif %}
|
|
|
|
<div>
|
|
<div class="columns is-mobile">
|
|
<h2 class="title column">{% trans "User Activity" %}</h2>
|
|
<div class="column is-narrow">
|
|
<a class="icon icon-rss" target="_blank" href="{{ user.local_path }}/rss">
|
|
<span class="is-sr-only">{% trans "RSS feed" %}</span>
|
|
</a>
|
|
</div>
|
|
</div>
|
|
{% for activity in activities %}
|
|
<div class="block" id="feed-{{ activity.id }}">
|
|
{% include 'snippets/status/status.html' with status=activity %}
|
|
</div>
|
|
{% endfor %}
|
|
{% if not activities %}
|
|
<div class="block">
|
|
<p>{% trans "No activities yet!" %}</a>
|
|
</div>
|
|
{% endif %}
|
|
|
|
{% include 'snippets/pagination.html' with page=activities path=user.local_path anchor="#feed" %}
|
|
</div>
|
|
|
|
{% endblock %}
|