Projects: Use render_secondary_navigation macro
This commit is contained in:
@@ -39,10 +39,6 @@ include ../../../../../../pillar/src/templates/mixins/components
|
|||||||
| {% endif %}
|
| {% endif %}
|
||||||
| {% endif %}
|
| {% endif %}
|
||||||
|
|
||||||
| {% if project and project._id != config.MAIN_PROJECT_ID %}
|
|
||||||
| {{ projectmacros.render_secondary_navigation(project, pages=pages) }}
|
|
||||||
| {% endif %}
|
|
||||||
|
|
||||||
.row
|
.row
|
||||||
.col-md-9.mx-auto
|
.col-md-9.mx-auto
|
||||||
|
|
||||||
|
@@ -1,5 +1,8 @@
|
|||||||
| {% import 'projects/_macros.html' as projectmacros %}
|
|
||||||
| {% extends 'layout.html' %}
|
| {% extends 'layout.html' %}
|
||||||
|
| {% import 'projects/_macros.html' as projectmacros %}
|
||||||
|
| {% from '_macros/_asset_list_item.html' import asset_list_item %}
|
||||||
|
| {% set title = 'landing' %}
|
||||||
|
include ../../../../pillar/src/templates/mixins/components
|
||||||
|
|
||||||
| {% block page_title %}{{ project.name }}{% endblock%}
|
| {% block page_title %}{{ project.name }}{% endblock%}
|
||||||
|
|
||||||
@@ -70,95 +73,73 @@ meta(property="og:url", content="{{url_for('projects.view', project_url=project.
|
|||||||
#others
|
#others
|
||||||
| {% endblock %}
|
| {% endblock %}
|
||||||
|
|
||||||
| {% block head %}
|
|
||||||
|
|
||||||
script(src="{{ url_for('static_pillar', filename='assets/js/vendor/videojs-6.2.8.min.js') }}")
|
|
||||||
script(src="{{ url_for('static_pillar', filename='assets/js/vendor/videojs-ga-0.4.2.min.js') }}")
|
|
||||||
script(src="{{ url_for('static_pillar', filename='assets/js/vendor/videojs-hotkeys-0.2.20.min.js') }}")
|
|
||||||
| {% endblock %}
|
|
||||||
|
|
||||||
| {% block css %}
|
| {% block css %}
|
||||||
link(href="{{ url_for('static_pillar', filename='assets/css/font-pillar.css') }}", rel="stylesheet")
|
link(href="{{ url_for('static_pillar', filename='assets/css/font-pillar.css') }}", rel="stylesheet")
|
||||||
link(href="{{ url_for('static_cloud', filename='assets/css/project-main.css') }}", rel="stylesheet")
|
link(href="{{ url_for('static_cloud', filename='assets/css/project-main.css') }}", rel="stylesheet")
|
||||||
| {% endblock %}
|
| {% endblock %}
|
||||||
|
|
||||||
|
| {% block navigation_tabs %}
|
||||||
|
| {{ projectmacros.render_secondary_navigation(project, navigation_links, title) }}
|
||||||
|
| {% endblock navigation_tabs %}
|
||||||
|
|
||||||
| {% block body %}
|
| {% block body %}
|
||||||
header
|
+jumbotron(null, null, "{{ project.picture_header.thumbnail('h', api=api) }}")
|
||||||
//a(href="{{ url_for( 'projects.view', project_url=project.url) }}")
|
|
||||||
img.header(src="{{ project.picture_header.thumbnail('h', api=api) }}")
|
|
||||||
|
|
||||||
| {% block navbar_secondary %}
|
.container-fluid
|
||||||
| {{ projectmacros.render_secondary_navigation(project, pages=pages) }}
|
.row
|
||||||
|
.col-md-8.mx-auto
|
||||||
|
h2.pt-5 {{ project.name }}
|
||||||
|
|
||||||
| {% endblock navbar_secondary %}
|
| {% if project.description %}
|
||||||
#container.landing
|
.node-details-description
|
||||||
section.node-details-container.project
|
| {{ project | markdowned('description') }}
|
||||||
.node-details-title
|
| {% endif %}
|
||||||
h1 {{ project.name }}
|
|
||||||
|
|
||||||
| {% if project.description %}
|
.row
|
||||||
.node-details-description
|
.col-md-10.mx-auto
|
||||||
| {{ project | markdowned('description') }}
|
section.py-5
|
||||||
| {% endif %}
|
h2.pb-3 Gallery
|
||||||
|
|
||||||
|
.gallery
|
||||||
|
| {% for n in activity_stream %}
|
||||||
|
| {% if n.node_type not in ['comment', 'post'] and n.picture %}
|
||||||
|
.thumbnail.expand-image-links
|
||||||
|
.img-container
|
||||||
|
a(href="{{ n.picture.thumbnail('l', api=api) }}", data-node_id="{{ n._id }}")
|
||||||
|
img(src="{{ n.picture.thumbnail('l', api=api) }}", alt="{{ n.name }}")
|
||||||
|
.img-caption.table
|
||||||
|
| {# Not using for the moment
|
||||||
|
span.table-cell {{ n.name }}
|
||||||
|
| #}
|
||||||
|
| {% endif %}
|
||||||
|
| {% endfor %}
|
||||||
|
div(class="clearfix")
|
||||||
|
| {% if project.nodes_featured %}
|
||||||
|
| {# In some cases featured_nodes might might be embedded #}
|
||||||
|
| {% if '_id' in project.nodes_featured[0] %}
|
||||||
|
| {% set featured_node_id=project.nodes_featured[0]._id %}
|
||||||
|
| {% else %}
|
||||||
|
| {% set featured_node_id=project.nodes_featured[0] %}
|
||||||
|
| {% endif %}
|
||||||
|
.text-center.p-5
|
||||||
|
a.btn.btn-outline-secondary.px-5(
|
||||||
|
href="{{ url_for('projects.view_node', project_url=project.url, node_id=featured_node_id) }}")
|
||||||
|
| See More Artwork
|
||||||
|
| {% endif %}
|
||||||
|
|
||||||
|
|
||||||
section.gallery
|
.row
|
||||||
h2 Gallery
|
.col-md-10.mx-auto
|
||||||
| {% for n in activity_stream %}
|
h2 Latest Updates
|
||||||
| {% if n.node_type not in ['comment', 'post'] and n.picture %}
|
|
||||||
.thumbnail.expand-image-links
|
|
||||||
.img-container
|
|
||||||
a(href="{{ n.picture.thumbnail('l', api=api) }}", data-node_id="{{ n._id }}")
|
|
||||||
img(src="{{ n.picture.thumbnail('l', api=api) }}", alt="{{ n.name }}")
|
|
||||||
.img-caption.table
|
|
||||||
| {# Not using for the moment
|
|
||||||
span.table-cell {{ n.name }}
|
|
||||||
| #}
|
|
||||||
| {% endif %}
|
|
||||||
| {% endfor %}
|
|
||||||
div(class="clearfix")
|
|
||||||
| {% if project.nodes_featured %}
|
|
||||||
| {# In some cases featured_nodes might might be embedded #}
|
|
||||||
| {% if '_id' in project.nodes_featured[0] %}
|
|
||||||
| {% set featured_node_id=project.nodes_featured[0]._id %}
|
|
||||||
| {% else %}
|
|
||||||
| {% set featured_node_id=project.nodes_featured[0] %}
|
|
||||||
| {% endif %}
|
|
||||||
a.btn(href="{{ url_for('projects.view_node', project_url=project.url, node_id=featured_node_id) }}") See more
|
|
||||||
| {% endif %}
|
|
||||||
|
|
||||||
|
| {% if activity_stream %}
|
||||||
section.node-extra
|
+card-deck(class="px-2")
|
||||||
h2 Latest Updates
|
| {% for n in activity_stream %}
|
||||||
|
| {% if n.node_type == 'post' %}
|
||||||
| {% if activity_stream %}
|
| {{ asset_list_item(n, current_user) }}
|
||||||
.node-updates
|
| {% endif %}
|
||||||
ul.node-updates-list
|
| {% endfor %}
|
||||||
| {% for n in activity_stream %}
|
| {% endif %}
|
||||||
| {% if n.node_type == 'post' %}
|
|
||||||
li.node-updates-list-item(
|
|
||||||
data-node_id="{{ n._id }}",
|
|
||||||
class="{{ n.node_type }} {{ n.properties.content_type | hide_none }}")
|
|
||||||
a.image(href="{{ url_for_node(node=n) }}")
|
|
||||||
| {% if n.picture %}
|
|
||||||
img(src="{{ n.picture.thumbnail('l', api=api) }}")
|
|
||||||
| {% endif %}
|
|
||||||
|
|
||||||
.info
|
|
||||||
a.title(href="{{ url_for_node(node=n) }}") {{ n.name }}
|
|
||||||
p.description(href="{{ url_for_node(node=n) }}")
|
|
||||||
| {% if n.node_type == 'post' %}
|
|
||||||
| {{ n.properties | markdowned('content') | striptags | truncate(140, end="... <small>read more</small>") | safe | hide_none }}
|
|
||||||
| {% else %}
|
|
||||||
| {{ n | markdowned('description') | striptags | truncate(140, end="... <small>read more</small>") | safe | hide_none }}
|
|
||||||
| {% endif %}
|
|
||||||
//span.details
|
|
||||||
// span.what {% if n.properties.content_type %}{{ n.properties.content_type | undertitle }}{% else %}{{ n.node_type | undertitle }}{% endif %} ·
|
|
||||||
// span.when {{ n._updated | pretty_date }} by
|
|
||||||
// span.who {{ n.user.full_name }}
|
|
||||||
| {% endif %}
|
|
||||||
| {% endfor %}
|
|
||||||
| {% endif %}
|
|
||||||
|
|
||||||
.text-center.p-5
|
.text-center.p-5
|
||||||
a.btn.btn-outline-secondary.px-5(href="{{ url_for('main.project_blog', project_url=project.url) }}") See All Updates
|
a.btn.btn-outline-secondary.px-5(href="{{ url_for('main.project_blog', project_url=project.url) }}") See All Updates
|
||||||
|
@@ -1,5 +1,7 @@
|
|||||||
| {% extends 'layout.html' %}
|
| {% extends 'layout.html' %}
|
||||||
| {% from '_macros/_add_new_menu.html' import add_new_menu %}
|
| {% from '_macros/_add_new_menu.html' import add_new_menu %}
|
||||||
|
| {% import 'projects/_macros.html' as projectmacros %}
|
||||||
|
|
||||||
include ../../../../pillar/src/templates/mixins/components
|
include ../../../../pillar/src/templates/mixins/components
|
||||||
|
|
||||||
| {% block page_title %}{{ project.name }}{% endblock%}
|
| {% block page_title %}{{ project.name }}{% endblock%}
|
||||||
@@ -85,30 +87,7 @@ link(href="{{ url_for('static_cloud', filename='assets/css/project-main.css') }}
|
|||||||
| {% endblock %}
|
| {% endblock %}
|
||||||
|
|
||||||
| {% block navigation_tabs %}
|
| {% block navigation_tabs %}
|
||||||
+nav-secondary()
|
| {{ projectmacros.render_secondary_navigation(project, navigation_links, title) }}
|
||||||
| {% if project.category == 'course' %}
|
|
||||||
li.text-capitalize
|
|
||||||
a.nav-link.text-muted.px-0(href="{{ url_for('cloud.courses') }}")
|
|
||||||
| Courses
|
|
||||||
li.px-1
|
|
||||||
i.pi-angle-right
|
|
||||||
| {% elif project.category == 'workshop' %}
|
|
||||||
li.text-capitalize
|
|
||||||
a.nav-link.text-muted.px-0(href="{{ url_for('cloud.workshops') }}")
|
|
||||||
| Workshops
|
|
||||||
li.px-1
|
|
||||||
i.pi-angle-right
|
|
||||||
| {% endif %}
|
|
||||||
|
|
||||||
+nav-secondary-link(
|
|
||||||
class="px-0 font-weight-bold",
|
|
||||||
href="{{url_for('projects.view', project_url=project.url, _external=True)}}")
|
|
||||||
| {{ project.name }}
|
|
||||||
|
|
||||||
| {% for link in navigation_links %}
|
|
||||||
+nav-secondary-link(href="{{ link['url'] }}")
|
|
||||||
| {{ link['label'] }}
|
|
||||||
| {% endfor %}
|
|
||||||
| {% endblock navigation_tabs %}
|
| {% endblock navigation_tabs %}
|
||||||
|
|
||||||
| {% block body %}
|
| {% block body %}
|
||||||
|
Reference in New Issue
Block a user