华清大学特普通奖学金初选报名系统
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.

348 lines
11 KiB

3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 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.loli.net/css2?family=Noto+Serif+SC:wght@300&display=swap" rel="stylesheet">
  8. <link href="https://fonts.loli.net/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. <script src="https://cdn.bootcss.com/jquery/3.4.1/jquery.min.js"></script>
  13. <script src="https://cdn.bootcss.com/twitter-bootstrap/4.3.1/js/bootstrap.min.js"></script>
  14. <script src="https://cdn.bootcdn.net/ajax/libs/jquery-timeago/1.6.7/jquery.timeago.min.js"></script>
  15. <script src="https://cdn.bootcdn.net/ajax/libs/jquery-timeago/1.6.7/locales/jquery.timeago.zh-CN.js"></script>
  16. <title>华清特奖报名</title>
  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. font-family: 'Noto Serif SC', serif;
  29. }
  30. a,
  31. a:hover,
  32. .btn-link,
  33. .btn-link:hover {
  34. color: inherit;
  35. text-decoration: underline;
  36. }
  37. nav .page-link {
  38. color: #000;
  39. }
  40. nav .page-item.active .page-link {
  41. background-color: #000;
  42. border-color: #000;
  43. }
  44. .btn-lg {
  45. font-size: 2em;
  46. font-family: 'Noto Serif SC', serif;
  47. }
  48. .part1 {
  49. max-width: 500px;
  50. float: left;
  51. padding-right: 25px;
  52. }
  53. .part2 {
  54. min-width: 200px;
  55. overflow: hidden;
  56. padding-left: 25px;
  57. }
  58. .qbox {
  59. border: 2px black solid;
  60. background: white;
  61. padding: 5px;
  62. color: black;
  63. margin: 5px 5px 40px;
  64. }
  65. .qbox-new {
  66. background: black;
  67. color: white;
  68. }
  69. .qbox-new input,
  70. .qbox-new textarea {
  71. background: black;
  72. color: white;
  73. border: none;
  74. border-bottom: 2px white solid;
  75. border-radius: 0;
  76. }
  77. .qbox .inner {
  78. margin: 15px 0 0 15px;
  79. white-space: pre-wrap;
  80. }
  81. .like {
  82. fill: #fff;
  83. }
  84. .liked {
  85. fill: #000;
  86. }
  87. .timeago {
  88. font-size: 0.5em;
  89. margin-right: 10px;
  90. }
  91. .display_name {
  92. margin: 0;
  93. }
  94. .card-body {
  95. padding: 0.75em;
  96. }
  97. .new {
  98. overflow: hidden;
  99. position: relative;
  100. margin-bottom: 30px;
  101. }
  102. .new-collapse {
  103. max-height: 360px;
  104. }
  105. .show-mask {
  106. display: block;
  107. position: absolute;
  108. top: 0;
  109. text-align: center;
  110. padding-top: 320px;
  111. width: 100%;
  112. }
  113. .footer {
  114. background: black;
  115. color: white;
  116. text-align: center;
  117. font-size: 80%;
  118. border-top: solid 1px white;
  119. }
  120. .footer p {
  121. margin: 10px 0 0;
  122. float: bottom;
  123. }
  124. </style>
  125. </head>
  126. <body style="background: #fff url('/img/ord/bg.jpg') repeat-x fixed center top / 1000px">
  127. <div class="container" style="overflow: hidden;min-height: 100vh">
  128. <div style='padding:15px'>
  129. <img src="/img/ord/logo.png" width="200px" />
  130. </div>
  131. <div class="part1">
  132. <div id="new" class="new new-collapse">
  133. <form action="new" method="post">
  134. <div class="form-group qbox qbox-new">
  135. <h1 style="margin: -14px -13px 20px">自荐提名</h1>
  136. <textarea class="form-control" name="text" rows="5" maxlength="4000" placeholder="
  137. 一段自我陈述,
  138. 向大家展示普通的自己。" required="required"></textarea>
  139. <hr />
  140. <textarea class="form-control" name="privateText" rows="4" maxlength="1000" placeholder="不想公开,但想被评委们看到的内容。
  141. 如想留下联系方式也可放在这里。"></textarea>
  142. <hr />
  143. <div class="form-group row">
  144. <label for="url" class="col-sm-3 col-form-label">补充材料</label>
  145. <div class="col-sm-9">
  146. <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]+)?)">
  147. </div>
  148. </div>
  149. <hr />
  150. <hr />
  151. {% for v in vs %}
  152. <div class="form-group row">
  153. <label for="{{v.name}}" class="col-sm-8 col-form-label">{{v.ques}}</label>
  154. <div class="col-sm-4">
  155. <input type="text" class="form-control" id="{{v.name}}" name="{{v.name}}" placeholder="{{v.hint}}" required="required">
  156. </div>
  157. </div>
  158. {% endfor %}
  159. <button type="submit" class="btn btn-link btn-lg">报名</button>
  160. </div>
  161. </form>
  162. <div style="font-size:80%;">
  163. <ul>
  164. <li>初选报名不需要登陆任何帐号,你可以留下联系方式或可验证身份的信息(如公钥/数字签名),也可以不留。</li>
  165. <li>如需附上补充材料,请使用清华云盘。为了避免泄露姓名推荐使用<a href="/safeShare" target="_blank">safeShare</a>。我们不接受其他云盘。</li>
  166. <li>下方的评论来自闭社用户。如需删除自己发布的介绍请让任意一位工作人员评论“删除”。</li>
  167. <li>需要回答几个简单的问题以初步验证身份。入围后的环节将在闭社平台上进行(需清华邮箱注册)以正式验证身份。</li>
  168. <li>建议在电脑上操作以免丢失未保存的内容。如果出错(例如验证问题答错了),请回退,多数浏览器都会恢复之前填写的内容。</li>
  169. </ul>
  170. </div>
  171. <a href="##" onclick="showNew()" class="show-mask">
  172. <span><svg fill="#fff" viewBox="0 12 24 48" width="24">
  173. <path d="m0 24 l12 18 l12 -18 z"></path>
  174. </svg></span>
  175. </a>
  176. </div>
  177. <script>
  178. function showNew() {
  179. $('#new').removeClass('new-collapse');
  180. $('.show-mask').hide();
  181. }
  182. </script>
  183. </div>
  184. <div class="part2">
  185. <div style="display:flex;justify-content:space-between;align-items: flex-end">
  186. <h1>已有报名</h1>
  187. <span style="margin:8px">
  188. {% if sort_by == 'likeNum' %}
  189. <a href="?sort_by=time">按时间</a> | <b>按赞数</b>
  190. {% else %}
  191. <b>按时间</b> | <a href="?sort_by=likeNum">按赞数</a>
  192. {% endif %}
  193. </span>
  194. </div>
  195. {% for c in pagination.items %}
  196. <div class="qbox">
  197. <pre class="inner">{{c.content}}</pre>
  198. {% if showPrivate %}
  199. <hr />
  200. <pre class="inner">{{c.private}}</pre>
  201. <hr />
  202. {% endif %}
  203. {% if c.url %}
  204. <p class="inner"><a href="{{c.url}}" target="_black">补充材料</a></p>
  205. {% endif %}
  206. <div style="text-align:right;margin: 27px 0 -5px">
  207. <time class="timeago" datetime="{{c.time}}"></time>
  208. <a href="##" class="btn btn-link" id="like-{{c.toot}}" onClick="like('{{c.toot}}')" style="text-decoration: none;">
  209. <svg viewBox="-20 0 552 512" height="16" class="{{c.liked}}">
  210. <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
  211. 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
  212. 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
  213. 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
  214. 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
  215. c53.168-45.306,99.085-84.434,131.002-122.395C495.367,259.578,512,219.954,512,177.351
  216. C512,138.213,498.733,101.605,474.644,74.27z" />
  217. </svg>
  218. <span>
  219. {{c.likeNum}}
  220. </span>
  221. </a>
  222. <a class="btn btn-link request-answer" data-toggle="collapse" href="#collapse-{{c.toot}}" role="button" aria-expanded="false" aria-controls="collapse-{{c.toot}}">
  223. <svg fill="#000" viewBox="0 24 24 20" height="16">
  224. <path d="m0 24 l12 18 l12 -18 z"></path>
  225. </svg>
  226. </a>
  227. </div>
  228. <div class="collapse" id="collapse-{{c.toot}}">
  229. <div class="card card-body">
  230. 加载中...
  231. </div>
  232. </div>
  233. </div>
  234. {% endfor %}
  235. <nav>
  236. <ul class="pagination">
  237. {%- for page in pagination.iter_pages() %}
  238. {% if page %}
  239. {% if page != pagination.page %}
  240. <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>
  241. {% else %}
  242. <li class="page-item active">
  243. <a class="page-link" href="#">{{ page }}<span class="sr-only">(current)</span></a>
  244. </li>
  245. {% endif %}
  246. {% else %}
  247. <li class="page-item"><span class=ellipsis></span></li>
  248. {% endif %}
  249. {%- endfor %}
  250. </ul>
  251. </nav>
  252. </div>
  253. </div>
  254. <div class="footer">
  255. <p>
  256. <a href="//closed.social" target="_blank">闭社</a>提供技术支持
  257. </p>
  258. <p> 🄯 2020 Copyleft: closed.social</p>
  259. </div>
  260. </body>
  261. <script>
  262. $('.timeago').timeago();
  263. function like(toot) {
  264. if ($(`#like-${toot} svg`).hasClass("liked")) {
  265. alert('赞都赞了,别撤回嘛');
  266. return;
  267. }
  268. $.ajax({
  269. type: 'POST',
  270. url: toot + '/like',
  271. success: (result, status, xhr) => {
  272. console.log(result + ' : ' + status);
  273. $(`#like-${toot} span`).text(result);
  274. $(`#like-${toot} svg`).toggleClass("like liked");
  275. },
  276. error: (xhr, status, error) => {
  277. alert(error + ': ' + xhr.responseText);
  278. }
  279. });
  280. }
  281. $('.collapse').on('show.bs.collapse', (e) => {
  282. let self = e.target;
  283. let toot = self.id.split('-')[1];
  284. $.ajax({
  285. type: 'GET',
  286. url: toot + '/comments',
  287. success: (result, status, xhr) => {
  288. if (result.replies.length) {
  289. $(self).empty();
  290. result.replies.forEach((rp) => {
  291. $(self).append(`<div class="card card-body"><p class="display_name"><a href="${rp.url}">${rp.disp}</a>:</p><pre>${rp.content}</pre><time class="timeago" datetime="${rp.time}"></time></div>`)
  292. });
  293. $(self).find('.timeago').timeago();
  294. } else {
  295. $(self).empty();
  296. $(self).append(`<div class="card card-body">(暂无评论)</div>`)
  297. }
  298. },
  299. error: (xhr, status, error) => {
  300. console.log(error, status, xhr.status, xhr.responseText);
  301. $(self).empty();
  302. $(self).append(`<div class="card card-body"><p style="color:red">${xhr.status} ${xhr.responseText}</p></div>`);
  303. if (xhr.status == 404)
  304. setTimeout(() => {
  305. $(self).parent().remove()
  306. }, 3000);
  307. }
  308. });
  309. });
  310. </script>
  311. </html>