blog.html 7.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248
  1. {% load static %}{% load day_util %}
  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="{{ article.intro }}"
  14. />
  15. <meta name="keywords" content="{{ article.title }}"/>
  16. <meta name="author" content="CyberSicko"/>
  17. <meta name="theme-color" content="#ffffff"/>
  18. <title>{{ article.title }}-CyberSicko.net</title>
  19. <link
  20. rel="stylesheet"
  21. href="{% static 'semantic.min.css' %}"
  22. type="text/css"
  23. />
  24. <link
  25. rel="stylesheet"
  26. href="{% static 'photoswipe/photoswipe.css' %}"
  27. type="text/css"
  28. />
  29. <link rel="stylesheet" href="{% static 'highlightjs/styles/androidstudio.min.css' %}">
  30. <link rel="shortcut icon" href="{% static 'favicon.ico' %}">
  31. <style type="text/css">
  32. p {
  33. font-size: 1.2em;
  34. }
  35. body {
  36. padding-top: 54px;
  37. -webkit-font-smoothing: antialiased;
  38. -moz-font-smoothing: grayscale;
  39. }
  40. .ui.borderless.menu {
  41. background-color: #f8f8f8;
  42. {#box-shadow: none;#} flex-wrap: wrap;
  43. border: none;
  44. padding-left: 0;
  45. padding-right: 0;
  46. }
  47. .ui.borderless.menu .header.item {
  48. font-size: 18px;
  49. font-weight: 400;
  50. }
  51. .ui.mobile.only.grid .ui.menu .ui.vertical.menu {
  52. display: none;
  53. }
  54. .ui.mobile.only.grid .ui.vertical.menu .dropdown.icon {
  55. float: unset;
  56. }
  57. .ui.mobile.only.grid .ui.vertical.menu .dropdown.icon:before {
  58. content: "\f0d7";
  59. }
  60. .ui.mobile.only.grid .ui.vertical.menu .ui.dropdown.item .menu {
  61. position: static;
  62. width: 100%;
  63. background-color: unset;
  64. border: none;
  65. box-shadow: none;
  66. }
  67. .ui.mobile.only.grid .ui.vertical.menu .ui.dropdown.item .menu {
  68. margin-top: 6px;
  69. }
  70. .ui.container > .ui.message {
  71. background-color: rga(238, 238, 238);
  72. box-shadow: none;
  73. padding: 5rem 4rem;
  74. margin-top: 1rem;
  75. }
  76. .ui.message h1.ui.header {
  77. font-size: 4.5rem;
  78. }
  79. .ui.message p.lead {
  80. font-size: 1.3rem;
  81. color: #333333;
  82. line-height: 1.4;
  83. font-weight: 300;
  84. }
  85. p > a > img {
  86. width: 100%;
  87. height: 100%;
  88. }
  89. .pre {
  90. background-color: antiquewhite;
  91. border-radius: 4px;
  92. }
  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">Git Repository</a>
  116. </div>
  117. </div>
  118. </div>
  119. </div>
  120. <div class="ui mobile only padded grid">
  121. <div class="ui top fixed borderless huge fluid menu">
  122. <a class="header item"><img style="width: 7em;" src="{% static '/img.png' %}"/></a>
  123. <div class="right menu">
  124. <div class="item">
  125. <button class="ui icon toggle basic button">
  126. <i class="content icon"></i>
  127. </button>
  128. </div>
  129. </div>
  130. <div class="ui vertical borderless fluid menu">
  131. <a href="{% url 'index' %}" class="{% if current_category == None %}
  132. active
  133. {% else %}
  134. {% endif %} item">主页</a>
  135. {% for item in category %}
  136. {# <li class="category_li"><a href="/category/{{ item.name }}?page=1">{{ item.name }}</a></li>#}
  137. <a class="{% if current_category != None and current_category == item.name %}
  138. active
  139. {% else %}
  140. {% endif %} item" href="/category/{{ item.name }}?page=1">{{ item.name }}</a>
  141. {% endfor %}
  142. </div>
  143. </div>
  144. </div>
  145. <div class="ui grid stackable container">
  146. <div class="row" id="article">
  147. <div class="eleven wide column">
  148. <div class="ui comments">
  149. <div class="comment">
  150. <a class="avatar">
  151. <img src="/user_avatar/{{ article.user_id }}">
  152. </a>
  153. <div class="content">
  154. <a class="author">{{ article.user__first_name }}{{ article.user__last_name }}</a>
  155. <div class="metadata">
  156. <div class="date">发布于: {{ article.created_time|days_until }}</div>
  157. </div>
  158. <div class="text">hava a nice day.</div>
  159. </div>
  160. </div>
  161. </div>
  162. <h2 class="ui large header">
  163. <div class="content">{{ article.title }}</div>
  164. </h2>
  165. {% autoescape off %}
  166. {{ article.html_text }}
  167. {% endautoescape %}
  168. <div class="ui hidden divider"></div>
  169. </div>
  170. <div class="four wide right floated column">
  171. <h4 class="ui header">归档</h4>
  172. <div class="ui list">
  173. {% for record in records %}
  174. <a class="item" href="/date/{{ record.datetime }}?page=1">{{ record.datetime }}
  175. ({{ record.count }})</a>
  176. {% endfor %}
  177. </div>
  178. <h4 class="ui header">Top</h4>
  179. <div class="ui list">
  180. {% for tag in tags %}
  181. <a class="item" href="/tag/{{ tag.name }}?page=1">{{ tag.name }} ({{ tag.count }})</a>
  182. {% endfor %}
  183. </div>
  184. </div>
  185. </div>
  186. </div>
  187. <div class="ui divider"></div>
  188. <footer>
  189. <div style="text-align: center;height: 40px"><p>@2024 C.J</p></div>
  190. </footer>
  191. <script type="application/javascript" src="{% static 'js/jquery.min.js' %}"></script>
  192. <script type="application/javascript" src="{% static 'semantic.js' %}"></script>
  193. <script src="{% static 'highlightjs/highlight.min.js' %}"></script>
  194. <script type="application/javascript" src="{% static 'photoswipe/photoswipe.umd.min.js' %}"></script>
  195. <script type="application/javascript" src="{% static 'photoswipe/photoswipe-lightbox.umd.min.js' %}"></script>
  196. <script>
  197. $(document).ready(function () {
  198. $(".ui.toggle.button").click(function () {
  199. $(".mobile.only.grid .ui.vertical.menu").toggle(100);
  200. });
  201. $(".ui.dropdown").dropdown();
  202. });
  203. var lightbox = new PhotoSwipeLightbox({
  204. gallery: 'p',
  205. children: 'a',
  206. // dynamic import is not supported in UMD version
  207. pswpModule: PhotoSwipe
  208. });
  209. lightbox.init();
  210. </script>
  211. <script>
  212. hljs.initHighlightingOnLoad();
  213. </script>
  214. </body>
  215. </html>