Index Collection: Limit columns to 3

This commit is contained in:
2018-09-16 03:43:21 +02:00
parent 88f936772d
commit ae907719d0

View File

@@ -64,41 +64,43 @@ meta(name="twitter:image", content="{{ page_header_image }}")
| {% block body %} | {% block body %}
.container.pb-5 .container.pb-5
.pt-4 .row
h2.text-uppercase.font-weight-bold .col-12
| {{ page_title }} .pt-4
.lead h2.text-uppercase.font-weight-bold
| {{ page_header_text }} | {{ page_title }}
.lead
| {{ page_header_text }}
hr.pb-2 hr.pb-2
+card-deck +card-deck(3)
| {% for project in projects %} | {% for project in projects %}
| {% if (project.status == 'published') or (project.status == 'pending' and current_user.is_authenticated) and project._id != config.MAIN_PROJECT_ID %} | {% if (project.status == 'published') or (project.status == 'pending' and current_user.is_authenticated) and project._id != config.MAIN_PROJECT_ID %}
+card( +card(
class='js-project-go card-fade cursor-pointer mb-4 mx-0', class='js-project-go card-fade cursor-pointer mb-4 mx-0',
data-url="{{ url_for('projects.view', project_url=project.url) }}", data-url="{{ url_for('projects.view', project_url=project.url) }}",
tabindex='{{ loop.index }}') tabindex='{{ loop.index }}')
| {% if project.picture_header %} | {% if project.picture_header %}
a(href="{{ url_for('projects.view', project_url=project.url) }}") a(href="{{ url_for('projects.view', project_url=project.url) }}")
img.card-img-top( img.card-img-top(
src="{{ project.picture_header.thumbnail('l', api=api) }}", alt="{{ project.name }}") src="{{ project.picture_header.thumbnail('l', api=api) }}", alt="{{ project.name }}")
| {% endif %}
.card-body
h5.card-title
| {{ project.name }}
| {% if project.status == 'pending' and current_user.is_authenticated and current_user.has_role('admin') %}
small (pending)
| {% endif %} | {% endif %}
| {% if project.summary %} .card-body
p.card-text h5.card-title
| {{project.summary|safe}} | {{ project.name }}
| {% if project.status == 'pending' and current_user.is_authenticated and current_user.has_role('admin') %}
small (pending)
| {% endif %}
| {% if project.summary %}
p.card-text
| {{project.summary|safe}}
| {% endif %}
| {% endif %} | {% endif %}
| {% endif %} | {% endfor %}
| {% endfor %}
| {% endblock %} | {% endblock %}