51 lines
1.9 KiB
HTML
51 lines
1.9 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 api_url = '{{ url("api: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">
|
|
<button id="subbtn">{{ get_sub_msgs(request=request)|length }}</button>
|
|
<div id="subscriptionsContent">
|
|
{% for sub in get_sub_msgs(request=request) %}
|
|
<div id="notification-{{ sub.id }}" >
|
|
{{ sub.created_at.strftime('%Y-%m-%d') }} <a href="{{ sub.meta.url }}">{{ sub }}</a>
|
|
<a href="javascript:void(0);" onclick="clear_notification({{ sub.id }})">X</a>
|
|
<br>
|
|
</div>
|
|
{% endfor %}
|
|
</div>
|
|
</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>
|