Titivillus/jinja2/base.html

40 lines
1.6 KiB
HTML

{% set vars = {} %}
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>{% block title %}{% endblock %} - Titivillus</title>
<link rel="stylesheet" type="text/css" href="{{ static('base.css') }}">
<script type="text/javascript" src="{{ static('base.js') }}"></script>
<script>
const set_session_url = '{{ url("set_session:index") }}';
const csrf_token = '{{ csrf_token }}';
</script>
{% block head %}{% endblock %}
</head>
<body>
<div id="globalWrapper">
<div id="header" class="header" style="{% if request.session.get("hide_header") == True %}display:none;{% else %}display:flex;{% endif %}">
<span><a onclick="toggle_header();" href="javascript:void(0);"></a></span>
<span><a href="{{ url('homepage:index') }}">Home</a></span>
{% if request.user.is_authenticated %}
<span id="profileLink"><a href="{{ url('user:profile', args=[request.user.id]) }}">{{ request.user.username }}</a></span>
<span id="subscriptions">{{ get_sub_msgs(request=request)|length }}</span>
{% endif %}
{% block header %}{% endblock %}
</div>
<div id="headerHidden" class="header" style="{% if request.session.get("hide_header") == True %}display:flex;{% else %}display:none;{% endif %}">
<span><a onclick="toggle_header();" href="javascript:void(0);"></a></span>
</div>
<ul id="alerts">
{% for message in get_messages(request=request) %}
{% if "subscription" not in message.tags %}
<li class="{{ message.tags }}">{{ message }}</li>
{% endif %}
{% endfor %}
</ul>
<div id="content">{% block content %}{% endblock %}</div>
</div>
</body>
</html>