index.tpl 21 KB

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