From 49bffd108d7baeddb6060382a1e024933968c13b Mon Sep 17 00:00:00 2001 From: Pablo Vazquez Date: Mon, 1 Apr 2019 12:33:47 +0200 Subject: [PATCH] UI Index Collection: Match style with Training and Libraries. --- src/templates/projects_index_collection.pug | 94 ++++++++------------- 1 file changed, 33 insertions(+), 61 deletions(-) diff --git a/src/templates/projects_index_collection.pug b/src/templates/projects_index_collection.pug index 3f0d01a..17a995f 100644 --- a/src/templates/projects_index_collection.pug +++ b/src/templates/projects_index_collection.pug @@ -4,10 +4,10 @@ include ../../../pillar/src/templates/mixins/components | {# Default case is Open Projects #} -| {% set page_title = 'Open Projects' %} +| {% set page_title = 'Films' %} | {% set page_description = 'Full production data and tutorials from all open movies, for you to use freely' %} | {% set page_header_image = url_for('static', filename='assets/img/backgrounds/background_agent327_01.jpg') %} -| {% set page_header_text = 'The iconic Blender Institute Open Movies. Featuring all the production files, assets, artwork, and never-seen-before content.' %} +| {% set page_header_text = 'The iconic Blender Open Movies. Featuring all the production files, assets, artwork, and never-seen-before content.' %} | {% if title == 'courses' %} | {% set page_title = 'Courses' %} @@ -20,7 +20,6 @@ include ../../../pillar/src/templates/mixins/components | {% set page_description = 'Production quality training by 3D professionals' %} | {% set page_header_image = url_for('static', filename='assets/img/backgrounds/background_agent327_04.jpg') %} | {% set page_header_text = 'Enter the artist workshop and learn by example.' %} - | {% endif %} | {% block og %} @@ -46,72 +45,45 @@ meta(name="twitter:image", content="{{ page_header_image }}") | {% endblock navigation_tabs %} | {% block body %} - -| {% if title in ['film', 'open-projects'] %} -| {# Specify the URL of projects in production. These are hidden from the listing below. #} -| {% set projects_in_production = ['spring'] %} -- var jumbotron_title = 'SPRING'; -- var jumbotron_lead = 'A poetic short film about a mountain spirit and her wise little dog.'; -+jumbotron( - jumbotron_title, - jumbotron_lead, - "{{ url_for('static', filename='assets/img/backgrounds/background_spring_01.jpg')}}")( - class="jumbotron-overlay-gradient") - - .d-block.mt-4 - a.btn.btn-primary.px-5.font-weight-bold( - href="{{ url_for('projects.view', project_url='spring') }}") - | BROWSE - - a.btn.btn-link-light.px-4( - style="color: white", - href="{{ url_for('main.project_blog', project_url='spring') }}") - | Production Blog - i.pi-angle-right.px-1 -| {% endif %} - -.container.pb-5 +.container.py-4 .row - .col-12 - .pt-4 - h2.text-uppercase.font-weight-bold - | {{ page_title }} - .lead - | {{ page_header_text }} + .col-9 + h2.text-uppercase.font-weight-bold + | {{ page_title }} + .lead + | {{ page_header_text }} - hr.pb-2 + hr.pb-2 - +card-deck() - | {% for project in projects %} + +card-deck() + | {% for project in projects %} - | {% if project.url not in projects_in_production %} - | {% if (project.status == 'published') or (project.status == 'pending' and current_user.is_authenticated) and project._id != config.MAIN_PROJECT_ID %} - +card( - class='js-project-go card-fade cursor-pointer mb-4', - style="min-width: 30%", - data-url="{{ url_for('projects.view', project_url=project.url) }}", - tabindex='{{ loop.index }}') + | {% if (project.status == 'published') or (project.status == 'pending' and current_user.is_authenticated) and project._id != config.MAIN_PROJECT_ID %} + +card( + class='js-project-go card-fade cursor-pointer mb-4', + style="min-width: 30%", + data-url="{{ url_for('projects.view', project_url=project.url) }}", + tabindex='{{ loop.index }}') - | {% if project.picture_header %} - a.card-thumbnail(href="{{ url_for('projects.view', project_url=project.url) }}") - img.card-img-top( - src="{{ project.picture_header.thumbnail('l', api=api) }}", alt="{{ project.name }}") + | {% if project.picture_header %} + a.card-thumbnail(href="{{ url_for('projects.view', project_url=project.url) }}") + img.card-img-top( + 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 %} - .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 %} - - | {% if project.summary %} - p.card-text - | {{project.summary|safe}} - | {% endif %} + | {% if project.summary %} + p.card-text + | {{project.summary|safe}} | {% endif %} - | {% endif %} - | {% endfor %} + | {% endif %} + | {% endfor %} | {% endblock %}