Titivillus/jinja2/base.html

40 lines
1.6 KiB
HTML
Raw Normal View History

2018-09-25 11:58:07 -04:00
{% set vars = {} %}
2018-08-10 08:39:51 -04:00
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
2018-08-10 08:39:51 -04:00
<title>{% block title %}{% endblock %} - Titivillus</title>
<link rel="stylesheet" type="text/css" href="{{ static('base.css') }}">
2018-09-19 15:56:59 -04:00
<script type="text/javascript" src="{{ static('base.js') }}"></script>
2018-09-20 13:09:24 -04:00
<script>
const set_session_url = '{{ url("set_session:index") }}';
const csrf_token = '{{ csrf_token }}';
</script>
2018-08-10 08:39:51 -04:00
{% block head %}{% endblock %}
</head>
<body>
2018-09-19 15:56:59 -04:00
<div id="globalWrapper">
2018-09-30 01:30:50 -04:00
<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 %}
2018-09-19 15:56:59 -04:00
{% block header %}{% endblock %}
2018-09-30 01:30:50 -04:00
</div>
2018-10-02 11:35:39 -04:00
<div id="headerHidden" class="header" style="{% if request.session.get("hide_header") == True %}display:flex;{% else %}display:none;{% endif %}">
2018-09-30 01:30:50 -04:00
<span><a onclick="toggle_header();" href="javascript:void(0);"></a></span>
</div>
2018-09-19 15:56:59 -04:00
<ul id="alerts">
2018-10-12 10:34:57 -04:00
{% for message in get_messages(request=request) %}
{% if "subscription" not in message.tags %}
<li class="{{ message.tags }}">{{ message }}</li>
{% endif %}
{% endfor %}
</ul>
2018-09-19 15:56:59 -04:00
<div id="content">{% block content %}{% endblock %}</div>
</div>
2018-08-10 08:39:51 -04:00
</body>
</html>