diff --git a/themes/yilia/layout/_partial/tools.ejs b/themes/yilia/layout/_partial/tools.ejs index 09cff4e..1daa169 100644 --- a/themes/yilia/layout/_partial/tools.ejs +++ b/themes/yilia/layout/_partial/tools.ejs @@ -5,14 +5,8 @@ %>
+
- +
diff --git a/themes/yilia/source-src/config/waifu-tip.json b/themes/yilia/source-src/config/waifu-tip.json index cd8a2c6..5dd7cc5 100644 --- a/themes/yilia/source-src/config/waifu-tip.json +++ b/themes/yilia/source-src/config/waifu-tip.json @@ -7,7 +7,8 @@ "aboutme": "想听听关于主人的故事吗", "github": "发现主人出没地点!", "weibo": "发现主人出没地点!", - "mail" : "这里是主人的联系方式", + "rss": "订阅就可以看到最新的文章啦", + "mail": "这里是主人的联系方式", "tools.eye": "深夜时要爱护眼睛呀", "tools.chart": "猜猜我要说些什么", "tools.photo": "你要给我拍照呀,一二三~茄子~~", diff --git a/themes/yilia/source-src/css/core/_animation.scss b/themes/yilia/source-src/css/core/_animation.scss index 9fe54f9..619816e 100644 --- a/themes/yilia/source-src/css/core/_animation.scss +++ b/themes/yilia/source-src/css/core/_animation.scss @@ -248,22 +248,15 @@ } } - -/*弹性动画*/ -@keyframes leftIn { - from {transform: translate3d(0, 0, 0);} - to {transform: translate3d(333px, 0, 0);} -} - %anmCommon { animation-duration: .5s; animation-fill-mode: both; animation-timing-function: ease-in-out; } -%anmLeftIn { - @extend %anmCommon; - animation-name: leftIn; +@keyframes leftIn { + from {transform: translate3d(0, 0, 0);} + to {transform: translate3d(333px, 0, 0);} } @keyframes leftOut { @@ -271,6 +264,11 @@ to {transform: translate3d(0, 0, 0);} } +%anmLeftIn { + @extend %anmCommon; + animation-name: leftIn; +} + %anmLeftOut { @extend %anmCommon; animation-name: leftOut; @@ -281,16 +279,16 @@ to {transform: translate3d(300px, 0, 0);} } -%anmSmallLeftIn { - @extend %anmCommon; - animation-name: smallLeftIn; -} - @keyframes smallleftOut { from {transform: translate3d(300px, 0, 0);} to {transform: translate3d(0, 0, 0);} } +%anmSmallLeftIn { + @extend %anmCommon; + animation-name: smallLeftIn; +} + %anmSmallLeftOut { @extend %anmCommon; animation-name: smallleftOut; diff --git a/themes/yilia/source-src/js/slider.js b/themes/yilia/source-src/js/slider.js index bfaba8b..12f7e91 100644 --- a/themes/yilia/source-src/js/slider.js +++ b/themes/yilia/source-src/js/slider.js @@ -64,6 +64,9 @@ new Vue({ } }, addSearchItem(query, type='title') { + if(query) { + query = query.trim() + } // 如果已存在相同的查询条件, 则不加入 var isExist = Array.prototype.some.call(this.searchItems, searchItem => { return searchItem.query === query && searchItem.type === type @@ -74,7 +77,6 @@ new Vue({ this.search = null }, searchKeydown(event) { - console.log(event.keyCode) if(event.keyCode == 13){ // 回车键 this.addSearchItem(this.search) } else if(event.keyCode == 8 && !this.search) { // 退格键 @@ -97,13 +99,12 @@ new Vue({ } }, filters: { - urlformat: (str) => { + urlformat (str) { return (window.themeConfig && window.themeConfig.root) ? window.themeConfig.root + str : '/' + str } }, watch: { searchItems (newVal, oldVal) { - console.log(newVal) if(newVal && newVal.length) { handleSearch.call(this, newVal) } else { @@ -148,6 +149,8 @@ function handleSearch(searchItems) { return Array.prototype.some.call(articleItem.categories, category => { return category.name === searchItem.query }) + case 'date' : + return articleItem.date && ( articleItem.date.substr(0,7) === searchItem.query ) } }) })