base.html 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342
  1. {% load static %}
  2. <!DOCTYPE html>
  3. <html>
  4. <head>
  5. <meta charset="utf-8"/>
  6. <meta name="baidu-site-verification" content="codeva-y7kl5gdyM4"/>
  7. <meta content="IE=edge,chrome=1" http-equiv="X-UA-Compatible"/>
  8. <meta
  9. name="viewport"
  10. content="width=device-width, initial-scale=1, maximum-scale=2, user-scalable=no"
  11. />
  12. <meta
  13. name="description"
  14. content="CyberSicko.net"
  15. />
  16. <link rel="shortcut icon" href="{% static 'favicon.ico' %}">
  17. <meta name="keywords" content="Semantic-UI, Theme, Design, Template"/>
  18. <meta name="author" content="CyberSicko"/>
  19. <meta name="theme-color" content="#ffffff"/>
  20. <title>CyberSicko.NET</title>
  21. <link rel="preconnect" href="https://fonts.googleapis.com">
  22. <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
  23. <link href="https://fonts.googleapis.com/css2?family=Noto+Serif+SC:wght@200;300;400;500;600;700;900&display=swap"
  24. rel="stylesheet">
  25. <link
  26. rel="stylesheet"
  27. href="{% static 'semantic.min.css' %}"
  28. type="text/css"
  29. />
  30. <link
  31. rel="stylesheet"
  32. href="{% static 'photoswipe/photoswipe.css' %}"
  33. type="text/css"
  34. />
  35. {% if is_login %}
  36. <link href="https://unpkg.com/@wangeditor/editor@latest/dist/css/style.css" rel="stylesheet">
  37. {% endif %}
  38. <style>
  39. :root {
  40. --primary: #333333;
  41. --bg-light: #f8f8f8;
  42. --text: #333;
  43. --gray: #666;
  44. --line-height: 1.8;
  45. --max-width: 900px;
  46. --sidebar-width: 300px;
  47. }
  48. body {
  49. color: var(--text);
  50. background: whitesmoke;
  51. line-height: var(--line-height);
  52. }
  53. /* 主容器:限制最大宽度并居中 */
  54. .ui.grid.stackable.container {
  55. max-width: var(--max-width);
  56. margin: 2rem auto;
  57. padding: 0 1rem;
  58. }
  59. /* 段落与标题留白 */
  60. p {
  61. margin-bottom: 1rem;
  62. }
  63. h2.ui.header {
  64. margin-top: 2rem;
  65. margin-bottom: 1rem;
  66. }
  67. /* 卡片式内容区 */
  68. .eleven.wide.column {
  69. background: #fff;
  70. padding: 2rem;
  71. box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  72. border-radius: 4px;
  73. }
  74. /* 代码块滚动与样式 */
  75. .pre {
  76. overflow-x: auto;
  77. padding: 1rem;
  78. background: #fafafa;
  79. border-left: 3px solid var(--primary);
  80. margin: 1.5rem 0;
  81. }
  82. /* 顶部菜单去掉死板的灰色,增加一点阴影 */
  83. .ui.top.fixed.menu {
  84. background: #fff;
  85. box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
  86. }
  87. /* 菜单项内边距更舒适 */
  88. .ui.menu .item {
  89. padding: 0.8rem 1.2rem;
  90. font-size: 1rem;
  91. }
  92. /* 移动端:展开动画更顺滑 */
  93. .ui.vertical.menu {
  94. transition: max-height .3s ease-out;
  95. overflow: hidden;
  96. }
  97. .ui.vertical.menu.collapsed {
  98. max-height: 0 !important;
  99. }
  100. .ui.vertical.menu.expanded {
  101. max-height: 500px !important;
  102. }
  103. /* 右侧 Archiv/Top 区域在大屏下保持粘性 */
  104. .four.wide.right.floated.column {
  105. position: sticky;
  106. top: 80px; /* 根据你的导航高度微调 */
  107. max-width: var(--sidebar-width);
  108. margin-left: 2rem;
  109. }
  110. /* 调整归档和标签列表间距 */
  111. .ui.list .item {
  112. padding: .5rem 0;
  113. }
  114. </style>
  115. <style type="text/css">
  116. p {
  117. font-size: 1.2em;
  118. }
  119. body {
  120. padding-top: 54px;
  121. -webkit-font-smoothing: antialiased;
  122. -moz-font-smoothing: grayscale;
  123. }
  124. .ui.borderless.menu {
  125. background-color: #f8f8f8;
  126. {#box-shadow: none;#} flex-wrap: wrap;
  127. border: none;
  128. padding-left: 0;
  129. padding-right: 0;
  130. }
  131. .ui.borderless.menu .header.item {
  132. font-size: 18px;
  133. font-weight: 400;
  134. }
  135. .ui.mobile.only.grid .ui.menu .ui.vertical.menu {
  136. display: none;
  137. }
  138. .ui.mobile.only.grid .ui.vertical.menu .dropdown.icon {
  139. float: unset;
  140. }
  141. .ui.mobile.only.grid .ui.vertical.menu .dropdown.icon:before {
  142. content: "\f0d7";
  143. }
  144. .ui.mobile.only.grid .ui.vertical.menu .ui.dropdown.item .menu {
  145. position: static;
  146. width: 100%;
  147. background-color: unset;
  148. border: none;
  149. box-shadow: none;
  150. }
  151. .ui.mobile.only.grid .ui.vertical.menu .ui.dropdown.item .menu {
  152. margin-top: 6px;
  153. }
  154. .ui.container > .ui.message {
  155. background-color: rga(238, 238, 238);
  156. box-shadow: none;
  157. padding: 5rem 4rem;
  158. margin-top: 1rem;
  159. }
  160. .ui.message h1.ui.header {
  161. font-size: 4.5rem;
  162. }
  163. .ui.message p.lead {
  164. font-size: 1.3rem;
  165. color: #333333;
  166. line-height: 1.4;
  167. font-weight: 300;
  168. }
  169. p > a > img {
  170. width: 100px;
  171. height: 100px;
  172. }
  173. {% block css %}
  174. {% endblock %}
  175. </style>
  176. </head>
  177. <body id="root">
  178. {% if is_login %}
  179. {% csrf_token %}
  180. {% endif %}
  181. <div class="ui tablet computer only padded grid">
  182. <div class="ui top fixed borderless fluid huge menu">
  183. <div class="ui container">
  184. <a href="/" class="header item " >CyberSicko.net</a>
  185. <a href="{% url 'index' %}" class="{% if current_category == None %}
  186. active
  187. {% else %}
  188. {% endif %} item">主页</a>
  189. {% for item in category %}
  190. {# <li class="category_li"><a href="/category/{{ item.name }}?page=1">{{ item.name }}</a></li>#}
  191. <a class="{% if current_category != None and current_category == item.name %}
  192. active
  193. {% else %}
  194. {% endif %} item" href="/category/{{ item.name }}?page=1">{{ item.name }}</a>
  195. {% endfor %}
  196. <div class="right menu">
  197. <div id="dropdown1" class="ui dropdown item right">关联<i class="dropdown icon"></i>
  198. <div class="menu">
  199. <a class="item" href="http://git.cybersicko.net"><i class="gitlab icon"></i>GOGS</a>
  200. <a class="item" href="http://files.cybersicko.net"><i class="file icon"></i>Files</a>
  201. </div>
  202. </div>
  203. <a href="/login" class="item"> <i class="icon share square"></i>
  204. Sign in</a>
  205. </div>
  206. </div>
  207. </div>
  208. </div>
  209. <div class="ui mobile only padded grid">
  210. <div class="ui top fixed borderless huge fluid menu">
  211. <a href="/" class="header item " >CyberSicko.net</a>
  212. <div class="right menu">
  213. <div class="item">
  214. <button class="ui icon toggle basic button">
  215. <i class="content icon"></i>
  216. </button>
  217. </div>
  218. </div>
  219. <div class="ui vertical borderless fluid menu">
  220. <a href="{% url 'index' %}" class="{% if current_category == None %}
  221. active
  222. {% else %}
  223. {% endif %} item">主页</a>
  224. {% for item in category %}
  225. {# <li class="category_li"><a href="/category/{{ item.name }}?page=1">{{ item.name }}</a></li>#}
  226. <a class="{% if current_category != None and current_category == item.name %}
  227. active
  228. {% else %}
  229. {% endif %} item" href="/category/{{ item.name }}?page=1">{{ item.name }}</a>
  230. {% endfor %}
  231. <a href="/login" class="item"> <i class="icon share square"></i>
  232. Sign in</a>
  233. <div id="dropdown1" class="ui dropdown item right">关联<i class="dropdown icon"></i>
  234. <div class="menu">
  235. <a class="item" href="http://git.cybersicko.net"><i class="gitlab icon"></i>GOGS</a>
  236. <a class="item" href="http://files.cybersicko.net"><i class="file icon"></i>Files</a>
  237. </div>
  238. </div>
  239. </div>
  240. </div>
  241. </div>
  242. {% block container %}
  243. {% endblock %}
  244. <footer style="margin-top: 50px" class="ui secondary segment">
  245. <div class="ui two column stackable grid">
  246. <div class="ten wide column">
  247. <img style="width: 8rem" src="{% static '/img.png' %}">
  248. <p> © 2023 - 2023 cybersicko.net - All Rights Reserved.</p>
  249. </div>
  250. <div class="six wide column">
  251. <div class="ui left aligned container" style="margin-top:10px">
  252. <a target="_blank" href="http://www.beian.gov.cn/portal/registerSystemInfo?recordcode=50019002503732"
  253. style="display:inline-block;text-decoration:none;height:20px;line-height:20px;"><img
  254. src="{% static '/备案图标.png' %}" style="float:left;"/>
  255. <p style="float:left;height:20px;line-height:20px;margin: 0px 0px 0px 5px; color:#939393;"> 渝公网安备
  256. 50019002503732号</p></a>
  257. <a rel="nofollow"
  258. href="http://beian.miit.gov.cn/publish/query/indexFirst.action"
  259. target="_blank"><p>皖ICP备2023011943号</p></a>
  260. </div>
  261. </div>
  262. </div>
  263. </footer>
  264. <script type="application/javascript" src="{% static 'js/jquery.min.js' %}"></script>
  265. <script type="application/javascript" src="{% static 'semantic.js' %}"></script>
  266. <script type="application/javascript" src="{% static 'photoswipe/photoswipe.umd.min.js' %}"></script>
  267. <script type="application/javascript" src="{% static 'photoswipe/photoswipe-lightbox.umd.min.js' %}"></script>
  268. <script>
  269. $('#search')
  270. .search({
  271. type: 'category',
  272. minCharacters: 3,
  273. apiSettings: {
  274. url: '/search?keywords={query}'
  275. }
  276. })
  277. var lightbox = new PhotoSwipeLightbox({
  278. gallery: '.extra.images',
  279. children: 'a',
  280. // dynamic import is not supported in UMD version
  281. pswpModule: PhotoSwipe
  282. });
  283. lightbox.init();
  284. $(document).ready(function () {
  285. $(".ui.toggle.button").click(function () {
  286. $(".mobile.only.grid .ui.vertical.menu").toggle(100);
  287. });
  288. $(".ui.dropdown").dropdown();
  289. });
  290. </script>
  291. {% block js %}
  292. {% endblock %}
  293. <script>
  294. </script>
  295. </body>
  296. </html>