diff --git a/frontend/static/main.css b/frontend/static/main.css
index f9a9616..96a1cda 100644
--- a/frontend/static/main.css
+++ b/frontend/static/main.css
@@ -63,7 +63,7 @@ table {
.content {
margin: 0 auto 2em;
padding: 0 1em;
- max-width: 72em;
+ max-width: 81em;
}
@media screen and (min-width: 48em) {
.content {
@@ -121,7 +121,7 @@ h1 {
}
@media screen and (min-width: 48em) {
.challenges {
- max-width: 25em;
+ max-width: 28em;
margin-left: 1em;
}
}
@@ -189,3 +189,11 @@ table .narrow {
max-width: 50%;
width: 100%;
}
+/* revert changes by purecss in form */
+#token {
+ border: revert;
+ background-color: revert;
+ padding: revert;
+ vertical-align: revert;
+ border-radius: revert;
+}
\ No newline at end of file
diff --git a/frontend/templates/hub.html b/frontend/templates/hub.html
index 96f8ae7..3201f79 100644
--- a/frontend/templates/hub.html
+++ b/frontend/templates/hub.html
@@ -90,7 +90,7 @@
{{ challenge.category }} |
{{ challenge.score }} |
- {{ (clear_count.challenges.find(i=>i.challenge===challenge.pk)||{count:0}).count }} |
+ {{ get_challenge_count(challenge) }} |
@@ -101,7 +101,7 @@
|
|
{{ flag.score }} |
- {{ (clear_count.flags.find(i=>i.challenge===challenge.pk&&i.flag===flag_index)||{count:0}).count }} |
+ {{ get_subchallenge_count(challenge, flag_index) }} |
@@ -216,6 +216,25 @@ {{ opened.name }}
} while (!color.valid());
return color.hex();
},
+ get_challenge_count(challenge) {
+ let count = (this.clear_count.flags.find(i => i.challenge === challenge.pk) || {count: 0}).count;
+ // are there any sub-flags?
+ if (challenge.flags.length > 1) {
+ let max_sub = 0;
+ for (let j = 0; j < challenge.flags.length; j++) {
+ let sub_count = this.get_subchallenge_count(challenge, j);
+ if (sub_count > max_sub) {
+ max_sub = sub_count;
+ }
+ }
+ return `${count} (${max_sub})`;
+ }
+ return count;
+ },
+ get_subchallenge_count(challenge, flag_index) {
+ let count = (this.clear_count.flags.find(i => i.challenge === challenge.pk && i.flag === flag_index) || {count: 0}).count;
+ return count;
+ }
},
updated: function () {
this.$nextTick(function () {
diff --git a/frontend/templates/profile.html b/frontend/templates/profile.html
index e688b73..e3f664c 100644
--- a/frontend/templates/profile.html
+++ b/frontend/templates/profile.html
@@ -19,7 +19,15 @@ 修改个人信息
如果你看到这条消息,说明你的浏览器版本过低或网络存在问题,导致比赛平台不能正常加载。请忽略以下显示的任何信息,换用最新版 Firefox 或 Chrome 浏览器访问比赛平台。
+
+
+
+
+
+ Token 是一些题目的登录凭证,禁止分享,否则视为作弊
{{ i }}
@@ -89,6 +97,21 @@
修改个人信息
{{ user_.json|json_script:'json-user' }}
{{ profile_required|json_script:'json-profile_required' }}
+{% endblock %}
{% block content %}
+{% verbatim %}
+
+{% endverbatim %}
+{{ user_.json|json_script:'json-user' }}
+
{% endblock %}