Reformat html files
This commit is contained in:
parent
9a208ca108
commit
52f1e77fe1
205 changed files with 11096 additions and 11086 deletions
|
@ -1,13 +1,13 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="{{ LANGUAGE_CODE }}">
|
||||
<head>
|
||||
<head>
|
||||
<title>{% block title %}{{ title }} - {{ SITE_LONG_NAME }}{% endblock %}</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
{% if misc_config.meta_keywords %}
|
||||
<meta name="keywords" content="{{ misc_config.meta_keywords }}">
|
||||
<meta name="keywords" content="{{ misc_config.meta_keywords }}">
|
||||
{% endif %}
|
||||
{% if meta_description %}
|
||||
<meta name="description" content="{{ meta_description }}">
|
||||
<meta name="description" content="{{ meta_description }}">
|
||||
{% endif %}
|
||||
<meta id="viewport" name="viewport" content="width=device-width, initial-scale=1">
|
||||
<!-- Favicons-->
|
||||
|
@ -30,14 +30,14 @@
|
|||
{# Chrome 39 for Android colour #}
|
||||
<meta name="theme-color" content="#FFBB33">
|
||||
{% if og_image %}
|
||||
<meta property="og:image" content="{{ request.build_absolute_uri(og_image) }}">
|
||||
<meta property="og:image" content="{{ request.build_absolute_uri(og_image) }}">
|
||||
{% endif %}
|
||||
{% block og_title %}{% endblock %}
|
||||
<meta property="og:site_name" content="{{ SITE_LONG_NAME }}">
|
||||
<meta property="og:url"
|
||||
content="{{ DMOJ_SCHEME }}://{{ DMOJ_CANONICAL|default(site.domain) }}{{ request.get_full_path() }}">
|
||||
content="{{ DMOJ_SCHEME }}://{{ DMOJ_CANONICAL|default(site.domain) }}{{ request.get_full_path() }}">
|
||||
{% if meta_description %}
|
||||
<meta property="og:description" content="{{ meta_description }}">
|
||||
<meta property="og:description" content="{{ meta_description }}">
|
||||
{% endif %}
|
||||
<!--[if lt IE 9]>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv.min.js"></script>
|
||||
|
@ -45,337 +45,337 @@
|
|||
<![endif]-->
|
||||
{% block meta %}{% endblock %}
|
||||
{% if not INLINE_FONTAWESOME %}
|
||||
<link rel="stylesheet" href="{{ FONTAWESOME_CSS }}">
|
||||
<link rel="stylesheet" href="{{ FONTAWESOME_CSS }}">
|
||||
{% endif %}
|
||||
<link rel="stylesheet" type="text/css" href="{{ static('markdown.css') }}">
|
||||
{% compress css %}
|
||||
<link rel="stylesheet" href="{{ static('style.css') }}">
|
||||
{% if PYGMENT_THEME %}
|
||||
<link rel="stylesheet" href="{{ static(PYGMENT_THEME) }}">
|
||||
{% endif %}{% if INLINE_FONTAWESOME %}
|
||||
<link rel="stylesheet" href="{{ static('style.css') }}">
|
||||
{% if PYGMENT_THEME %}
|
||||
<link rel="stylesheet" href="{{ static(PYGMENT_THEME) }}">
|
||||
{% endif %}{% if INLINE_FONTAWESOME %}
|
||||
<link rel="stylesheet" href="{{ static('libs/fontawesome/font-awesome.css') }}">{% endif %}
|
||||
<link rel="stylesheet" type="text/css" href="{{ static('libs/featherlight/featherlight.min.css') }}">
|
||||
<link rel="stylesheet" type="text/css" href="{{ static('libs/clipboard/tooltip.css') }}">
|
||||
<link rel="stylesheet" type="text/css" href="{{ static('libs/select2/select2.css') }}">
|
||||
<link rel="stylesheet" type="text/css" href="{{ static('icofont/icofont.min.css') }}">
|
||||
<link rel="stylesheet" type="text/css" href="{{ static('libs/featherlight/featherlight.min.css') }}">
|
||||
<link rel="stylesheet" type="text/css" href="{{ static('libs/clipboard/tooltip.css') }}">
|
||||
<link rel="stylesheet" type="text/css" href="{{ static('libs/select2/select2.css') }}">
|
||||
<link rel="stylesheet" type="text/css" href="{{ static('icofont/icofont.min.css') }}">
|
||||
{% endcompress %}
|
||||
<link rel="canonical"
|
||||
href="{{ DMOJ_SCHEME }}://{{ DMOJ_CANONICAL|default(site.domain) }}{{ request.get_full_path() }}">
|
||||
href="{{ DMOJ_SCHEME }}://{{ DMOJ_CANONICAL|default(site.domain) }}{{ request.get_full_path() }}">
|
||||
{% if request.user.is_impersonate %}
|
||||
<style>
|
||||
#nav-container {
|
||||
background: #893e89 !important;
|
||||
}
|
||||
</style>
|
||||
<style>
|
||||
#nav-container {
|
||||
background: #893e89 !important;
|
||||
}
|
||||
</style>
|
||||
{% endif %}
|
||||
{% block media %}{% endblock %}
|
||||
{% if use_darkmode %}
|
||||
{% compress css %}
|
||||
<link rel="stylesheet" href="{{ static('darkmode.css') }}">
|
||||
<link rel="stylesheet" href="{{ static('darkmode-svg.css') }}">
|
||||
{% endcompress %}
|
||||
{% compress css %}
|
||||
<link rel="stylesheet" href="{{ static('darkmode.css') }}">
|
||||
<link rel="stylesheet" href="{{ static('darkmode-svg.css') }}">
|
||||
{% endcompress %}
|
||||
{% endif %}
|
||||
{% if not INLINE_JQUERY %}
|
||||
<script src="{{ JQUERY_JS }}"></script>
|
||||
<script src="{{ JQUERY_JS }}"></script>
|
||||
{% endif %}
|
||||
<script src="https://unpkg.com/@popperjs/core@2"></script>
|
||||
{% compress js %}
|
||||
<script>{{ inlinei18n(LANGUAGE_CODE)|safe }}</script>
|
||||
{% if INLINE_JQUERY %}
|
||||
<script src="{{ static('libs/jquery-3.4.1.min.js') }}"></script>
|
||||
{% endif %}
|
||||
<script src="{{ static('libs/jquery-cookie.js') }}"></script>
|
||||
<script src="{{ static('libs/jquery-taphold.js') }}"></script>
|
||||
<script src="{{ static('libs/jquery.unveil.js') }}"></script>
|
||||
<script src="{{ static('libs/moment.js') }}"></script>
|
||||
<script src="{{ static('libs/select2/select2.js') }}"></script>
|
||||
{% include "extra_js.html" %}
|
||||
<script src="{{ static('common.js') }}"></script>
|
||||
<script src="{{ static('libs/clipboard/tooltip.js') }}"></script>
|
||||
<script>
|
||||
moment.locale('{{ LANGUAGE_CODE }}');
|
||||
$(function () {
|
||||
$('img.unveil').unveil(200);
|
||||
});
|
||||
const loading_page = `{% include "loading-page.html" %}`;
|
||||
</script>
|
||||
<script>{{ inlinei18n(LANGUAGE_CODE)|safe }}</script>
|
||||
{% if INLINE_JQUERY %}
|
||||
<script src="{{ static('libs/jquery-3.4.1.min.js') }}"></script>
|
||||
{% endif %}
|
||||
<script src="{{ static('libs/jquery-cookie.js') }}"></script>
|
||||
<script src="{{ static('libs/jquery-taphold.js') }}"></script>
|
||||
<script src="{{ static('libs/jquery.unveil.js') }}"></script>
|
||||
<script src="{{ static('libs/moment.js') }}"></script>
|
||||
<script src="{{ static('libs/select2/select2.js') }}"></script>
|
||||
{% include "extra_js.html" %}
|
||||
<script src="{{ static('common.js') }}"></script>
|
||||
<script src="{{ static('libs/clipboard/tooltip.js') }}"></script>
|
||||
<script>
|
||||
moment.locale('{{ LANGUAGE_CODE }}');
|
||||
$(function () {
|
||||
$('img.unveil').unveil(200);
|
||||
});
|
||||
const loading_page = `{% include "loading-page.html" %}`;
|
||||
</script>
|
||||
{% endcompress %}
|
||||
|
||||
{% block js_media %}{% endblock %}
|
||||
{% if request.in_contest %}
|
||||
<script>$(function () {
|
||||
if ($("#contest-time-remaining").length) {
|
||||
count_down($("#contest-time-remaining"));
|
||||
}
|
||||
<script>$(function () {
|
||||
if ($("#contest-time-remaining").length) {
|
||||
count_down($("#contest-time-remaining"));
|
||||
}
|
||||
|
||||
var selected = null,
|
||||
x_pos = 0, y_pos = 0,
|
||||
x_elem = 0, y_elem = 0;
|
||||
var selected = null,
|
||||
x_pos = 0, y_pos = 0,
|
||||
x_elem = 0, y_elem = 0;
|
||||
|
||||
$('#contest-info').mousedown(function () {
|
||||
selected = $(this);
|
||||
x_elem = x_pos - selected.offset().left;
|
||||
y_elem = y_pos - (selected.offset().top - $(window).scrollTop());
|
||||
return false;
|
||||
});
|
||||
|
||||
if (localStorage.getItem("contest_timer_position")) {
|
||||
data = localStorage.getItem("contest_timer_position").split(":");
|
||||
$("#contest-info").css({
|
||||
left: data[0],
|
||||
top: data[1]
|
||||
});
|
||||
}
|
||||
|
||||
$("#contest-info").show();
|
||||
|
||||
$("#contest-info-toggle").on('click', function() {
|
||||
$.post("{{url('contest_mode_ajax')}}", function() {
|
||||
window.location.reload();
|
||||
})
|
||||
});
|
||||
|
||||
$(document).mousemove(function (e) {
|
||||
x_pos = e.screenX;
|
||||
y_pos = e.screenY;
|
||||
|
||||
if (selected !== null) {
|
||||
left_px = (x_pos - x_elem);
|
||||
top_px = (y_pos - y_elem);
|
||||
left_px = Math.max(Math.min(left_px, window.innerWidth), 0) / window.innerWidth * 100 + '%';
|
||||
top_px = Math.max(Math.min(top_px, window.innerHeight), 0) / window.innerHeight * 100 + '%';
|
||||
localStorage.setItem("contest_timer_position", left_px + ":" + top_px);
|
||||
|
||||
selected.css({
|
||||
left: left_px,
|
||||
top: top_px
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
$(document).mouseup(function () {
|
||||
selected = null;
|
||||
})
|
||||
$('#contest-info').mousedown(function () {
|
||||
selected = $(this);
|
||||
x_elem = x_pos - selected.offset().left;
|
||||
y_elem = y_pos - (selected.offset().top - $(window).scrollTop());
|
||||
return false;
|
||||
});
|
||||
</script>
|
||||
|
||||
if (localStorage.getItem("contest_timer_position")) {
|
||||
data = localStorage.getItem("contest_timer_position").split(":");
|
||||
$("#contest-info").css({
|
||||
left: data[0],
|
||||
top: data[1]
|
||||
});
|
||||
}
|
||||
|
||||
$("#contest-info").show();
|
||||
|
||||
$("#contest-info-toggle").on('click', function() {
|
||||
$.post("{{url('contest_mode_ajax')}}", function() {
|
||||
window.location.reload();
|
||||
})
|
||||
});
|
||||
|
||||
$(document).mousemove(function (e) {
|
||||
x_pos = e.screenX;
|
||||
y_pos = e.screenY;
|
||||
|
||||
if (selected !== null) {
|
||||
left_px = (x_pos - x_elem);
|
||||
top_px = (y_pos - y_elem);
|
||||
left_px = Math.max(Math.min(left_px, window.innerWidth), 0) / window.innerWidth * 100 + '%';
|
||||
top_px = Math.max(Math.min(top_px, window.innerHeight), 0) / window.innerHeight * 100 + '%';
|
||||
localStorage.setItem("contest_timer_position", left_px + ":" + top_px);
|
||||
|
||||
selected.css({
|
||||
left: left_px,
|
||||
top: top_px
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
$(document).mouseup(function () {
|
||||
selected = null;
|
||||
})
|
||||
});
|
||||
</script>
|
||||
{% endif %}
|
||||
|
||||
{% if request.user.is_authenticated %}
|
||||
<script>
|
||||
window.user = {
|
||||
email: '{{ request.user.email|escapejs }}',
|
||||
id: '{{ request.user.id|escapejs }}',
|
||||
name: '{{ request.user.username|escapejs }}'
|
||||
};
|
||||
</script>
|
||||
<script>
|
||||
window.user = {
|
||||
email: '{{ request.user.email|escapejs }}',
|
||||
id: '{{ request.user.id|escapejs }}',
|
||||
name: '{{ request.user.username|escapejs }}'
|
||||
};
|
||||
</script>
|
||||
{% else %}
|
||||
<script>window.user = {};</script>
|
||||
<script>window.user = {};</script>
|
||||
{% endif %}
|
||||
|
||||
{% if misc_config.analytics %}
|
||||
{{ misc_config.analytics|safe }}
|
||||
{{ misc_config.analytics|safe }}
|
||||
{% endif %}
|
||||
|
||||
{# Don't run userscript since it may be malicious #}
|
||||
{% if request.user.is_authenticated and request.profile.user_script and not request.user.is_impersonate %}
|
||||
<script type="text/javascript">{{ request.profile.user_script|safe }}</script>
|
||||
<script type="text/javascript">{{ request.profile.user_script|safe }}</script>
|
||||
{% endif %}
|
||||
|
||||
<noscript>
|
||||
<style>
|
||||
#content {
|
||||
margin: 80px auto auto;
|
||||
}
|
||||
<style>
|
||||
#content {
|
||||
margin: 80px auto auto;
|
||||
}
|
||||
|
||||
#navigation {
|
||||
top: 27px;
|
||||
}
|
||||
</style>
|
||||
#navigation {
|
||||
top: 27px;
|
||||
}
|
||||
</style>
|
||||
</noscript>
|
||||
</head>
|
||||
<body>
|
||||
<svg width="0" height="0" style="display: block">
|
||||
<defs>
|
||||
</head>
|
||||
<body>
|
||||
<svg width="0" height="0" style="display: block">
|
||||
<defs>
|
||||
<clipPath id="rating-clip"><circle cx="8" cy="8" r="7"/></clipPath>
|
||||
</defs>
|
||||
</svg>
|
||||
<nav id="navigation" class="unselectable">
|
||||
<div id="nav-container">
|
||||
</defs>
|
||||
</svg>
|
||||
<nav id="navigation" class="unselectable">
|
||||
<div id="nav-container">
|
||||
<a id="navicon" href="javascript:void(0)"><i class="fa fa-bars"></i></a>
|
||||
<ul id="nav-list">
|
||||
<li class="home-nav-element"><a href="{{ url('home') }}">{% include "site-logo-fragment.html" %}</a></li>
|
||||
<li class="home-nav-element"><span class="nav-divider"></span></li>
|
||||
<li class="home-menu-item"><a href="{{ url('home') }}" class="nav-home">{{ _('Home') }}</a></li>
|
||||
{% for node in mptt_tree(nav_bar) recursive %}
|
||||
<li>
|
||||
<a href="{{ node.path }}" class="nav-{{ node.key }}{% if node.key in nav_tab %} active{% endif %}">
|
||||
{{ user_trans(node.label) }}
|
||||
{% if not node.is_leaf_node %}
|
||||
<div href="javascript:void(0)" class="nav-expand">></div>
|
||||
{% endif %}
|
||||
</a>
|
||||
{% with children=node.get_children() %}
|
||||
{% if children %}<ul>{{ loop(children) }}</ul>{% endif %}
|
||||
{% endwith %}
|
||||
</li>
|
||||
{% endfor %}
|
||||
<li class="home-nav-element"><a href="{{ url('home') }}">{% include "site-logo-fragment.html" %}</a></li>
|
||||
<li class="home-nav-element"><span class="nav-divider"></span></li>
|
||||
<li class="home-menu-item"><a href="{{ url('home') }}" class="nav-home">{{ _('Home') }}</a></li>
|
||||
{% for node in mptt_tree(nav_bar) recursive %}
|
||||
<li>
|
||||
<a href="{{ node.path }}" class="nav-{{ node.key }}{% if node.key in nav_tab %} active{% endif %}">
|
||||
{{ user_trans(node.label) }}
|
||||
{% if not node.is_leaf_node %}
|
||||
<div href="javascript:void(0)" class="nav-expand">></div>
|
||||
{% endif %}
|
||||
</a>
|
||||
{% with children=node.get_children() %}
|
||||
{% if children %}<ul>{{ loop(children) }}</ul>{% endif %}
|
||||
{% endwith %}
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
<div style="float: right; display: inline-flex; font-size: larger; align-items: center; height: 100%;">
|
||||
<span class="navbar-icons">
|
||||
{% if request.user.is_authenticated %}
|
||||
<span title="{{_('Chat')}}">
|
||||
<a id="chat-icon" href="{{ url('chat', '') }}" class="icofont-wechat navbar-icon" aria-hidden="true">
|
||||
{% set unread_chat = request.profile.count_unread_chat_boxes %}
|
||||
{% if unread_chat %}
|
||||
<sub class="unread_boxes">{{unread_chat}}</sub>
|
||||
{% endif %}
|
||||
</a>
|
||||
</span>
|
||||
|
||||
{% set unseen_cnt = request.profile.count_unseen_notifications %}
|
||||
<span title="{{_('Notification')}}" class="{{ 'notification-open' if unseen_cnt > 0 }}">
|
||||
<a href="{{ url('notification') }}" class="icofont-alarm navbar-icon" id="notification" aria-hidden="true">
|
||||
{% if unseen_cnt > 0 %}
|
||||
<sub class="unread_boxes">{{unseen_cnt}}</sub>
|
||||
{% endif %}
|
||||
</a>
|
||||
</span>
|
||||
{% endif %}
|
||||
<span title="{{_('Language')}}">
|
||||
<a class="icofont-globe navbar-icon" id="nav-lang-icon" aria-hidden="true">
|
||||
<sub class="sub-lang">{{LANGUAGE_CODE}}</sub>
|
||||
</a>
|
||||
<div id="lang-dropdown" class="dropdown" role="tooltip">
|
||||
{% for language in language_info_list(LANGUAGES) %}
|
||||
<div value="{{ language.code }}"
|
||||
class="dropdown-item lang-dropdown-item" style="{{'font-weight: bold' if language.code == LANGUAGE_CODE}}">
|
||||
{{ language.name_local }}
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</span>
|
||||
<span title="{{_('Dark Mode')}}">
|
||||
<a class="icofont-adjust navbar-icon black" id="nav-darkmode-icon" aria-hidden="true" href="?darkmode=1"></a>
|
||||
</span>
|
||||
</span>
|
||||
<span class="navbar-icons">
|
||||
{% if request.user.is_authenticated %}
|
||||
<span id="user-links">
|
||||
<ul><li><a href="javascript:void(0)">
|
||||
<span>
|
||||
<img src="{{ gravatar(request.user, 32) }}" height="24" width="24">{# -#}
|
||||
<span>
|
||||
<b class="{{request.profile.css_class}}">{{ request.user.username }}</b>
|
||||
</span>
|
||||
</span>
|
||||
</a></li></ul>
|
||||
</span>
|
||||
<div class="dropdown" id="userlink_dropdown" role="tooptip">
|
||||
<div class="dropdown-item"><a href="{{ url('user_page') }}">{{ _('Profile') }}</a></div>
|
||||
{% if request.user.is_staff or request.user.is_superuser %}
|
||||
<div class="dropdown-item"><a href="{{ url('admin:index') }}">{{ _('Admin') }}</a></div>
|
||||
{% endif %}
|
||||
{% if request.user.is_superuser %}
|
||||
<div class="dropdown-item"><a href="{{ url('internal_problem') }}">{{ _('Internal') }}</a></div>
|
||||
<div class="dropdown-item"><a href="{{ url('site_stats') }}">{{ _('Stats') }}</a></div>
|
||||
{% endif %}
|
||||
<div class="dropdown-item"><a href="{{ url('user_edit_profile') }}">{{ _('Edit profile') }}</a></div>
|
||||
{% if request.user.is_impersonate %}
|
||||
<div class="dropdown-item"><a href="{{ url('impersonate-stop') }}">Stop impersonating</a></div>
|
||||
{% else %}
|
||||
<div class="dropdown-item">
|
||||
<a href="#" id="logout" class="red">{{ _('Log out') }}</a>
|
||||
<form id="logout-form" action="{{ url('auth_logout') }}" method="POST">
|
||||
{% csrf_token %}
|
||||
</form>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% else %}
|
||||
<span class="anon">
|
||||
<a href="{{ url('auth_login') }}?next={{ LOGIN_RETURN_PATH|urlencode }}"><b>{{ _('Log in') }}</b></a>
|
||||
{{ _('or') }}
|
||||
<a href="{{ url('registration_register') }}"><b>{{ _('Sign up') }}</b></a>
|
||||
</span>
|
||||
<span title="{{_('Chat')}}">
|
||||
<a id="chat-icon" href="{{ url('chat', '') }}" class="icofont-wechat navbar-icon" aria-hidden="true">
|
||||
{% set unread_chat = request.profile.count_unread_chat_boxes %}
|
||||
{% if unread_chat %}
|
||||
<sub class="unread_boxes">{{unread_chat}}</sub>
|
||||
{% endif %}
|
||||
</a>
|
||||
</span>
|
||||
|
||||
{% set unseen_cnt = request.profile.count_unseen_notifications %}
|
||||
<span title="{{_('Notification')}}" class="{{ 'notification-open' if unseen_cnt > 0 }}">
|
||||
<a href="{{ url('notification') }}" class="icofont-alarm navbar-icon" id="notification" aria-hidden="true">
|
||||
{% if unseen_cnt > 0 %}
|
||||
<sub class="unread_boxes">{{unseen_cnt}}</sub>
|
||||
{% endif %}
|
||||
</a>
|
||||
</span>
|
||||
{% endif %}
|
||||
<span title="{{_('Language')}}">
|
||||
<a class="icofont-globe navbar-icon" id="nav-lang-icon" aria-hidden="true">
|
||||
<sub class="sub-lang">{{LANGUAGE_CODE}}</sub>
|
||||
</a>
|
||||
<div id="lang-dropdown" class="dropdown" role="tooltip">
|
||||
{% for language in language_info_list(LANGUAGES) %}
|
||||
<div value="{{ language.code }}"
|
||||
class="dropdown-item lang-dropdown-item" style="{{'font-weight: bold' if language.code == LANGUAGE_CODE}}">
|
||||
{{ language.name_local }}
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</span>
|
||||
<span title="{{_('Dark Mode')}}">
|
||||
<a class="icofont-adjust navbar-icon black" id="nav-darkmode-icon" aria-hidden="true" href="?darkmode=1"></a>
|
||||
</span>
|
||||
</span>
|
||||
{% if request.user.is_authenticated %}
|
||||
<span id="user-links">
|
||||
<ul><li><a href="javascript:void(0)">
|
||||
<span>
|
||||
<img src="{{ gravatar(request.user, 32) }}" height="24" width="24">{# -#}
|
||||
<span>
|
||||
<b class="{{request.profile.css_class}}">{{ request.user.username }}</b>
|
||||
</span>
|
||||
</span>
|
||||
</a></li></ul>
|
||||
</span>
|
||||
<div class="dropdown" id="userlink_dropdown" role="tooptip">
|
||||
<div class="dropdown-item"><a href="{{ url('user_page') }}">{{ _('Profile') }}</a></div>
|
||||
{% if request.user.is_staff or request.user.is_superuser %}
|
||||
<div class="dropdown-item"><a href="{{ url('admin:index') }}">{{ _('Admin') }}</a></div>
|
||||
{% endif %}
|
||||
{% if request.user.is_superuser %}
|
||||
<div class="dropdown-item"><a href="{{ url('internal_problem') }}">{{ _('Internal') }}</a></div>
|
||||
<div class="dropdown-item"><a href="{{ url('site_stats') }}">{{ _('Stats') }}</a></div>
|
||||
{% endif %}
|
||||
<div class="dropdown-item"><a href="{{ url('user_edit_profile') }}">{{ _('Edit profile') }}</a></div>
|
||||
{% if request.user.is_impersonate %}
|
||||
<div class="dropdown-item"><a href="{{ url('impersonate-stop') }}">Stop impersonating</a></div>
|
||||
{% else %}
|
||||
<div class="dropdown-item">
|
||||
<a href="#" id="logout" class="red">{{ _('Log out') }}</a>
|
||||
<form id="logout-form" action="{{ url('auth_logout') }}" method="POST">
|
||||
{% csrf_token %}
|
||||
</form>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% else %}
|
||||
<span class="anon">
|
||||
<a href="{{ url('auth_login') }}?next={{ LOGIN_RETURN_PATH|urlencode }}"><b>{{ _('Log in') }}</b></a>
|
||||
{{ _('or') }}
|
||||
<a href="{{ url('registration_register') }}"><b>{{ _('Sign up') }}</b></a>
|
||||
</span>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
<div id="nav-shadow"></div>
|
||||
</nav>
|
||||
{% if request.in_contest %}
|
||||
<div id="contest-info">
|
||||
</div>
|
||||
<div id="nav-shadow"></div>
|
||||
</nav>
|
||||
{% if request.in_contest %}
|
||||
<div id="contest-info">
|
||||
<div id="contest-info-main">
|
||||
<a href="{{ url('contest_view', request.participation.contest.key) }}" style="vertical-align: middle; display: inline">
|
||||
{{ request.participation.contest.name }} -
|
||||
{% if request.participation.spectate %}
|
||||
{{ _('spectating') }}
|
||||
{% elif request.participation.end_time %}
|
||||
<div id="contest-time-remaining" data-secs="{{request.participation.end_time}}">
|
||||
{{ request.participation.time_remaining|timedelta("localized") }}
|
||||
</div>
|
||||
{% else %}
|
||||
{{ _('virtual') }}
|
||||
{% endif %}
|
||||
</a>
|
||||
<a href="{{ url('contest_view', request.participation.contest.key) }}" style="vertical-align: middle; display: inline">
|
||||
{{ request.participation.contest.name }} -
|
||||
{% if request.participation.spectate %}
|
||||
{{ _('spectating') }}
|
||||
{% elif request.participation.end_time %}
|
||||
<div id="contest-time-remaining" data-secs="{{request.participation.end_time}}">
|
||||
{{ request.participation.time_remaining|timedelta("localized") }}
|
||||
</div>
|
||||
{% else %}
|
||||
{{ _('virtual') }}
|
||||
{% endif %}
|
||||
</a>
|
||||
</div>
|
||||
<div id="contest-info-toggle" class="{{'contest-info-toggle-mode-on' if request.contest_mode else 'contest-info-toggle-mode-off'}}">
|
||||
{% if request.contest_mode %}
|
||||
<i class="fa fa-toggle-on white"></i> {{_('Compete')}}
|
||||
{% else %}
|
||||
<i class="fa fa-toggle-off white"></i> {{_('General')}}
|
||||
{% endif %}
|
||||
{% if request.contest_mode %}
|
||||
<i class="fa fa-toggle-on white"></i> {{_('Compete')}}
|
||||
{% else %}
|
||||
<i class="fa fa-toggle-off white"></i> {{_('General')}}
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
<div id="page-container">
|
||||
<noscript>
|
||||
</div>
|
||||
{% endif %}
|
||||
<div id="page-container">
|
||||
<noscript>
|
||||
<div id="noscript">{{ _('This site works best with JavaScript enabled.') }}</div>
|
||||
</noscript>
|
||||
<br>
|
||||
<main id="content">
|
||||
</noscript>
|
||||
<br>
|
||||
<main id="content">
|
||||
{% block title_row %}
|
||||
<h2 class="title-row">
|
||||
{% block content_title %}
|
||||
{% if content_title %}{{ content_title }}{% else %}{{ title }}{% endif %}
|
||||
{% endblock %}
|
||||
</h2>
|
||||
<h2 class="title-row">
|
||||
{% block content_title %}
|
||||
{% if content_title %}{{ content_title }}{% else %}{{ title }}{% endif %}
|
||||
{% endblock %}
|
||||
</h2>
|
||||
{% endblock %}
|
||||
{% block header %}{% endblock %}
|
||||
{% block title_ruler %}
|
||||
<hr>
|
||||
<hr>
|
||||
{% endblock %}
|
||||
<div id="content-body">{% block body %}{% endblock %}</div>
|
||||
</main>
|
||||
</main>
|
||||
|
||||
{% if i18n_config.announcement %}
|
||||
{% if i18n_config.announcement %}
|
||||
<div id="announcement">{{ i18n_config.announcement|safe }}</div>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
{% block bodyend %}{% endblock %}
|
||||
{% block footer %}
|
||||
<footer>
|
||||
<span id="footer-content">
|
||||
{% block bodyend %}{% endblock %}
|
||||
{% block footer %}
|
||||
<footer>
|
||||
<span id="footer-content">
|
||||
<br>
|
||||
<a class="background-footer" target="_blank" href="https://dmoj.ca">proudly powered by <b>DMOJ</b></a><a target="_blank" href="https://github.com/LQDJudge/online-judge"> | developed by LQDJudge team</a> |
|
||||
{% if i18n_config.footer %}
|
||||
{{ i18n_config.footer|safe }} |
|
||||
{{ i18n_config.footer|safe }} |
|
||||
{% endif %}
|
||||
<form action="{{ url('set_language') }}" method="post" style="display: inline" id="form-lang">
|
||||
{% csrf_token %}
|
||||
<input name="next" type="hidden" value="{{ request.get_full_path() }}">
|
||||
<select name="language" onchange="form.submit()" style="height: 1.5em">
|
||||
{% csrf_token %}
|
||||
<input name="next" type="hidden" value="{{ request.get_full_path() }}">
|
||||
<select name="language" onchange="form.submit()" style="height: 1.5em">
|
||||
{% for language in language_info_list(LANGUAGES) %}
|
||||
<option value="{{ language.code }}" {% if language.code == LANGUAGE_CODE %}selected{% endif %}>
|
||||
{{ language.name_local }} ({{ language.code }})
|
||||
</option>
|
||||
<option value="{{ language.code }}" {% if language.code == LANGUAGE_CODE %}selected{% endif %}>
|
||||
{{ language.name_local }} ({{ language.code }})
|
||||
</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</form>
|
||||
</span>
|
||||
</footer>
|
||||
{% endblock %}
|
||||
</div>
|
||||
</select>
|
||||
</form>
|
||||
</span>
|
||||
</footer>
|
||||
{% endblock %}
|
||||
</div>
|
||||
<link rel="preconnect" href="https://fonts.googleapis.com">
|
||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
||||
<link href="https://fonts.googleapis.com/css2?family=Fira+Code&family=Noto+Sans&display=swap" rel="stylesheet">
|
||||
</body>
|
||||
</body>
|
||||
</html>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue