WIP
This commit is contained in:
54
bookwyrm/templates/discover/discover.html
Normal file
54
bookwyrm/templates/discover/discover.html
Normal file
@ -0,0 +1,54 @@
|
||||
{% extends "layout.html" %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block title %}{% trans "Discover" %}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<header class="block">
|
||||
<h1 class="title has-text-centered">{% trans "Discover" %}</h1>
|
||||
</header>
|
||||
|
||||
<section class="tile is-ancestor">
|
||||
<div class="tile is-vertical">
|
||||
<div class="tile is-parent">
|
||||
<div class="tile is-child box has-background-white-ter">
|
||||
{% include 'discover/large-book.html' with status=large.0 %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="tile">
|
||||
<div class="tile is-parent is-6">
|
||||
<div class="tile is-child box has-background-white-ter">
|
||||
{% include 'discover/small-book.html' with status=small.0 %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="tile is-parent is-6">
|
||||
<div class="tile is-child box has-background-white-ter">
|
||||
{% include 'discover/small-book.html' with status=small.1 %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="tile is-vertical">
|
||||
<div class="tile">
|
||||
<div class="tile is-parent is-6">
|
||||
<div class="tile is-child box has-background-white-ter">
|
||||
{% include 'discover/small-book.html' with status=small.2 %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="tile is-parent is-6">
|
||||
<div class="tile is-child box has-background-white-ter">
|
||||
{% include 'discover/small-book.html' with status=small.3 %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="tile is-parent">
|
||||
<div class="tile is-child box has-background-white-ter">
|
||||
{% include 'discover/large-book.html' with status=large.1 %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
|
||||
{% endblock %}
|
38
bookwyrm/templates/discover/large-book.html
Normal file
38
bookwyrm/templates/discover/large-book.html
Normal file
@ -0,0 +1,38 @@
|
||||
{% load bookwyrm_tags %}
|
||||
{% load markdown %}
|
||||
{% load i18n %}
|
||||
|
||||
{% if book %}
|
||||
{% with book=book %}
|
||||
<div class="columns is-gapless">
|
||||
<div class="column is-5-tablet is-cover">
|
||||
<a
|
||||
class="align to-b to-l"
|
||||
href="{{ book.local_path }}"
|
||||
>{% include 'snippets/book_cover.html' with cover_class='is-w-l-mobile is-w-auto-tablet' %}</a>
|
||||
|
||||
{% include 'snippets/stars.html' with rating=book|rating:request.user %}
|
||||
</div>
|
||||
|
||||
|
||||
<div class="column mt-3-mobile ml-3-tablet">
|
||||
<h3 class="title is-5">
|
||||
<a href="{{ book.local_path }}">{{ book.title }}</a>
|
||||
</h3>
|
||||
|
||||
{% if book.authors %}
|
||||
<p class="subtitle is-5">
|
||||
{% trans "by" %}
|
||||
{% include 'snippets/authors.html' with limit=3 %}
|
||||
</p>
|
||||
{% endif %}
|
||||
|
||||
{% if book|book_description %}
|
||||
<blockquote class="content">
|
||||
{{ book|book_description|to_markdown|safe|truncatewords_html:50 }}
|
||||
</blockquote>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
{% endwith %}
|
||||
{% endif %}
|
41
bookwyrm/templates/discover/small-book.html
Normal file
41
bookwyrm/templates/discover/small-book.html
Normal file
@ -0,0 +1,41 @@
|
||||
{% load bookwyrm_tags %}
|
||||
{% load utilities %}
|
||||
{% load i18n %}
|
||||
|
||||
{% if status %}
|
||||
{% with book=status.book %}
|
||||
<a href="{{ book.local_path }}">
|
||||
{% include 'snippets/book_cover.html' with cover_class='is-w-l-mobile is-h-l-tablet is-w-auto align to-b to-l' %}
|
||||
</a>
|
||||
|
||||
{% include 'snippets/stars.html' with rating=book|rating:request.user %}
|
||||
|
||||
<h3 class="title is-6">
|
||||
<a href="{{ book.local_path }}">{{ book.title }}</a>
|
||||
</h3>
|
||||
|
||||
{% if book.authors %}
|
||||
<p class="subtitle is-6">
|
||||
{% trans "by" %}
|
||||
{% include 'snippets/authors.html' with limit=3 %}
|
||||
</p>
|
||||
{% endif %}
|
||||
|
||||
<div class="media">
|
||||
<figure class="media-left" aria-hidden="true">
|
||||
<a class="image is-48x48" href="{{ status.user.local_path }}">
|
||||
{% include 'snippets/avatar.html' with user=status.user ariaHide="true" medium="true" %}
|
||||
</a>
|
||||
</figure>
|
||||
|
||||
<div class="media-content">
|
||||
<h3 class="has-text-weight-bold">
|
||||
<a href="{{ status.user.local_path }}">
|
||||
<span>{{ status.user.display_name }}</span>
|
||||
</a>
|
||||
</h3>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% endwith %}
|
||||
{% endif %}
|
Reference in New Issue
Block a user