From 343fa3f9d9c956a4d06abbeef7b02f83e982a05c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E7=BB=93=E5=8F=91=E5=8F=97=E9=95=BF=E7=94=9F?=
Date: Tue, 19 Jun 2018 14:21:50 +0800
Subject: [PATCH] =?UTF-8?q?=E6=97=A5=E6=9C=9F=E6=A0=BC=E5=BC=8F=E5=8C=96?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
_config.yml | 8 ++++----
themes/yilia/layout/_partial/script.ejs | 2 +-
themes/yilia/layout/_partial/tools.ejs | 8 ++++----
themes/yilia/source-src/js/slider.js | 16 ++--------------
...3f182cf.js => slider.f9a33fdc5a046f675ae0.js} | 6 +++---
5 files changed, 14 insertions(+), 26 deletions(-)
rename themes/yilia/source/js/{slider.5ca5d3094d7d23f182cf.js => slider.f9a33fdc5a046f675ae0.js} (94%)
diff --git a/_config.yml b/_config.yml
index 0775ec4..dc1c0fc 100644
--- a/_config.yml
+++ b/_config.yml
@@ -18,7 +18,6 @@ timezone:
# URL
## If your site is put in a subdirectory, set url as 'http://yoursite.com/child' and root as '/child/'
url: https://www.colorfulsweet.site
-# url: http://localhost:6603
root: /
permalink: :title/
permalink_defaults:
@@ -83,9 +82,9 @@ theme: yilia
#----------------------------
# 搜索
#----------------------------
-search:
- path: search.xml
- field: all
+# search:
+# path: search.xml
+# field: all
# Deployment
## Docs: https://hexo.io/docs/deployment.html
@@ -97,6 +96,7 @@ deploy:
jsonContent:
meta: false
pages: false
+ dateFormat: YYYY-MM-DD
posts:
title: true
date: true
diff --git a/themes/yilia/layout/_partial/script.ejs b/themes/yilia/layout/_partial/script.ejs
index 2e566d1..9daf438 100644
--- a/themes/yilia/layout/_partial/script.ejs
+++ b/themes/yilia/layout/_partial/script.ejs
@@ -1 +1 @@
-<%- js('js/mobile.cfb38e2874478d984279.js') %> <%- js('js/slider.5ca5d3094d7d23f182cf.js') %> <%- js('js/main.34802c21ea4824f2ae00.js') %>
\ No newline at end of file
+<%- js('js/mobile.cfb38e2874478d984279.js') %> <%- js('js/slider.f9a33fdc5a046f675ae0.js') %> <%- js('js/main.34802c21ea4824f2ae00.js') %>
\ No newline at end of file
diff --git a/themes/yilia/layout/_partial/tools.ejs b/themes/yilia/layout/_partial/tools.ejs
index b3203fc..0d0ce89 100644
--- a/themes/yilia/layout/_partial/tools.ejs
+++ b/themes/yilia/layout/_partial/tools.ejs
@@ -85,19 +85,19 @@
- {{item.title}}
+
- {{item.date|dateformat}}
+
- {{category.name}}
+
- {{tag.name}}
+
diff --git a/themes/yilia/source-src/js/slider.js b/themes/yilia/source-src/js/slider.js
index 98f1a2e..cb394e4 100644
--- a/themes/yilia/source-src/js/slider.js
+++ b/themes/yilia/source-src/js/slider.js
@@ -8,18 +8,13 @@ import Vue from './vue.min'
const isMobile = (Browser.versions.mobile && window.screen.width < 800)
-function fixzero(str) {
- str = str + ''
- return str.length === 1 ? '0' + str : str
-}
-
function setScrollZero() {
let $sct = document.querySelectorAll('.tools-section')
Array.prototype.forEach.call($sct, (em) => {
em.scrollTop = 0
})
}
-let vm = new Vue({
+new Vue({
el: '#container',
data: {
isCtnShow: false,
@@ -64,14 +59,7 @@ let vm = new Vue({
},
filters: {
urlformat: (str) => {
- if (window.yiliaConfig && window.yiliaConfig.root) {
- return window.yiliaConfig.root + str
- }
- return '/' + str
- },
- dateformat: (str) => {
- let d = new Date(str)
- return d.getFullYear() + '-' + fixzero((d.getMonth() + 1)) + '-' + fixzero(d.getDate())
+ return (window.yiliaConfig && window.yiliaConfig.root) ? window.yiliaConfig.root + str : '/' + str;
}
},
watch: {
diff --git a/themes/yilia/source/js/slider.5ca5d3094d7d23f182cf.js b/themes/yilia/source/js/slider.f9a33fdc5a046f675ae0.js
similarity index 94%
rename from themes/yilia/source/js/slider.5ca5d3094d7d23f182cf.js
rename to themes/yilia/source/js/slider.f9a33fdc5a046f675ae0.js
index f840219..7110849 100644
--- a/themes/yilia/source/js/slider.5ca5d3094d7d23f182cf.js
+++ b/themes/yilia/source/js/slider.f9a33fdc5a046f675ae0.js
@@ -1,12 +1,12 @@
-!function(t){function e(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,e),o.l=!0,o.exports}var n={};e.m=t,e.c=n,e.d=function(t,n,r){e.o(t,n)||Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:r})},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.s=224)}([,,function(t,e){var n=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},,function(t,e){var n=t.exports={version:"2.5.7"};"number"==typeof __e&&(__e=n)},,,function(t,e,n){var r=n(44)("wks"),o=n(25),i=n(2).Symbol,a="function"==typeof i;(t.exports=function(t){return r[t]||(r[t]=a&&i[t]||(a?i:o)("Symbol."+t))}).store=r},function(t,e){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},function(t,e,n){t.exports=!n(21)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},,function(t,e,n){var r=n(19),o=n(65),i=n(41),a=Object.defineProperty;e.f=n(9)?Object.defineProperty:function(t,e,n){if(r(t),e=i(e,!0),r(n),o)try{return a(t,e,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(t[e]=n.value),t}},function(t,e){var n={}.hasOwnProperty;t.exports=function(t,e){return n.call(t,e)}},function(t,e,n){var r=n(11),o=n(24);t.exports=n(9)?function(t,e,n){return r.f(t,e,o(1,n))}:function(t,e,n){return t[e]=n,t}},function(t,e,n){var r=n(2),o=n(4),i=n(40),a=n(13),s=n(12),u=function(t,e,n){var c,f,l,p=t&u.F,d=t&u.G,v=t&u.S,h=t&u.P,m=t&u.B,y=t&u.W,g=d?o:o[e]||(o[e]={}),_=g.prototype,w=d?r:v?r[e]:(r[e]||{}).prototype;d&&(n=e);for(c in n)(f=!p&&w&&void 0!==w[c])&&s(g,c)||(l=f?w[c]:n[c],g[c]=d&&"function"!=typeof w[c]?n[c]:m&&f?i(l,r):y&&w[c]==l?function(t){var e=function(e,n,r){if(this instanceof t){switch(arguments.length){case 0:return new t;case 1:return new t(e);case 2:return new t(e,n)}return new t(e,n,r)}return t.apply(this,arguments)};return e.prototype=t.prototype,e}(l):h&&"function"==typeof l?i(Function.call,l):l,h&&((g.virtual||(g.virtual={}))[c]=l,t&u.R&&_&&!_[c]&&a(_,c,l)))};u.F=1,u.G=2,u.S=4,u.P=8,u.B=16,u.W=32,u.U=64,u.R=128,t.exports=u},function(t,e,n){var r=n(89),o=n(39);t.exports=function(t){return r(o(t))}},,,,function(t,e,n){var r=n(8);t.exports=function(t){if(!r(t))throw TypeError(t+" is not an object!");return t}},,function(t,e){t.exports=function(t){try{return!!t()}catch(t){return!0}}},function(t,e){t.exports=!0},,function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},function(t,e){var n=0,r=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++n+r).toString(36))}},function(t,e){t.exports={}},function(t,e,n){var r=n(11).f,o=n(12),i=n(7)("toStringTag");t.exports=function(t,e,n){t&&!o(t=n?t:t.prototype,i)&&r(t,i,{configurable:!0,value:e})}},,,,function(t,e,n){var r=n(67),o=n(45);t.exports=Object.keys||function(t){return r(t,o)}},function(t,e,n){e.f=n(7)},function(t,e,n){"use strict";function r(t){return"[object Array]"===$.call(t)}function o(t){return"[object ArrayBuffer]"===$.call(t)}function i(t){return"undefined"!=typeof FormData&&t instanceof FormData}function a(t){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(t):t&&t.buffer&&t.buffer instanceof ArrayBuffer}function s(t){return"string"==typeof t}function u(t){return"number"==typeof t}function c(t){return void 0===t}function f(t){return null!==t&&"object"==typeof t}function l(t){return"[object Date]"===$.call(t)}function p(t){return"[object File]"===$.call(t)}function d(t){return"[object Blob]"===$.call(t)}function v(t){return"[object Function]"===$.call(t)}function h(t){return f(t)&&v(t.pipe)}function m(t){return"undefined"!=typeof URLSearchParams&&t instanceof URLSearchParams}function y(t){return t.replace(/^\s*/,"").replace(/\s*$/,"")}function g(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product)&&("undefined"!=typeof window&&"undefined"!=typeof document)}function _(t,e){if(null!==t&&void 0!==t)if("object"!=typeof t&&(t=[t]),r(t))for(var n=0,o=t.length;n0?r:n)(t)}},function(t,e){t.exports=function(t){if(void 0==t)throw TypeError("Can't call method on "+t);return t}},function(t,e,n){var r=n(59);t.exports=function(t,e,n){if(r(t),void 0===e)return t;switch(n){case 1:return function(n){return t.call(e,n)};case 2:return function(n,r){return t.call(e,n,r)};case 3:return function(n,r,o){return t.call(e,n,r,o)}}return function(){return t.apply(e,arguments)}}},function(t,e,n){var r=n(8);t.exports=function(t,e){if(!r(t))return t;var n,o;if(e&&"function"==typeof(n=t.toString)&&!r(o=n.call(t)))return o;if("function"==typeof(n=t.valueOf)&&!r(o=n.call(t)))return o;if(!e&&"function"==typeof(n=t.toString)&&!r(o=n.call(t)))return o;throw TypeError("Can't convert object to primitive value")}},function(t,e){var n={}.toString;t.exports=function(t){return n.call(t).slice(8,-1)}},function(t,e,n){var r=n(44)("keys"),o=n(25);t.exports=function(t){return r[t]||(r[t]=o(t))}},function(t,e,n){var r=n(4),o=n(2),i=o["__core-js_shared__"]||(o["__core-js_shared__"]={});(t.exports=function(t,e){return i[t]||(i[t]=void 0!==e?e:{})})("versions",[]).push({version:r.version,mode:n(22)?"pure":"global",copyright:"© 2018 Denis Pushkarev (zloirock.ru)"})},function(t,e){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(t,e,n){var r=n(2),o=n(4),i=n(22),a=n(32),s=n(11).f;t.exports=function(t){var e=o.Symbol||(o.Symbol=i?{}:r.Symbol||{});"_"==t.charAt(0)||t in e||s(e,t,{value:a.f(t)})}},function(t,e){e.f={}.propertyIsEnumerable},,,,,function(t,e,n){var r=n(19),o=n(88),i=n(45),a=n(43)("IE_PROTO"),s=function(){},u=function(){var t,e=n(60)("iframe"),r=i.length;for(e.style.display="none",n(90).appendChild(e),e.src="javascript:",t=e.contentWindow.document,t.open(),t.write("