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

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