From ab63ac652fc2ee838ce58e8caa1a6dd8ec3b66f7 Mon Sep 17 00:00:00 2001 From: virusdefender <1670873886@qq.com> Date: Thu, 6 Aug 2015 23:47:28 +0800 Subject: [PATCH 1/6] =?UTF-8?q?=E5=88=86=E7=A6=BB=E5=85=AC=E5=85=B1=20js?= =?UTF-8?q?=EF=BC=9B=E4=BF=AE=E6=94=B9=20footer=20=E6=95=88=E6=9E=9C?= =?UTF-8?q?=EF=BC=8C=E5=9B=BA=E5=AE=9A=E5=9C=A8=E5=BA=95=E9=83=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- static/src/css/admin.css | 24 +++++++----------------- static/src/css/global.css | 15 +++++++++++++++ static/src/css/oj.css | 19 ------------------- 3 files changed, 22 insertions(+), 36 deletions(-) create mode 100644 static/src/css/global.css diff --git a/static/src/css/admin.css b/static/src/css/admin.css index 75fc901..e54f0e3 100644 --- a/static/src/css/admin.css +++ b/static/src/css/admin.css @@ -1,25 +1,15 @@ +@import url("global.css"); @import url("bootstrap/bootstrap.min.css"); @import url("bootstrap/todc-bootstrap.min.css"); @import url("codeMirror/codemirror.css"); @import url("simditor/simditor.css"); @import url("webuploader/webuploader.css"); @import url("datetime_picker/bootstrap-datetimepicker.css"); -html, body { - height: 100%; -} -img { - max-width: 100%; - height: auto; -} - -.footer { - padding-top: 30px; - padding-bottom: 30px; - float: bottom; - bottom: 0; -} - -label { - font-size: 16px; +#loading-gif{ + width: 40px; + height: 40px; + margin: auto; + position: absolute; + top: 0; left: 0; bottom: 0; right: 0; } \ No newline at end of file diff --git a/static/src/css/global.css b/static/src/css/global.css new file mode 100644 index 0000000..edc04a7 --- /dev/null +++ b/static/src/css/global.css @@ -0,0 +1,15 @@ +img { + max-width: 100%; + height: auto; +} + +.footer { + left: 0; + right: 0; + position: absolute; + bottom: 30px; +} + +label { + font-size: 16px; +} \ No newline at end of file diff --git a/static/src/css/oj.css b/static/src/css/oj.css index fcf80dd..5e1bfc5 100644 --- a/static/src/css/oj.css +++ b/static/src/css/oj.css @@ -1,25 +1,7 @@ @import url("bootstrap/bootstrap.min.css"); @import url("bootstrap/todc-bootstrap.min.css"); @import url("codeMirror/codemirror.css"); -html, body { - height: 100%; -} -img { - max-width: 100%; - height: auto; -} - -.footer { - padding-top: 30px; - padding-bottom: 30px; - float: bottom; - bottom: 0; -} - -label { - font-size: 16px; -} #language-selector { width: 130px; @@ -47,7 +29,6 @@ label { font-size: 15px; } -/* index css */ .jumbotron { text-align: center; background-color: transparent; From d6a36fe20ce722b89e06d8e81337626b557c4a89 Mon Sep 17 00:00:00 2001 From: virusdefender <1670873886@qq.com> Date: Thu, 6 Aug 2015 23:47:54 +0800 Subject: [PATCH 2/6] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=A8=A1=E6=9D=BF?= =?UTF-8?q?=E5=8A=A0=E8=BD=BD=E6=95=88=E6=9E=9C=E5=92=8C=E5=AF=B9=E5=BA=94?= =?UTF-8?q?=E7=9A=84=20js=20=E6=8E=A7=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- static/src/js/app/admin/admin.js | 6 +++++- template/admin/admin.html | 4 ++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/static/src/js/app/admin/admin.js b/static/src/js/app/admin/admin.js index d3e30ac..b44f575 100644 --- a/static/src/js/app/admin/admin.js +++ b/static/src/js/app/admin/admin.js @@ -20,12 +20,16 @@ define("admin", ["jquery", "avalon"], function($, avalon){ if(hash){ li_inactive(".list-group-item"); li_active("#li-" + hash); + $("#loading-gif").show(); vm.template_url = "template/index/" + hash + ".html"; } }; var vm = avalon.define({ $id: "admin", - template_url: "template/index/index.html" + template_url: "template/index/index.html", + hide_loading: function(){ + $("#loading-gif").hide(); + } }); }); \ No newline at end of file diff --git a/template/admin/admin.html b/template/admin/admin.html index c712084..6ec5a4e 100644 --- a/template/admin/admin.html +++ b/template/admin/admin.html @@ -81,9 +81,9 @@ - + -
+
From a66b755aa3327acd024db892e2e616be707646f1 Mon Sep 17 00:00:00 2001 From: virusdefender <1670873886@qq.com> Date: Fri, 7 Aug 2015 17:11:20 +0800 Subject: [PATCH 3/6] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=20footer=20=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=E4=BD=8D=E7=BD=AE=E9=94=99=E8=AF=AF=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- static/src/css/global.css | 16 ++++++++++++++-- static/src/css/oj.css | 1 + 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/static/src/css/global.css b/static/src/css/global.css index edc04a7..c55a0bb 100644 --- a/static/src/css/global.css +++ b/static/src/css/global.css @@ -1,3 +1,16 @@ +html{ + height: 100%; +} + +body{ + height:100%; /*使内容高度和body一样*/ + margin-bottom:-80px;/*向上缩减80像素,不至于footer超出屏幕可视范围*/ +} + +.main{ + padding-bottom: 120px; +} + img { max-width: 100%; height: auto; @@ -6,8 +19,7 @@ img { .footer { left: 0; right: 0; - position: absolute; - bottom: 30px; + height: 80px } label { diff --git a/static/src/css/oj.css b/static/src/css/oj.css index 5e1bfc5..cc6ac62 100644 --- a/static/src/css/oj.css +++ b/static/src/css/oj.css @@ -1,3 +1,4 @@ +@import url("global.css"); @import url("bootstrap/bootstrap.min.css"); @import url("bootstrap/todc-bootstrap.min.css"); @import url("codeMirror/codemirror.css"); From 2475407597b9f9078a319f286c9c64beacb55914 Mon Sep 17 00:00:00 2001 From: virusdefender <1670873886@qq.com> Date: Fri, 7 Aug 2015 17:12:08 +0800 Subject: [PATCH 4/6] =?UTF-8?q?=E5=89=8D=E5=8F=B0=E7=BD=91=E9=A1=B5?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=96=B0=E7=9A=84=20class=EF=BC=8C=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D=20footer=20=E6=98=BE=E7=A4=BA=E4=BD=8D=E7=BD=AE?= =?UTF-8?q?=E9=94=99=E8=AF=AF=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- template/oj/account/change_password.html | 2 +- template/oj/account/login.html | 2 +- template/oj/account/register.html | 2 +- template/oj/contest/problems.html | 2 +- template/oj/problem/problem.html | 2 +- template/oj/problem/problem_list.html | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/template/oj/account/change_password.html b/template/oj/account/change_password.html index 65de447..dd0d84e 100644 --- a/template/oj/account/change_password.html +++ b/template/oj/account/change_password.html @@ -1,6 +1,6 @@ {% extends "oj_base.html" %} {% block body %} -
+

修改密码

diff --git a/template/oj/account/login.html b/template/oj/account/login.html index e9ddbf2..fb4249b 100644 --- a/template/oj/account/login.html +++ b/template/oj/account/login.html @@ -1,6 +1,6 @@ {% extends "oj_base.html" %} {% block body %} -
+

用户登录

diff --git a/template/oj/account/register.html b/template/oj/account/register.html index 34dc9a4..02d66c8 100644 --- a/template/oj/account/register.html +++ b/template/oj/account/register.html @@ -1,6 +1,6 @@ {% extends "oj_base.html" %} {% block body %} -
+

用户注册

diff --git a/template/oj/contest/problems.html b/template/oj/contest/problems.html index 88dd9d2..450415f 100644 --- a/template/oj/contest/problems.html +++ b/template/oj/contest/problems.html @@ -1,6 +1,6 @@ {% extends "oj_base.html" %} {% block body %} -
+