index1.php 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484
  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>
  211. <option value=''>全部</option>
  212. <option value='translation'>译文</option>
  213. <option value='nissaya'>Nissaya</option>
  214. <option value='commentray'>注疏</option>
  215. </select>
  216. </span>
  217. </div>
  218. <div class='settting-item'>
  219. <span>完成度阈值</span>
  220. <span>
  221. <select>
  222. <option value='0.9'>90</option>
  223. <option value='0.8'>80</option>
  224. <option value='0.7'>70</option>
  225. </select>
  226. </span>
  227. </div>
  228. <div class='settting-item'>
  229. <span>语言</span>
  230. <span>
  231. <select>
  232. <option value=''>全部</option>
  233. <option value='zh'>中文</option>
  234. <option value='en'>英文</option>
  235. </select>
  236. </span>
  237. </div>
  238. <div><button>还原默认</button><button>应用</button></div>
  239. </div>
  240. </div>
  241. <div class="filter submenu">
  242. <div class="title submenu_title" style="flex;">
  243. <span>分类标签</span>
  244. <span>
  245. <select id="tag_category_index" onchange="TagCategoryIndexchange(this)"></select>
  246. </span>
  247. </div>
  248. <div class='inner' style='max-height: unset;'>
  249. <div id='tag-category' ></div>
  250. </div>
  251. </div>
  252. <div class="filter submenu">
  253. <div class="title submenu_title">作者</div>
  254. <div class='inner' id='filter-author' ></div>
  255. </div>
  256. <div class="filter submenu">
  257. <div class="title submenu_title">语言</div>
  258. <div class='inner' id='filter-lang' ></div>
  259. </div>
  260. <div class="filter submenu">
  261. <div class="title submenu_title">类型</div>
  262. <div class='inner' id='filter-type' ></div>
  263. </div>
  264. </div>
  265. </div>
  266. <div id='course_head_bar' style='flex:6;padding:0 10px 10px 10px;'>
  267. <div class='index_inner '>
  268. <div style='display:flex;justify-content: space-between;display:none;'>
  269. <div> </div>
  270. <div style=''>
  271. <select onchange='viewChanged(this)'>
  272. <option value='list'>列表</option>
  273. <option value='card'>卡片</option>
  274. </select>
  275. </div>
  276. </div>
  277. <div>
  278. <div class='main_menu' id = 'main_menu'>
  279. </div>
  280. </div>
  281. <div id="main_tag" style="display:none;">
  282. <span tag="sutta" title="sutta"></span>
  283. <span tag="vinaya" title="vinaya"></span>
  284. <span tag="abhidhamma" title="abhidhamma"></span>
  285. <span tag="mūla" title="mūla"></span>
  286. <span tag="aṭṭhakathā" title="aṭṭhakathā"></span>
  287. <span tag="ṭīkā" title="ṭīkā"></span>
  288. <span tag="añña" title="añña"></span>
  289. </div>
  290. <div id="select_bar" >
  291. <div id="channel_selected"></div>
  292. <div id="tag_selected"></div>
  293. </div>
  294. <div id='bread-crumbs'></div>
  295. <div id='filter_bar'>
  296. <div id='filter_bar_left'></div>
  297. <div id='filter_bar_right'>
  298. <button id='btn-filter' onclick="tag_list_slide_toggle(this)">
  299. <svg class='icon' style='fill: var(--box-bg-color1)'>
  300. <use xlink:href='../../node_modules/bootstrap-icons/bootstrap-icons.svg#filter'>
  301. </svg>
  302. </button>
  303. </div>
  304. </div>
  305. <div>
  306. <div id="tag_list" style='display:none;'>
  307. <div id="tag_list_head" style="display:flex;justify-content: space-between;border-bottom: 1px solid var(--border-line-color);">
  308. <div style='width:20em;'>
  309. <input id="tag_input" type="input" placeholder="tag search" size="20">
  310. </div>
  311. <div>
  312. <button id="btn-tag_list_close" onclick='close_tag_list()'>X</button>
  313. </div>
  314. </div>
  315. <div level="0" class="tag_others"></div>
  316. <div level="1" class="tag_others"></div>
  317. <div level="2" class="tag_others"></div>
  318. <div level="3" class="tag_others"></div>
  319. <div level="4" class="tag_others"></div>
  320. <div level="5" class="tag_others"></div>
  321. <div level="100" class="tag_others"></div>
  322. <div level="8" class="tag_others"></div>
  323. </div>
  324. </div>
  325. <div class='index_inner'>
  326. <div id="chapter_shell" class="chapter_list" >
  327. <div id="list_shell_1" class="show" level="1">
  328. <ul id="list-1" class="grid" level="1" >
  329. </ul>
  330. <button>More</button>
  331. </div>
  332. <div id="list_shell_2" level="2">
  333. <ul id="list-2" class="hidden" level="2" >
  334. </ul>
  335. </div>
  336. <div id="list_shell_3" level="3">
  337. <ul id="list-3" class="hidden" level="3" >
  338. </ul>
  339. </div>
  340. <div id="list_shell_4" level="4">
  341. <ul id="list-4" class="hidden" level="4" >
  342. </ul>
  343. </div>
  344. <div id="list_shell_5" level="5">
  345. <ul id="list-5" class="hidden" level="5" >
  346. </ul>
  347. </div>
  348. <div id="list_shell_6" level="6">
  349. <ul id="list-6" class="hidden" level="6" >
  350. </ul>
  351. </div>
  352. <div id="list_shell_7" level="7">
  353. <ul id="list-7" class="hidden" level="7" >
  354. </ul>
  355. </div>
  356. <div id="list_shell_8" level="8">
  357. <ul id="list-8" class="hidden" level="8" >
  358. </ul>
  359. </div>
  360. </div>
  361. </div>
  362. </div>
  363. </div>
  364. <div style="flex:2;">
  365. <div class='bangdan' id = "user_recent">
  366. <div class='title'>最近阅读</div>
  367. <div class='list'>
  368. <div id="page_loader" class="lds-ellipsis" style="visibility: hidden;"><div></div><div></div><div></div><div></div></div>
  369. </div>
  370. </div>
  371. <div class='bangdan'>
  372. <div class='title'>求助</div>
  373. <div class='list'>
  374. <ul>
  375. <li>zuixin-1</li>
  376. </ul>
  377. </div>
  378. </div>
  379. <div class='bangdan'>
  380. <div class='title'>社区推荐</div>
  381. <div class='list'>
  382. <ul>
  383. <li>zuixin-1</li>
  384. </ul>
  385. </div>
  386. </div>
  387. <div class='bangdan' id='contribution'>
  388. <div class='title'>月度贡献</div>
  389. <div class='list'>
  390. <ul>
  391. <li>zuixin-1</li>
  392. </ul>
  393. </div>
  394. </div>
  395. </div>
  396. </div>
  397. <script>
  398. $(document).ready(function() {
  399. let indexFilename = localStorage.getItem('palicanon_tag_category');
  400. if(!indexFilename){
  401. indexFilename = "defualt";
  402. }
  403. loadTagCategory(indexFilename);
  404. loadTagCategoryIndex();
  405. <?php
  406. if(isset($_GET["view"])){
  407. echo "_view = '{$_GET["view"]}';";
  408. }else{
  409. echo "_view = 'community';";
  410. echo "updataHistory();";
  411. }
  412. if(isset($_GET["tag"])){
  413. echo "_tags = '{$_GET["tag"]}';";
  414. }
  415. if(isset($_GET["channel"])){
  416. echo "_channel = '{$_GET["channel"]}';";
  417. }
  418. switch ($_view) {
  419. case 'community':
  420. //echo "community_onload();";
  421. break;
  422. case 'category':
  423. //echo "palicanon_onload();";
  424. break;
  425. case 'my';
  426. default:
  427. # code...
  428. break;
  429. }
  430. ?>
  431. list_tag = _tags.split(',');
  432. refresh_selected_tag();
  433. ReanderMainMenu();
  434. updateFirstListView();
  435. //载入用户最近的阅读列表
  436. loadUserRecent();
  437. loadContribution();
  438. });
  439. </script>
  440. <?php
  441. include "../pcdl/html_foot.php";
  442. ?>