base.html 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208
  1. {% load static %}
  2. <!DOCTYPE html>
  3. <html>
  4. <head>
  5. <meta charset="utf-8"/>
  6. <meta content="IE=edge,chrome=1" http-equiv="X-UA-Compatible"/>
  7. <meta
  8. name="viewport"
  9. content="width=device-width, initial-scale=1, maximum-scale=2, user-scalable=no"
  10. />
  11. <meta
  12. name="description"
  13. content="CyberSicko.net"
  14. />
  15. <link rel="shortcut icon" href="{% static 'favicon.ico' %}">
  16. <meta name="keywords" content="Semantic-UI, Theme, Design, Template"/>
  17. <meta name="author" content="CyberSicko"/>
  18. <meta name="theme-color" content="#ffffff"/>
  19. <title>CyberSicko.NET</title>
  20. <link
  21. rel="stylesheet"
  22. href="{% static 'semantic.min.css' %}"
  23. type="text/css"
  24. />
  25. <link
  26. rel="stylesheet"
  27. href="{% static 'photoswipe/photoswipe.css' %}"
  28. type="text/css"
  29. />
  30. {% if is_login %}
  31. <link href="https://unpkg.com/@wangeditor/editor@latest/dist/css/style.css" rel="stylesheet">
  32. {% endif %}
  33. <style type="text/css">
  34. p {
  35. font-size: 1.2em;
  36. }
  37. body {
  38. padding-top: 54px;
  39. -webkit-font-smoothing: antialiased;
  40. -moz-font-smoothing: grayscale;
  41. }
  42. .ui.borderless.menu {
  43. background-color: #f8f8f8;
  44. {#box-shadow: none;#} flex-wrap: wrap;
  45. border: none;
  46. padding-left: 0;
  47. padding-right: 0;
  48. }
  49. .ui.borderless.menu .header.item {
  50. font-size: 18px;
  51. font-weight: 400;
  52. }
  53. .ui.mobile.only.grid .ui.menu .ui.vertical.menu {
  54. display: none;
  55. }
  56. .ui.mobile.only.grid .ui.vertical.menu .dropdown.icon {
  57. float: unset;
  58. }
  59. .ui.mobile.only.grid .ui.vertical.menu .dropdown.icon:before {
  60. content: "\f0d7";
  61. }
  62. .ui.mobile.only.grid .ui.vertical.menu .ui.dropdown.item .menu {
  63. position: static;
  64. width: 100%;
  65. background-color: unset;
  66. border: none;
  67. box-shadow: none;
  68. }
  69. .ui.mobile.only.grid .ui.vertical.menu .ui.dropdown.item .menu {
  70. margin-top: 6px;
  71. }
  72. .ui.container > .ui.message {
  73. background-color: rga(238, 238, 238);
  74. box-shadow: none;
  75. padding: 5rem 4rem;
  76. margin-top: 1rem;
  77. }
  78. .ui.message h1.ui.header {
  79. font-size: 4.5rem;
  80. }
  81. .ui.message p.lead {
  82. font-size: 1.3rem;
  83. color: #333333;
  84. line-height: 1.4;
  85. font-weight: 300;
  86. }
  87. p > a > img {
  88. width: 100px;
  89. height: 100px;
  90. }
  91. {% block css %}
  92. {% endblock %}
  93. </style>
  94. </head>
  95. <body id="root">
  96. {% if is_login %}
  97. {% csrf_token %}
  98. {% endif %}
  99. <div class="ui tablet computer only padded grid">
  100. <div class="ui top fixed borderless fluid huge menu">
  101. <div class="ui container">
  102. <a class="header item"><img style="width: 7em;" src="{% static '/img.png' %}"/></a>
  103. <a href="{% url 'index' %}" class="{% if current_category == None %}
  104. active
  105. {% else %}
  106. {% endif %} item">主页</a>
  107. {% for item in category %}
  108. {# <li class="category_li"><a href="/category/{{ item.name }}?page=1">{{ item.name }}</a></li>#}
  109. <a class="{% if current_category != None and current_category == item.name %}
  110. active
  111. {% else %}
  112. {% endif %} item" href="/category/{{ item.name }}?page=1">{{ item.name }}</a>
  113. {% endfor %}
  114. <div class="right menu">
  115. <a href="#" class="item"> <i class="icon gitlab "></i>
  116. Git Repository</a>
  117. <a href="/login" class="item"> <i class="icon share square"></i>
  118. Sign in</a>
  119. </div>
  120. </div>
  121. </div>
  122. </div>
  123. <div class="ui mobile only padded grid">
  124. <div class="ui top fixed borderless huge fluid menu">
  125. <a class="header item"><img style="width: 7em;" src="{% static '/img.png' %}"/></a>
  126. <div class="right menu">
  127. <div class="item">
  128. <button class="ui icon toggle basic button">
  129. <i class="content icon"></i>
  130. </button>
  131. </div>
  132. </div>
  133. <div class="ui vertical borderless fluid menu">
  134. <a href="{% url 'index' %}" class="{% if current_category == None %}
  135. active
  136. {% else %}
  137. {% endif %} item">主页</a>
  138. {% for item in category %}
  139. {# <li class="category_li"><a href="/category/{{ item.name }}?page=1">{{ item.name }}</a></li>#}
  140. <a class="{% if current_category != None and current_category == item.name %}
  141. active
  142. {% else %}
  143. {% endif %} item" href="/category/{{ item.name }}?page=1">{{ item.name }}</a>
  144. {% endfor %}
  145. <a href="/login" class="item"> <i class="icon share square"></i>
  146. Sign in</a>
  147. </div>
  148. </div>
  149. </div>
  150. {% block container %}
  151. {% endblock %}
  152. <div class="ui divider"></div>
  153. <footer>
  154. <div style="text-align: center;height: 40px"><p>@2024 C.J</p></div>
  155. </footer>
  156. <script type="application/javascript" src="{% static 'js/jquery.min.js' %}"></script>
  157. <script type="application/javascript" src="{% static 'semantic.js' %}"></script>
  158. <script type="application/javascript" src="{% static 'photoswipe/photoswipe.umd.min.js' %}"></script>
  159. <script type="application/javascript" src="{% static 'photoswipe/photoswipe-lightbox.umd.min.js' %}"></script>
  160. <script>
  161. var lightbox = new PhotoSwipeLightbox({
  162. gallery: '.extra.images',
  163. children: 'a',
  164. // dynamic import is not supported in UMD version
  165. pswpModule: PhotoSwipe
  166. });
  167. lightbox.init();
  168. $(document).ready(function () {
  169. $(".ui.toggle.button").click(function () {
  170. $(".mobile.only.grid .ui.vertical.menu").toggle(100);
  171. });
  172. $(".ui.dropdown").dropdown();
  173. });
  174. </script>
  175. {% block js %}
  176. {% endblock %}
  177. <script>
  178. </script>
  179. </body>
  180. </html>