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 @@
|
|||
{% extends "base.html" %}
|
||||
|
||||
{% block js_media %}
|
||||
{% include "comments/media-js.html" %}
|
||||
{% include "actionbar/media-js.html" %}
|
||||
{% include "comments/media-js.html" %}
|
||||
{% include "actionbar/media-js.html" %}
|
||||
{% endblock %}
|
||||
|
||||
{% block media %}
|
||||
{% include "comments/media-css.html" %}
|
||||
{% include "actionbar/media-css.html" %}
|
||||
{% include "comments/media-css.html" %}
|
||||
{% include "actionbar/media-css.html" %}
|
||||
{% endblock %}
|
||||
|
||||
{% block title_row %}
|
||||
|
@ -17,41 +17,41 @@
|
|||
{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
<div class="post-full">
|
||||
<div class="post-title">{{ title }}</div>
|
||||
<div class="time">
|
||||
{% with authors=post.authors.all() %}
|
||||
{% if authors %}
|
||||
<span class="post-authors">{{ link_users(authors) }}</span>
|
||||
{% endif %}
|
||||
{% endwith %}
|
||||
<span class="post-time">
|
||||
{% trans time=post.publish_on|date(_("N j, Y, g:i a")) %} posted on {{ time }}{% endtrans %}
|
||||
</span>
|
||||
{% if post.is_editable_by(request.user) %}
|
||||
<span> [<a href="{{ url('admin:judge_blogpost_change', post.id) }}">{{ _('Edit') }}</a>]</span>
|
||||
{% endif %}
|
||||
{% if valid_user_to_show_edit %}
|
||||
{% for org in valid_org_to_show_edit %}
|
||||
<span> [<a href="{{ url('edit_organization_blog', org.id , org.slug , post.id) }}">{{ _('Edit in') }} {{org.slug}}</a>]</span>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="body content-description">
|
||||
{% cache 86400 'post_content' post.id MATH_ENGINE %}
|
||||
{{ post.content|markdown|reference|str|safe}}
|
||||
{% endcache %}
|
||||
</div>
|
||||
{% include "actionbar/list.html" %}
|
||||
<div class="post-full">
|
||||
<div class="post-title">{{ title }}</div>
|
||||
<div class="time">
|
||||
{% with authors=post.authors.all() %}
|
||||
{% if authors %}
|
||||
<span class="post-authors">{{ link_users(authors) }}</span>
|
||||
{% endif %}
|
||||
{% endwith %}
|
||||
<span class="post-time">
|
||||
{% trans time=post.publish_on|date(_("N j, Y, g:i a")) %} posted on {{ time }}{% endtrans %}
|
||||
</span>
|
||||
{% if post.is_editable_by(request.user) %}
|
||||
<span> [<a href="{{ url('admin:judge_blogpost_change', post.id) }}">{{ _('Edit') }}</a>]</span>
|
||||
{% endif %}
|
||||
{% if valid_user_to_show_edit %}
|
||||
{% for org in valid_org_to_show_edit %}
|
||||
<span> [<a href="{{ url('edit_organization_blog', org.id , org.slug , post.id) }}">{{ _('Edit in') }} {{org.slug}}</a>]</span>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
</div>
|
||||
<hr style="width: 60%; margin:4em auto;">
|
||||
{% include "comments/list.html" %}
|
||||
<div class="body content-description">
|
||||
{% cache 86400 'post_content' post.id MATH_ENGINE %}
|
||||
{{ post.content|markdown|reference|str|safe}}
|
||||
{% endcache %}
|
||||
</div>
|
||||
{% include "actionbar/list.html" %}
|
||||
</div>
|
||||
<hr style="width: 60%; margin:4em auto;">
|
||||
{% include "comments/list.html" %}
|
||||
{% endblock %}
|
||||
|
||||
{% block bodyend %}
|
||||
{{ super() }}
|
||||
{% if REQUIRE_JAX %}
|
||||
{% include "mathjax-load.html" %}
|
||||
{% endif %}
|
||||
{% include "comments/math.html" %}
|
||||
{{ super() }}
|
||||
{% if REQUIRE_JAX %}
|
||||
{% include "mathjax-load.html" %}
|
||||
{% endif %}
|
||||
{% include "comments/math.html" %}
|
||||
{% endblock %}
|
|
@ -1,52 +1,52 @@
|
|||
<section class="{% if post.sticky %}sticky {% endif %}blog-box">
|
||||
<div style="margin-bottom: 0.5em">
|
||||
<span class="time">
|
||||
{% with authors=post.authors.all() %}
|
||||
{%- if authors -%}
|
||||
<img src="{{gravatar(authors[0])}}" style="width: 1.5em; border-radius: 50%; margin-bottom: -0.3em">
|
||||
<span class="post-authors">{{ link_users(authors) }}</span>
|
||||
{%- endif -%}
|
||||
{% endwith %}
|
||||
•
|
||||
{{ relative_time(post.publish_on, abs=_('on {time}'), rel=_('{time}')) -}}
|
||||
{%- if post.sticky %} •
|
||||
<i title="Sticky" class="fa fa-star fa-fw"></i>{% endif -%}
|
||||
{% if post.is_organization_private and show_organization_private_icon %}
|
||||
•
|
||||
<span>
|
||||
{% for org in post.organizations.all() %}
|
||||
<span class="organization-tag" style="display: inherit;">
|
||||
<a href="{{ org.get_absolute_url() }}">
|
||||
<i class="fa fa-lock"></i> {{ org.name }}
|
||||
</a>
|
||||
</span>
|
||||
{% endfor %}
|
||||
</span>
|
||||
{% endif %}
|
||||
<div style="margin-bottom: 0.5em">
|
||||
<span class="time">
|
||||
{% with authors=post.authors.all() %}
|
||||
{%- if authors -%}
|
||||
<img src="{{gravatar(authors[0])}}" style="width: 1.5em; border-radius: 50%; margin-bottom: -0.3em">
|
||||
<span class="post-authors">{{ link_users(authors) }}</span>
|
||||
{%- endif -%}
|
||||
{% endwith %}
|
||||
•
|
||||
{{ relative_time(post.publish_on, abs=_('on {time}'), rel=_('{time}')) -}}
|
||||
{%- if post.sticky %} •
|
||||
<i title="Sticky" class="fa fa-star fa-fw"></i>{% endif -%}
|
||||
{% if post.is_organization_private and show_organization_private_icon %}
|
||||
•
|
||||
<span>
|
||||
{% for org in post.organizations.all() %}
|
||||
<span class="organization-tag" style="display: inherit;">
|
||||
<a href="{{ org.get_absolute_url() }}">
|
||||
<i class="fa fa-lock"></i> {{ org.name }}
|
||||
</a>
|
||||
</span>
|
||||
{% endfor %}
|
||||
</span>
|
||||
<span style="float: right">
|
||||
<a href="{{ url('blog_post', post.id, post.slug) }}#comments" class="blog-comment-count-link">
|
||||
<i class="fa fa-comments blog-comment-icon"></i>
|
||||
<span class="blog-comment-count">
|
||||
{{- post_comment_counts[post.id] or 0 -}}
|
||||
</span>
|
||||
</a>
|
||||
{% endif %}
|
||||
</span>
|
||||
<span style="float: right">
|
||||
<a href="{{ url('blog_post', post.id, post.slug) }}#comments" class="blog-comment-count-link">
|
||||
<i class="fa fa-comments blog-comment-icon"></i>
|
||||
<span class="blog-comment-count">
|
||||
{{- post_comment_counts[post.id] or 0 -}}
|
||||
</span>
|
||||
</a>
|
||||
</span>
|
||||
</div>
|
||||
<h2 class="title">
|
||||
<a href="{{ url('blog_post', post.id, post.slug) }}">{{ post.title }}</a>
|
||||
</h2>
|
||||
<div class="blog-description">
|
||||
<div class="summary content-description">
|
||||
{% cache 86400 'post_summary' post.id %}
|
||||
{{ post.summary|default(post.content, true)|markdown(lazy_load=True)|reference|str|safe }}
|
||||
{% endcache %}
|
||||
</div>
|
||||
<h2 class="title">
|
||||
<a href="{{ url('blog_post', post.id, post.slug) }}">{{ post.title }}</a>
|
||||
</h2>
|
||||
<div class="blog-description">
|
||||
<div class="summary content-description">
|
||||
{% cache 86400 'post_summary' post.id %}
|
||||
{{ post.summary|default(post.content, true)|markdown(lazy_load=True)|reference|str|safe }}
|
||||
{% endcache %}
|
||||
</div>
|
||||
{% set pagevote = post.pagevote %}
|
||||
{% set bookmark = post.bookmark %}
|
||||
{% set hide_actionbar_comment = True %}
|
||||
{% set include_hr = True %}
|
||||
{% set share_url = request.build_absolute_uri(post.get_absolute_url()) %}
|
||||
{% include "actionbar/list.html" %}
|
||||
</div>
|
||||
{% set pagevote = post.pagevote %}
|
||||
{% set bookmark = post.bookmark %}
|
||||
{% set hide_actionbar_comment = True %}
|
||||
{% set include_hr = True %}
|
||||
{% set share_url = request.build_absolute_uri(post.get_absolute_url()) %}
|
||||
{% include "actionbar/list.html" %}
|
||||
</div>
|
||||
</section>
|
|
@ -1,34 +1,34 @@
|
|||
<div class="sidebox dashboard">
|
||||
<h3>Dashboard <i class="fa fa-dashboard"></i>
|
||||
</h3>
|
||||
<div class="sidebox-content">
|
||||
<div class="user-gravatar">
|
||||
<img src="{{ gravatar(request.user, 135) }}"
|
||||
alt="gravatar" width="135px" height="135px">
|
||||
</div>
|
||||
<div class="recently-attempted">
|
||||
<h4>Recently attempted problems</h4>
|
||||
<ul>
|
||||
{% for code, name, problem_points, user_points, s_date in recently_attempted_problems %}
|
||||
<li>
|
||||
<a href="{{ url('problem_detail', code) }}">{{ name }}</a>
|
||||
[<a href="{{ url('user_submissions', code, request.user.username }}">
|
||||
{{- user_points }}/{{ problem_points|floatformat }}</a>]
|
||||
|
||||
<span class="time">
|
||||
<span data-unix="{{ submission.date|utc|date("c") }}"
|
||||
class="recent-time moment-time-toggle">
|
||||
{% trans time=submission.date|date(_("N j, Y, g:i a")) %}
|
||||
on {{ time }}
|
||||
{% endtrans %}
|
||||
</span>
|
||||
</span>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
<div class="recommended-problems">
|
||||
<h4>Recommended problems</h4><i>Coming soon.</i>
|
||||
</div>
|
||||
<h3>Dashboard <i class="fa fa-dashboard"></i>
|
||||
</h3>
|
||||
<div class="sidebox-content">
|
||||
<div class="user-gravatar">
|
||||
<img src="{{ gravatar(request.user, 135) }}"
|
||||
alt="gravatar" width="135px" height="135px">
|
||||
</div>
|
||||
<div class="recently-attempted">
|
||||
<h4>Recently attempted problems</h4>
|
||||
<ul>
|
||||
{% for code, name, problem_points, user_points, s_date in recently_attempted_problems %}
|
||||
<li>
|
||||
<a href="{{ url('problem_detail', code) }}">{{ name }}</a>
|
||||
[<a href="{{ url('user_submissions', code, request.user.username }}">
|
||||
{{- user_points }}/{{ problem_points|floatformat }}</a>]
|
||||
|
||||
<span class="time">
|
||||
<span data-unix="{{ submission.date|utc|date("c") }}"
|
||||
class="recent-time moment-time-toggle">
|
||||
{% trans time=submission.date|date(_("N j, Y, g:i a")) %}
|
||||
on {{ time }}
|
||||
{% endtrans %}
|
||||
</span>
|
||||
</span>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
<div class="recommended-problems">
|
||||
<h4>Recommended problems</h4><i>Coming soon.</i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -1,115 +1,115 @@
|
|||
{% extends "three-column-content.html" %}
|
||||
{% block three_col_media %}
|
||||
{% include "blog/media-css.html" %}
|
||||
{% include "actionbar/media-css.html" %}
|
||||
<style>
|
||||
@media (max-width: 799px) {
|
||||
.title {
|
||||
clear: both;
|
||||
}
|
||||
}
|
||||
.time {
|
||||
margin-left: 0;
|
||||
}
|
||||
{% include "blog/media-css.html" %}
|
||||
{% include "actionbar/media-css.html" %}
|
||||
<style>
|
||||
@media (max-width: 799px) {
|
||||
.title {
|
||||
clear: both;
|
||||
}
|
||||
}
|
||||
.time {
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
.no-clarifications-message {
|
||||
font-style: italic;
|
||||
text-align: center;
|
||||
}
|
||||
</style>
|
||||
.no-clarifications-message {
|
||||
font-style: italic;
|
||||
text-align: center;
|
||||
}
|
||||
</style>
|
||||
{% endblock %}
|
||||
|
||||
{% block three_col_js %}
|
||||
{% include "actionbar/media-js.html" %}
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function () {
|
||||
$('.time-remaining').each(function () {
|
||||
count_down($(this));
|
||||
});
|
||||
{% include "actionbar/media-js.html" %}
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function () {
|
||||
$('.time-remaining').each(function () {
|
||||
count_down($(this));
|
||||
});
|
||||
|
||||
$('.right-sidebar').hide();
|
||||
$('#event-tab').click(function (e) {
|
||||
e.preventDefault();
|
||||
$('.left-sidebar-item').removeClass('active');
|
||||
$('#event-tab').addClass('active');
|
||||
$('.middle-content').hide();
|
||||
$('.right-sidebar').show();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
$('.right-sidebar').hide();
|
||||
$('#event-tab').click(function (e) {
|
||||
e.preventDefault();
|
||||
$('.left-sidebar-item').removeClass('active');
|
||||
$('#event-tab').addClass('active');
|
||||
$('.middle-content').hide();
|
||||
$('.right-sidebar').show();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
{% endblock %}
|
||||
|
||||
{% block left_sidebar %}
|
||||
<div class="left-sidebar">
|
||||
{{ make_tab_item('blog', 'fa fa-rss', url('home'), _('News')) }}
|
||||
{{ make_tab_item('comment', 'fa fa-comments', url('comment_feed'), _('Comments')) }}
|
||||
{{ make_tab_item('ticket', 'fa fa-question-circle', url('ticket_feed'), _('Tickets')) }}
|
||||
{{ make_tab_item('event', 'fa fa-calendar', '#', _('Events')) }}
|
||||
</div>
|
||||
<div class="left-sidebar">
|
||||
{{ make_tab_item('blog', 'fa fa-rss', url('home'), _('News')) }}
|
||||
{{ make_tab_item('comment', 'fa fa-comments', url('comment_feed'), _('Comments')) }}
|
||||
{{ make_tab_item('ticket', 'fa fa-question-circle', url('ticket_feed'), _('Tickets')) }}
|
||||
{{ make_tab_item('event', 'fa fa-calendar', '#', _('Events')) }}
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
{% block middle_content %}
|
||||
{% set show_organization_private_icon=True %}
|
||||
{% if page_type == 'blog' %}
|
||||
{% for post in posts %}
|
||||
{% include "blog/content.html" %}
|
||||
{% endfor %}
|
||||
{% elif page_type == 'ticket' %}
|
||||
{% if tickets %}
|
||||
{% for ticket in tickets %}
|
||||
{% include "ticket/feed.html" %}
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
<h3 style="text-align: center">{{_('You have no ticket')}}</h3>
|
||||
{% endif %}
|
||||
{% elif page_type == 'comment' %}
|
||||
{% for comment in comments %}
|
||||
{% include "comments/feed.html" %}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{% if page_obj.num_pages > 1 %}
|
||||
<div style="margin-bottom:10px;margin-top:10px">{% include "list-pages.html" %}</div>
|
||||
{% set show_organization_private_icon=True %}
|
||||
{% if page_type == 'blog' %}
|
||||
{% for post in posts %}
|
||||
{% include "blog/content.html" %}
|
||||
{% endfor %}
|
||||
{% elif page_type == 'ticket' %}
|
||||
{% if tickets %}
|
||||
{% for ticket in tickets %}
|
||||
{% include "ticket/feed.html" %}
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
<h3 style="text-align: center">{{_('You have no ticket')}}</h3>
|
||||
{% endif %}
|
||||
{% elif page_type == 'comment' %}
|
||||
{% for comment in comments %}
|
||||
{% include "comments/feed.html" %}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{% if page_obj.num_pages > 1 %}
|
||||
<div style="margin-bottom:10px;margin-top:10px">{% include "list-pages.html" %}</div>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
{% block right_sidebar %}
|
||||
<div class="right-sidebar">
|
||||
{% if request.in_contest_mode and request.participation.contest.use_clarifications %}
|
||||
<div class="blog-sidebox sidebox">
|
||||
<h3>{{ _('Clarifications') }}
|
||||
<i class="fa fa-question-circle"></i>
|
||||
{% if can_edit_contest %}
|
||||
<a href="{{url('new_contest_clarification', request.participation.contest.key)}}"
|
||||
class="fa fa-plus-circle"
|
||||
id="add-clarification"
|
||||
title="{{_('Add')}}"
|
||||
style="color: lightcyan">
|
||||
</a>
|
||||
{% endif %}
|
||||
</h3>
|
||||
<div class="sidebox-content">
|
||||
{% if has_clarifications %}
|
||||
<ul>
|
||||
{% for clarification in clarifications %}
|
||||
<li class="clarification">
|
||||
<a href="{{ url('problem_detail', clarification.problem.problem.code) }}"
|
||||
class="problem">
|
||||
{{ clarification.problem.problem.name }}
|
||||
</a>
|
||||
<span class="time">{{ relative_time(clarification.date) }}</span>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% else %}
|
||||
<p class="no-clarifications-message">
|
||||
{{ _('No clarifications have been made at this time.') }}
|
||||
</p>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% include 'contests-countdown.html' %}
|
||||
{% include 'recent-organization.html' %}
|
||||
{% include 'top-users.html' %}
|
||||
</div>
|
||||
<div class="right-sidebar">
|
||||
{% if request.in_contest_mode and request.participation.contest.use_clarifications %}
|
||||
<div class="blog-sidebox sidebox">
|
||||
<h3>{{ _('Clarifications') }}
|
||||
<i class="fa fa-question-circle"></i>
|
||||
{% if can_edit_contest %}
|
||||
<a href="{{url('new_contest_clarification', request.participation.contest.key)}}"
|
||||
class="fa fa-plus-circle"
|
||||
id="add-clarification"
|
||||
title="{{_('Add')}}"
|
||||
style="color: lightcyan">
|
||||
</a>
|
||||
{% endif %}
|
||||
</h3>
|
||||
<div class="sidebox-content">
|
||||
{% if has_clarifications %}
|
||||
<ul>
|
||||
{% for clarification in clarifications %}
|
||||
<li class="clarification">
|
||||
<a href="{{ url('problem_detail', clarification.problem.problem.code) }}"
|
||||
class="problem">
|
||||
{{ clarification.problem.problem.name }}
|
||||
</a>
|
||||
<span class="time">{{ relative_time(clarification.date) }}</span>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% else %}
|
||||
<p class="no-clarifications-message">
|
||||
{{ _('No clarifications have been made at this time.') }}
|
||||
</p>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% include 'contests-countdown.html' %}
|
||||
{% include 'recent-organization.html' %}
|
||||
{% include 'top-users.html' %}
|
||||
</div>
|
||||
{% endblock %}
|
|
@ -1,30 +1,30 @@
|
|||
<style>
|
||||
.user-gravatar {
|
||||
display: inline-block;
|
||||
padding-right: 15px;
|
||||
padding-top: 8px;
|
||||
width: 135px;
|
||||
}
|
||||
.user-gravatar {
|
||||
display: inline-block;
|
||||
padding-right: 15px;
|
||||
padding-top: 8px;
|
||||
width: 135px;
|
||||
}
|
||||
|
||||
.user-gravatar img {
|
||||
width: 135px;
|
||||
height: 135px;
|
||||
display: block;
|
||||
border-radius: 6px;
|
||||
}
|
||||
.user-gravatar img {
|
||||
width: 135px;
|
||||
height: 135px;
|
||||
display: block;
|
||||
border-radius: 6px;
|
||||
}
|
||||
|
||||
.recently-attempted, .recommended-problems {
|
||||
display: inline-block;
|
||||
}
|
||||
.recently-attempted, .recommended-problems {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.recently-attempted ul {
|
||||
list-style: none;
|
||||
padding-left: 1em;
|
||||
padding-right: .5em;
|
||||
margin: 0.2em;
|
||||
}
|
||||
.recently-attempted ul {
|
||||
list-style: none;
|
||||
padding-left: 1em;
|
||||
padding-right: .5em;
|
||||
margin: 0.2em;
|
||||
}
|
||||
|
||||
.recently-attempted h4, .recommended-problems h4 {
|
||||
font-weight: 500;
|
||||
}
|
||||
.recently-attempted h4, .recommended-problems h4 {
|
||||
font-weight: 500;
|
||||
}
|
||||
</style>
|
Loading…
Add table
Add a link
Reference in a new issue