From cf4ae5aa124954162cc24e759a0845157c28d3c2 Mon Sep 17 00:00:00 2001 From: virusdefender <1670873886@qq.com> Date: Sun, 2 Aug 2015 16:58:41 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E9=A2=98=E7=9B=AE=E5=88=97?= =?UTF-8?q?=E8=A1=A8=E9=A1=B5=E5=92=8C=E9=83=A8=E5=88=86=20ajax=20js=20[CI?= =?UTF-8?q?=20SKIP]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- oj/urls.py | 2 +- static/src/css/oj.css | 10 +++ static/src/js/app/oj/problem/problem_list.js | 6 ++ template/oj/index.html | 2 +- template/oj/problem/problem.html | 2 +- template/oj/problem/problem_list.html | 91 ++++++++++++++++++++ template/oj_base.html | 23 ++++- 7 files changed, 129 insertions(+), 7 deletions(-) create mode 100644 static/src/js/app/oj/problem/problem_list.js create mode 100644 template/oj/problem/problem_list.html diff --git a/oj/urls.py b/oj/urls.py index c9b9607..260a42a 100644 --- a/oj/urls.py +++ b/oj/urls.py @@ -15,5 +15,5 @@ urlpatterns = [ url(r'^problem/(?P\d+)/$', "problem.views.problem_page", name="problem_page"), url(r'^admin/contest/$', TemplateView.as_view(template_name="admin/contest/add_contest.html"), name="add_contest_page"), - + url(r'^problems/$', TemplateView.as_view(template_name="oj/problem/problem_list.html"), name="problem_list_page"), ] diff --git a/static/src/css/oj.css b/static/src/css/oj.css index 4cbaf03..fcf80dd 100644 --- a/static/src/css/oj.css +++ b/static/src/css/oj.css @@ -75,4 +75,14 @@ label { #submit-code-button{ margin: 10px; +} + +li.list-group-item { + padding: 10px 15px; + margin-bottom: -1px; + border: 1px solid #e5e5e5; +} + +.panel>.list-group{ + padding: 0 0; } \ No newline at end of file diff --git a/static/src/js/app/oj/problem/problem_list.js b/static/src/js/app/oj/problem/problem_list.js new file mode 100644 index 0000000..2219946 --- /dev/null +++ b/static/src/js/app/oj/problem/problem_list.js @@ -0,0 +1,6 @@ +require(["jquery", "avalon"], function($, avalon){ + var vm = avalon.define({ + $id: "problem_list", + problem_list: [] + }) +}); \ No newline at end of file diff --git a/template/oj/index.html b/template/oj/index.html index 65c67f2..156a452 100644 --- a/template/oj/index.html +++ b/template/oj/index.html @@ -8,7 +8,7 @@

走心的在线评测平台和算法交流社区,全新登场~

-

开始刷题!

+

开始刷题!

diff --git a/template/oj/problem/problem.html b/template/oj/problem/problem.html index 8cb9b06..0cdbce9 100644 --- a/template/oj/problem/problem.html +++ b/template/oj/problem/problem.html @@ -89,5 +89,5 @@ {% endblock %} {% block js_block %} - + {% endblock %} \ No newline at end of file diff --git a/template/oj/problem/problem_list.html b/template/oj/problem/problem_list.html new file mode 100644 index 0000000..3446e1b --- /dev/null +++ b/template/oj/problem/problem_list.html @@ -0,0 +1,91 @@ +{% extends "oj_base.html" %} +{% block body %} +
+
+
+
+
+ +
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
#题目难度通过率
1MarkOtto@mdo
2JacobThornton@fat
3Larrythe Bird@twitter
+
+
+
+
+
+

+ + 公告 +

+
Panel content
+
+
+
+

+ + 分类 +

+
+
    +
  • + 14 + Cras justo odio +
  • +
  • + 14 + Cras justo odio +
  • +
  • + 14 + Cras justo odio +
  • +
  • + 14 + Cras justo odio +
  • +
  • + 14 + Cras justo odio +
  • +
+
+ +
+
+
+{% endblock %} + +{% block js_block %} + +{% endblock %} \ No newline at end of file diff --git a/template/oj_base.html b/template/oj_base.html index 0fb7942..0cfcf82 100644 --- a/template/oj_base.html +++ b/template/oj_base.html @@ -38,14 +38,16 @@ - qduoj + qduoj @@ -88,6 +99,10 @@ + + {% block js_block %}{% endblock %}