summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--404.md1
-rw-r--r--_includes/live2d.html33
-rw-r--r--_layouts/default.html35
-rw-r--r--feed.json1
-rw-r--r--index.html1
-rw-r--r--opensearch.xml12
-rw-r--r--rss.xml1
-rw-r--r--search.json1
8 files changed, 52 insertions, 33 deletions
diff --git a/404.md b/404.md
index f8cd00e..6cc9116 100644
--- a/404.md
+++ b/404.md
@@ -2,6 +2,7 @@
 layout: default
 title: 404 - 找不到页面
 ---
+
 # 找不到页面
   你访问的资源 <code><script>document.write(window.location.pathname)</script></code> 不存在或者可能已经被永久移除。
 
diff --git a/_includes/live2d.html b/_includes/live2d.html
new file mode 100644
index 0000000..f7670cd
--- /dev/null
+++ b/_includes/live2d.html
@@ -0,0 +1,33 @@
+<!--[if !IE]> -->
+<div id="landlord" style="left:5px;bottom:0px;">
+  <div class="message" style="opacity:0"></div>
+  <canvas id="live2d" width="500" height="560" class="live2d"></canvas>
+  <div class="live_talk_input_body">
+    <form id="live_talk_input_form">
+      <div class="live_talk_input_name_body" {% unless page.layout == "post" %}style="display:none;"{% endunless %}>
+        <input type="checkbox" id="load_this" />
+        <input type="hidden" id="post_id" value="{{ page.url }}" />
+        <label for="load_this">
+          <span style="font-size: 11px; color: #fff;">&#160;想问这篇文章</span>
+        </label>
+      </div>
+      <div class="live_talk_input_text_body">
+        <input name="talk" type="text" class="live_talk_talk white_input" id="AIuserText" autocomplete="off" placeholder="要和我聊什么呀?" />
+        <button type="submit" class="live_talk_send_btn" id="talk_send">发送</button>
+      </div>
+    </form>
+  </div>
+  <input name="live_talk" id="live_talk" value="1" type="hidden" />
+  <div class="live_ico_box" style="display:none;">
+    <div class="live_ico_item type_info" id="showInfoBtn"></div>
+    <div class="live_ico_item type_talk" id="showTalkBtn"></div>
+    <div class="live_ico_item type_music" id="musicButton"></div>
+    <div class="live_ico_item type_youdu" id="youduButton"></div>
+    <div class="live_ico_item type_quit" id="hideButton"></div>
+    <input name="live_statu_val" id="live_statu_val" value="0" type="hidden" />
+    <audio src="" style="display:none;" id="live2d_bgm" data-bgm="0" preload="none"></audio>
+    <input id="duType" value="douqilai" type="hidden" />
+  </div>
+</div>
+<div id="open_live2d">召唤伊斯特瓦尔</div>
+<!-- <![endif]-->
\ No newline at end of file
diff --git a/_layouts/default.html b/_layouts/default.html
index d06dcb1..726ae05 100644
--- a/_layouts/default.html
+++ b/_layouts/default.html
@@ -16,6 +16,7 @@ layout: xslt_container
   <!--[if !IE]> -->
   <link rel="stylesheet" href="/Live2dHistoire/live2d/css/live2d.css" />
   <!-- <![endif]-->
+  <link rel="search" type="application/opensearchdescription+xml" href="/opensearch.xml" title="{{ site.title }}" />
   <link rel="webmention" href="https://webmention.io/mabbs.github.io/webmention" />
   <link rel="pingback" href="https://webmention.io/mabbs.github.io/xmlrpc" />
   <link rel="preconnect" href="https://summary.mayx.eu.org" crossorigin="anonymous" />
@@ -92,39 +93,7 @@ layout: xslt_container
       {{ content }}
 
     </section>
-    <!--[if !IE]> -->
-    <div id="landlord" style="left:5px;bottom:0px;">
-      <div class="message" style="opacity:0"></div>
-      <canvas id="live2d" width="500" height="560" class="live2d"></canvas>
-      <div class="live_talk_input_body">
-        <form id="live_talk_input_form">
-          <div class="live_talk_input_name_body" {% unless page.layout == "post" %}style="display:none;"{% endunless %}>
-            <input type="checkbox" id="load_this" />
-            <input type="hidden" id="post_id" value="{{ page.url }}" />
-            <label for="load_this">
-              <span style="font-size: 11px; color: #fff;">&#160;想问这篇文章</span>
-            </label>
-          </div>
-          <div class="live_talk_input_text_body">
-            <input name="talk" type="text" class="live_talk_talk white_input" id="AIuserText" autocomplete="off" placeholder="要和我聊什么呀?" />
-            <button type="submit" class="live_talk_send_btn" id="talk_send">发送</button>
-          </div>
-        </form>
-      </div>
-      <input name="live_talk" id="live_talk" value="1" type="hidden" />
-      <div class="live_ico_box" style="display:none;">
-        <div class="live_ico_item type_info" id="showInfoBtn"></div>
-        <div class="live_ico_item type_talk" id="showTalkBtn"></div>
-        <div class="live_ico_item type_music" id="musicButton"></div>
-        <div class="live_ico_item type_youdu" id="youduButton"></div>
-        <div class="live_ico_item type_quit" id="hideButton"></div>
-        <input name="live_statu_val" id="live_statu_val" value="0" type="hidden" />
-        <audio src="" style="display:none;" id="live2d_bgm" data-bgm="0" preload="none"></audio>
-        <input id="duType" value="douqilai" type="hidden" />
-      </div>
-    </div>
-    <div id="open_live2d">召唤伊斯特瓦尔</div>
-    <!-- <![endif]-->
+    {% include live2d.html %}
     <footer>
       <p>
         <small>Made with ❤ by Mayx<br />Last updated at {{ site.time | date: "%F %T" }}<br /> 总字数:{% include_cached word_count.html %} - 文章数:{{ site.posts.size }} - <a href="{{ site.feed.path | relative_url }}" >Atom</a> - <a href="{{ "/README.html" | relative_url }}" >About</a></small>
