print.php 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180
  1. <?php
  2. require_once __DIR__."/../config.php";
  3. require_once "../pcdl/html_head.php";
  4. ?>
  5. <body style="margin: 0;padding: 0;" class="reader_body" >
  6. <script>
  7. var gCaseTable=<?php echo file_get_contents("../public/js/case.json"); ?>
  8. </script>
  9. <script src="./article.js"></script>
  10. <script>
  11. <?php
  12. $_id = "";
  13. $_display = "";
  14. $_channal = "";
  15. $_collect = "";
  16. if(isset($_GET["view"])){
  17. echo "_view='".$_GET["view"]."';";
  18. }
  19. else{
  20. echo "_view='article';";
  21. }
  22. if(isset($_GET["collection"])){
  23. echo "_collection_id='".$_GET["collection"]."';";
  24. }
  25. if(isset($_GET["channel"])){
  26. echo "_channal='".$_GET["channel"]."';";
  27. }
  28. if(isset($_GET["mode"]) && $_GET["mode"]=="edit" && isset($_COOKIE["userid"])){
  29. #登录状态下 编辑模式
  30. $_mode = "edit";
  31. echo "_mode='edit';";
  32. $classMode="edit_mode";
  33. }
  34. else{
  35. $_mode = "read";
  36. echo "_mode='read';";
  37. $classMode="read_mode";
  38. }
  39. if(isset($_GET["display"])){
  40. if($_mode == "edit"){
  41. $_display = "sent";
  42. echo "_display='sent';";
  43. }
  44. else{
  45. $_display = $_GET["display"];
  46. echo "_display='".$_GET["display"]."';";
  47. }
  48. }
  49. else{
  50. if($_mode=="read"){
  51. $_display = "para";
  52. echo "_display='para';";
  53. }
  54. else{
  55. $_display = "sent";
  56. echo "_display='sent';";
  57. }
  58. }
  59. if(isset($_GET["direction"])){
  60. $_direction = $_GET["direction"];
  61. echo "_direction='".$_GET["direction"]."';";
  62. }
  63. else{
  64. if($_mode=="read"){
  65. $_direction = "row";
  66. echo "_direction='row';";
  67. }
  68. else{
  69. $_direction = "col";
  70. echo "_direction='col';";
  71. }
  72. }
  73. $contentClass= "";
  74. if($_direction=="row"){
  75. $contentClass .= ' horizontal ';
  76. }
  77. else{
  78. $contentClass .= ' vertical ';
  79. }
  80. if($_display=="para"){
  81. $contentClass .= ' para_mode ';
  82. }
  83. else{
  84. $contentClass .= ' sent_mode ';
  85. }
  86. $contentClass .= " $_mode ";
  87. ?>
  88. </script>
  89. <link type="text/css" rel="stylesheet" href="style.css" />
  90. <script src="../article/my_collect.js" type="text/javascript"></script>
  91. <script src="../../node_modules/mustache/mustache.js"></script>
  92. <style>
  93. ul.fancytree-container{
  94. border:unset;
  95. width: max-content;
  96. }
  97. .fancytree-container .active {
  98. font-weight: 700;
  99. color: var(--main-color);
  100. background: linear-gradient(to right, var(--link-color), var(--nocolor));
  101. border-radius: 5px;
  102. }
  103. span.fancytree-title{
  104. color: var(--main-color1);
  105. }
  106. span.fancytree-node{
  107. display: flex;
  108. }
  109. #content_toc>ul>li>span.fancytree-node{
  110. font-size: 120%;
  111. font-weight: 900;
  112. }
  113. #article_path chapter{
  114. display:unset;
  115. }
  116. #contents ul, li {
  117. margin-block-start: 0.5em;
  118. margin-block-end: 0.5em;
  119. margin-left: 7px;
  120. }
  121. .click_dropdown_div{
  122. align-self: center;
  123. }
  124. .channel_select_button{
  125. color: var(--link-color);
  126. }
  127. .channel_select_button:hover{
  128. text-decoration-line: underline;
  129. }
  130. .sent_tran_div a{
  131. white-space: normal;
  132. overflow-wrap: anywhere;
  133. }
  134. .para_tran_div a{
  135. white-space: normal;
  136. overflow-wrap: anywhere;
  137. }
  138. </style>
  139. <div id="main_view" class="main_view <?php echo $classMode;?>">
  140. </div>
  141. <script>
  142. $(document).ready(function(){
  143. note_create();
  144. historay_init();
  145. collection_load(_collection_id);
  146. });
  147. </script>
  148. </body>
  149. </html>