Add JS page info

This commit is contained in:
Yusur 2021-03-14 22:50:49 +01:00
parent 2b7d990bb9
commit 0394e4b0d4
5 changed files with 25 additions and 5 deletions

View file

@ -8,6 +8,7 @@
<link rel="stylesheet" href="/static/style.css">
<!-- material icons -->
<link rel="stylesheet" href="https://cdn.sakuragasaki46.local/common/material-icons.css">
{% block json_info %}{% endblock %}
</head>
<body{% if request.cookies.get('dark') == '1' %} class="dark"{% endif %}>
<div id="__top"></div>

View file

@ -31,5 +31,6 @@
<h2>{{ T('latest-uploads') }}</h2>
{# TODO security flaw; find a way to do this in a more safe manner! #}
{{ gallery|safe }}
{% endblock %}

View file

@ -2,6 +2,8 @@
{% block title %}{{ p.title }} - {{ app_name }}{% endblock %}
{% block json_info %}<script>window.page_info={{ p.js_info()|tojson|safe }};</script>{% endblock %}
{% block content %}
<h1>{{ p.title }}</h1>