index.tpl 22 KB

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