summary refs log tree commit diff
path: root/_layouts/default.html
diff options
context:
space:
mode:
authormayx2025-04-07 08:21:34 +0000
committermayx2025-04-07 08:21:34 +0000
commit8c26bc57d5b9c9d5a6155eba222bc7fd47dd74f8 (patch)
treed937722053cc5f18d677e5c5ee8ecc977a79cf9c /_layouts/default.html
parent85594ca8b1a3e9315be9a6e4529cf39cfc18475b (diff)
Update 6 files
- /_layouts/post.html
- /_layouts/default.html
- /_posts/2024-07-03-ai-summary.md
- /_posts/2022-02-14-move.md
- /_posts/2022-01-04-banned.md
- /proxylist.md
Diffstat (limited to '_layouts/default.html')
-rw-r--r--_layouts/default.html59
1 files changed, 22 insertions, 37 deletions
diff --git a/_layouts/default.html b/_layouts/default.html
index a3c59c7..90bb0da 100644
--- a/_layouts/default.html
+++ b/_layouts/default.html
@@ -26,46 +26,31 @@
   gtag('js', new Date());
 
   gtag('config', '{{ site.google_analytics }}');
-  var lastUpdated = new Date("{{ site.time | date: "%FT%T%z" }}");
-  var BlogAPI = "https://summary.mayx.eu.org";
-  function getSearchJSON(callback) {
-    var searchData = JSON.parse(localStorage.getItem("blog_" + lastUpdated.valueOf()));
-    if (!searchData) {
-      for (var i = 0; i < localStorage.length; i++) {
-          var key = localStorage.key(i);
-          if (key.startsWith('blog_')) {
-              localStorage.removeItem(key);
-          }
+  </script>
+  {% endif %}
+  <script>
+    var lastUpdated = new Date("{{ site.time | date: "%FT%T%z" }}");
+    var BlogAPI = "https://summary.mayx.eu.org";
+    function getSearchJSON(callback) {
+      var searchData = JSON.parse(localStorage.getItem("blog_" + lastUpdated.valueOf()));
+      if (!searchData) {
+        for (var i = 0; i < localStorage.length; i++) {
+            var key = localStorage.key(i);
+            if (key.startsWith('blog_')) {
+                localStorage.removeItem(key);
+            }
+        }
+        $.getJSON("/search.json", function (data) {
+            localStorage.setItem("blog_" + lastUpdated.valueOf(), JSON.stringify(data));
+            callback(data);
+        });
+      } else {
+        callback(searchData);
       }
-      $.getJSON("/search.json", function (data) {
-          localStorage.setItem("blog_" + lastUpdated.valueOf(), JSON.stringify(data));
-          callback(data);
-      });
-    } else {
-      callback(searchData);
     }
-  }
   </script>
-  {% endif %}
   <style>
-    .backToTop {
-      display: none;
-      width: 18px;
-      line-height: 1.2;
-      padding: 5px 0;
-      background-color: #000;
-      color: #fff;
-      font-size: 12px;
-      text-align: center;
-      position: fixed;
-      _position: absolute;
-      right: 10px;
-      bottom: 100px;
-      _bottom: "auto";
-      cursor: pointer;
-      opacity: .6;
-      filter: Alpha(opacity=60);
-    }
+    .backToTop{display:none;width:18px;line-height:1.2;padding:5px 0;background-color:#000;color:#fff;font-size:12px;text-align:center;position:fixed;_position:absolute;right:10px;bottom:100px;_bottom:"auto";cursor:pointer;opacity:.6;filter:Alpha(opacity=60);}
   </style>
 </head>
 
@@ -145,7 +130,7 @@
     <!-- <![endif]-->
     <footer>
       <p>
-        <small>Made with ❤ by Mayx<br />Last updated at <script>document.write(lastUpdated.toLocaleString());</script><br /> 总字数:{% assign count = 0 %}{% for post in site.posts %}{% assign single_count = post.content | strip_html | strip_newlines | remove: " " | size %}{% assign count = count | plus: single_count %}{% endfor %}{% if count > 10000 %}{{ count | divided_by: 10000 }} 万 {{ count | modulo: 10000 }}{% else %}{{ count }}{% endif %} - 文章数:{% for post in site.posts %}{% assign co = co | plus: 1 %}{% endfor %}{{ co }} - <a href="{{ "/atom.xml" | relative_url }}" >Atom</a> - <a href="{{ "/README.html" | relative_url }}" >About</a></small>
+        <small>Made with ❤ by Mayx<br />Last updated at <script>document.write(lastUpdated.toLocaleString());</script><br /> 总字数:{% assign count = 0 %}{% for post in site.posts %}{% assign single_count = post.content | strip_html | strip_newlines | remove: " " | size %}{% assign count = count | plus: single_count %}{% endfor %}{{ count }} - 文章数:{{ site.posts.size }} - <a href="{{ site.feed.path | relative_url }}" >Atom</a> - <a href="{{ "/README.html" | relative_url }}" >About</a></small>
       </p>
     </footer>
   </div>