mirror of
				https://github.com/Mabbs/mabbs.github.io
				synced 2025-11-04 12:56:25 +00:00 
			
		
		
		
	Update 4 files
- /_layouts/default.html - /_layouts/post.html - /assets/js/main.js - /index.html
This commit is contained in:
		@ -21,6 +21,11 @@
 | 
			
		||||
  <![endif]-->
 | 
			
		||||
 | 
			
		||||
  <script src="/assets/js/jquery.min.js"></script>
 | 
			
		||||
  <script>
 | 
			
		||||
    var lastUpdated = new Date("{{ site.time | date_to_xmlschema }}");
 | 
			
		||||
    var BlogAPI = "https://summary.mayx.eu.org";
 | 
			
		||||
  </script>
 | 
			
		||||
  <script src="/assets/js/main.js"></script>
 | 
			
		||||
  <!--[if !IE]> -->
 | 
			
		||||
  {% if site.google_analytics %}
 | 
			
		||||
  <!-- Global site tag (gtag.js) - Google Analytics -->
 | 
			
		||||
@ -33,27 +38,6 @@
 | 
			
		||||
  gtag('config', '{{ site.google_analytics }}');
 | 
			
		||||
  </script>
 | 
			
		||||
  {% endif %}
 | 
			
		||||
  <script>
 | 
			
		||||
    var lastUpdated = new Date("{{ site.time | date_to_xmlschema }}");
 | 
			
		||||
    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);
 | 
			
		||||
      }
 | 
			
		||||
    }
 | 
			
		||||
  </script>
 | 
			
		||||
  <script src="/assets/js/instant.page.js" type="module"></script>
 | 
			
		||||
  <!-- <![endif]-->
 | 
			
		||||
</head>
 | 
			
		||||
@ -141,7 +125,6 @@
 | 
			
		||||
    </footer>
 | 
			
		||||
  </div>
 | 
			
		||||
  <script src="{{ "/assets/js/scale.fix.js" | relative_url }}"></script>
 | 
			
		||||
  <script src="/assets/js/main.js"></script>
 | 
			
		||||
  <!--[if !IE]> -->
 | 
			
		||||
  <script src="/assets/js/main_new.js"></script>
 | 
			
		||||
  <script src="/Live2dHistoire/live2d/js/live2d.js"></script>
 | 
			
		||||
 | 
			
		||||
@ -2,7 +2,7 @@
 | 
			
		||||
layout: default
 | 
			
		||||
---
 | 
			
		||||
 | 
			
		||||
<small>{{ page.date | date: "%-d %B %Y" }} - 字数统计:{% if page.layout == "encrypt" %}God Knows {% else %}{{ page.content | strip_html | strip_newlines | remove: " " | size }} - 阅读大约需要{{ page.content | strip_html | strip_newlines | remove: "" | size | divided_by: 350 | plus: 1 }}分钟{% endif %} <!--[if !IE]> --> - Hits: <span id="{{ page.url }}" class="visitors">Loading...</span> <!-- <![endif]--> </small>
 | 
			
		||||
<small>{{ page.date | date: "%-d %B %Y" }} - 字数统计:{% if page.layout == "encrypt" %}God Knows {% else %}{{ page.content | strip_html | strip_newlines | remove: " " | size }} - 阅读大约需要{{ page.content | strip_html | strip_newlines | remove: "" | size | divided_by: 350 | plus: 1 }}分钟{% endif %} - Hits: <span id="{{ page.url }}" class="visitors">Loading...</span></small>
 | 
			
		||||
<h1>{{ page.title }}</h1>
 | 
			
		||||
 | 
			
		||||
<p class="view">by <a href="//github.com/{{ page.author | default: "Mabbs" }}">{{ page.author | default: site.author }}</a></p>
 | 
			
		||||
 | 
			
		||||
@ -14,17 +14,17 @@ var talkAPI = BlogAPI + "/ai_chat";
 | 
			
		||||
})();
 | 
			
		||||
