Files
pillar/src/templates/projects/view_theatre.pug
Sybren A. Stüvel 12272750c3 T53890: Improving static content serving
Static files are now served with an 8-character hash before the last
extension. For example, `tutti.min.js` is now served as
`tutti.min.abcd1234.js`. When doing a request the hash is removed before
serving the static file.

The hash must be 8 characters long, and is taken from STATIC_FILE_HASH.
It is up to the deployment to change this configuration variable
whenever static files change. This forces browsers that download newly
deployed HTML to also refresh the dependencies (most importantly
JS/CSS).

For this to work, the URL must be built with `url_for('static_xxx',
filename='/path/to/file')`. The 'static' module still returns regular,
hashless URLs.
2018-03-23 17:36:14 +01:00

53 lines
1.8 KiB
Plaintext

| {% extends 'layout.html' %}
| {% set title = 'theatre' %}
| {% block og %}
meta(property="og:title", content="{{ node.name }}")
meta(name="twitter:title", content="{{node.name}}")
meta(property="og:url", content="{{ url_for('projects.view_node', project_url=project.url, node_id=node._id, t=1, _external=True) }}")
meta(property="og:type", content="website")
meta(property="og:description", content="Created on {{ node._created.strftime('%d %b %Y') }}")
meta(name="twitter:description", content="Created on {{ node._created.strftime('%d %b %Y') }}")
| {% if og_picture %}
meta(property="og:image", content="{{ og_picture.thumbnail('l', api=api) }}")
meta(property="og:image:secure_url", content="{{ og_picture.thumbnail('l', api=api) }}")
meta(property="og:image:type", content="{{ og_picture.content_type }}")
meta(property="og:image:witdh", content="{{ og_picture.width }}")
meta(property="og:image:height", content="{{ og_picture.height }}")
meta(property="twitter:image", content="{{ og_picture.thumbnail('l', api=api) }}")
| {% endif %}
| {% endblock %}
| {% block navigation_search %}{% endblock %}
| {% block navigation_sections %}
li
a.navbar-item.info(
href="",
title="Toggle info & sidebar")
i.pi-info
| {% endblock %}
| {% 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/theatre.css') }}", rel="stylesheet")
| {% endblock %}
| {% block body %}
#theatre-container(class="{% if current_user.is_authenticated %}with-info{% endif %}")
| {% endblock %}
| {% block footer_scripts %}
script.
$(function(){
$.get("{{url_for('nodes.view', node_id=node._id, t=True)}}", function(dataHtml) {
$("#theatre-container").html(dataHtml);
});
});
| {% endblock %}
| {% block footer %}{% endblock %}
| {% block footer_navigation %}{% endblock %}