Index collection redesign
This commit is contained in:
@@ -9,13 +9,13 @@
|
|||||||
| {% if title == 'courses' %}
|
| {% if title == 'courses' %}
|
||||||
| {% set page_title = 'Courses' %}
|
| {% set page_title = 'Courses' %}
|
||||||
| {% set page_description = 'Production quality training by 3D professionals' %}
|
| {% set page_description = 'Production quality training by 3D professionals' %}
|
||||||
| {% set page_header_image = url_for('static', filename='assets/img/backgrounds/background_caminandes_3_03.jpg') %}
|
| {% set page_header_image = url_for('static', filename='assets/img/backgrounds/background_agent327_04.jpg') %}
|
||||||
| {% set page_header_text = 'Character modeling, 3D printing, VFX, rigging and more.' %}
|
| {% set page_header_text = 'Character modeling, 3D printing, VFX, rigging and more.' %}
|
||||||
|
|
||||||
| {% elif title == 'workshops' %}
|
| {% elif title == 'workshops' %}
|
||||||
| {% set page_title = 'Workshops' %}
|
| {% set page_title = 'Workshops' %}
|
||||||
| {% set page_description = 'Production quality training by 3D professionals' %}
|
| {% set page_description = 'Production quality training by 3D professionals' %}
|
||||||
| {% set page_header_image = url_for('static', filename='assets/img/backgrounds/background_caminandes_3_03.jpg') %}
|
| {% 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.' %}
|
| {% set page_header_text = 'Enter the artist workshop and learn by example.' %}
|
||||||
|
|
||||||
| {% endif %}
|
| {% endif %}
|
||||||
@@ -39,58 +39,63 @@ meta(name="twitter:image", content="{{ page_header_image }}")
|
|||||||
| {% endblock %}
|
| {% endblock %}
|
||||||
|
|
||||||
| {% block body %}
|
| {% block body %}
|
||||||
|
.jumbotron.jumbotron-overlay.text-white(style="background-image: url({{ page_header_image }})")
|
||||||
|
.container
|
||||||
|
.row
|
||||||
|
.col-md-8
|
||||||
|
.display-4.text-uppercase.font-weight-bold {{ page_title }}
|
||||||
|
.lead {{ page_header_text }}
|
||||||
|
|
||||||
#project-container
|
.container.pb-5
|
||||||
|
ul.nav.nav-secondary.justify-content-center.mb-5
|
||||||
|
li.nav-item.nav-title
|
||||||
|
| {% if title in ['courses', 'workshops'] %}Training{% else %}Open Projects{% endif %}
|
||||||
|
|
||||||
#node_index-container
|
li.nav-item
|
||||||
#node_index-header.collection
|
a.nav-link(
|
||||||
img.background-header(src="{{ page_header_image }}")
|
class="{% if title == 'workshops' %}active{% endif %}",
|
||||||
#node_index-collection-info
|
href="{{ url_for('cloud.workshops') }}") Workshops
|
||||||
.node_index-collection-name
|
li.nav-item
|
||||||
span {{ page_title }}
|
a.nav-link(
|
||||||
.node_index-collection-description
|
class="{% if title == 'courses' %}active{% endif %}",
|
||||||
span.
|
href="{{ url_for('cloud.courses') }}") Courses
|
||||||
{{ page_header_text }}
|
li.nav-item
|
||||||
|
a.nav-link(
|
||||||
|
class="{% if title == 'gallery' %}active{% endif %}",
|
||||||
|
href="{{ url_for('projects.view', project_url='gallery') }}") Art Gallery
|
||||||
|
|
||||||
.node_index-collection
|
.card-deck.card-padless.card-3-columns
|
||||||
|
| {% for project in projects %}
|
||||||
|
| {% if (project.status == 'published') or (project.status == 'pending' and current_user.is_authenticated) and project._id != config.MAIN_PROJECT_ID %}
|
||||||
|
.card.card-fade.cursor-pointer.mb-4.js-project-go(
|
||||||
|
data-url="{{ url_for('projects.view', project_url=project.url) }}",
|
||||||
|
tabindex="{{ loop.index }}")
|
||||||
|
| {% if project.picture_header %}
|
||||||
|
a(href="{{ url_for('projects.view', project_url=project.url) }}")
|
||||||
|
img.card-img-top.rounded-0(
|
||||||
|
src="{{ project.picture_header.thumbnail('l', api=api) }}", alt="{{ project.name }}")
|
||||||
|
| {% endif %}
|
||||||
|
|
||||||
| {% for project in projects %}
|
.card-body
|
||||||
| {% if (project.status == 'published') or (project.status == 'pending' and current_user.is_authenticated) and project._id != config.MAIN_PROJECT_ID %}
|
h5.card-title
|
||||||
|
| {{ project.name }}
|
||||||
.node_index-collection-card.project(
|
| {% if project.status == 'pending' and current_user.is_authenticated and current_user.has_role('admin') %}
|
||||||
data-url="{{ url_for('projects.view', project_url=project.url) }}",
|
small (pending)
|
||||||
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 %}
|
| {% endif %}
|
||||||
|
|
||||||
a.learn-more LEARN MORE
|
| {% if project.summary %}
|
||||||
|
p.card-text
|
||||||
| {% endif %}
|
| {{project.summary|safe}}
|
||||||
| {% endfor %}
|
| {% endif %}
|
||||||
|
| {% endif %}
|
||||||
|
| {% endfor %}
|
||||||
|
|
||||||
| {% endblock %}
|
| {% endblock %}
|
||||||
|
|
||||||
|
|
||||||
| {% block footer_scripts %}
|
| {% block footer_scripts %}
|
||||||
script.
|
script.
|
||||||
$('.node_index-collection-card.project').on('click', function(e){
|
$('.js-project-go').on('click', function(e){
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
window.location.href = $(this).data('url');
|
window.location.href = $(this).data('url');
|
||||||
});
|
});
|
||||||
|
Reference in New Issue
Block a user