aaa
This commit is contained in:
parent
cd9ad778d1
commit
602bc5af32
|
|
@ -29,11 +29,11 @@ module.exports = {
|
||||||
var s = document.getElementsByTagName("script")[0];
|
var s = document.getElementsByTagName("script")[0];
|
||||||
s.parentNode.insertBefore(hm, s);
|
s.parentNode.insertBefore(hm, s);
|
||||||
})();`],
|
})();`],
|
||||||
['script', {
|
// ['script', {
|
||||||
"language": "javascript",
|
// "language": "javascript",
|
||||||
"type": "text/javascript",
|
// "type": "text/javascript",
|
||||||
"src": "https://limeng-blog.oss-cn-hangzhou.aliyuncs.com/sakura.js"
|
// "src": "https://limeng-blog.oss-cn-hangzhou.aliyuncs.com/sakura.js"
|
||||||
}]
|
// }]
|
||||||
],
|
],
|
||||||
markdown: {
|
markdown: {
|
||||||
lineNumbers: true,
|
lineNumbers: true,
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,10 @@
|
||||||
// 默认值
|
// 默认值
|
||||||
//$accentColor = #73acd9 // 主题颜色
|
//$accentColor = #73acd9 // 主题颜色
|
||||||
//$textColor = #366693 // 文本颜色
|
//$textColor = #366693 // 文本颜色
|
||||||
$accentColor = #f883c5 // 主题颜色
|
//$accentColor = #f883c5 // 主题颜色
|
||||||
$textColor = #f3087d // 文本颜色
|
//$textColor = #f3087d // 文本颜色
|
||||||
|
$accentColor = #f1aeca // 主题颜色
|
||||||
|
$textColor = #f1aeca // 文本颜色
|
||||||
$borderColor = #f1aeca // 边框线颜色
|
$borderColor = #f1aeca // 边框线颜色
|
||||||
$codeBgColor = #56585d // 代码块背景色
|
$codeBgColor = #56585d // 代码块背景色
|
||||||
$backgroundColor = #f1aeca // 悬浮块背景色
|
$backgroundColor = #f1aeca // 悬浮块背景色
|
||||||
|
|
|
||||||
|
|
@ -78,8 +78,6 @@
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<!--<script src="https://limeng-blog.oss-cn-hangzhou.aliyuncs.com/sakura.js"></script>-->
|
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import TagList from '@theme/components/TagList'
|
import TagList from '@theme/components/TagList'
|
||||||
import FriendLink from '@theme/components/FriendLink'
|
import FriendLink from '@theme/components/FriendLink'
|
||||||
|
|
@ -176,6 +174,7 @@ export default {
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="stylus">
|
<style lang="stylus">
|
||||||
|
|
||||||
.home-blog {
|
.home-blog {
|
||||||
padding: 0;
|
padding: 0;
|
||||||
margin: 0px auto;
|
margin: 0px auto;
|
||||||
|
|
@ -221,7 +220,7 @@ export default {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.info-wrapper {
|
.info-wrapper {
|
||||||
border:0.1px solid #f1aeca
|
border:0.1px solid $accentColor
|
||||||
position -webkit-sticky;
|
position -webkit-sticky;
|
||||||
position sticky;
|
position sticky;
|
||||||
top 70px
|
top 70px
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="mode-options">
|
<div class="mode-options">
|
||||||
<h4 class="title">Choose mode</h4>
|
<h4 class="title">选择主题</h4>
|
||||||
<ul class="color-mode-options">
|
<ul class="color-mode-options">
|
||||||
<li
|
<li
|
||||||
v-for="(mode, index) in modeOptions"
|
v-for="(mode, index) in modeOptions"
|
||||||
|
|
@ -21,8 +21,9 @@ export default {
|
||||||
return {
|
return {
|
||||||
modeOptions: [
|
modeOptions: [
|
||||||
{ mode: 'dark', title: 'dark' },
|
{ mode: 'dark', title: 'dark' },
|
||||||
{ mode: 'auto', title: 'auto' },
|
{ mode: 'light', title: 'light' },
|
||||||
{ mode: 'light', title: 'light' }
|
{ mode: 'simple', title: 'simple' }
|
||||||
|
// { mode: 'auto', title: 'auto' },
|
||||||
],
|
],
|
||||||
currentMode: 'auto'
|
currentMode: 'auto'
|
||||||
}
|
}
|
||||||
|
|
@ -41,6 +42,9 @@ export default {
|
||||||
window.matchMedia('(prefers-color-scheme: light)').addListener(() => {
|
window.matchMedia('(prefers-color-scheme: light)').addListener(() => {
|
||||||
that.$data.currentMode === 'auto' && applyMode(that.$data.currentMode)
|
that.$data.currentMode === 'auto' && applyMode(that.$data.currentMode)
|
||||||
})
|
})
|
||||||
|
window.matchMedia('(prefers-color-scheme: simple)').addListener(() => {
|
||||||
|
that.$data.currentMode === 'auto' && applyMode(that.$data.currentMode)
|
||||||
|
})
|
||||||
|
|
||||||
applyMode(this.currentMode)
|
applyMode(this.currentMode)
|
||||||
},
|
},
|
||||||
|
|
@ -51,6 +55,7 @@ export default {
|
||||||
this.currentMode = mode
|
this.currentMode = mode
|
||||||
applyMode(mode)
|
applyMode(mode)
|
||||||
localStorage.setItem('mode', mode)
|
localStorage.setItem('mode', mode)
|
||||||
|
location.reload();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
getClass (mode) {
|
getClass (mode) {
|
||||||
|
|
@ -64,6 +69,7 @@ export default {
|
||||||
.mode-options
|
.mode-options
|
||||||
background-color var(--background-color)
|
background-color var(--background-color)
|
||||||
min-width: 125px;
|
min-width: 125px;
|
||||||
|
//min-width: 125px;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
padding: 1em;
|
padding: 1em;
|
||||||
box-shadow var(--box-shadow);
|
box-shadow var(--box-shadow);
|
||||||
|
|
@ -75,26 +81,34 @@ export default {
|
||||||
color var(--text-color)
|
color var(--text-color)
|
||||||
.color-mode-options
|
.color-mode-options
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-wrap wrap
|
//flex-wrap wrap 强制换行
|
||||||
li
|
li
|
||||||
text-align: center;
|
text-align: center;
|
||||||
font-size 12px
|
font-size 12px
|
||||||
color var(--text-color)
|
color var(--text-color)
|
||||||
line-height 18px
|
line-height 18px
|
||||||
padding 3px 6px
|
padding 3px 6px
|
||||||
border-top 1px solid #666
|
border-top 1px solid $accentColor
|
||||||
border-bottom 1px solid #666
|
border-bottom 1px solid $accentColor
|
||||||
|
//border-top 1px solid #666
|
||||||
|
//border-bottom 1px solid #666
|
||||||
background-color var(--background-color)
|
background-color var(--background-color)
|
||||||
cursor pointer
|
cursor pointer
|
||||||
&.dark
|
&.dark
|
||||||
border-radius: $borderRadius 0 0 $borderRadius
|
border-radius: $borderRadius 0 0 $borderRadius
|
||||||
border-left 1px solid #666
|
//border-left 1px solid #666
|
||||||
|
border-left 1px solid $accentColor
|
||||||
&.light
|
&.light
|
||||||
|
//border-radius: $borderRadius $borderRadius
|
||||||
|
//border-left 1px solid #666
|
||||||
|
//border-left solid $accentColor
|
||||||
|
&.simple
|
||||||
border-radius: 0 $borderRadius $borderRadius 0
|
border-radius: 0 $borderRadius $borderRadius 0
|
||||||
border-right 1px solid #666
|
border-right 1px solid $accentColor
|
||||||
|
//border-right 1px solid #666
|
||||||
&.active
|
&.active
|
||||||
background-color: $accentColor;
|
background-color: $accentColor;
|
||||||
color #fff
|
color #fff
|
||||||
&:not(.active)
|
&:not(.active)
|
||||||
border-right 1px solid #666
|
//border-right 1px solid #666
|
||||||
</style>
|
</style>
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,27 @@
|
||||||
import modeOptions from './modeOptions'
|
import modeOptions from './modeOptions'
|
||||||
|
|
||||||
function render (mode) {
|
function render (mode) {
|
||||||
|
|
||||||
|
switch (mode){
|
||||||
|
case 'dark':
|
||||||
|
case 'light':
|
||||||
|
var script1=document.createElement('script');//创建script标签节点
|
||||||
|
script1.setAttribute('type','text/javascript');//设置script类型
|
||||||
|
script1.setAttribute('src','https://limeng-blog.oss-cn-hangzhou.aliyuncs.com/sakura.js');//设置js地址
|
||||||
|
document.body.appendChild(script1);//将js追加为body的子标签
|
||||||
|
}
|
||||||
|
|
||||||
const rootElement = document.querySelector(':root')
|
const rootElement = document.querySelector(':root')
|
||||||
const options = modeOptions[mode]
|
const options = modeOptions[mode]
|
||||||
const opposite = mode === 'dark' ? 'light' : 'dark'
|
let temp = 'dark'
|
||||||
|
switch (mode){
|
||||||
|
case 'dark':
|
||||||
|
case 'simple':
|
||||||
|
case 'light':
|
||||||
|
temp = mode
|
||||||
|
}
|
||||||
|
// const opposite = mode === 'dark' ? 'light' : 'dark'
|
||||||
|
const opposite = temp
|
||||||
for (const k in options) {
|
for (const k in options) {
|
||||||
rootElement.style.setProperty(k, options[k])
|
rootElement.style.setProperty(k, options[k])
|
||||||
}
|
}
|
||||||
|
|
@ -26,11 +43,13 @@ export default function applyMode (mode) {
|
||||||
|
|
||||||
const isDarkMode = window.matchMedia('(prefers-color-scheme: dark)').matches
|
const isDarkMode = window.matchMedia('(prefers-color-scheme: dark)').matches
|
||||||
const isLightMode = window.matchMedia('(prefers-color-scheme: light)').matches
|
const isLightMode = window.matchMedia('(prefers-color-scheme: light)').matches
|
||||||
|
const isSimpleMode = window.matchMedia('(prefers-color-scheme: simple)').matches
|
||||||
|
|
||||||
if (isDarkMode) render('dark')
|
if (isDarkMode) render('dark')
|
||||||
if (isLightMode) render('light')
|
if (isLightMode) render('light')
|
||||||
|
if (isSimpleMode) render('simple')
|
||||||
|
|
||||||
if (!isDarkMode && !isLightMode) {
|
if (!isDarkMode && !isLightMode && !isSimpleMode) {
|
||||||
console.log('You specified no preference for a color scheme or your browser does not support it. I schedule dark mode during night time.')
|
console.log('You specified no preference for a color scheme or your browser does not support it. I schedule dark mode during night time.')
|
||||||
const hour = new Date().getHours()
|
const hour = new Date().getHours()
|
||||||
if (hour < 6 || hour >= 18) render('dark')
|
if (hour < 6 || hour >= 18) render('dark')
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,24 @@
|
||||||
const modeOptions = {
|
const modeOptions = {
|
||||||
|
simple: {
|
||||||
|
'--default-color-10': 'rgba(255, 255, 255, 1)',
|
||||||
|
'--default-color-9': 'rgba(255, 255, 255, .9)',
|
||||||
|
'--default-color-8': 'rgba(255, 255, 255, .8)',
|
||||||
|
'--default-color-7': 'rgba(255, 255, 255, .7)',
|
||||||
|
'--default-color-6': 'rgba(255, 255, 255, .6)',
|
||||||
|
'--default-color-5': 'rgba(255, 255, 255, .5)',
|
||||||
|
'--default-color-4': 'rgba(255, 255, 255, .4)',
|
||||||
|
'--default-color-3': 'rgba(255, 255, 255, .3)',
|
||||||
|
'--default-color-2': 'rgba(255, 255, 255, .2)',
|
||||||
|
'--default-color-1': 'rgba(255, 255, 255, .1)',
|
||||||
|
'--background-color': '#fff',
|
||||||
|
'--box-shadow': '0 1px 8px 0 rgba(0, 0, 0, 0.1)',
|
||||||
|
'--box-shadow-hover': '0 2px 16px 0 rgba(0, 0, 0, 0.2)',
|
||||||
|
'--text-color': '#242424',
|
||||||
|
'--text-color-sub': '#7F7F7F',
|
||||||
|
'--border-color': '#eaecef',
|
||||||
|
'--code-color': 'rgba(27, 31, 35, 0.05)',
|
||||||
|
'--mask-color': '#888'
|
||||||
|
},
|
||||||
light: {
|
light: {
|
||||||
'--default-color-10': 'rgba(255, 255, 255, 1)',
|
'--default-color-10': 'rgba(255, 255, 255, 1)',
|
||||||
'--default-color-9': 'rgba(255, 255, 255, .9)',
|
'--default-color-9': 'rgba(255, 255, 255, .9)',
|
||||||
|
|
|
||||||
|
|
@ -2,9 +2,10 @@
|
||||||
<div
|
<div
|
||||||
class="abstract-item"
|
class="abstract-item"
|
||||||
@click="$router.push(item.path)">
|
@click="$router.push(item.path)">
|
||||||
|
<!-- 置顶 -->
|
||||||
<reco-icon v-if="item.frontmatter.sticky" icon="reco-sticky" />
|
<reco-icon v-if="item.frontmatter.sticky" icon="reco-sticky" />
|
||||||
<div class="title">
|
<div class="title">
|
||||||
<div class="flag flag-left"></div>
|
<div v-if="!item.frontmatter.sticky" class="flag flag-left"></div>
|
||||||
<reco-icon v-if="item.frontmatter.keys" icon="reco-lock" />
|
<reco-icon v-if="item.frontmatter.keys" icon="reco-lock" />
|
||||||
<router-link :to="item.path">{{item.title}}</router-link>
|
<router-link :to="item.path">{{item.title}}</router-link>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -27,7 +28,7 @@ export default {
|
||||||
|
|
||||||
<style lang="stylus" scoped>
|
<style lang="stylus" scoped>
|
||||||
.abstract-item
|
.abstract-item
|
||||||
border:0.1px solid #f1aeca
|
border:0.1px solid $accentColor
|
||||||
position relative
|
position relative
|
||||||
margin: 0 auto 20px;
|
margin: 0 auto 20px;
|
||||||
padding: 16px 20px;
|
padding: 16px 20px;
|
||||||
|
|
@ -93,7 +94,7 @@ export default {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
width: 74px;
|
width: 74px;
|
||||||
//background-color: #69abde;
|
//background-color: #69abde;
|
||||||
background-color: #f1aeca;
|
background-color: $accentColor;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
}
|
}
|
||||||
.flag-left {
|
.flag-left {
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,7 @@ import { addLinkToHead, addScriptToHead } from '@theme/helpers/utils'
|
||||||
import { registerCodeThemeCss, interceptRouterError } from '@theme/helpers/other'
|
import { registerCodeThemeCss, interceptRouterError } from '@theme/helpers/other'
|
||||||
import VueCompositionAPI from '@vue/composition-api'
|
import VueCompositionAPI from '@vue/composition-api'
|
||||||
import copy from "./mixins/copy";
|
import copy from "./mixins/copy";
|
||||||
|
// import sakura from "./mixins/sakura"
|
||||||
|
|
||||||
export default ({
|
export default ({
|
||||||
Vue,
|
Vue,
|
||||||
|
|
|
||||||
|
|
@ -133,9 +133,9 @@ function startSakura() {
|
||||||
window.onresize = function () {
|
window.onresize = function () {
|
||||||
var canvasSnow = document.getElementById('canvas_snow');
|
var canvasSnow = document.getElementById('canvas_snow');
|
||||||
}
|
}
|
||||||
img.onload = function () {
|
// img.onload = function () {
|
||||||
startSakura();
|
// startSakura();
|
||||||
}
|
// }
|
||||||
|
|
||||||
function stopp() {
|
function stopp() {
|
||||||
if (staticx) {
|
if (staticx) {
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
font-weight 600
|
font-weight 600
|
||||||
margin-bottom -0.4rem
|
margin-bottom -0.4rem
|
||||||
&.tip, &.warning, &.danger
|
&.tip, &.warning, &.danger
|
||||||
border:0.4px solid #f1aeca
|
border:0.4px solid $accentColor
|
||||||
//border:0.4px solid #69abde
|
//border:0.4px solid #69abde
|
||||||
padding .1rem 1.5rem
|
padding .1rem 1.5rem
|
||||||
border-left-width .3rem
|
border-left-width .3rem
|
||||||
|
|
@ -11,10 +11,10 @@
|
||||||
margin 1rem 0
|
margin 1rem 0
|
||||||
&.tip
|
&.tip
|
||||||
//background-color var(--code-color)
|
//background-color var(--code-color)
|
||||||
border-color #f1aeca
|
border-color $accentColor
|
||||||
//border-color #69abde
|
//border-color #69abde
|
||||||
.title
|
.title
|
||||||
color #f1aeca
|
color $accentColor
|
||||||
//color #69abde
|
//color #69abde
|
||||||
&.warning
|
&.warning
|
||||||
//background-color var(--code-color)
|
//background-color var(--code-color)
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,7 @@ date: 2020-06-29 22:06:23
|
||||||
tags: [缺陷的生命周期]
|
tags: [缺陷的生命周期]
|
||||||
categories: [质量体系]
|
categories: [质量体系]
|
||||||
author: Anges黎梦
|
author: Anges黎梦
|
||||||
|
sticky: 1
|
||||||
---
|
---
|
||||||
|
|
||||||
## 什么是软件缺陷?
|
## 什么是软件缺陷?
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,7 @@ categories: [质量体系]
|
||||||
author: Anges黎梦
|
author: Anges黎梦
|
||||||
tags:
|
tags:
|
||||||
- 缺陷等级
|
- 缺陷等级
|
||||||
|
sticky: 1
|
||||||
---
|
---
|
||||||
|
|
||||||
> 仅个人总结,提供参考,实际定级需要结合公司业务和场景评估。
|
> 仅个人总结,提供参考,实际定级需要结合公司业务和场景评估。
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,7 @@ date: 2020-06-28 16:37:55
|
||||||
tags: [研发流程与规范]
|
tags: [研发流程与规范]
|
||||||
categories: [质量体系]
|
categories: [质量体系]
|
||||||
author: Anges黎梦
|
author: Anges黎梦
|
||||||
|
sticky: 1
|
||||||
---
|
---
|
||||||
|
|
||||||
### 开始之前
|
### 开始之前
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue