index.tpl 22 KB

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