Browse Source

适配入围答辩阶段

master
欧醚 4 years ago
parent
commit
f233b1b3b1
Signed by: OmmyZhang GPG Key ID: 757D312E7C9D13F7
2 changed files with 53 additions and 7 deletions
  1. +1
    -1
      app.py
  2. +52
    -6
      templates/list.html

+ 1
- 1
app.py View File

@ -122,7 +122,7 @@ def can_list():
} for name, ques, hint, ans in C.verify
]
return render_template('list.html', pagination=pag, vs=vs, verified=session.get('verified'), showPrivate=(key==C.key), sort_by=sort_by, key=key, base_toot_url='https://%s/web/statuses/' % C.domain)
return render_template('list.html', pagination=pag, vs=vs, verified=session.get('verified'), showPrivate=(key==C.key), sort_by=sort_by, key=key, base_toot_url='https://%s/web/statuses/' % C.domain, step2=C.step2, text1=C.text1, text2=C.text2)
@app.route('/ordinary/new', methods=['POST'])
@limiter.limit("5 / hour; 1 / 2 second")

+ 52
- 6
templates/list.html View File

@ -11,6 +11,10 @@
<meta property="og:description" content="华清大学特普通奖学金" />
<link href="https://cdn.bootcss.com/twitter-bootstrap/4.3.1/css/bootstrap.min.css" rel="stylesheet">
<title>华清大学特普通奖 报名页面</title>
<script>
if(navigator.userAgent.search('MicroMessenger') !== -1)
location.href = `https://closed.social/tools/safe_jump/?go=${encodeURIComponent(location.href)}&t=${encodeURIComponent('华清大学特普通奖学金')}`;
</script>
<style>
body,
pre {
@ -60,6 +64,20 @@
margin: 20px;
}
.step2-info{
background-color: #eee9;
padding: 10px;
overflow: hidden;
}
{% if step2 %}
@media screen and (max-width: 600px) {
.part1 {
display: none;
}
}
{% endif %}
.part1 {
max-width: 500px;
float: left;
@ -81,6 +99,10 @@
margin: 5px 5px 40px;
}
.qbox.qbox-grey {
background: #eee;
}
.new .qbox {
background: black;
color: white;
@ -196,6 +218,15 @@
margin: 10px 0 0;
float: bottom;
}
@keyframes loop {
0% {
transform: translateX(100%);
}
100% {
transform: translateX(-50%);
}
}
</style>
</head>
@ -205,6 +236,20 @@
<img src="/img/ord/logo.png" width="200px" />
</div>
{% if step2 %}
<div class="step2-info">
<button type="button" class="close" aria-label="Close">
<span>&times;</span>
</button>
<p>现已进入“答辩”阶段。入围的选手会在闭社平台上发布更详细的陈述,并与观众在评论区互动。前往 <a href="https://thu.closed.social/tags/%E7%89%B9%E6%99%AE%E9%80%9A%E5%A5%96%E7%AD%94%E8%BE%A9">thu.closed.social/tags/特普通奖答辩</a> 围观。</p>
<ul>
{% for id, url in step2.get('cand', []) %}
<li style="animation: {{id*37 % 23 + 5}}s loop linear infinite;"><a href="{{url}}">{{id}}号选手</a></li>
{% endfor %}
</ul>
</div>
{% endif %}
<div class="part1">
{% if not verified %}
<form action="verify" method="post" class="verify-box">
@ -226,12 +271,9 @@
<form action="new" method="post">
<div class="form-group qbox">
<h1 style="margin: -14px -13px 20px">自荐提名</h1>
<textarea class="form-control" name="text" rows="5" maxlength="4000" placeholder="
一段自我陈述,
向大家展示普通的自己。" required="required"></textarea>
<textarea class="form-control" name="text" rows="5" maxlength="4000" placeholder="{{text1}}" required="required"></textarea>
<hr />
<textarea class="form-control" name="privateText" rows="4" maxlength="1000" placeholder="不想公开,但想被评委们看到的内容。
如有意正式提名,请于此留下自己的联系方式。"></textarea>
<textarea class="form-control" name="privateText" rows="4" maxlength="1000" placeholder="{{text2}}"></textarea>
<hr />
<div class="form-group row">
<label for="url" class="col-sm-3 col-form-label">补充材料</label>
@ -305,7 +347,7 @@
</span>
</div>
{% for c in pagination.items %}
<div class="qbox">
<div class="qbox {{'qbox-grey' if step2.get('end') and c.id > step2['end'] else ''}}">
<small>No. {{c.id}}</small>
<pre class="inner">{{c.content}}</pre>
{% if showPrivate %}
@ -403,6 +445,10 @@
$(document).ready(function(){
$('.timeago').timeago();
$('.close').click((e) => {
$(e.currentTarget).parent().remove();
});
$('.twin').click((e) => {
if($(e.currentTarget).hasClass('front'))
return;

Loading…
Cancel
Save