WIP on new landing pages or projects

This commit is contained in:
Francesco Siddi 2018-08-05 14:22:47 +02:00
parent 466adabbb0
commit 7a5af9282c
2 changed files with 50 additions and 51 deletions

View File

@ -1,24 +1,24 @@
| {% extends 'projects/landing.html' %}
| {% block body %}
| {% if node.picture %}
header
img.header(src="{{ node.picture.thumbnail('h', api=api) }}")
.jumbotron.jumbotron-fluid(
style="background-image: url('{{ node.picture.thumbnail('h', api=api) }}'); background-position: 50% 50%;")
| {% endif %}
| {# Secondary Navigation #}
| {% block navbar_secondary %}
| {{ super() }}
| {% endblock navbar_secondary %}
#node-container
#node-overlay
section.node-details-container.page
.node-details-header
.node-title#node-title
| {{node.name}}
.container.landing
section.node-details-container.project
.node-details-title.container
h1 {{node.name}}
| {% if node.description %}
.node-details-description#node-description
| {{ node | markdowned('description') }}
| {% endif %}

View File

@ -1,30 +1,30 @@
| {% macro render_secondary_navigation(project, pages=None) %}
nav.navbar-secondary
.navbar-container
nav.collapse.navbar-collapse
ul.nav.navbar-nav.navbar-right
li
a.navbar-item(
.container.navbar-secondary
ul.nav.justify-content-left
li.nav-item
a.nav-link.nav-title(
href="{{ url_for('projects.view', project_url=project.url) }}",
title="{{ project.name }} Homepage")
span
b {{ project.name }}
li
a.navbar-item(
title="{{ project.name }} Homepage") {{ project.name }}
li.nav-item
a.nav-link(
href="{{ url_for('main.project_blog', project_url=project.url) }}",
title="Project Blog",
class="{% if category == 'blog' %}active{% endif %}")
span Blog
class="{% if title == 'updates' %}active{% endif %}") Updates
| {% if pages %}
| {% for p in pages %}
li
a.navbar-item(
href="{{ url_for('projects.view_node', project_url=project.url, node_id=p._id) }}",
title="{{ p.name }}",
class="{% if category == 'page' %}active{% endif %}")
span {{ p.name }}
| {% for page in pages %}
li.nav-item
a.nav-link(
href="{{ url_for('projects.view_node', project_url=project.url, node_id=page._id) }}",
class="{% if title == 'updates' %}active{% endif %}") {{ page.name }}
| {% endfor %}
| {% endif %}
li.nav-item
a.nav-link(
href="/projects/gallery.html",
class="{% if title == 'gallery' %}active{% endif %}") Gallery
li.nav-item
a.nav-link(
href="#",
class="{% if title == 'assets' %}active{% endif %}") Assets
| {% if project.nodes_featured %}
| {# In some cases featured_nodes might might be embedded #}
| {% if '_id' in project.nodes_featured[0] %}
@ -32,11 +32,10 @@ nav.navbar-secondary
| {% else %}
| {% set featured_node_id=project.nodes_featured[0] %}
| {% endif %}
li
a.navbar-item(
href="{{ url_for('projects.view_node', project_url=project.url, node_id=featured_node_id) }}",
title="Explore {{ project.name }}",
class="{% if category == 'blog' %}active{% endif %}")
span Explore
| {% endif %}
li.nav-item
a.nav-link(
href="{{ url_for('projects.view_node', project_url=project.url, node_id=featured_node_id) }}",
title="Explore {{ project.name }}") Dashboard
| {% endmacro %}