index.php 7.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354
  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="./article.js"></script>
  8. <script src="../widget/click_dropdown.js"></script>
  9. <link type="text/css" rel="stylesheet" href="../widget/click_dropdown.css"/>
  10. <script>
  11. <?php
  12. $_id = "";
  13. $_display = "";
  14. $_channal = "";
  15. $_collect = "";
  16. if(isset($_GET["id"])){
  17. echo "_articel_id='".$_GET["id"]."';";
  18. }
  19. if(isset($_GET["collect"])){
  20. echo "_collect_id='".$_GET["collect"]."';";
  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. #head_bar{
  52. display: flex;
  53. justify-content: space-between;
  54. height: 5em;
  55. background-color: var(--tool-bg-color1);
  56. border-bottom: 1px solid var(--tool-line-color);
  57. padding:10px;
  58. }
  59. .main_view{
  60. padding: 0 1em;
  61. max-width: 1280px;
  62. margin-left: auto;
  63. margin-right: auto;
  64. }
  65. .fun_frame {
  66. border-bottom: 1px solid gray;
  67. margin-right: 10px;
  68. margin-bottom: 10px;
  69. }
  70. .fun_frame .title{
  71. padding:6px;
  72. font-weight: 700;
  73. }
  74. .fun_frame>.content{
  75. padding:6px;
  76. max-height:6em;
  77. overflow-y: scroll;
  78. }
  79. .fixed{
  80. position:fixed;
  81. right: 0;
  82. top: 0;
  83. }
  84. .when_right_fixed{
  85. padding-right:20em;
  86. }
  87. #contents_view{
  88. display:flex;
  89. }
  90. #contents_div{
  91. flex:7;
  92. }
  93. #contents{
  94. min-height: 400px;
  95. }
  96. #contents li{
  97. white-space: normal;
  98. }
  99. #right_pannal{
  100. flex:3;
  101. max-width:20em;
  102. }
  103. #head_bar{
  104. height:unset;
  105. }
  106. #contents_foot{
  107. margin-bottom: 70vh;
  108. }
  109. #toc_content .level_2{
  110. padding-left:0.5em;
  111. }
  112. #toc_content .level_3{
  113. padding-left:1em;
  114. }
  115. #toc_content .level_4{
  116. padding-left:1.5em;
  117. }
  118. #toc_content .level_5{
  119. padding-left:2em;
  120. }
  121. .ui-dialog-titlebar{
  122. display: flex;
  123. justify-content: space-between;
  124. background-color: var(--btn-bg-color);
  125. padding: 5px;
  126. }
  127. .ui-widget-content{
  128. background-color: var(--bg-color);
  129. }
  130. .ui-dialog{
  131. box-shadow: 8px 8px 20px var(--border-shadow);
  132. }
  133. .active{
  134. background-color: var(--btn-hover-bg-color);
  135. }
  136. .icon_btn a {
  137. color: var(--main-color);
  138. }
  139. .icon_btn:hover a {
  140. color: var(--btn-hover-color);
  141. }
  142. .tran img{
  143. max-width: 100%;
  144. max-height: 200px;
  145. width: auto;
  146. height: auto;
  147. object-fit: cover;
  148. background-size: contain;
  149. }
  150. .channal_list{
  151. white-space: nowrap;
  152. overflow-x: hidden;
  153. }
  154. .userinfo_channal{
  155. display:none;
  156. }
  157. .userinfo_channal:hover{
  158. display:block;
  159. }
  160. img {
  161. width: 90vw;
  162. max-width: 40em;
  163. }
  164. </style>
  165. <style media="screen and (max-width:800px)">
  166. #right_pannal{
  167. display:none;
  168. }
  169. .when_right_fixed{
  170. padding-right:0;
  171. }
  172. .index_toolbar{
  173. position:unset;
  174. }
  175. #pali_pedia{
  176. font-size: 200%;
  177. margin-top: auto;
  178. margin-bottom: auto;
  179. padding-left: 0.5em;
  180. }
  181. </style>
  182. <?php
  183. require_once("../pcdl/head_bar.php");
  184. ?>
  185. <div id="head_bar" >
  186. <div id="pali_pedia" style="display:flex;">
  187. <span><?php echo $_local->gui->anthology; ?></span>
  188. </div>
  189. <div>
  190. <span>
  191. <?php
  192. echo "<button class='icon_btn' title='{$_local->gui->modify} {$_local->gui->composition_structure}'>";
  193. echo "<a href='../article/my_article_edit.php?id=".$_GET["id"];
  194. echo "'>{$_local->gui->modify}</a></button>";
  195. if(isset($_GET["display"]) && $_GET["display"]=="para"){
  196. echo "<button class='icon_btn active' title='{$_local->gui->show} {$_local->gui->each_paragraph}'>";
  197. echo $_local->gui->each_paragraph;
  198. echo "</button>";
  199. }
  200. else{
  201. echo "<button class='icon_btn'>";
  202. echo "<a href='../article/?id=".$_GET["id"];
  203. if(isset($_GET["channal"])){
  204. echo "&channal=".$_GET["channal"];
  205. }
  206. echo "&display=para' title='{$_local->gui->show} {$_local->gui->each_paragraph}'>";
  207. echo $_local->gui->each_paragraph;
  208. echo "</a>";
  209. echo "</button>";
  210. }
  211. if(isset($_GET["display"]) && $_GET["display"]=="sent"){
  212. echo "<button class='icon_btn active' title='{$_local->gui->show} {$_local->gui->each_sentence}'>";
  213. echo $_local->gui->each_sentence;
  214. echo "</button>";
  215. }
  216. else{
  217. echo "<button class='icon_btn'><a href='../article/?id=".$_GET["id"];
  218. if(isset($_GET["channal"])){
  219. echo "&channal=".$_GET["channal"];
  220. }
  221. echo "&display=sent";
  222. echo "' title='{$_local->gui->show} {$_local->gui->each_sentence}'>{$_local->gui->each_sentence}</a></button>";
  223. }
  224. ?>
  225. <button class='icon_btn'><a href="#"><?php echo $_local->gui->help; ?></a></button>
  226. </span>
  227. </div>
  228. </div>
  229. <div id="main_view" class="main_view">
  230. <div id="article_head" style="border-bottom: 1px solid gray;">
  231. <div id="article_title" class="term_word_head_pali"><?php echo $_local->gui->title; ?></div>
  232. <div id="article_subtitle"><?php echo $_local->gui->sub_title; ?></div>
  233. <div id="article_author"><?php echo $_local->gui->author; ?></div>
  234. </div>
  235. <div id="contents_view">
  236. <div id="contents_div" style="padding: 0 1em 0 30px;width:70vw;">
  237. <div id="contents">
  238. <?php echo $_local->gui->loading; ?>...
  239. </div>
  240. <div id="contents_foot">
  241. <div id="contents_nav" style="display:flex;justify-content: space-between;">
  242. <div id="contents_nav_left"></div>
  243. <div id="contents_nav_right"></div>
  244. </div>
  245. <div id="contents_dicuse">
  246. </div>
  247. </div>
  248. </div>
  249. <div id="right_pannal">
  250. <div class="fun_frame">
  251. <div id = "collect_title" class="title"><?php echo $_local->gui->contents; ?></div>
  252. <div id = "toc_content" class="content" style="max-height:25vw;">
  253. </div>
  254. </div>
  255. <div class="fun_frame">
  256. <div style="display:flex;justify-content: space-between;">
  257. <div class="title"><?php echo $_local->gui->contributor; ?></div>
  258. <div class="click_dropdown_div">
  259. <div class="channel_select_button" onclick="onChannelMultiSelectStart()"><?php echo $_local->gui->select; ?></div>
  260. </div>
  261. </div>
  262. <div class='channel_select'>
  263. <button onclick='onChannelChange()'><?php echo $_local->gui->confirm; ?></button>
  264. <button onclick='onChannelMultiSelectCancel()'><?php echo $_local->gui->cancel; ?></button>
  265. </div>
  266. <div id="channal_list" class="content" style="max-height:25vw;">
  267. </div>
  268. </div>
  269. </div>
  270. </div>
  271. </div>
  272. <script>
  273. $(document).ready(function(){
  274. ntf_init();
  275. click_dropdown_init();
  276. note_create();
  277. historay_init();
  278. if(_collect_id==""){
  279. articel_load(_articel_id);
  280. articel_load_collect(_articel_id);
  281. }
  282. else{
  283. collect_load(_collect_id);
  284. }
  285. });
  286. window.addEventListener('scroll',winScroll);
  287. function winScroll(e){
  288. if(GetPageScroll().y>220){
  289. }
  290. else{
  291. }
  292. }
  293. //滚动条位置
  294. function GetPageScroll()
  295. {
  296. var pos=new Object();
  297. var x, y;
  298. if(window.pageYOffset)
  299. { // all except IE
  300. y = window.pageYOffset;
  301. x = window.pageXOffset;
  302. } else if(document.documentElement && document.documentElement.scrollTop)
  303. { // IE 6 Strict
  304. y = document.documentElement.scrollTop;
  305. x = document.documentElement.scrollLeft;
  306. } else if(document.body) { // all other IE
  307. y = document.body.scrollTop;
  308. x = document.body.scrollLeft;
  309. }
  310. pos.x=x;
  311. pos.y=y;
  312. return(pos);
  313. }
  314. </script>
  315. </body>
  316. </html>