index.html 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396
  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="#" 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. {% autoescape false %}
  172. {{rows}}
  173. {% endautoescape %}
  174. {% elif tn == 4 %}
  175. {% autoescape false %}
  176. {{rows}}
  177. {% endautoescape %}
  178. {% elif tn == 5 %}
  179. <form class="usrform" method='POST' action='/history/{{page}}/n/1'>
  180. <select name="a">
  181. {% autoescape false %}
  182. {{select}}
  183. {% endautoescape %}
  184. </select>
  185. <select name="b">
  186. {% autoescape false %}
  187. {{select}}
  188. {% endautoescape %}
  189. </select>
  190. <button class="btn btn-primary" type='submit'>리비전 비교</button>
  191. <br>
  192. <br>
  193. {% autoescape false %}
  194. {{rows}}
  195. {% endautoescape %}
  196. {% elif tn == 6 %}
  197. <div>
  198. {% autoescape false %}
  199. {{data}}
  200. {% endautoescape %}
  201. </div>
  202. {% elif tn == 7 %}
  203. <div>
  204. {% autoescape false %}
  205. {{data}}
  206. {% endautoescape %}
  207. </div>
  208. {% elif tn == 8 %}
  209. <form id="usrform" method="POST" action="/delete/{{page}}">
  210. {{plus}}
  211. <br>
  212. <br>
  213. <button class="btn btn-primary" type="submit">삭제</button>
  214. </form>
  215. {% if login == 0 %}
  216. <span>비 로그인 상태입니다. 비 로그인으로 작업 시 아이피가 역사에 기록됩니다.</span>
  217. {% endif %}
  218. {% elif tn == 9 %}
  219. <form id="usrform" method="POST" action="/move/{{page}}">
  220. {{plus}}
  221. <br>
  222. <br>
  223. <input class="form-control input-sm" value="{{title}}" name="title" type="text">
  224. <br>
  225. <br>
  226. <button class="btn btn-primary" type="submit">이동</button>
  227. </form>
  228. {% if login == 0 %}
  229. <span>비 로그인 상태입니다. 비 로그인으로 작업 시 아이피가 역사에 기록됩니다.</span>
  230. {% endif %}
  231. {% elif tn == 10 %}
  232. <form id="usrform" style="margin-top: -30px;" method="POST" action="/topic/{{page}}">
  233. {% autoescape false %}
  234. {{plus}}
  235. {% endautoescape %}
  236. {% if list == 1 %}
  237. <br>
  238. <a href="/topic/{{page}}/close">(닫힌 토론)</a> <a href="/topic/{{page}}/agree">(합의된 토론)</a>
  239. <br>
  240. <br>
  241. <input class="form-control" name="topic" style="width: 100%">
  242. <br>
  243. <br>
  244. <button class="btn btn-primary" type="submit">새토론</button>
  245. {% endif %}
  246. </form>
  247. {% elif tn == 11 %}
  248. <h2 style="margin-top: -15px;">{{toron}}</h2>
  249. <br>
  250. {% autoescape false %}
  251. {{rows}}
  252. {% endautoescape %}
  253. {% if ban == 1 %}
  254. {% else %}
  255. <a id="reload" href="javascript:window.location.reload(true);">(갱신)</a> <a href="#reload">(갱신 전에 누르시오)</a>
  256. <form id="usrform" style="{{style}}" method="POST" action="/topic/{{page}}/sub/{{suburl}}">
  257. <br>
  258. <textarea rows="10" cols="100" name="content" form="usrform"></textarea>
  259. <br>
  260. <br>
  261. <button class="btn btn-primary" type="submit">전송</button>
  262. </form>
  263. {% if login == 0 and style == '' %}
  264. <span>비 로그인 상태입니다. 비 로그인으로 작업 시 아이피가 역사에 기록됩니다.</span>
  265. {% endif %}
  266. {% endif %}
  267. {% elif tn == 13 %}
  268. <form id="usrform" method="POST" action="/revert/{{page}}/r/{{r}}">
  269. {{plus}}
  270. <br>
  271. <br>
  272. <button class="btn btn-primary" type="submit">되돌리기</button>
  273. </form>
  274. {% if login == 0 %}
  275. <span>비 로그인 상태입니다. 비 로그인으로 작업 시 아이피가 역사에 기록됩니다.</span>
  276. {% endif %}
  277. {% elif tn == 15 %}
  278. {% if title == '회원가입' %}
  279. <form id="usrform" method="POST" action="/register">
  280. {% elif title == '비밀번호 변경' %}
  281. <form id="usrform" method="POST" action="/change">
  282. {% else %}
  283. <form id="usrform" method="POST" action="/login">
  284. {% endif %}
  285. <span>아이디</span>
  286. <br>
  287. <br>
  288. <input name="id" type="text">
  289. <br>
  290. <br>
  291. <span>{% if title == '비밀번호 변경' %}현재 {% endif %}비밀번호</span>
  292. <br>
  293. <br>
  294. <input name="pw" type="password">
  295. <br>
  296. <br>
  297. {% if not title == '로그인' %}
  298. <span>{% if title == '비밀번호 변경' %}변경할 비밀번호{% else %}재 확인{% endif %}</span>
  299. <br>
  300. <br>
  301. <input name="pw2" type="password">
  302. <br>
  303. <br>
  304. {% if title == '비밀번호 변경' %}
  305. <span>재 확인</span>
  306. <br>
  307. <br>
  308. <input name="pw3" type="password">
  309. <br>
  310. <br>
  311. {% endif %}
  312. {% endif %}
  313. <button class="btn btn-primary" type="submit">{{enter}}</button>
  314. </form>
  315. {% elif tn == 16 %}
  316. <form id="usrform" method="POST" action="/ban/{{page}}">
  317. {% if now == '차단' or now == '대역 차단' %}
  318. <input class="form-control" name="end" style="width: 100%">
  319. <br>
  320. <br>
  321. <span>아무것도 안 적으면 무기한 차단입니다.</span>
  322. <br>
  323. <br>
  324. <span>차단 일 지정시 형식은 YYYY-MM-DD로 기록해야 합니다. (예시: 2017-01-20, 2017-10-15)</span>
  325. <br>
  326. <br>
  327. <span>지금 시각은 {{today}} 입니다.</span>
  328. <br>
  329. <br>
  330. <input class="form-control" name="why" style="width: 100%">
  331. <br>
  332. <br>
  333. <span>사유를 쓰는 곳입니다.</span>
  334. {% if allif == 1 %}
  335. <br>
  336. <br>
  337. <input type="checkbox" name="band">
  338. <span>대역 차단</span>
  339. </input>
  340. {% endif %}
  341. <br>
  342. <br>
  343. {% endif %}
  344. <button class="btn btn-primary" type="submit">{{now}}</button>
  345. </form>
  346. {% elif tn == 18 %}
  347. <form id="usrform" method="POST" action="/admin/{{page}}">
  348. {% if now == '권한 부여' %}
  349. <select name="select">
  350. <option value="admin" selected="selected">관리자</option>
  351. <option value="owner">소유자</option>
  352. </select>
  353. <br>
  354. <br>
  355. {% endif %}
  356. <button class="btn btn-primary" type="submit">{{now}}</button>
  357. </form>
  358. {% elif tn == 19 %}
  359. <br>
  360. <span>{{now}}</span>
  361. <br>
  362. <br>
  363. <form id="usrform" method="POST" action="/acl/{{page}}">
  364. <select name="select">
  365. <option value="admin" selected="selected">관리자만</option>
  366. <option value="user">유저 이상</option>
  367. <option value="normal">일반</option>
  368. </select>
  369. <br>
  370. <br>
  371. <button class="btn btn-primary" type="submit">ACL 변경</button>
  372. </form>
  373. {% elif tn == 21 %}
  374. <div>
  375. <form action="" method=post enctype=multipart/form-data>
  376. <input type=file name=file>
  377. <input type=submit value=Upload>
  378. </form>
  379. </div>
  380. <span>{{number}}MB 이하 파일만 업로드 가능하고 확장자는 jpg, png, gif, jpeg만 가능합니다.</span>
  381. {% else %}
  382. <div>
  383. {% autoescape false %}
  384. {{data}}
  385. {% endautoescape %}
  386. </div>
  387. {% endif %}
  388. <hr id="last">
  389. <p>{% autoescape false %}{{license}}{% endautoescape %}</p>
  390. <div id="powered">
  391. <a href="https://github.com/2DU/openNAMU"><img src="{{url_for('static', filename='images/on2.png')}}" width="100px"></a>
  392. </div>
  393. </div>
  394. </div>
  395. </body>
  396. </html>