index.php 8.1 KB

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