Initial subdomain implementation
This commit is contained in:
parent
dea24f7f71
commit
1628e63084
17 changed files with 194 additions and 46 deletions
|
@ -1,6 +1,11 @@
|
|||
{% extends "base.html" %}
|
||||
|
||||
{% block body %}
|
||||
{% if request.organization %}
|
||||
{% cache 3600 'organization_html' request.organization.id MATH_ENGINE %}
|
||||
{{ request.organization.about|markdown|reference|str|safe }}
|
||||
{% endcache %}
|
||||
{% else %}
|
||||
<h4>
|
||||
<a target="_blank" href="">LQDOJ (Le Quy Don Online Judge)</a> là một trang web chấm bài tự động được phát triển dựa trên nền tảng mã nguồn mở <a target="_blank" href="https://dmoj.ca/">DMOJ</a>. Được xây dựng với mục đích ban đầu là tạo ra một môi trường học tập cho học sinh khối chuyên Tin <a target="_blank" href="http://thpt-lequydon-danang.edu.vn/">trường THPT chuyên Lê Quý Đôn (TP Đà Nẵng)</a>, hiện nay LQDOJ đã cho phép đăng ký tự do để trở thành một sân chơi rộng mở cho toàn bộ cộng đồng học sinh yêu Tin học. Trang web cung cấp lượng bài luyện tập đồ sộ từ các kỳ thi HSG Quốc Gia, ACM ICPC, Olympic Duyên Hải Bắc Bộ, etc. cho đến các contest định kỳ để xếp loại khả năng (rating) giúp các bạn có thêm động lực cạnh tranh và khí thế phấn đấu rèn luyện nâng cao trình độ lập trình. Các bạn có thể tham khảo mã nguồn của trang web tại <a target="_blank" href="https://github.com/LQDJudge/online-judge">Github repo chính thức</a>. Mọi ý kiến đóng góp và thắc mắc xin gửi về:
|
||||
<ul>
|
||||
|
@ -9,5 +14,6 @@
|
|||
<li><a target="_blank" href="https://www.facebook.com/profile.php?id=100011662657075">Lê Phước Định</a> (handle: <span class="rating rate-grandmaster user"><a target="_blank" href="../user/cuom1999">cuom1999</a></span>), email: <a href="mailto:dinh@lqdoj.edu.vn">dinh@lqdoj.edu.vn</a></li>
|
||||
<li><a target="_blank" href="https://www.facebook.com/doannguyenthanhluong">Đoàn Nguyễn Thành Lương</a> (handle: <span class="rating rate-master user"><a target="_blank" href="../user/CaiWinDao">CaiWinDao</a></span>), email: <a href="mailto:luong@lqdoj.edu.vn">luong@lqdoj.edu.vn</a></li>
|
||||
</ul>
|
||||
</h4>
|
||||
</h4>
|
||||
{% endif %}
|
||||
{% endblock %}
|
|
@ -31,7 +31,7 @@
|
|||
{# Allow users to leave the virtual contest #}
|
||||
{% if in_contest %}
|
||||
<form action="{{ url('contest_leave', contest.key) }}" method="post"
|
||||
class="contest-join-pseudotab btn-midnightblue">
|
||||
class="contest-join-pseudotab btn-red">
|
||||
{% csrf_token %}
|
||||
<input type="submit" class="leaving-forever" value="{{ _('Leave contest') }}">
|
||||
</form>
|
||||
|
@ -77,12 +77,19 @@
|
|||
<input type="submit" class="btn-midnightblue" value="{{ _('Login to participate') }}">
|
||||
</form>
|
||||
{% endif %}
|
||||
|
||||
|
||||
<div class="content-description">
|
||||
{% cache 3600 'contest_html' contest.id MATH_ENGINE %}
|
||||
{{ contest.description|markdown|reference|str|safe }}
|
||||
{% endcache %}
|
||||
</div>
|
||||
{% if editable_organizations %}
|
||||
<div>
|
||||
{% for org in editable_organizations %}
|
||||
<span> [<a href="{{ url('organization_contest_edit', org.id , org.slug , contest.key) }}">{{ _('Edit in') }} {{org.slug}}</a>]</span>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if contest.ended or request.user.is_superuser or is_editor or is_tester %}
|
||||
<hr>
|
||||
|
|
|
@ -13,7 +13,14 @@
|
|||
{% block middle_title %}
|
||||
<div class="page-title">
|
||||
<div class="tabs" style="border: none;">
|
||||
<h2><img src="{{logo_override_image}}" style="height: 3rem; vertical-align: middle"> <span>{{title}}</span></h2>
|
||||
<h2><img src="{{logo_override_image}}" style="height: 3rem; vertical-align: middle">
|
||||
{{title}}
|
||||
</h2>
|
||||
{% if is_member %}
|
||||
<div>
|
||||
<a href="{{organization_subdomain}}" target="_blank">(Subdomain)</a>
|
||||
</div>
|
||||
{% endif %}
|
||||
<span class="spacer"></span>
|
||||
|
||||
{% if request.user.is_authenticated %}
|
||||
|
|
|
@ -1,7 +1,9 @@
|
|||
{% if not request.in_contest_mode %}
|
||||
{% if not show_contest_mode %}
|
||||
<div class="left-sidebar">
|
||||
{{ make_tab_item('feed', 'fa fa-pagelines', url('problem_feed'), _('Feed')) }}
|
||||
{{ make_tab_item('list', 'fa fa-list', url('problem_list'), _('List')) }}
|
||||
{% if request.user.is_superuser %}
|
||||
{{ make_tab_item('admin', 'fa fa-edit', url('admin:judge_problem_changelist'), _('Admin')) }}
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endif %}
|
|
@ -248,13 +248,7 @@
|
|||
{% endblock %}
|
||||
|
||||
{% block left_sidebar %}
|
||||
{% if not show_contest_mode %}
|
||||
<div class="left-sidebar">
|
||||
{{ make_tab_item('feed', 'fa fa-pagelines', url('problem_feed'), _('Feed')) }}
|
||||
{{ make_tab_item('list', 'fa fa-list', url('problem_list'), _('List')) }}
|
||||
{{ make_tab_item('admin', 'fa fa-edit', url('admin:judge_problem_changelist'), _('Admin')) }}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% include "problem/left-sidebar.html" %}
|
||||
{% endblock %}
|
||||
|
||||
{% block right_sidebar %}
|
||||
|
|
|
@ -1,7 +1,9 @@
|
|||
{% if request.in_contest_mode and request.participation.contest.logo_override_image %}
|
||||
<img data-src="{{ request.participation.contest.logo_override_image|camo }}" alt="{{ SITE_NAME }}" height="44" style="border: none">
|
||||
<img src="{{ request.participation.contest.logo_override_image|camo }}" alt="{{ SITE_NAME }}" height="44" style="border: none">
|
||||
{% elif request.organization %}
|
||||
<img src="{{ request.organization.logo_override_image|camo }}" alt="{{ SITE_NAME }}" height="44" style="border: none">
|
||||
{% elif logo_override_image is defined and logo_override_image %}
|
||||
<img data-src="{{ logo_override_image|camo }}" alt="{{ SITE_NAME }}" height="44" style="border: none">
|
||||
<img src="{{ logo_override_image|camo }}" alt="{{ SITE_NAME }}" height="44" style="border: none">
|
||||
{% else %}
|
||||
<img src="{{ static('icons/logo.png') }}" alt="{{ SITE_NAME }}" height="44"
|
||||
onerror="this.src="{{ static('icons/logo.png') }}"; this.onerror=null" style="border: none">
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue