index.php 8.1 KB

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