华清大学特普通奖学金初选报名系统
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

503 lines
17 KiB

4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
  1. <!DOCTYPE html>
  2. <html lang="zh-CN">
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
  6. <link rel="icon" type="image/png" href="/img/ord/icon-128.png" />
  7. <link href="https://fonts.yecdn.com/css2?family=Noto+Serif+SC:wght@300;700&display=swap" rel="stylesheet">
  8. <link href="https://fonts.yecdn.com/css2?family=Noto+Sans+SC&display=swap" rel="stylesheet">
  9. <meta property="og:title" content="华清大学特普通奖学金 报名页面" />
  10. <meta property="og:description" content="华清大学特普通奖学金" />
  11. <link href="https://cdn.bootcss.com/twitter-bootstrap/4.3.1/css/bootstrap.min.css" rel="stylesheet">
  12. <title>华清大学特普通奖 报名页面</title>
  13. <script>
  14. if(navigator.userAgent.search('MicroMessenger') !== -1)
  15. location.href = `https://closed.social/tools/safe_jump/?go=${encodeURIComponent(location.href)}&t=${encodeURIComponent('华清大学特普通奖学金')}`;
  16. </script>
  17. <style>
  18. body,
  19. pre {
  20. font-family: 'Noto Sans SC', sans-serif;
  21. }
  22. h1,
  23. h2,
  24. h3,
  25. h4,
  26. h5,
  27. h6,
  28. .sort-by{
  29. font-family: 'Noto Serif SC', serif;
  30. font-weight: 300;
  31. }
  32. .sort-by b {
  33. font-weight: 700;
  34. }
  35. a,
  36. a:hover,
  37. .btn-link,
  38. .btn-link:hover {
  39. color: inherit;
  40. text-decoration: underline;
  41. }
  42. nav .page-link {
  43. color: #000;
  44. }
  45. nav .page-item.active .page-link {
  46. background-color: #000;
  47. border-color: #000;
  48. }
  49. .btn-lg {
  50. font-size: 2em;
  51. font-family: 'Noto Serif SC', serif;
  52. }
  53. .verify-box {
  54. padding: 20px;
  55. background-color: #8884;
  56. margin: 20px;
  57. }
  58. .step2-info{
  59. background-color: #eee9;
  60. padding: 10px;
  61. overflow: hidden;
  62. }
  63. {% if step2 %}
  64. @media screen and (max-width: 600px) {
  65. .part1 {
  66. display: none;
  67. }
  68. }
  69. {% endif %}
  70. .part1 {
  71. max-width: 500px;
  72. float: left;
  73. padding-right: 10px;
  74. position: relative;
  75. }
  76. .part2 {
  77. min-width: 200px;
  78. overflow: hidden;
  79. padding-left: 25px;
  80. }
  81. .qbox {
  82. border: 2px black solid;
  83. background: white;
  84. padding: 5px;
  85. color: black;
  86. margin: 5px 5px 40px;
  87. }
  88. .qbox.qbox-grey {
  89. background: #eee;
  90. }
  91. .new .qbox {
  92. background: black;
  93. color: white;
  94. }
  95. .judge .qbox {
  96. background: white;
  97. color: black;
  98. padding: 5px 15px;
  99. }
  100. .twin.new .qbox input,
  101. .twin.new .qbox textarea {
  102. border-bottom: 2px solid;
  103. background: black;
  104. color: white;
  105. }
  106. .verify-box input {
  107. background: #0000;
  108. padding: 0;
  109. }
  110. .verify-box input,
  111. .twin .qbox input,
  112. .twin .qbox textarea {
  113. border: none;
  114. border-bottom: 1px solid;
  115. border-radius: 0;
  116. }
  117. .qbox .inner {
  118. margin: 15px 0 20px 15px;
  119. white-space: pre-wrap;
  120. }
  121. .like {
  122. fill: #fff;
  123. }
  124. .liked {
  125. fill: #000;
  126. }
  127. .timeago {
  128. font-size: 0.5em;
  129. margin-right: 10px;
  130. }
  131. .display_name {
  132. margin: 0;
  133. }
  134. .card-body {
  135. padding: 0.75em;
  136. }
  137. .behind {
  138. z-index: 98;
  139. cursor: pointer;
  140. transform: translateY(5px) scale(0.98);
  141. transform-origin: top;
  142. transition-property: transform;
  143. transition-duration: 0.5s;
  144. }
  145. .front {
  146. z-index: 99;
  147. transition-property: transform;
  148. transition-duration: 0.5s;
  149. }
  150. .judge {
  151. position: absolute;
  152. top: 0;
  153. right: 0;
  154. margin: 0 0 30px 20px;
  155. width: 90%;
  156. }
  157. .twin {
  158. overflow: hidden;
  159. }
  160. .new {
  161. position: relative;
  162. margin: 30px 20px 30px 0;
  163. }
  164. .twin-collapse {
  165. max-height: 360px;
  166. }
  167. .show-mask {
  168. display: block;
  169. position: absolute;
  170. top: 20px;
  171. right: 35px;
  172. text-align: center;
  173. padding-top: 330px;
  174. width: 100%;
  175. z-index: 999;
  176. }
  177. .footer {
  178. background: black;
  179. color: white;
  180. text-align: center;
  181. font-size: 80%;
  182. border-top: solid 1px white;
  183. }
  184. .footer p {
  185. margin: 10px 0 0;
  186. float: bottom;
  187. }
  188. @keyframes loop {
  189. 0% {
  190. transform: translateX(100%);
  191. }
  192. 100% {
  193. transform: translateX(-50%);
  194. }
  195. }
  196. </style>
  197. </head>
  198. <body style="background: #fff url('/img/ord/bg.jpg') repeat-x fixed center top / 650px">
  199. <div class="container" style="overflow: hidden;min-height: 100vh">
  200. <div style='padding:15px'>
  201. <img src="/img/ord/logo.png" width="200px" />
  202. </div>
  203. {% if step2 %}
  204. <div class="step2-info mb-3">
  205. <button type="button" class="close" aria-label="Close">
  206. <span>&times;</span>
  207. </button>
  208. <p>现已进入“答辩”阶段,入围者将在<a href="https://thu.closed.social/">闭社</a>线上“答辩”。
  209. 如果想来围观或是与入围者交流,请注册并登陆<a href="https://thu.closed.social/">闭社</a>(需华清邮箱),前往<a href="https://thu.closed.social/web/timelines/tag/%E7%89%B9%E6%99%AE%E9%80%9A%E5%A5%96%E7%AD%94%E8%BE%A9">特普通奖答辩现场</a>,或点击下方滑动链接进入某一位入围者的答辩房间。
  210. <br>
  211. <ul>
  212. {% for id, name, url in step2.get('cand', []) %}
  213. <li style="animation: {{id*37 % 23 + 10}}s loop linear infinite;"><a href="{{url}}">{{name}} (No. {{id}})</a></li>
  214. {% endfor %}
  215. </ul>
  216. </div>
  217. {% endif %}
  218. <div class="part1">
  219. {% if not verified %}
  220. <form action="verify" method="post" class="verify-box">
  221. <p>提名阶段已经结束,不过完成简易验证后,你依然可以于此畅所欲言或加入评委群。</p>
  222. <hr>
  223. {% for v in vs %}
  224. <div class="form-group row">
  225. <label for="{{v.name}}" class="col-sm-8 col-form-label">{{v.ques}}</label>
  226. <div class="col-sm-4">
  227. <input type="text" class="form-control" name="{{v.name}}" placeholder="{{v.hint}}" required="required">
  228. </div>
  229. </div>
  230. {% endfor %}
  231. <button type="submit" class="btn btn-link btn-lg">提交</button>
  232. </form>
  233. {% else %}
  234. <div id="new" class="new twin front">
  235. <form action="new" method="post">
  236. <div class="form-group qbox">
  237. <h1 style="margin: -14px -13px 20px">自荐提名</h1>
  238. <textarea class="form-control" name="text" rows="5" maxlength="4000" placeholder="{{text1}}" required="required"></textarea>
  239. <hr />
  240. <textarea class="form-control" name="privateText" rows="4" maxlength="1000" placeholder="{{text2}}"></textarea>
  241. <hr />
  242. <div class="form-group row">
  243. <label for="url" class="col-sm-3 col-form-label">补充材料</label>
  244. <div class="col-sm-9">
  245. <input type="url" class="form-control" id="url" name="url" placeholder="清华云盘或safeShare链接,https://开头" pattern="https://(cloud\.tsinghua\.edu\.cn/f/[0-9a-z]+/(\?dl=1)?|closed\.social/safeShare/\d([a-zA-Z]+)?)">
  246. </div>
  247. </div>
  248. <button type="submit" class="btn btn-link btn-lg">报名</button>
  249. </div>
  250. </form>
  251. <div style="font-size:80%;">
  252. <ul>
  253. <li>如需附上补充材料,请使用清华云盘。为了避免泄露姓名推荐使用<a href="/safeShare" target="_blank">safeShare</a>。其他云盘是不被接受的。</li>
  254. <li>需要回答几个简单的问题以初步验证学生身份,入围后的线上答辩环节将于<a href="https://thu.closed.social/">闭社</a>平台进行(需清华邮箱注册)以正式验证身份。</li>
  255. <li>获得五个赞并留下联系方式(如微信号、手机号或邮箱)者被视为正式提名,会有工作人员与之联系并发放奖品。</li>
  256. <li>点击倒三角按钮展开评论,发布评论请前往<a href="https://thu.closed.social/">闭社</a></li>
  257. <li>如需删除报名,请联系工作人员(微信:ordinary_thuer)。</li>
  258. </ul>
  259. </div>
  260. </div>
  261. <div class="judge twin behind">
  262. <form action="judge" method="post">
  263. <div class="form-group qbox">
  264. <h1 style="text-align:right;margin:-12px -20px 16px">成为评委</h1>
  265. <div style="font-size:80%">
  266. <p>为了更好地选出十位普通人的代表,为了更好地展现大众的声音,我们希望招募更多的评委。</p>
  267. <p>成为评委的条件:</p>
  268. <ul>
  269. <li>是华清大学在读学生</li>
  270. <li>没有报名参选</li>
  271. <li>愿意对报名者进行评分</li>
  272. </ul>
  273. <p>我们原则上不拒绝任何的评委报名。</p>
  274. <p>目前在三个平台上建了三个评委群,分别是闭聊(Matrix),Telegram,微信。前两个消息自动同步,加入哪个都是等价的,微信群与另外两个群不连通。(注意Telegram墙内不可直接访问。闭聊由闭社提供,使用闭社帐号登陆,如使用其他服务器上的Matrix帐号加群需要验证华清身份。)</p>
  275. <p>选择想加入的群,完成验证,进入评委群。如果不愿意加群,也可以私信主办方保持沟通和上传打分结果。</p>
  276. </div>
  277. <div style="text-align:center">
  278. <div class="form-check form-check-inline">
  279. <input class="form-check-input" type="radio" name="groupType" value="mx" required>
  280. <label class="form-check-label" for="mx">闭聊</label>
  281. </div>
  282. <div class="form-check form-check-inline">
  283. <input class="form-check-input" type="radio" name="groupType" value="tg" required>
  284. <label class="form-check-label" for="tg">Telegram</label>
  285. </div>
  286. <div class="form-check form-check-inline">
  287. <input class="form-check-input" type="radio" name="groupType" value="wx" required>
  288. <label class="form-check-label" for="wx">微信</label>
  289. </div>
  290. </div>
  291. <button type="submit" class="btn btn-link btn-lg">进群</button>
  292. </div>
  293. </form>
  294. </div>
  295. {% endif %}
  296. </div>
  297. <div class="part2" id="part2">
  298. <div style="display:flex;justify-content:space-between;align-items: flex-end">
  299. <h1>已有报名</h1>
  300. <span style="margin:8px" class="sort-by">
  301. {% if final_list %}
  302. <a href="?sort_by={{sort_by}}&final_list=#part2">全部</a> | <b>仅入围</b>
  303. {% else %}
  304. <b>全部</b> | <a href="?sort_by={{sort_by}}&final_list=1#part2">仅入围</a>
  305. {% endif %}
  306. <br>
  307. {% if sort_by == 'likeNum' %}
  308. <a href="?sort_by=time&final_list={{final_list}}#part2">按时间</a> | <b>按赞数</b>
  309. {% else %}
  310. <b>按时间</b> | <a href="?sort_by=likeNum&final_list={{final_list}}#part2">按赞数</a>
  311. {% endif %}
  312. </span>
  313. </div>
  314. {% for c in pagination.items %}
  315. <div class="qbox {{'qbox-grey' if step2.get('end') and c.id > step2['end'] else ''}}">
  316. <small>No. {{c.id}}</small>
  317. <pre class="inner">{{c.content}}</pre>
  318. {% if showPrivate %}
  319. <hr />
  320. <pre class="inner">{{c.private}}</pre>
  321. <hr />
  322. {% endif %}
  323. {% if c.url %}
  324. <p class="inner"><a href="{{c.url}}" target="_black">补充材料</a></p>
  325. {% endif %}
  326. <div style="text-align:right;margin: 27px 0 -5px">
  327. <time class="timeago" datetime="{{c.time}}"></time>
  328. <a href="##" class="btn btn-link" id="like-{{c.toot}}" onClick="like('{{c.toot}}')" style="text-decoration: none;">
  329. <svg viewBox="-20 0 552 512" height="16" class="{{c.liked}}">
  330. <path stroke="#000" stroke-width="30" d="M474.644,74.27C449.391,45.616,414.358,29.836,376,29.836c-53.948,0-88.103,32.22-107.255,59.25
  331. c-4.969,7.014-9.196,14.047-12.745,20.665c-3.549-6.618-7.775-13.651-12.745-20.665c-19.152-27.03-53.307-59.25-107.255-59.25
  332. c-38.358,0-73.391,15.781-98.645,44.435C13.267,101.605,0,138.213,0,177.351c0,42.603,16.633,82.228,52.345,124.7
  333. c31.917,37.96,77.834,77.088,131.005,122.397c19.813,16.884,40.302,34.344,62.115,53.429l0.655,0.574
  334. c2.828,2.476,6.354,3.713,9.88,3.713s7.052-1.238,9.88-3.713l0.655-0.574c21.813-19.085,42.302-36.544,62.118-53.431
  335. c53.168-45.306,99.085-84.434,131.002-122.395C495.367,259.578,512,219.954,512,177.351
  336. C512,138.213,498.733,101.605,474.644,74.27z" />
  337. </svg>
  338. <span>
  339. {{c.likeNum}}
  340. </span>
  341. </a>
  342. <a class="btn btn-link request-answer" data-toggle="collapse" href="#collapse-{{c.toot}}" role="button" aria-expanded="false" aria-controls="collapse-{{c.toot}}">
  343. <svg fill="#000" viewBox="0 24 24 20" height="16">
  344. <path d="m0 24 l12 18 l12 -18 z"></path>
  345. </svg>
  346. </a>
  347. </div>
  348. <div class="collapse" id="collapse-{{c.toot}}">
  349. <div class="card card-body">
  350. 加载中...
  351. </div>
  352. </div>
  353. </div>
  354. {% endfor %}
  355. <nav>
  356. <ul class="pagination">
  357. {%- for page in pagination.iter_pages(left_edge=2, left_current=1, right_current=3, right_edge=2) %}
  358. {% if page %}
  359. {% if page != pagination.page %}
  360. <li class="page-item"><a class="page-link" href="{{ url_for('can_list', page=page, per_page=pagination.per_page, key=key, sort_by=sort_by) }}">{{ page }}</a></li>
  361. {% else %}
  362. <li class="page-item active">
  363. <a class="page-link" href="#">{{ page }}<span class="sr-only">(current)</span></a>
  364. </li>
  365. {% endif %}
  366. {% else %}
  367. <li class="page-item"><span class=ellipsis>...</span></li>
  368. {% endif %}
  369. {%- endfor %}
  370. </ul>
  371. </nav>
  372. </div>
  373. </div>
  374. <div class="footer">
  375. <p>
  376. <a href="//closed.social" target="_blank">闭社</a>提供技术支持,本报名系统开源于<a href="//git.closed.social/closed-social/ordinary">碧茶</a>
  377. </p>
  378. <p> 🄯 2020 Copyleft: closed.social</p>
  379. </div>
  380. </body>
  381. <script src="https://cdn.bootcss.com/jquery/3.4.1/jquery.min.js"></script>
  382. <script src="https://cdn.bootcss.com/twitter-bootstrap/4.3.1/js/bootstrap.min.js"></script>
  383. <script src="https://cdn.bootcdn.net/ajax/libs/jquery-timeago/1.6.7/jquery.timeago.min.js"></script>
  384. <script src="https://cdn.bootcdn.net/ajax/libs/jquery-timeago/1.6.7/locales/jquery.timeago.zh-CN.js"></script>
  385. <script>
  386. function like(toot) {
  387. if ($(`#like-${toot} svg`).hasClass("liked")) {
  388. alert('赞都赞了,别撤回嘛');
  389. return;
  390. }
  391. $.ajax({
  392. type: 'POST',
  393. url: toot + '/like',
  394. success: (result, status, xhr) => {
  395. console.log(result + ' : ' + status);
  396. $(`#like-${toot} span`).text(result);
  397. $(`#like-${toot} svg`).toggleClass("like liked");
  398. },
  399. error: (xhr, status, error) => {
  400. alert(error + ': ' + xhr.responseText);
  401. }
  402. });
  403. }
  404. $(document).ready(function(){
  405. $('.timeago').timeago();
  406. $('.close').click((e) => {
  407. $(e.currentTarget).parent().remove();
  408. $('.part1').show();
  409. });
  410. $('.twin').click((e) => {
  411. if($(e.currentTarget).hasClass('front'))
  412. return;
  413. let behind_box = $('.behind');
  414. let front_box = $('.front');
  415. behind_box.toggleClass('behind front');
  416. front_box.toggleClass('front behind');
  417. });
  418. $('.collapse').on('show.bs.collapse', (e) => {
  419. let self = e.target;
  420. let toot = self.id.split('-')[1];
  421. $.ajax({
  422. type: 'GET',
  423. url: toot + '/comments',
  424. success: (result, status, xhr) => {
  425. if (result.replies.length) {
  426. $(self).empty();
  427. result.replies.forEach((rp) => {
  428. $(self).append(`<div class="card card-body"><p class="display_name"><a href="${rp.url}">${rp.disp}</a>:</p><pre class="inner">${rp.content}</pre><time class="timeago" datetime="${rp.time}"></time></div>`)
  429. });
  430. $(self).find('.timeago').timeago();
  431. } else {
  432. $(self).empty();
  433. $(self).append(`<div class="card card-body"><p>(暂无评论) <sub><a target="_blank" href="{{base_toot_url}}${toot}">发表第一条评论</sub></p></div>`)
  434. }
  435. },
  436. error: (xhr, status, error) => {
  437. console.log(error, status, xhr.status, xhr.responseText);
  438. $(self).empty();
  439. $(self).append(`<div class="card card-body"><p style="color:red">${xhr.status} ${xhr.responseText}</p></div>`);
  440. if (xhr.status == 404)
  441. setTimeout(() => {
  442. $(self).parent().remove()
  443. }, 3000);
  444. }
  445. });
  446. });
  447. });
  448. </script>
  449. </html>