index.html 19 KB

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