diff --git a/README.md b/README.md index 043cae0..4d9c036 100644 --- a/README.md +++ b/README.md @@ -8,9 +8,10 @@ demo: https://qduoj.com TODO: + - 将判题服务器改为 rpc 通信 + - 重构消息队列 - 完善测试 - 完善小组功能 - - 后台重构 ![oj_previewindex.png][1] diff --git a/account/views.py b/account/views.py index 759e438..c92d04f 100644 --- a/account/views.py +++ b/account/views.py @@ -62,10 +62,9 @@ def index_page(request): if not request.user.is_authenticated(): return render(request, "oj/index.html") - try: - if request.META['HTTP_REFERER']: + if request.META.get('HTTP_REFERER') or request.GET.get("index"): return render(request, "oj/index.html") - except KeyError: + else: return http.HttpResponseRedirect('/problems/') diff --git a/static/src/img/index/bg/bg0.jpg b/static/src/img/index/bg/bg0.jpg new file mode 100644 index 0000000..02c9417 Binary files /dev/null and b/static/src/img/index/bg/bg0.jpg differ diff --git a/static/src/img/index/bg/bg1.jpg b/static/src/img/index/bg/bg1.jpg new file mode 100644 index 0000000..4d4862f Binary files /dev/null and b/static/src/img/index/bg/bg1.jpg differ diff --git a/static/src/img/index/bg/bg2.jpg b/static/src/img/index/bg/bg2.jpg new file mode 100644 index 0000000..aa80557 Binary files /dev/null and b/static/src/img/index/bg/bg2.jpg differ diff --git a/static/src/img/index/bg/bg3.jpg b/static/src/img/index/bg/bg3.jpg new file mode 100644 index 0000000..5c4b58f Binary files /dev/null and b/static/src/img/index/bg/bg3.jpg differ diff --git a/template/src/oj/index.html b/template/src/oj/index.html index 4a8edd3..0245084 100644 --- a/template/src/oj/index.html +++ b/template/src/oj/index.html @@ -100,6 +100,15 @@ max-width: 300px; } + .section{ + background-size: cover; + } + + #section0{ + background-image: url(/static/img/index/bg/bg3.jpg); + padding: 0 0 0 0; + } + @@ -110,12 +119,21 @@ @@ -172,7 +190,7 @@
-

自由举办小组赛(10月上线)

+

自由举办小组赛(12月上线)

内部比赛,日常作业,期末考试,通通搞定