index.php 7.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417
  1. <?php
  2. require_once "../public/load_lang.php";
  3. require_once "../path.php";
  4. require_once "../pcdl/html_head.php";
  5. ?>
  6. <body style="margin: 0;padding: 0;" class="reader_body" >
  7. <script src="../channal/channal.js"></script>
  8. <script src="./article.js"></script>
  9. <script src="../widget/click_dropdown.js"></script>
  10. <link type="text/css" rel="stylesheet" href="../widget/click_dropdown.css"/>
  11. <script>
  12. <?php
  13. $_id = "";
  14. $_display = "";
  15. $_channal = "";
  16. if(isset($_GET["id"])){
  17. echo "_articel_id='".$_GET["id"]."';";
  18. }
  19. if(isset($_GET["display"])){
  20. echo "_display='".$_GET["display"]."';";
  21. }
  22. if(isset($_GET["channal"])){
  23. echo "_channal='".$_GET["channal"]."';";
  24. }
  25. if(isset($_GET["lang"])){
  26. echo "_lang='".$_GET["lang"]."';";
  27. }
  28. if(isset($_GET["author"])){
  29. echo "_author='".$_GET["author"]."';";
  30. }
  31. ?>
  32. </script>
  33. <style>
  34. #search_result{
  35. position: absolute;
  36. background: wheat;
  37. max-width: 95%;
  38. width: 24em;
  39. }
  40. .icon{
  41. width: 15px;
  42. height: 15px;
  43. }
  44. .submenu_title{
  45. font-size: 120%;
  46. font-weight: 700;
  47. }
  48. note{
  49. padding: 0.5em 0.8em;
  50. margin-bottom: 0.4em;
  51. border-radius: 5px;
  52. line-height:1.3em;
  53. <?php
  54. if(isset($_GET["display"]) && $_GET["display"]=="para"){
  55. echo "display:inline;";
  56. }
  57. else{
  58. echo "display:block;";
  59. echo "background-color: #80808014;";
  60. }
  61. ?>
  62. }
  63. .term_block_bar {
  64. display: flex;
  65. justify-content: space-between;
  66. }
  67. #head_bar{
  68. display: flex;
  69. justify-content: space-between;
  70. height: 5em;
  71. background-color: var(--tool-bg-color1);
  72. border-bottom: 1px solid var(--tool-line-color);
  73. padding:10px;
  74. }
  75. .term_block_bar_left{
  76. display: flex;
  77. }
  78. .term_block_bar_left_icon{
  79. display: inline-block;
  80. width: 1.5em;
  81. text-align: center;
  82. height: 1.5em;
  83. background-color: gray;
  84. font-size: 180%;
  85. color: white;
  86. border-radius: 99px;
  87. }
  88. .term_block_bar_left_info{
  89. padding-left: 8px;
  90. }
  91. .main_view{
  92. padding: 0 1em;
  93. max-width: 1280px;
  94. margin-left: auto;
  95. margin-right: auto;
  96. }
  97. #term_list_right{
  98. width: 25em;
  99. }
  100. #term_list{
  101. width: 100%;
  102. padding: 0.5em;
  103. }
  104. #term_list_div{
  105. display: flex;
  106. justify-content: space-between;
  107. }
  108. .fun_frame {
  109. border-bottom: 1px solid gray;
  110. margin-right: 10px;
  111. margin-bottom: 10px;
  112. }
  113. .fun_frame .title{
  114. padding:6px;
  115. font-weight: 700;
  116. }
  117. .fun_frame>.content{
  118. padding:6px;
  119. max-height:6em;
  120. overflow-y: scroll;
  121. }
  122. .fixed{
  123. position:fixed;
  124. right: 0;
  125. top: 0;
  126. }
  127. .when_right_fixed{
  128. padding-right:20em;
  129. }
  130. <?php
  131. if(isset($_GET["display"]) && $_GET["display"]=="para"){
  132. }
  133. else{
  134. ?>
  135. .bg_color_1{
  136. background-color:#ebebeb66;
  137. }
  138. .bg_color_2{
  139. background:linear-gradient(to right, #6afdb033, #ebebeb66);
  140. }
  141. .bg_color_3{
  142. background:linear-gradient(to right, #6a95fd26, #ebebeb66);
  143. }
  144. .bg_color_4{
  145. background:linear-gradient(to right, #f9e7911c, #ebebeb66);
  146. }
  147. .bg_color_5{
  148. background:linear-gradient(to right, #fe99b91c, #ebebeb66);
  149. }
  150. <?php
  151. }
  152. ?>
  153. pre {
  154. white-space: pre-line;
  155. font-family: auto;
  156. border-left: 3px solid var(--border-shadow);
  157. margin-left: 1em;
  158. padding-left: 0.5em;
  159. }
  160. #contents_view{
  161. display:flex;
  162. }
  163. #contents_div{
  164. flex:7;
  165. }
  166. #contents{
  167. min-height: 400px;
  168. }
  169. #contents li{
  170. white-space: normal;
  171. }
  172. #right_pannal{
  173. flex:3;
  174. max-width:20em;
  175. }
  176. #head_bar{
  177. height:unset;
  178. }
  179. <?php
  180. if(isset($_GET["display"]) && $_GET["display"]=="para"){
  181. ?>
  182. .tran>p{
  183. display:inline;
  184. }
  185. note{
  186. padding: 2px;
  187. margin-bottom: unset;
  188. }
  189. <?php
  190. }
  191. ?>
  192. #toc_content .level_2{
  193. padding-left:0.5em;
  194. }
  195. #toc_content .level_3{
  196. padding-left:1em;
  197. }
  198. #toc_content .level_4{
  199. padding-left:1.5em;
  200. }
  201. #toc_content .level_5{
  202. padding-left:2em;
  203. }
  204. .ui-dialog-titlebar{
  205. display: flex;
  206. justify-content: space-between;
  207. background-color: var(--btn-bg-color);
  208. padding: 5px;
  209. }
  210. .ui-widget-content{
  211. background-color: var(--bg-color);
  212. }
  213. .ui-dialog{
  214. box-shadow: 8px 8px 20px var(--border-shadow);
  215. }
  216. .active{
  217. background-color: var(--btn-hover-bg-color);
  218. }
  219. </style>
  220. <style media="screen and (max-width:767px)">
  221. #right_pannal{
  222. display:none;
  223. }
  224. .when_right_fixed{
  225. padding-right:0;
  226. }
  227. .index_toolbar{
  228. position:unset;
  229. }
  230. #pali_pedia{
  231. font-size: 200%;
  232. margin-top: auto;
  233. margin-bottom: auto;
  234. padding-left: 0.5em;
  235. }
  236. </style>
  237. <script>
  238. term_word_link_fun("wiki_goto_word");
  239. </script>
  240. <?php
  241. require_once("../pcdl/head_bar.php");
  242. ?>
  243. <div id="head_bar" >
  244. <div id="pali_pedia" style="display:flex;">
  245. <span><?php echo $_local->gui->anthology; ?></span>
  246. </div>
  247. <div>
  248. <span>
  249. <?php
  250. echo "<button class='icon_btn'><a href='../article/my_article_edit.php?id=".$_GET["id"];
  251. echo "'>Open in Studio</a></button>";
  252. if(isset($_GET["display"]) && $_GET["display"]=="para"){
  253. echo "<button class='icon_btn active'>";
  254. echo $_local->gui->each_paragraph;
  255. echo "</button>";
  256. }
  257. else{
  258. echo "<button class='icon_btn'>";
  259. echo "<a href='../article/?id=".$_GET["id"];
  260. if(isset($_GET["channal"])){
  261. echo "&channal=".$_GET["channal"];
  262. }
  263. echo "&display=para'>";
  264. echo $_local->gui->each_paragraph;
  265. echo "</a>";
  266. echo "</button>";
  267. }
  268. if(isset($_GET["display"]) && $_GET["display"]=="sent"){
  269. echo "<button class='icon_btn active'>";
  270. echo $_local->gui->each_sentence;
  271. echo "</button>";
  272. }
  273. else{
  274. echo "<button class='icon_btn'><a href='../article/?id=".$_GET["id"];
  275. if(isset($_GET["channal"])){
  276. echo "&channal=".$_GET["channal"];
  277. }
  278. echo "&display=sent";
  279. echo "'>{$_local->gui->each_sentence}</a></button>";
  280. }
  281. ?>
  282. <button class='icon_btn'><a href="#"><?php echo $_local->gui->help; ?></a></button>
  283. </span>
  284. </div>
  285. </div>
  286. <div id="main_view" class="main_view">
  287. <div id="article_head" style="border-bottom: 1px solid gray;">
  288. <div id="article_title" class="term_word_head_pali">Title</div>
  289. <div id="article_subtitle">Subtitle</div>
  290. <div id="article_author">author</div>
  291. </div>
  292. <div id="contents_view">
  293. <div id="contents_div" style="padding: 0 1em;">
  294. <div id="contents">
  295. <?php echo $_local->gui->loading; ?>...
  296. </div>
  297. <div id="contents_foot">
  298. <div id="contents_nav" style="display:flex;justify-content: space-between;">
  299. <div id="contents_nav_left"></div>
  300. <div id="contents_nav_right"></div>
  301. </div>
  302. <div id="contents_dicuse">
  303. </div>
  304. </div>
  305. </div>
  306. <div id="right_pannal">
  307. <div class="fun_frame">
  308. <div id = "collect_title" class="title">Table of Content</div>
  309. <div id = "toc_content" class="content" style="max-height:20em;">
  310. </div>
  311. </div>
  312. <div class="fun_frame">
  313. <div style="display:flex;justify-content: space-between;">
  314. <div class="title"><?php echo $_local->gui->channels; ?></div>
  315. <div class="click_dropdown_div">
  316. <div class="click_dropdown_button">more</div>
  317. <div class="click_dropdown_content">
  318. <div class="click_dropdown_content_inner" id="channal_select">
  319. 列表
  320. </div>
  321. <div>
  322. <button class="icon_btn click_dropdown_ok">Ok</button>
  323. <button class="icon_btn click_dropdown_cancel">Cancel</button>
  324. </div>
  325. </div>
  326. </div>
  327. </div>
  328. <div id="channal_list" class="content" style="max-height:20em;">
  329. </div>
  330. </div>
  331. </div>
  332. </div>
  333. </div>
  334. <!-- ui-dialog -->
  335. <div id="dialog" title="Dialog Title">
  336. <div id="edit_dialog_content"></div>
  337. </div>
  338. <script>
  339. $(document).ready(function(){
  340. note_create();
  341. term_edit_dlg_init();
  342. articel_load(_articel_id);
  343. articel_load_collect(_articel_id);
  344. click_dropdown_init();
  345. ntf_init();
  346. });
  347. window.addEventListener('scroll',winScroll);
  348. function winScroll(e){
  349. if(GetPageScroll().y>220){
  350. }
  351. else{
  352. }
  353. }
  354. //滚动条位置
  355. function GetPageScroll()
  356. {
  357. var pos=new Object();
  358. var x, y;
  359. if(window.pageYOffset)
  360. { // all except IE
  361. y = window.pageYOffset;
  362. x = window.pageXOffset;
  363. } else if(document.documentElement && document.documentElement.scrollTop)
  364. { // IE 6 Strict
  365. y = document.documentElement.scrollTop;
  366. x = document.documentElement.scrollLeft;
  367. } else if(document.body) { // all other IE
  368. y = document.body.scrollTop;
  369. x = document.body.scrollLeft;
  370. }
  371. pos.x=x;
  372. pos.y=y;
  373. return(pos);
  374. }
  375. </script>
  376. </body>
  377. </html>