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

61 lines
1.4 KiB
Plaintext
Raw Normal View History

| {% extends 'projects/landing.html' %}
2018-09-16 04:05:37 +02:00
include ../../../mixins/components
2016-11-11 17:10:43 +01:00
//- Remove custom classes applied by the landing template (that turn background black).
| {% block bodyclasses %}page{% endblock %}
| {% block body %}
2019-03-29 15:19:22 +01:00
| {% if project and project.has_method('PUT') %}
+nav-secondary
+nav-secondary-link(
href="{{ url_for('nodes.edit', node_id=node._id) }}")
i.pi-edit.pr-2
span Edit Post
| {% endif %}
| {% if node.picture %}
2018-09-16 04:05:37 +02:00
.expand-image-links.imgs-fluid
+jumbotron(
"{{ node.name }}",
null,
2018-09-16 04:05:37 +02:00
"{{ node.picture.thumbnail('h', api=api) }}",
"{{ node.url }}")
| {% endif %}
2018-09-16 04:05:37 +02:00
.container.pb-5
.row
.col-8.mx-auto
| {% if node.description %}
.node-details-description.pt-5
2018-09-16 04:05:37 +02:00
| {{ node | markdowned('description') }}
| {% endif %}
small.text-muted
span(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 %}