diff --git a/feed.json b/feed.json
index 48503b7..7f66b1b 100644
--- a/feed.json
+++ b/feed.json
@@ -1,3 +1,4 @@
 ---
 ---
+
 {"version":"https://jsonfeed.org/version/1","title":"{{ site.title | xml_escape }}","home_page_url":"{{ "/" | absolute_url }}","feed_url":"{{ "/feed.json" | absolute_url }}","description":{{ site.description | jsonify }},"favicon":"{{ "/favicon.ico" | absolute_url }}","expired":false,{% if site.author %}"author":{% if site.author.name %}{"name":"{{ site.author.name }}","url":{% if site.author.url %}"{{ site.author.url }}"{% else %}null{% endif %},"avatar":{% if site.author.avatar %}"{{ site.author.avatar }}"{% else %}null{% endif %}},{% else %}{"name":"{{ site.author }}"},{% endif %}{% endif %}"items":[{% for post in site.posts limit:10 %}{"id":"{{ post.url | absolute_url }}","title":{{ post.title | jsonify }},"summary":{{ post.excerpt | strip_html | jsonify }},"content_text":{{ post.content | strip_html | strip_newlines | jsonify }},"content_html":{{ post.content | strip_newlines | jsonify }},"url":"{{ post.url | absolute_url }}",{% if post.image.size > 1 %}"image":{{ post.image | jsonify }},{% endif %}{% if post.link.size > 1 %}"external_url":"{{ post.link }}",{% endif %}{% if post.banner.size > 1 %}"banner_image":"{{ post.banner }}",{% endif %}{% if post.tags.size > 1 %}"tags":{{ post.tags | jsonify }},{% endif %}{% if post.enclosure.size > 1 %}"attachments":[{  "url":"{{ post.enclosure }}",  "mime_type":"{{ post.enclosure_type }}",  "size_in_bytes":"{{ post.enclosure_length }}"}],{% endif %}"date_published":"{{ post.date | date_to_xmlschema }}","date_modified":"{{ post.date | date_to_xmlschema }}",{% if post.author %}"author":{% if post.author.name %} {"name":"{{ post.author.name }}","url":{% if post.author.url %}"{{ post.author.url }}"{% else %}null{% endif %},"avatar":{% if post.author.avatar %}"{{ post.author.avatar }}"{% else %}null{% endif %}}{% else %}"{{ post.author }}"{% endif %}{% else %}"author":{% if site.author.name %} {"name":"{{ site.author.name }}","url":{% if site.author.url %}"{{ site.author.url }}"{% else %}null{% endif %},"avatar":{% if site.author.avatar %}"{{ site.author.avatar }}"{% else %}null{% endif %}}{% else %}{"name":"{{ site.author }}"}{% endif %}{% endif %}}{% if forloop.last == false %},{% endif %}{% endfor %}]}
\ No newline at end of file
diff --git a/index.html b/index.html
index ccbfa90..e84a4bb 100644
--- a/index.html
+++ b/index.html
@@ -2,6 +2,7 @@
 layout: default
 title: 首页 - 我的文章
 ---
+
 {% if paginator.page == 1 %}<div class="hslice" id="LatestPost">{% endif %}
 <h1 class="entry-title" style="display:inline"> 首页 - 我的文章 </h1><small><a href="/archives.html">Archives</a> | <a href="javascript:getSearchJSON(function(data){window.location = data[Math.floor(Math.random()*data.length)].url})">Random</a></small><br /><br />
 
diff --git a/opensearch.xml b/opensearch.xml
new file mode 100644
index 0000000..6d1808d
--- /dev/null
+++ b/opensearch.xml
@@ -0,0 +1,12 @@
+---
+---
+
+<?xml version="1.0" encoding="UTF-8"?>
+<OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/" xmlns:moz="http://www.mozilla.org/2006/browser/search/">
+  <ShortName>{{ site.title }}</ShortName>
+  <Description>搜索 {{ site.title }}</Description>
+  <InputEncoding>UTF-8</InputEncoding>
+  <Image width="16" height="16" type="image/x-icon">{{ "/favicon.ico" | absolute_url }}</Image>
+  <Url type="text/html" method="get" template="{{ "/search.html" | absolute_url }}?keyword={searchTerms}"/>
+  <moz:SearchForm>{{ "/search.html" | absolute_url }}</moz:SearchForm>
+</OpenSearchDescription>
diff --git a/rss.xml b/rss.xml
index bd26cb6..d29a94d 100644
--- a/rss.xml
+++ b/rss.xml
@@ -1,5 +1,6 @@
 ---
 ---
+
 <?xml version="1.0" encoding="UTF-8"?>
 <?xml-stylesheet type="text/xml" href="/feed.xslt.xml"?>
 <rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
diff --git a/search.json b/search.json
index 8ad4e54..79dcd37 100644
--- a/search.json
+++ b/search.json
@@ -1,3 +1,4 @@
 ---
 ---
+
 [{% for post in site.posts %}{% unless post.layout == "encrypt" %}{ "title": "{{ post.title | escape }}", "category": "{{ post.category }}", "tags": "{{ post.tags | join: ', ' }}", "url": "{{ site.baseurl }}{{ post.url }}", "date": "{{ post.date | date: "%Y/%m/%d" }}", "content": {{ post.content | strip_html | strip_newlines | jsonify }} }{% unless forloop.last %},{% endunless %}{% endunless %}{% endfor %}]