index.php 7.7 KB

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