ID: 667da0cb92d0c53e5bc0b788b0e1790177ba67cc
114 lines
โ
5K โ
View raw
| {% set user = session_user () %}
{# Number of new messages #}
{% if user %}
{% set unread_messages = new_messages (user.id) %}
{% endif %}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href="/css/freepost.css" rel="stylesheet">
<title>{{ title ~ ' - ' if title else '' }}freepost</title>
</head>
<body>
<div class="container">
<div class="header">
<div class="title-small">
<a href="{{ url ('homepage') }}{{ '?sort=new' if user and user.preferred_feed == 'new' }}" class="flex-item logo">
free
<img alt="๐ต " title="freepost" src="/images/freepost.svg" class="monkey" />
post
</a>
<div class="burger-icon {{ 'notify' if unread_messages }}">
<div class="line1"></div>
<div class="line2"></div>
<div class="line3"></div>
</div>
</div>
<div class="title-large">
<a href="{{ url('homepage') }}{{ '?sort=new' if user and user.preferred_feed == 'new' }}" class="flex-item logo">
freepost
</a>
<a href="{{ url('homepage') }}{{ '?sort=new' if user and user.preferred_feed == 'new' }}" class="flex-item logo">
<img alt="๐ต " title="freepost" src="/images/freepost.svg" class="monkey" />
</a>
</div>
<div class="menu" id="menu">
<a href="{{ url('communities') }}" class="flex-item {{ 'active_page' if active_page == 'communities' }}">
Communities
</a>
<a href="{{ url ('search') }}" class="flex-item {{ 'active_page' if active_page == 'search' }}">Search</a>
<a href="{{ url ('about') }}" class="flex-item {{ 'active_page' if active_page == 'about' }}">About</a>
{% if user %}
{% if unread_messages %}
<a href="{{ url ('user_replies') }}" class="new_messages flex-item">
{{ user.username }} ({{ unread_messages }})
</a>
{% else %}
<a href="{{ url ('user_settings') }}" class="flex-item {{ 'active_page' if active_page == 'user' }}">
{{ user.username }}
</a>
{% endif %}
<a href="{{ url ('logout') }}" class="flex-item">Log out</a>
{% else %}
<a href="{{ url ('login') }}" class="flex-item {{ 'active_page' if active_page == 'login' }}">Log in</a>
{% endif %}
</div>
</div>
<div class="content">
{% block content %}{% endblock %}
</div>
<footer>
<img alt="๐ต " title="freepost" src="/images/freepost.svg" class="monkey" />
<ul>
<li>
<img alt="RSS" title="" src="/images/rss.png" />
<a href="/rss/hot">Hot</a> โข
<a href="/rss/new">New</a> โข
<a href="/rss_comments">Comments</a>
</li>
<li>
<img alt="Source" title="" src="/images/source.png" />
<a href="https://clif.peers.community/zplus/freepost.git">Source code</a>
</li>
<li>
<img alt="Peers" title="" src="/images/peers.png" />
<a href="http://peers.community">Peers</a>
<a href="https://dokk.org/The_Peers_Community">Community</a>
</li>
<li>
<img alt="TuxFamily" title="" src="/images/tuxfamily.png" />
Hosted at <a href="https://dokk.org/TuxFamily">TuxFamily</a>
</li>
</ul>
</footer>
</div>
{# When users vote, this <iframe/> is used as <form> target, such that
# the page is not reloaded.
#}
<iframe name="vote_sink" class="vote_sink"></iframe>
<script src="/javascript/freepost.js"></script>
</body>
</html>
|