$(function () {
 | 
			
		||||
    function showHitCount() {
 | 
			
		||||
        $(".visitors-index").each(function() {
 | 
			
		||||
        $(".visitors-index").each(function () {
 | 
			
		||||
            var $elem = $(this);
 | 
			
		||||
            $.get(BlogAPI + "/count_click?id=" + $elem.attr('id'), function(data) {
 | 
			
		||||
            $.get(BlogAPI + "/count_click?id=" + $elem.attr('id'), function (data) {
 | 
			
		||||
                $elem.text(Number(data));
 | 
			
		||||
            });
 | 
			
		||||
        });
 | 
			
		||||
    }
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    function addCount() {
 | 
			
		||||
        var $visitor = $(".visitors:first");
 | 
			
		||||
        $.get(BlogAPI + "/count_click_add?id=" + $visitor.attr('id'), function(data) {
 | 
			
		||||
        $.get(BlogAPI + "/count_click_add?id=" + $visitor.attr('id'), function (data) {
 | 
			
		||||
            $visitor.text(Number(data));
 | 
			
		||||
        });
 | 
			
		||||
    }
 | 
			
		||||
@ -33,15 +33,33 @@ $(function () {
 | 
			
		||||
    } else if ($('.visitors-index').length > 0) {
 | 
			
		||||
        showHitCount();
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    today = new Date();
 | 
			
		||||
    timeold = (today.getTime() - lastUpdated.getTime());
 | 
			
		||||
    secondsold = Math.floor(timeold / 1000);
 | 
			
		||||
    e_daysold = timeold / (24 * 60 * 60 * 1000);
 | 
			
		||||
    daysold = Math.floor(e_daysold);
 | 
			
		||||
    if (daysold > 90) {
 | 
			
		||||
        $("html")[0].style = "-webkit-filter: grayscale(100%);filter:progid:DXImageTransform.Microsoft.BasicImage(graysale=1);";
 | 
			
		||||
        $("html")[0].innerHTML = $("html")[0].innerHTML.replace(/Mayx/g, "Ghost");
 | 
			
		||||
        console.warn("Mayx may already be Dead");
 | 
			
		||||
    }
 | 
			
		||||
});
 | 
			
		||||
 | 
			
		||||
today = new Date();
 | 
			
		||||
timeold = (today.getTime() - lastUpdated.getTime());
 | 
			
		||||
secondsold = Math.floor(timeold / 1000);
 | 
			
		||||
e_daysold = timeold / (24 * 60 * 60 * 1000);
 | 
			
		||||
daysold = Math.floor(e_daysold);
 | 
			
		||||
if (daysold > 90) {
 | 
			
		||||
    $("html")[0].style = "-webkit-filter: grayscale(100%);filter:progid:DXImageTransform.Microsoft.BasicImage(graysale=1);";
 | 
			
		||||
    $("html")[0].innerHTML = $("html")[0].innerHTML.replace(/Mayx/g, "Ghost");
 | 
			
		||||
    console.warn("Mayx may already be Dead");
 | 
			
		||||
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);
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
@ -14,9 +14,7 @@ title: 首页 - 我的文章
 | 
			
		||||
    <h2><a class="post-link" href="{{ post.url }}">{{ post.title }}{% if post.layout == "encrypt" %} [加密] {% endif %}</a></h2>
 | 
			
		||||
  <p class="author">
 | 
			
		||||
    <span class="date">{{ post.date | date: "%-d %B %Y" }}</span>
 | 
			
		||||
    <!--[if !IE]> -->
 | 
			
		||||
    | Hits: <span id="{{ post.url }}" class="visitors-index" >Loading...</span>
 | 
			
		||||
    <!-- <![endif]-->
 | 
			
		||||
  </p>
 | 
			
		||||
  <div class="content">
 | 
			
		||||
    {{ post.excerpt | strip_html | strip_newlines }} 
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user