diff --git a/themes/yilia/source-src/css/article-inner.scss b/themes/yilia/source-src/css/article-inner.scss index 86a9b61..7b874da 100644 --- a/themes/yilia/source-src/css/article-inner.scss +++ b/themes/yilia/source-src/css/article-inner.scss @@ -79,6 +79,7 @@ font-family: Menlo,Monaco,"Andale Mono","lucida console","Courier New","Microsoft YaHei"; word-wrap: break-word; font-size: 14px; + border-radius: $radiusSmall; } blockquote { padding: 15px 20px; diff --git a/themes/yilia/source-src/css/core/_mixin.scss b/themes/yilia/source-src/css/core/_mixin.scss index 288ec23..4d19523 100644 --- a/themes/yilia/source-src/css/core/_mixin.scss +++ b/themes/yilia/source-src/css/core/_mixin.scss @@ -694,10 +694,6 @@ -ms-transition: all 0.8s ease-in; } -%line-bg { - background: linear-gradient(200deg, #a0cfe4, #e8c37e); -} - %paper-bg { background: url('./img/checkered-pattern.png') repeat #5d5d5d; } diff --git a/themes/yilia/source-src/css/core/_variables.scss b/themes/yilia/source-src/css/core/_variables.scss index f5d4e73..cd4b57d 100644 --- a/themes/yilia/source-src/css/core/_variables.scss +++ b/themes/yilia/source-src/css/core/_variables.scss @@ -41,12 +41,6 @@ $colorA: #aaa; $colorC: #ccc; $colorF: #f5f5f5; -$blue: #007aff !default; -$orange: #ff9500 !default; -$red: #ff3b30 !default; -$green: #4cd964 !default; -$primary: #007aff !default; - // 元素上下间距 //----------------------------------------------------- @@ -74,11 +68,4 @@ $timingFunction: cubic-bezier(0.42, 0, 0.58, 1); $activeStateSwitch: true !default; -// z-index -//----------------------------------------------------- -$zIndexHeader: 1000 !default; -$zIndexFooter: 2000 !default; -$zIndexPopup: 3000 !default; -$zIndexOverlay: 4000 !default; // 默认高于header和footer部分 - $articlePadding: 7.6923%; \ No newline at end of file diff --git a/themes/yilia/source-src/css/mobile.scss b/themes/yilia/source-src/css/mobile.scss index dec3677..4fec143 100644 --- a/themes/yilia/source-src/css/mobile.scss +++ b/themes/yilia/source-src/css/mobile.scss @@ -257,9 +257,6 @@ html, body, #container { .archives-wrap{ margin: 10px 10px 0px; padding: 10px; - .archive-article-title{ - font-size: 16px; - } .archive-year-wrap{ position: relative; padding: 0 0 0 0; diff --git a/themes/yilia/source-src/css/night.scss b/themes/yilia/source-src/css/night.scss index 52edf1b..cdb07a5 100644 --- a/themes/yilia/source-src/css/night.scss +++ b/themes/yilia/source-src/css/night.scss @@ -1,54 +1,66 @@ -/* -* 夜间模式配色 -*/ -$mainBg_night: #1f2e3c; // 主背景色 -$articleBg_night: #15202b; // 文章背景色 -$textColor_night: #d5d5d5; // 文字颜色 - -body.night { - background: $mainBg_night; - // 展开菜单之后的背景 - #container.show { - background: none; - } - // 主背景 - .mid-col { - background: $mainBg_night; - } - // 文章区域 - .article{ - background: $articleBg_night; - border-color: rgb(56, 68, 77); - color: $textColor_night; - .article-title { // 主标题 - color: $colorF; - } - .article-entry blockquote{ // 引用 - background: #2c2c2c; - } - h1,h2,h3,h4,h5,h6 { // 章节标题 - color: #b8a7a7; - } - } - // 左侧栏 - .left-col { - background: $articleBg_night; - .overlay { - background: none; - } - .profilepic { // 头像 - filter: brightness(30%); - } - } - // 看板娘 - .waifu { - filter: brightness(30%); - } - // 评论 - #comments { - background: none; - } - #footer { - color: $textColor_night; - } +/* +* 夜间模式配色 +*/ +$mainBg_night: #1f2e3c; // 主背景色 +$articleBg_night: #15202b; // 文章背景色 +$borderColor_night: #38444d; // 边框颜色 +$textColor_night: #d5d5d5; // 文字颜色 + +body.night { + background: $mainBg_night; + // 展开菜单之后的背景 + #container.show { + background: none; + } + // 主背景 + .mid-col { + background: $mainBg_night; + } + // 文章区域 + .article{ + background: $articleBg_night; + border-color: $borderColor_night; + color: $textColor_night; + .article-title { // 主标题 + color: $colorF; + } + .article-entry blockquote{ // 引用 + background: #2c2c2c; + } + h1,h2,h3,h4,h5,h6 { // 章节标题 + color: #b8a7a7; + } + } + // 归档列表 + .archives-wrap { + background: $articleBg_night; + border-bottom-color: $borderColor_night; + .archive-article { + border-color: $borderColor_night; + } + a.archive-article-title { + color: $textColor_night; + } + } + // 左侧栏 + .left-col { + background: $articleBg_night; + .overlay { + background: none; + } + .profilepic { // 头像 + filter: brightness(30%); + } + } + // 看板娘 + .waifu { + filter: brightness(30%); + } + // 评论 + #comments { + background: none; + } + #footer { + color: $textColor_night; + } } \ No newline at end of file diff --git a/themes/yilia/source-src/css/waifu.scss b/themes/yilia/source-src/css/waifu.scss index e5a6510..a28157f 100644 --- a/themes/yilia/source-src/css/waifu.scss +++ b/themes/yilia/source-src/css/waifu.scss @@ -55,7 +55,7 @@ } } .waifu-tool { - color: #aaa; + color: $colorA; top: 100px; right: 10px; font-size: 14px; @@ -90,17 +90,6 @@ } } } -/* -body.night .waifu { - color: #34495e; - filter: brightness(30%); -} -*/ -@media (max-width: 768px) { - .waifu { - display: none; - } -} @keyframes shake { 2% { diff --git a/themes/yilia/source-src/js/comment.js b/themes/yilia/source-src/js/comment.js index 42703ff..92223ca 100644 --- a/themes/yilia/source-src/js/comment.js +++ b/themes/yilia/source-src/js/comment.js @@ -1,16 +1,16 @@ // const AV = require('leancloud-storage'); window.AV = require('leancloud-storage'); -const Valine = require('../lib/Valine.min'); +// const Valine = require('../lib/Valine.min'); /** - * Valine.min.js.bak文件, 是根据Valine项目源代码重新打包的 + * 使用根据Valine项目源代码重新打包 * 可以支持对于AV对象的传参输入, 而不需要暴露全局变量 * 但是缺少一些新功能 */ // 评论配置 -const commentConfig = require("../config/comment.json"); +const commentConfig = require("../config/comment.json") -if(window.yiliaConfig.isPost && commentConfig.valine.enable) { - commentConfig.valine.config.path = window.location.pathname; - // commentConfig.valine.config.av = AV; - new Valine(commentConfig.valine.config); -} +import(/* webpackChunkName: "valine" */ '../lib/Valine.min').then(({ default: Valine }) => { + commentConfig.valine.config.path = window.location.pathname + // commentConfig.valine.config.av = AV; + new Valine(commentConfig.valine.config) +}) diff --git a/themes/yilia/source-src/js/main.js b/themes/yilia/source-src/js/main.js index 2d90141..a6612d1 100644 --- a/themes/yilia/source-src/js/main.js +++ b/themes/yilia/source-src/js/main.js @@ -14,3 +14,8 @@ Util.addLoadEvent(function() { // Viewer.init() Aside.init() }) +const commentConfig = require("../config/comment.json") +if(window.yiliaConfig.isPost && commentConfig.valine.enable) { + // 如果是文章详情页面, 并且启用了评论, 则加载评论相关代码 + import(/* webpackChunkName: "comment" */ './comment') +} \ No newline at end of file diff --git a/themes/yilia/source-src/lib/Valine.min.js.bak b/themes/yilia/source-src/lib/Valine.min.js.bak deleted file mode 100644 index 496a42a..0000000 --- a/themes/yilia/source-src/lib/Valine.min.js.bak +++ /dev/null @@ -1,6 +0,0 @@ -/*! - * Valine v1.1.9 - * (c) 2017-2018 xCss - * Released under the GPL-2.0 License. - */ -!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.Valine=t():e.Valine=t()}(this,function(){return function(e){function t(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,t),i.l=!0,i.exports}var n={};return t.m=e,t.c=n,t.i=function(e){return e},t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=9)}([function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var o=n(1),a=r(o),s=n(2),l=r(s),c={cdn:"https://gravatar.cat.net/avatar/",ds:["mm","identicon","monsterid","wavatar","retro",""],params:"?s=40",hide:!1},u={comment:"",rid:"",nick:"Guest",mail:"",link:"",ua:navigator.userAgent,url:"",pin:0,like:0},p=["nick","mail","link"],h=localStorage,d=function(){function e(t){i(this,e);var n=this;n.version="1.1.8-beta",n.md5=a.default,!!t&&n.init(t)}return e.prototype.init=function(e){var t=this;try{var n="[object HTMLDivElement]"==={}.toString.call(e.el)?e.el:document.querySelectorAll(e.el)[0];if("[object HTMLDivElement]"!={}.toString.call(n))throw"The target element was not found.";t.el=n,t.el.classList.add("valine");var r=e.guest_info||p,i=r.map(function(e){switch(e){case"nick":return'';case"mail":return'';case"link":return'';default:return""}}),o=e.placeholder||"",a='
'+e+""):console)}var m=t.el.querySelector(".vmark");t.alert={show:function(e){m.innerHTML='
Valine:"+t.version+"
反馈:"+g+"