Add link to current summary on home feed
This commit is contained in:
@ -64,14 +64,20 @@
|
||||
{{ allowed_status_types|json_script:"unread-notifications-wrapper" }}
|
||||
</a>
|
||||
|
||||
{% if request.user.show_goal and not goal and tab.key == 'home' %}
|
||||
{% now 'Y' as year %}
|
||||
<section class="block">
|
||||
{% include 'feed/goal_card.html' with year=year %}
|
||||
<hr>
|
||||
</section>
|
||||
{% endif %}
|
||||
{% if request.user.show_goal and not goal and tab.key == 'home' %}
|
||||
{% now 'Y' as year %}
|
||||
<section class="block">
|
||||
{% include 'feed/goal_card.html' with year=year %}
|
||||
<hr>
|
||||
</section>
|
||||
{% endif %}
|
||||
|
||||
{% if annual_summary_year and tab.key == 'home' %}
|
||||
<section class="block">
|
||||
{% include 'feed/summary_card.html' with year=annual_summary_year %}
|
||||
<hr>
|
||||
</section>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
{# activity feed #}
|
||||
|
22
bookwyrm/templates/feed/summary_card.html
Normal file
22
bookwyrm/templates/feed/summary_card.html
Normal file
@ -0,0 +1,22 @@
|
||||
{% extends 'components/card.html' %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block card-header %}
|
||||
<h3 class="card-header-title has-background-success has-text-white">
|
||||
<span class="icon is-size-3 mr-2" aria-hidden="true">📚</span>
|
||||
<span class="icon is-size-3 mr-2" aria-hidden="true">✨</span>
|
||||
{% blocktrans %}{{ year }} in the books{% endblocktrans %}
|
||||
</h3>
|
||||
{% endblock %}
|
||||
|
||||
{% block card-content %}
|
||||
<p class="mb-3">
|
||||
{% blocktrans %}The end of the year is the best moment to take stock of all the books read during the last 12 months. How many pages have you read? Which book is your best-rated of the year? We compiled these stats, and more!{% endblocktrans %}
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<a href="{% url 'annual-summary' year %}" class="button is-success">
|
||||
{% blocktrans %}Discover your stats for {{ year }}!{% endblocktrans %}
|
||||
</a>
|
||||
</p>
|
||||
{% endblock %}
|
Reference in New Issue
Block a user