index1.php 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480
  1. <?PHP
  2. require_once "../pcdl/html_head.php";
  3. ?>
  4. <body>
  5. <script src="../palicanon/palicanon.js"></script>
  6. <script src="../term/term.js"></script>
  7. <?php
  8. require_once "../pcdl/head_bar.php";
  9. ?>
  10. <link type="text/css" rel="stylesheet" href="../palicanon/style.css" />
  11. <link type="text/css" rel="stylesheet" href="../palicanon/style_mobile.css" media="screen and (max-width:800px)">
  12. <script>
  13. var tag_level = <?php echo file_get_contents("../public/book_tag/tag_list.json"); ?>;
  14. </script>
  15. <?php
  16. //
  17. require_once "../config.php";
  18. require_once "../public/_pdo.php";
  19. require_once '../media/function.php';
  20. require_once '../public/function.php';
  21. ?>
  22. <link href="../../node_modules/jquery.fancytree/dist/skin-win7/ui.fancytree.css" rel="stylesheet" type="text/css" class="skinswitcher">
  23. <script src="../tree/jquery.fancytree.js" type="text/javascript"></script>
  24. <script src="../widget/like.js"></script>
  25. <link type="text/css" rel="stylesheet" href="../widget/like.css"/>
  26. <script src="../palicanon/chapter_channel.js"></script>
  27. <link type="text/css" rel="stylesheet" href="../palicanon/loading.css"/>
  28. <script src="router.js"></script>
  29. <script src="test.js"></script>
  30. <style>
  31. .chapter_list ul {
  32. margin-left: 0;
  33. }
  34. .head_bar{
  35. display: flex;
  36. flex-direction: column;
  37. }
  38. #left-bar{
  39. flex: 2;
  40. background-color: var(--box-bg-color2);
  41. }
  42. .chapter_list ul li .main{
  43. display:flex;
  44. }
  45. .book_view ul li{
  46. display:block;
  47. }
  48. .book_view .level_1{
  49. background:unset;
  50. }
  51. .book_view ul li{
  52. border:unset;
  53. width: 30%;
  54. height:90px;
  55. }
  56. .chapter_list .list {
  57. display: none;
  58. }
  59. .chapter_list .show {
  60. display: block;
  61. width: 100%;
  62. }
  63. .chapter_list .grid {
  64. width: 100%;
  65. }
  66. .chapter_list > div {
  67. max-height: unset;
  68. overflow-y: unset;
  69. }
  70. .chapter_list .more_info{
  71. display:flex;
  72. font-size:80%;
  73. color: var(--main-color1);
  74. justify-content: space-between;
  75. }
  76. }
  77. .more_info>.palicanon_chapter_info>.item{
  78. margin-right:1em;
  79. }
  80. .left_item>.item{
  81. margin-right:1em;
  82. }
  83. .filter>.inner {
  84. max-height: 200px;
  85. overflow-y: auto;
  86. background-color: var(--input-bg-color);
  87. }
  88. .main_menu {
  89. font-size: 100%;
  90. text-align: center;
  91. margin: 0 1em;
  92. transition: all 600ms ease;
  93. text-transform: capitalize;
  94. }
  95. .main_menu>span {
  96. margin: 2px;
  97. padding: 2px 12px;
  98. font-weight: 500;
  99. transition-duration: 0.2s;
  100. cursor: pointer;
  101. font-size: 120%;
  102. border: unset;
  103. border-radius: 0;
  104. border-bottom: 2px solid var(--nocolor);
  105. display: inline-block;
  106. }
  107. .main_menu>.select {
  108. border-bottom: 2px solid var(--link-color);
  109. }
  110. .main_menu>span>a {
  111. color:unset;
  112. }
  113. .main_menu span:hover {
  114. background-color: unset;
  115. color: unset;
  116. border-color: var(--link-hover-color);
  117. }
  118. .submenu select>option {
  119. background-color: gray;
  120. }
  121. button.active {
  122. background-color: gray;
  123. }
  124. .chapter_list ul li>.main>.left{
  125. width: 100px;
  126. display: flex;
  127. flex-direction: row;
  128. justify-content: space-between;
  129. }
  130. .chapter_list ul li>.main>.right{
  131. width:100%;
  132. }
  133. .chapter_tag {
  134. width: 475px;
  135. padding: 5px 0;
  136. overflow-y: visible;
  137. overflow-x: auto;
  138. display: flex;
  139. flex-wrap: wrap;
  140. }
  141. .left_item {
  142. margin: 4px 0;
  143. }
  144. .left_item>.item>.small_icon{
  145. width:16px;
  146. height:16px;
  147. }
  148. .left_item>.item>.text{
  149. padding:5px;
  150. }
  151. div#tag_list {
  152. background-color: var(--btn-color);
  153. padding: 5px;
  154. display: none;
  155. }
  156. #more_chapter {
  157. text-align: center;
  158. }
  159. #more_chapter_line {
  160. border-bottom: 1px solid var(--border-line-color);
  161. height: 1em;
  162. }
  163. #btn_more_chapter{
  164. position: absolute;
  165. margin-top: -1.1em;
  166. background-color: var(--link-color);
  167. color: var(--bg-color);
  168. border: none;
  169. padding: 2px 40px;
  170. margin-left: -5em;
  171. }
  172. #filter-author li.active{
  173. background-color:gray;
  174. }
  175. #filter_bar {
  176. display: flex;
  177. justify-content: space-between;
  178. }
  179. div#filter_bar {
  180. font-size: 120%;
  181. }
  182. span.channel:hover {
  183. background-color: wheat;
  184. }
  185. span.channel {
  186. cursor: pointer;
  187. }
  188. .settting-item {
  189. display: flex;
  190. justify-content: space-between;
  191. padding: 2px;
  192. }
  193. </style>
  194. <?php
  195. if(isset($_GET["view"])){
  196. $_view = $_GET["view"];
  197. }else{
  198. $_view = "community";
  199. }
  200. ?>
  201. <div style="display:flex;">
  202. <div id='left-bar' >
  203. <div id='left-bar-inner'>
  204. <div class="filter submenu">
  205. <div class="title submenu_title">设定</div>
  206. <div class='inner' id='filter-setting' >
  207. <div class='settting-item'>
  208. <span>语言</span>
  209. <span>
  210. <select id='setting_lang'>
  211. <option value='auto'>自动</option>
  212. <option value=''>全部</option>
  213. <option value='zh'>中文</option>
  214. <option value='en'>英文</option>
  215. </select>
  216. </span>
  217. </div>
  218. <div class='settting-item'>
  219. <span>内容类型</span>
  220. <span>
  221. <select id='setting_channel_type'>
  222. <option value=''>全部</option>
  223. <option value='translation' selected >译文</option>
  224. <option value='nissaya'>Nissaya</option>
  225. <option value='commentray'>注疏</option>
  226. </select>
  227. </span>
  228. </div>
  229. <div class='settting-item'>
  230. <span>完成度</span>
  231. <span>
  232. <select id='setting_progress'>
  233. <option value='0.9'>90</option>
  234. <option value='0.8'>80</option>
  235. <option value='0.7'>70</option>
  236. </select>
  237. </span>
  238. </div>
  239. <div><button>还原默认</button><button onclick="updateSetting()">应用</button></div>
  240. </div>
  241. </div>
  242. <div class="filter submenu">
  243. <div class="title submenu_title" style="flex;">
  244. <span>分类标签</span>
  245. <span>
  246. <select id="tag_category_index" onchange="TagCategoryIndexchange(this)"></select>
  247. </span>
  248. </div>
  249. <div class='inner' style='max-height: unset;'>
  250. <div id='tag-category' ></div>
  251. </div>
  252. </div>
  253. <div class="filter submenu">
  254. <div class="title submenu_title"><span>作者</span><span><input type="input" placeholder="🔍" /></span></div>
  255. <div class='inner' id='filter-author' ></div>
  256. </div>
  257. </div>
  258. </div>
  259. <div id='course_head_bar' style='flex:6;padding:0 10px 10px 10px;'>
  260. <div class='index_inner '>
  261. <div style='display:flex;justify-content: space-between;display:none;'>
  262. <div> </div>
  263. <div style=''>
  264. <select onchange='viewChanged(this)'>
  265. <option value='list'>列表</option>
  266. <option value='card'>卡片</option>
  267. </select>
  268. </div>
  269. </div>
  270. <div>
  271. <div class='main_menu' id = 'main_menu'>
  272. </div>
  273. </div>
  274. <div id="main_tag" style="display:none;">
  275. <span tag="sutta" title="sutta"></span>
  276. <span tag="vinaya" title="vinaya"></span>
  277. <span tag="abhidhamma" title="abhidhamma"></span>
  278. <span tag="mūla" title="mūla"></span>
  279. <span tag="aṭṭhakathā" title="aṭṭhakathā"></span>
  280. <span tag="ṭīkā" title="ṭīkā"></span>
  281. <span tag="añña" title="añña"></span>
  282. </div>
  283. <div id="select_bar" >
  284. <div id="channel_selected"></div>
  285. <div id="tag_selected"></div>
  286. </div>
  287. <div id='bread-crumbs'></div>
  288. <div id='filter_bar'>
  289. <div id='filter_bar_left'></div>
  290. <div id='filter_bar_right'>
  291. <button id='btn-filter' onclick="tag_list_slide_toggle(this)">
  292. <svg class='icon' style='fill: var(--box-bg-color1)'>
  293. <use xlink:href='../../node_modules/bootstrap-icons/bootstrap-icons.svg#filter'>
  294. </svg>
  295. </button>
  296. </div>
  297. </div>
  298. <div>
  299. <div id="tag_list" style='display:none;'>
  300. <div id="tag_list_head" style="display:flex;justify-content: space-between;border-bottom: 1px solid var(--border-line-color);">
  301. <div style='width:20em;'>
  302. <input id="tag_input" type="input" placeholder="tag search" size="20">
  303. </div>
  304. <div>
  305. <button id="btn-tag_list_close" onclick='close_tag_list()'>X</button>
  306. </div>
  307. </div>
  308. <div level="0" class="tag_others"></div>
  309. <div level="1" class="tag_others"></div>
  310. <div level="2" class="tag_others"></div>
  311. <div level="3" class="tag_others"></div>
  312. <div level="4" class="tag_others"></div>
  313. <div level="5" class="tag_others"></div>
  314. <div level="100" class="tag_others"></div>
  315. <div level="8" class="tag_others"></div>
  316. </div>
  317. </div>
  318. <div class='index_inner'>
  319. <div id="chapter_shell" class="chapter_list" >
  320. <div id="list_shell_1" class="show" level="1">
  321. <ul id="list-1" class="grid" level="1" >
  322. </ul>
  323. <button>More</button>
  324. </div>
  325. <div id="list_shell_2" level="2">
  326. <ul id="list-2" class="hidden" level="2" >
  327. </ul>
  328. </div>
  329. <div id="list_shell_3" level="3">
  330. <ul id="list-3" class="hidden" level="3" >
  331. </ul>
  332. </div>
  333. <div id="list_shell_4" level="4">
  334. <ul id="list-4" class="hidden" level="4" >
  335. </ul>
  336. </div>
  337. <div id="list_shell_5" level="5">
  338. <ul id="list-5" class="hidden" level="5" >
  339. </ul>
  340. </div>
  341. <div id="list_shell_6" level="6">
  342. <ul id="list-6" class="hidden" level="6" >
  343. </ul>
  344. </div>
  345. <div id="list_shell_7" level="7">
  346. <ul id="list-7" class="hidden" level="7" >
  347. </ul>
  348. </div>
  349. <div id="list_shell_8" level="8">
  350. <ul id="list-8" class="hidden" level="8" >
  351. </ul>
  352. </div>
  353. </div>
  354. </div>
  355. </div>
  356. </div>
  357. <div style="flex:2;">
  358. <div class='bangdan' id = "user_recent">
  359. <div class='title'>最近阅读</div>
  360. <div class='list'>
  361. <div id="page_loader" class="lds-ellipsis" style="visibility: hidden;"><div></div><div></div><div></div><div></div></div>
  362. </div>
  363. </div>
  364. <div class='bangdan'>
  365. <div class='title'>求助</div>
  366. <div class='list'>
  367. <ul>
  368. <li>zuixin-1</li>
  369. </ul>
  370. </div>
  371. </div>
  372. <div class='bangdan'>
  373. <div class='title'>社区推荐</div>
  374. <div class='list'>
  375. <ul>
  376. <li>zuixin-1</li>
  377. </ul>
  378. </div>
  379. </div>
  380. <div class='bangdan' id='contribution'>
  381. <div class='title'>月度贡献</div>
  382. <div class='list'>
  383. <ul>
  384. <li>zuixin-1</li>
  385. </ul>
  386. </div>
  387. </div>
  388. </div>
  389. </div>
  390. <script>
  391. $(document).ready(function() {
  392. let indexFilename = localStorage.getItem('palicanon_tag_category');
  393. if(!indexFilename){
  394. indexFilename = "defualt";
  395. }
  396. loadTagCategory(indexFilename);
  397. loadTagCategoryIndex();
  398. loadFilterSetting();//载入上次的过滤器配置
  399. LoadAllLanguage();
  400. <?php
  401. if(isset($_GET["view"])){
  402. echo "_view = '{$_GET["view"]}';";
  403. }else{
  404. echo "_view = 'community';";
  405. echo "updataHistory();";
  406. }
  407. if(isset($_GET["tag"])){
  408. echo "_tags = '{$_GET["tag"]}';";
  409. }
  410. if(isset($_GET["channel"])){
  411. echo "_channel = '{$_GET["channel"]}';";
  412. }
  413. switch ($_view) {
  414. case 'community':
  415. //echo "community_onload();";
  416. break;
  417. case 'category':
  418. //echo "palicanon_onload();";
  419. break;
  420. case 'my';
  421. default:
  422. # code...
  423. break;
  424. }
  425. ?>
  426. list_tag = _tags.split(',');
  427. refresh_selected_tag();
  428. ReanderMainMenu();
  429. updateFirstListView();
  430. //载入用户最近的阅读列表
  431. loadUserRecent();
  432. loadContribution();
  433. });
  434. </script>
  435. <?php
  436. include "../pcdl/html_foot.php";
  437. ?>