From fe408c3151dce175ebaf2cb60db40e009b36d453 Mon Sep 17 00:00:00 2001 From: Francesco Siddi Date: Wed, 26 Jul 2017 16:49:40 +0200 Subject: [PATCH] Moved projects index_collection from Pillar --- src/templates/projects_index_collection.pug | 86 +++++++++++++++++++++ 1 file changed, 86 insertions(+) create mode 100644 src/templates/projects_index_collection.pug diff --git a/src/templates/projects_index_collection.pug b/src/templates/projects_index_collection.pug new file mode 100644 index 0000000..cca0a0e --- /dev/null +++ b/src/templates/projects_index_collection.pug @@ -0,0 +1,86 @@ +| {% extends 'layout.html' %} + +| {% block og %} +meta(property="og:type", content="website") +meta(property="og:url", content="https://cloud.blender.org") + +meta(property="og:title", content="{% if title == 'open-projects' %}Open Projects{% elif title == 'training' %}Training{% endif %}") +meta(name="twitter:title", content="{% if title == 'open-projects' %}Open Projects{% elif title == 'training' %}Training{% endif %} on Blender Cloud") + +meta(property="og:description", content="{% if title == 'open-projects' %}Full production data and tutorials from all open movies, for you to use freely{% elif title == 'training' %}Production quality training by 3D professionals{% endif %}") +meta(name="twitter:description", content="{% if title == 'open-projects' %}Full production data and tutorials from all open movies, for you to use freely{% elif title == 'training' %}Production quality training by 3D professionals{% endif %}") + +meta(property="og:image", content="{% if title == 'training' %}{{ url_for('static', filename='assets/img/backgrounds/background_caminandes_3_03.jpg')}}{% else %}{{ url_for('static', filename='assets/img/backgrounds/background_agent327_01.jpg')}}{% endif %}") +meta(name="twitter:image", content="{% if title == 'training' %}{{ url_for('static', filename='assets/img/backgrounds/background_caminandes_3_03.jpg')}}{% else %}{{ url_for('static', filename='assets/img/backgrounds/background_agent327_01.jpg')}}{% endif %}") +| {% endblock %} + +| {% block page_title %} +| {% if title == 'open-projects' %}Open Projects{% elif title == 'training' %}Training{% else %}Projects{% endif %} +| {% endblock %} + +| {% block body %} + +#project-container + + #node_index-container + #node_index-header.collection + img.background-header(src="{% if title == 'training' %}{{ url_for('static', filename='assets/img/backgrounds/background_caminandes_3_03.jpg')}}{% else %}{{ url_for('static', filename='assets/img/backgrounds/background_agent327_01.jpg')}}{% endif %}") + #node_index-collection-info + | {% if title == 'open-projects' %} + .node_index-collection-name + span Open Projects + .node_index-collection-description + span. + The iconic Blender Institute Open Movies. + Featuring all the production files, assets, artwork, and never-seen-before content. + | {% elif title == 'training' %} + .node_index-collection-name + span Training + .node_index-collection-description + span. + Character modeling, 3D printing, VFX, rigging and more. + | {% endif %} + + .node_index-collection + + | {% for project in projects %} + | {% if (project.status == 'published') or (project.status == 'pending' and current_user.is_authenticated) and project._id != config.MAIN_PROJECT_ID %} + + .node_index-collection-card.project( + data-url="{{ url_for('projects.view', project_url=project.url) }}", + tabindex="{{ loop.index }}") + | {% if project.picture_header %} + a.item-header( + href="{{ url_for('projects.view', project_url=project.url) }}") + img(src="{{ project.picture_header.thumbnail('l', api=api) }}") + | {% endif %} + + .item-info + a.item-title( + href="{{ url_for('projects.view', project_url=project.url) }}") + | {{project.name}} + | {% if project.status == 'pending' and current_user.is_authenticated and current_user.has_role('admin') %} + small (pending) + | {% endif %} + + | {% if project.summary %} + p.item-description + | {{project.summary|safe}} + | {% endif %} + + a.learn-more LEARN MORE + + | {% endif %} + | {% endfor %} + + +| {% endblock %} + + +| {% block footer_scripts %} +script. + $('.node_index-collection-card.project').on('click', function(e){ + e.preventDefault(); + window.location.href = $(this).data('url'); + }); +| {% endblock %}