seria/templates/master.twig

60 lines
4 KiB
Twig
Raw Normal View History

<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>{% if title is defined %}{{ title }} :: {% endif %}{{ globals.site_info.name }}</title>
<link href="/assets/seria.css" type="text/css" rel="stylesheet">
<meta name="csrfp-token" content="{{ csrfp_token() }}">
</head>
<body>
<div class="wrapper">
<nav class="header">
{% if globals.auth_info.isLoggedIn %}
{% set user_info = globals.auth_info.userInfo %}
{% set user_ratio = user_info.calculateRatio %}
<div class="header-stats">
<a href="/profile/{{ globals.auth_info.userName }}">{{ globals.auth_info.userName }}</a>
&nbsp;&#183;&nbsp; <a href="/profile/{{ globals.auth_info.userName }}/history">R:&nbsp; <span style="color: {{ seria_ratio_colour(user_ratio) }};">{{ user_ratio|number_format(3) }}</span></a>
&nbsp;&#183;&nbsp; <a href="/profile/{{ globals.auth_info.userName }}/history?filter=uploaded"><span style="color: green;">U:</span>&nbsp; {{ user_info.bytesUploaded|format_filesize }}</a>
&nbsp;&#183;&nbsp; <a href="/profile/{{ globals.auth_info.userName }}/history?filter=downloaded"><span style="color: red;">D:</span>&nbsp; {{ user_info.bytesDownloaded|format_filesize }}</a>
&nbsp;&#183;&nbsp; <a href="/profile/{{ globals.auth_info.userName }}/history?filter=uploading"><span style="color: green;">&#8593;</span>&nbsp; {{ seria_count_user_uploading(user_info)|number_format }}</a>
&nbsp;&#183;&nbsp; <a href="/profile/{{ globals.auth_info.userName }}/history?filter=downloading"><span style="color: red;">&#8595;</span>&nbsp; {{ seria_count_user_downloading(user_info)|number_format }}</a>
</div>
{% endif %}
<div class="header-logo"><a href="/">{{ globals.site_info.name }}</a></div>
<div class="header-menu">
{% set header_menu = seria_header_menu() %}
{% for link in header_menu %}
<a href="{{ link.url }}">{{ link.text }}</a>
{% endfor %}
</div>
</nav>
<div class="wrapper-body">
{% block content %}
meow
{% endblock %}
</div>
<footer class="footer">
<div class="copyright">
<span>Powered by <a href="//git.flash.moe/flashii/seria">Seria</a> &copy; <a href="//flash.moe">flashwave</a> 2021-{{ 'now'|date('Y') }}</span>
<span>/
{% set git_branch = git_branch() %}
{% if git_branch != 'HEAD' %}
<a href="https://git.flash.moe/flashii/seria/src/branch/{{ git_branch }}" target="_blank" rel="noreferrer noopener">{{ git_branch }}</a>
{% else %}
{% set git_tag = git_tag() %}
<a href="https://git.flash.moe/flashii/seria/src/tag/{{ git_tag }}" target="_blank" rel="noreferrer noopener">{{ git_tag }}</a>
{% endif %}
# <a href="https://git.flash.moe/flashii/seria/commit/{{ git_commit_hash(true) }}" target="_blank" rel="noreferrer noopener">{{ git_commit_hash() }}</a>
</span>
{% if globals.display_timings_info %}
<span>/ SQL Queries: {{ seria_db_query_count()|number_format }}</span>
{% endif %}
</div>
<div class="disclaimer">None of the files shown here are actually hosted on this server. The administrator of this site ({{ globals.site_info.host }}) holds NO RESPONSIBILITY if these files are misused in any way and cannot be held responsible for what its users post, or any other actions of it.</div>
</footer>
</div>
<script src="/assets/seria.js"></script>
</body>
</html>