index.html 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454
  1. <html>
  2. <head>
  3. <title>{{title}} - {{logo}}</title>
  4. <link rel="stylesheet" href="{{url_for('static', filename='primer.css')}}">
  5. <link rel="stylesheet" href="{{url_for('static', filename='style.css')}}">
  6. <link rel="stylesheet" href="{{url_for('static', filename='font-awesome/css/font-awesome.min.css')}}">
  7. <script type="text/x-mathjax-config">
  8. MathJax.Hub.Config({tex2jax: {inlineMath: [['$','$'], ['\\(','\\)']]}});
  9. </script>
  10. <script type="text/javascript" async
  11. src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-AMS_CHTML">
  12. </script>
  13. <meta name="twitter:creator" content="@{{logo}}">
  14. <meta name="twitter:title" content="{{title}}">
  15. <meta name="twitter:site" content="@{{logo}}">
  16. <meta name="twitter:card" content="summary">
  17. <meta name="twitter:description" content="{{data}}" />
  18. <link rel="shortcut icon" href="{{url_for('static', filename='images/on.ico')}}">
  19. <meta name="viewport" content="width=device-width, initial-scale=1">
  20. <style>
  21. {{custom}}
  22. </style>
  23. </head>
  24. <body>
  25. <br>
  26. <div class="one-fifth column">
  27. <div id="top">
  28. <a href="/" id="logo">{{logo}}</a>
  29. <div>
  30. <a href="/recentchanges" id="log">
  31. <i class="fa fa-refresh" aria-hidden="true"></i>
  32. </a>
  33. <a href="/recentdiscuss" id="log">
  34. <i class="fa fa-comment" aria-hidden="true"></i>
  35. </a>
  36. <a href="/random" id="log">
  37. <i class="fa fa-random" aria-hidden="true"></i>
  38. </a>
  39. <a href="/user" id="log">
  40. {% if login == 1 %}
  41. <i class="fa fa-user" aria-hidden="true"></i>
  42. {% elif login == 0 %}
  43. <i class="fa fa-user-times" aria-hidden="true"></i>
  44. {% else %}
  45. <i class="fa fa-user-secret" aria-hidden="true"></i>
  46. {% endif %}
  47. </a>
  48. <a href="/other" id="log">
  49. <i class="fa fa-cogs" aria-hidden="true"></i>
  50. </a>
  51. </div>
  52. <form method="POST" action="/search" id="search">
  53. <div class="input-group">
  54. <input class="form-control" name="search" type="text">
  55. <span class="input-group-button">
  56. <button id="goto" class="btn" formaction="/goto"><i class="fa fa-share" aria-hidden="true"></i></button>
  57. </span>
  58. <span class="input-group-button">
  59. <button class="btn"><i class="fa fa-search" aria-hidden="true"></i></button>
  60. </span>
  61. </div>
  62. </form>
  63. </div>
  64. </div>
  65. <div class="scroll-buttons">
  66. <a class="scroll-toc" href="#toc"><i class="fa fa-list-alt" aria-hidden="true"></i></a>
  67. <a class="scroll-button" href="#top" id="left"><i class="fa fa-arrow-up" aria-hidden="true"></i></a>
  68. <a class="scroll-bottom" href="#powered" id="right"><i class="fa fa-arrow-down" aria-hidden="true"></i></a>
  69. </div>
  70. <div id="all_contect">
  71. <div id="left_bar">
  72. <a href="#">맨 위로</a>
  73. <br>
  74. <br>
  75. {% autoescape false %}
  76. {{left}}
  77. {% endautoescape %}
  78. </div>
  79. <div class="four-fifths column">
  80. <div id="tool">
  81. <nav class="menu">
  82. <a class="menu-item selected" href="#" onclick="return false">{% if sub %}{{sub}}{% elif tn == 1 %}문서{% else %}기타{% endif %}</a>
  83. {% if tn == 1 %}
  84. {% if data_none == True %}
  85. <a class="menu-item" href="/edit/{{page}}">생성</a>
  86. {% else %}
  87. <a class="menu-item" href="/edit/{{page}}">수정</a>
  88. {% endif %}
  89. <a class="menu-item" id="{{topic}}" href="/topic/{{page}}">토론</a>
  90. {% if not data_none == True %}
  91. <a class="menu-item" href="/delete/{{page}}">삭제</a>
  92. {% endif %}
  93. <a class="menu-item" href="/move/{{page}}">이동</a>
  94. {% if not data_none == True %}
  95. <a class="menu-item" href="/raw/{{page}}">Raw</a>
  96. {% endif %}
  97. <a class="menu-item" href="/history/{{page}}/n/1">역사</a>
  98. <a class="menu-item" href="/backlink/{{page}}/n/1">역링크</a>
  99. {% if redirect %}
  100. <a class="menu-item" href="/w/{{page}}">넘기기</a>
  101. {% endif %}
  102. {% if admin == "ACL" %}
  103. <a class="menu-item" href="/acl/{{page}}">ACL</a>
  104. {% endif %}
  105. {% if uppage %}
  106. <a class="menu-item" style="{{style}}" href="/w/{{uppage}}">상위</a>
  107. {% endif %}
  108. {% elif tn == 6 or tn == 13 or not tn and not sub == '역링크' or tn == 12 or tn == 3 or tn == 4 or tn == 20 or tn == 21 %}
  109. <a class="menu-item" href="javascript:history.back(-1);">뒤로</a>
  110. {% elif tn == 10 and not list or tn == 11 %}
  111. <a class="menu-item" href="/topic/{{page}}">토론 목록</a>
  112. {% else %}
  113. <a class="menu-item" href="/w/{{page}}">문서</a>
  114. {% endif %}
  115. </nav>
  116. </div>
  117. <h1 class="title">{{title}}{% if acl %} <sub>{{acl}}</sub>{% endif %}{% if sub %} <sub>({{sub}})</sub>{% endif %}</h1>
  118. {% if tn == 1 %}
  119. {% if redirect %}
  120. {% autoescape false %}
  121. <li style="margin-top: -20px;"><a href="/w/{{redirect}}/from/{{page}}">{{redirect}}</a>에서 넘어 왔습니다.</li>
  122. <br>
  123. {% endautoescape %}
  124. {% endif %}
  125. <div>
  126. {% autoescape false %}
  127. {{data}}
  128. {% endautoescape %}
  129. </div>
  130. {% elif tn == 2 %}
  131. {% if login == 0 %}
  132. <br>
  133. <span>비 로그인 상태입니다. 비 로그인으로 작업 시 아이피가 역사에 기록됩니다.</span>
  134. <br>
  135. <br>
  136. {% endif %}
  137. {% if section == 1 %}
  138. <form id="usrform" name="f1" method="POST" action="/edit/{{page}}/section/{{number}}">
  139. <textarea rows="30" cols="100" name="content" form="usrform">{{data}}</textarea>
  140. {% if preview == 1 %}
  141. <textarea style="display:none;" rows="30" cols="100" name="otent" form="usrform">{{odata}}</textarea>
  142. {% else %}
  143. <textarea style="display:none;" rows="30" cols="100" name="otent" form="usrform">{{data}}</textarea>
  144. {% endif %}
  145. <input name="send" style="margin-top:10px;width:100%" type="text">
  146. <br>
  147. <br>
  148. <div class="form-actions">
  149. <button class="btn btn-primary" type="submit" onclick="f1.action='/edit/{{page}}/section/{{number}}';">저장</button>
  150. <button class="btn" type="submit" onclick="f1.action='/preview/{{page}}/section/{{number}}';">미리보기</button>
  151. </div>
  152. </form>
  153. {% else %}
  154. <form id="usrform" name="f1" method="POST" action="/edit/{{page}}">
  155. <textarea rows="30" cols="100" name="content" form="usrform">{{data}}</textarea>
  156. <input name="send" style="margin-top:10px;width:100%" type="text">
  157. <br>
  158. <br>
  159. <div class="form-actions">
  160. <button class="btn btn-primary" type="submit" onclick="f1.action='/edit/{{page}}';">저장</button>
  161. <button class="btn" type="submit" onclick="f1.action='/preview/{{page}}';">미리보기</button>
  162. </div>
  163. </form>
  164. {% endif %}
  165. {% if preview == 1 %}
  166. {% autoescape false %}
  167. {{enddata}}
  168. {% endautoescape %}
  169. {% endif %}
  170. {% elif tn == 3 %}
  171. <table style="width: 100%;">
  172. <tbody>
  173. <tr>
  174. <td style="text-align: center;width:33.33%;">문서명</td>
  175. <td style="text-align: center;width:33.33%;">기여자</td>
  176. <td style="text-align: center;width:33.33%;">시간</td>
  177. </tr>
  178. </tbody>
  179. </table>
  180. {% autoescape false %}
  181. {{rows}}
  182. {% endautoescape %}
  183. {% elif tn == 4 %}
  184. {% autoescape false %}
  185. {{rows}}
  186. {% endautoescape %}
  187. {% elif tn == 5 %}
  188. <form class="usrform" method='POST' action='/history/{{page}}/n/1'>
  189. <select name="a">
  190. {% autoescape false %}
  191. {{select}}
  192. {% endautoescape %}
  193. </select>
  194. <select name="b">
  195. {% autoescape false %}
  196. {{select}}
  197. {% endautoescape %}
  198. </select>
  199. <button class="btn btn-primary" type='submit'>리비전 비교</button>
  200. <br>
  201. <br>
  202. <table style="width: 100%;">
  203. <tbody>
  204. <tr>
  205. <td style="text-align: center;width:33.33%;">판</td>
  206. <td style="text-align: center;width:33.33%;">기여자</td>
  207. <td style="text-align: center;width:33.33%;">시간</td>
  208. </tr>
  209. </tbody>
  210. </table>
  211. {% autoescape false %}
  212. {{rows}}
  213. {% endautoescape %}
  214. {% elif tn == 6 %}
  215. <div>
  216. {% autoescape false %}
  217. {{data}}
  218. {% endautoescape %}
  219. </div>
  220. {% elif tn == 7 %}
  221. <div>
  222. {% autoescape false %}
  223. {{data}}
  224. {% endautoescape %}
  225. </div>
  226. {% elif tn == 8 %}
  227. <form id="usrform" method="POST" action="/delete/{{page}}">
  228. {{plus}}
  229. <br>
  230. <br>
  231. <button class="btn btn-primary" type="submit">삭제</button>
  232. </form>
  233. {% if login == 0 %}
  234. <span>비 로그인 상태입니다. 비 로그인으로 작업 시 아이피가 역사에 기록됩니다.</span>
  235. {% endif %}
  236. {% elif tn == 9 %}
  237. <form id="usrform" method="POST" action="/move/{{page}}">
  238. {{plus}}
  239. <br>
  240. <br>
  241. <input class="form-control input-sm" value="{{title}}" name="title" type="text">
  242. <br>
  243. <br>
  244. <button class="btn btn-primary" type="submit">이동</button>
  245. </form>
  246. {% if login == 0 %}
  247. <span>비 로그인 상태입니다. 비 로그인으로 작업 시 아이피가 역사에 기록됩니다.</span>
  248. {% endif %}
  249. {% elif tn == 10 %}
  250. <form id="usrform" style="margin-top: -30px;" method="POST" action="/topic/{{page}}">
  251. {% autoescape false %}
  252. {{plus}}
  253. {% endautoescape %}
  254. {% if list == 1 %}
  255. <br>
  256. <a href="/topic/{{page}}/close">(닫힌 토론)</a> <a href="/topic/{{page}}/agree">(합의된 토론)</a>
  257. <br>
  258. <br>
  259. <input class="form-control" name="topic" style="width: 100%">
  260. <br>
  261. <br>
  262. <button class="btn btn-primary" type="submit">새토론</button>
  263. {% endif %}
  264. </form>
  265. {% elif tn == 11 %}
  266. <h2 style="margin-top: -15px;">{{toron}}</h2>
  267. <br>
  268. {% autoescape false %}
  269. {{rows}}
  270. {% endautoescape %}
  271. {% if ban == 1 %}
  272. {% else %}
  273. <a id="reload" href="javascript:window.location.reload(true);">(갱신)</a> <a href="#reload">(갱신 전에 누르시오)</a>
  274. <form id="usrform" style="{{style}}" method="POST" action="/topic/{{page}}/sub/{{suburl}}">
  275. <br>
  276. <textarea rows="10" cols="100" name="content" form="usrform"></textarea>
  277. <br>
  278. <br>
  279. <button class="btn btn-primary" type="submit">전송</button>
  280. </form>
  281. {% if login == 0 and style == '' %}
  282. <span>비 로그인 상태입니다. 비 로그인으로 작업 시 아이피가 역사에 기록됩니다.</span>
  283. {% endif %}
  284. {% endif %}
  285. {% elif tn == 12 %}
  286. <table style="width: 100%;">
  287. <tbody>
  288. <tr>
  289. <td style="text-align: center;width:50%;">토론명</td>
  290. <td style="text-align: center;width:50%;">시간</td>
  291. </tr>
  292. </tbody>
  293. </table>
  294. {% autoescape false %}
  295. {{rows}}
  296. {% endautoescape %}
  297. {% elif tn == 13 %}
  298. <form id="usrform" method="POST" action="/revert/{{page}}/r/{{r}}">
  299. {{plus}}
  300. <br>
  301. <br>
  302. <button class="btn btn-primary" type="submit">되돌리기</button>
  303. </form>
  304. {% if login == 0 %}
  305. <span>비 로그인 상태입니다. 비 로그인으로 작업 시 아이피가 역사에 기록됩니다.</span>
  306. {% endif %}
  307. {% elif tn == 15 %}
  308. {% if title == '회원가입' %}
  309. <form id="usrform" method="POST" action="/register">
  310. {% elif title == '비밀번호 변경' %}
  311. <form id="usrform" method="POST" action="/change">
  312. {% else %}
  313. <form id="usrform" method="POST" action="/login">
  314. {% endif %}
  315. <span>아이디</span>
  316. <br>
  317. <br>
  318. <input name="id" type="text">
  319. <br>
  320. <br>
  321. <span>{% if title == '비밀번호 변경' %}현재 {% endif %}비밀번호</span>
  322. <br>
  323. <br>
  324. <input name="pw" type="password">
  325. <br>
  326. <br>
  327. {% if not title == '로그인' %}
  328. <span>{% if title == '비밀번호 변경' %}변경할 비밀번호{% else %}재 확인{% endif %}</span>
  329. <br>
  330. <br>
  331. <input name="pw2" type="password">
  332. <br>
  333. <br>
  334. {% if title == '비밀번호 변경' %}
  335. <span>재 확인</span>
  336. <br>
  337. <br>
  338. <input name="pw3" type="password">
  339. <br>
  340. <br>
  341. {% endif %}
  342. {% endif %}
  343. <button class="btn btn-primary" type="submit">{{enter}}</button>
  344. </form>
  345. {% elif tn == 16 %}
  346. <form id="usrform" method="POST" action="/ban/{{page}}">
  347. {% if now == '차단' or now == '대역 차단' %}
  348. <input class="form-control" name="end" style="width: 100%">
  349. <br>
  350. <br>
  351. <span>아무것도 안 적으면 무기한 차단입니다.</span>
  352. <br>
  353. <br>
  354. <span>차단 일 지정시 형식은 YYYY-MM-DD로 기록해야 합니다. (예시: 2017-01-20, 2017-10-15)</span>
  355. <br>
  356. <br>
  357. <span>지금 시각은 {{today}} 입니다.</span>
  358. <br>
  359. <br>
  360. <input class="form-control" name="why" style="width: 100%">
  361. <br>
  362. <br>
  363. <span>사유를 쓰는 곳입니다.</span>
  364. {% if allif == 1 %}
  365. <br>
  366. <br>
  367. <input type="checkbox" name="band">
  368. <span>대역 차단</span>
  369. </input>
  370. {% endif %}
  371. <br>
  372. <br>
  373. {% endif %}
  374. <button class="btn btn-primary" type="submit">{{now}}</button>
  375. </form>
  376. {% elif tn == 18 %}
  377. <form id="usrform" method="POST" action="/admin/{{page}}">
  378. {% if now == '권한 부여' %}
  379. <select name="select">
  380. <option value="admin" selected="selected">관리자</option>
  381. <option value="owner">소유자</option>
  382. </select>
  383. <br>
  384. <br>
  385. {% endif %}
  386. <button class="btn btn-primary" type="submit">{{now}}</button>
  387. </form>
  388. {% elif tn == 19 %}
  389. <br>
  390. <span>{{now}}</span>
  391. <br>
  392. <br>
  393. <form id="usrform" method="POST" action="/acl/{{page}}">
  394. <select name="select">
  395. <option value="admin" selected="selected">관리자만</option>
  396. <option value="user">유저 이상</option>
  397. <option value="normal">일반</option>
  398. </select>
  399. <br>
  400. <br>
  401. <button class="btn btn-primary" type="submit">ACL 변경</button>
  402. </form>
  403. {% elif tn == 20 %}
  404. <table style="width: 100%;">
  405. <tbody>
  406. <tr>
  407. <td style="text-align: center;width:20%;">차단자</td>
  408. <td style="text-align: center;width:20%;">관리자</td>
  409. <td style="text-align: center;width:20%;">언제까지</td>
  410. <td style="text-align: center;width:20%;">왜</td>
  411. <td style="text-align: center;width:20%;">시간</td>
  412. </tr>
  413. </tbody>
  414. </table>
  415. {% autoescape false %}
  416. {{rows}}
  417. {% endautoescape %}
  418. {% elif tn == 21 %}
  419. <div>
  420. <form action="" method=post enctype=multipart/form-data>
  421. <input type=file name=file>
  422. <input type=submit value=Upload>
  423. </form>
  424. </div>
  425. <span>{{number}}MB 이하 파일만 업로드 가능하고 확장자는 jpg, png, gif, jpeg만 가능합니다.</span>
  426. {% elif tn == 22 %}
  427. <table style="width: 100%;">
  428. <tbody>
  429. <tr>
  430. <td style="text-align: center;width:33.33%;">유저</td>
  431. <td style="text-align: center;width:33.33%;">아이피</td>
  432. <td style="text-align: center;width:33.33%;">언제</td>
  433. </tr>
  434. </tbody>
  435. </table>
  436. {% autoescape false %}
  437. {{rows}}
  438. {% endautoescape %}
  439. {% else %}
  440. <div>
  441. {% autoescape false %}
  442. {{data}}
  443. {% endautoescape %}
  444. </div>
  445. {% endif %}
  446. <hr id="last">
  447. <p>{% autoescape false %}{{license}}{% endautoescape %}</p>
  448. <div id="powered">
  449. <a href="https://github.com/2DU/openNAMU"><img src="{{url_for('static', filename='images/on2.png')}}" width="100px"></a>
  450. </div>
  451. </div>
  452. </div>
  453. </body>
  454. </html>