Files
pillar/src/templates/nodes/custom/page/view_embed.pug

53 lines
1.2 KiB
Plaintext
Raw Normal View History

| {% extends 'projects/landing.html' %}
2016-11-11 17:10:43 +01:00
| {% block body %}
| {% if node.picture %}
header
img.header(src="{{ node.picture.thumbnail('l', api=api) }}")
| {% endif %}
| {% block navbar_secondary %}
| {{ super() }}
| {% endblock navbar_secondary %}
2016-11-11 17:10:43 +01:00
#node-container
#node-overlay
section.node-details-container.page
.node-details-header
.node-title#node-title
| {{node.name}}
| {% if node.description %}
.node-details-description#node-description
| {{ node | markdowned('description') }}
2016-11-11 17:10:43 +01:00
| {% endif %}
.node-details-meta.footer
2016-11-24 18:16:25 +01:00
span.updated(title="created {{ node._created | pretty_date }}") updated {{ node._updated | pretty_date }}
2016-11-11 17:10:43 +01:00
include ../_scripts
| {% endblock %}
| {% block footer_scripts %}
| {{ super() }}
2016-11-11 17:10:43 +01:00
script.
// Push the correct URL onto the history. This push happens after the id has
// been pushed to the history already. We should probably keep only this and
// skip the project-level displayNode push.
var url = '{{ node.properties.url }}'
var replace_state = {nodeId: '{{node._id}}', url: url};
window.history.replaceState(
replace_state,
'{{node.name}}',
url
);
2016-11-11 17:10:43 +01:00
// Generate GA pageview
$(document).ready(function () {
ga('send', 'pageview', location.pathname);
});
2016-11-11 17:10:43 +01:00
| {% endblock %}