index.php 7.5 KB

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