index1.php 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414
  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. <style>
  29. .chapter_list ul {
  30. margin-left: 0;
  31. }
  32. .head_bar{
  33. display: flex;
  34. flex-direction: column;
  35. }
  36. #left-bar{
  37. flex: 2;
  38. background-color: var(--box-bg-color2);
  39. }
  40. .chapter_list ul li .main{
  41. display:flex;
  42. }
  43. .book_view ul li{
  44. display:block;
  45. }
  46. .book_view .level_1{
  47. background:unset;
  48. }
  49. .book_view ul li{
  50. border:unset;
  51. width: 30%;
  52. height:90px;
  53. }
  54. .chapter_list .list {
  55. display: none;
  56. }
  57. .chapter_list .show {
  58. display: block;
  59. width: 100%;
  60. }
  61. .chapter_list .grid {
  62. width: 100%;
  63. }
  64. .chapter_list > div {
  65. max-height: unset;
  66. overflow-y: unset;
  67. }
  68. .chapter_list .more_info{
  69. display:flex;
  70. font-size:80%;
  71. color: var(--main-color1);
  72. justify-content: space-between;
  73. }
  74. }
  75. .more_info>.palicanon_chapter_info>.item{
  76. margin-right:1em;
  77. }
  78. .left_item>.item{
  79. margin-right:1em;
  80. }
  81. .filter>.inner {
  82. max-height: 200px;
  83. overflow-y: auto;
  84. background-color: var(--input-bg-color);
  85. }
  86. .main_menu {
  87. font-size: 100%;
  88. text-align: center;
  89. margin: 0 1em;
  90. transition: all 600ms ease;
  91. text-transform: capitalize;
  92. }
  93. .main_menu>span {
  94. margin: 2px;
  95. padding: 2px 12px;
  96. font-weight: 500;
  97. transition-duration: 0.2s;
  98. cursor: pointer;
  99. font-size: 120%;
  100. border: unset;
  101. border-radius: 0;
  102. border-bottom: 2px solid var(--nocolor);
  103. display: inline-block;
  104. }
  105. .main_menu>.select {
  106. border-bottom: 2px solid var(--link-color);
  107. }
  108. .main_menu>span>a {
  109. color:unset;
  110. }
  111. .main_menu span:hover {
  112. background-color: unset;
  113. color: unset;
  114. border-color: var(--link-hover-color);
  115. }
  116. select#tag_category_index option {
  117. background-color: gray;
  118. }
  119. button.active {
  120. background-color: gray;
  121. }
  122. .chapter_list ul li>.main>.left{
  123. width: 100px;
  124. display: flex;
  125. flex-direction: row;
  126. justify-content: space-between;
  127. }
  128. .chapter_list ul li>.main>.right{
  129. width:100%;
  130. }
  131. .chapter_tag {
  132. width: 475px;
  133. padding: 5px 0;
  134. overflow-y: visible;
  135. overflow-x: auto;
  136. display: flex;
  137. flex-wrap: wrap;
  138. }
  139. .left_item {
  140. margin: 4px 0;
  141. }
  142. .left_item>.item>.small_icon{
  143. width:16px;
  144. height:16px;
  145. }
  146. .left_item>.item>.text{
  147. padding:5px;
  148. }
  149. div#tag_list {
  150. background-color: var(--btn-color);
  151. padding: 5px;
  152. display: none;
  153. }
  154. div#info_bar_left {
  155. font-size: 120%;
  156. }
  157. #more_chapter {
  158. text-align: center;
  159. }
  160. #more_chapter_line {
  161. border-bottom: 1px solid var(--border-line-color);
  162. height: 1em;
  163. }
  164. #btn_more_chapter{
  165. position: absolute;
  166. margin-top: -1.1em;
  167. background-color: var(--link-color);
  168. color: var(--bg-color);
  169. border: none;
  170. padding: 2px 40px;
  171. margin-left: -5em;
  172. }
  173. </style>
  174. <?php
  175. if(isset($_GET["view"])){
  176. $_view = $_GET["view"];
  177. }else{
  178. $_view = "community";
  179. }
  180. ?>
  181. <div style="display:flex;">
  182. <div id='left-bar' >
  183. <div id='left-bar-inner'>
  184. <div class="filter submenu">
  185. <div class="title submenu_title" style="flex;">
  186. <span>分类标签</span>
  187. <span>
  188. <select id="tag_category_index" onchange="TagCategoryIndexchange(this)">
  189. </select>
  190. </span>
  191. </div>
  192. <div class='inner' >
  193. <div id='tag-category' >
  194. </div>
  195. </div>
  196. </div>
  197. <div class="filter submenu">
  198. <div class="title submenu_title">作者</div>
  199. <div class='inner' id='filter-author' >
  200. </div>
  201. </div>
  202. <div class="filter submenu">
  203. <div class="title submenu_title">语言</div>
  204. <div class='inner' id='filter-lang' >
  205. </div>
  206. </div>
  207. <div class="filter submenu">
  208. <div class="title submenu_title">类型</div>
  209. <div class='inner' id='filter-type' >
  210. </div>
  211. </div>
  212. </div>
  213. </div>
  214. <div id='course_head_bar' style='flex:6;padding:0 10px 10px 10px;'>
  215. <div class='index_inner '>
  216. <div style='display:flex;justify-content: space-between;display:none;'>
  217. <div> </div>
  218. <div style=''>
  219. <select onchange='viewChanged(this)'>
  220. <option value='list'>列表</option>
  221. <option value='card'>卡片</option>
  222. </select>
  223. </div>
  224. </div>
  225. <div>
  226. <div class='main_menu' id = 'main_menu'>
  227. </div>
  228. </div>
  229. <div id="main_tag" style="display:none;">
  230. <span tag="sutta" title="sutta"></span>
  231. <span tag="vinaya" title="vinaya"></span>
  232. <span tag="abhidhamma" title="abhidhamma"></span>
  233. <span tag="mūla" title="mūla"></span>
  234. <span tag="aṭṭhakathā" title="aṭṭhakathā"></span>
  235. <span tag="ṭīkā" title="ṭīkā"></span>
  236. <span tag="añña" title="añña"></span>
  237. </div>
  238. <div id="select_bar" >
  239. <div id="tag_selected"></div>
  240. <div>
  241. </div>
  242. </div>
  243. <div>
  244. <div id="tag_list" style='display:none;'>
  245. <div id="tag_list_head" style="display:flex;justify-content: space-between;border-bottom: 1px solid var(--border-line-color);">
  246. <div style='width:20em;'>
  247. <input id="tag_input" type="input" placeholder="tag search" size="20">
  248. </div>
  249. <div>
  250. <button id="btn-tag_list_close" onclick='close_tag_list()'>X</button>
  251. </div>
  252. </div>
  253. <div level="0" class="tag_others"></div>
  254. <div level="1" class="tag_others"></div>
  255. <div level="2" class="tag_others"></div>
  256. <div level="3" class="tag_others"></div>
  257. <div level="4" class="tag_others"></div>
  258. <div level="5" class="tag_others"></div>
  259. <div level="100" class="tag_others"></div>
  260. <div level="8" class="tag_others"></div>
  261. </div>
  262. </div>
  263. <div id='bread-crumbs'></div>
  264. <div id='info_bar'>
  265. <div id='info_bar_left'>
  266. </div>
  267. </div>
  268. <div class='index_inner'>
  269. <div id="chapter_shell" class="chapter_list" >
  270. <div id="list_shell_1" class="show" level="1">
  271. <ul id="list-1" class="grid" level="1" >
  272. </ul>
  273. <button>More</button>
  274. </div>
  275. <div id="list_shell_2" level="2">
  276. <ul id="list-2" class="hidden" level="2" >
  277. </ul>
  278. </div>
  279. <div id="list_shell_3" level="3">
  280. <ul id="list-3" class="hidden" level="3" >
  281. </ul>
  282. </div>
  283. <div id="list_shell_4" level="4">
  284. <ul id="list-4" class="hidden" level="4" >
  285. </ul>
  286. </div>
  287. <div id="list_shell_5" level="5">
  288. <ul id="list-5" class="hidden" level="5" >
  289. </ul>
  290. </div>
  291. <div id="list_shell_6" level="6">
  292. <ul id="list-6" class="hidden" level="6" >
  293. </ul>
  294. </div>
  295. <div id="list_shell_7" level="7">
  296. <ul id="list-7" class="hidden" level="7" >
  297. </ul>
  298. </div>
  299. <div id="list_shell_8" level="8">
  300. <ul id="list-8" class="hidden" level="8" >
  301. </ul>
  302. </div>
  303. </div>
  304. </div>
  305. </div>
  306. </div>
  307. <div style="flex:2;">
  308. <div class='bangdan' id = "user_recent">
  309. <div class='title'>最近阅读</div>
  310. <div class='list'>
  311. <ul>
  312. <li>zuixin-1</li>
  313. </ul>
  314. </div>
  315. </div>
  316. <div class='bangdan'>
  317. <div class='title'>求助</div>
  318. <div class='list'>
  319. <ul>
  320. <li>zuixin-1</li>
  321. </ul>
  322. </div>
  323. </div>
  324. <div class='bangdan'>
  325. <div class='title'>社区推荐</div>
  326. <div class='list'>
  327. <ul>
  328. <li>zuixin-1</li>
  329. </ul>
  330. </div>
  331. </div>
  332. <div class='bangdan' id='contribution'>
  333. <div class='title'>月度贡献</div>
  334. <div class='list'>
  335. <ul>
  336. <li>zuixin-1</li>
  337. </ul>
  338. </div>
  339. </div>
  340. </div>
  341. </div>
  342. <script>
  343. $(document).ready(function() {
  344. let indexFilename = localStorage.getItem('palicanon_tag_category');
  345. if(!indexFilename){
  346. indexFilename = "defualt";
  347. }
  348. loadTagCategory(indexFilename);
  349. loadTagCategoryIndex();
  350. <?php
  351. if(isset($_GET["view"])){
  352. echo "_view = '{$_GET["view"]}';";
  353. }
  354. switch ($_view) {
  355. case 'community':
  356. echo "community_onload();";
  357. break;
  358. case 'category':
  359. echo "palicanon_onload();";
  360. break;
  361. case 'my';
  362. default:
  363. # code...
  364. break;
  365. }
  366. ?>
  367. ReanderMainMenu();
  368. updateFirstListView();
  369. loadUserRecent();
  370. loadContribution();
  371. });
  372. </script>
  373. <?php
  374. include "../pcdl/html_foot.php";
  375. ?>