Skip to content

Commit

Permalink
v1.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
xugaoyi committed Jun 16, 2020
1 parent 67e8db7 commit b182561
Show file tree
Hide file tree
Showing 6 changed files with 43 additions and 16 deletions.
6 changes: 3 additions & 3 deletions docs/.vuepress/styles/palette.styl
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//***vdoing主题-样式变量***//

// 原主题变量已弃用,以下是vdoing使用的变量,你可以在这个文件内修改它们。

//***vdoing主题-变量***//
// 以下注释的变量仅供参考,主题使用的最新变量请查看:https://github.com/xugaoyi/vuepress-theme-vdoing/blob/master/theme-vdoing/styles/palette.styl
// 你可以在这个文件内修改这些变量的值

// // 颜色

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"vuepress-plugin-one-click-copy": "^1.0.2",
"vuepress-plugin-thirdparty-search": "^1.0.2",
"vuepress-plugin-zooming": "^1.1.7",
"vuepress-theme-vdoing": "^1.2.4",
"vuepress-theme-vdoing": "^1.3.0",
"yamljs": "^0.3.0"
},
"dependencies": {
Expand Down
25 changes: 17 additions & 8 deletions theme-vdoing/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,31 +80,40 @@ module.exports = (options, ctx) => {
['container', {
type: 'tip',
defaultTitle: {
'/': 'TIP',
'/zh/': '提示'
'/': '提示',
'/en/': 'TIP'
}
}],
['container', {
type: 'warning',
defaultTitle: {
'/': 'WARNING',
'/zh/': '注意'
'/': '注意',
'/en/': 'WARNING'
}
}],
['container', {
type: 'danger',
defaultTitle: {
'/': 'WARNING',
'/zh/': '警告'
'/': '警告',
'/en/': 'WARNING'
}
}],
['container', {
type: 'right',
defaultTitle: ''
}],
['container', {
type: 'theorem',
before: info => `<div class="custom-block theorem"><p class="title">${info}</p>`,
after: '</div>'
}],
['container', {
type: 'details',
before: info => `<details class="custom-block details">${info ? `<summary>${info}</summary>` : ''}\n`,
after: () => '</details>\n',
defaultTitle: {
'/': 'DETAILS',
'/zh/': '点击查看'
'/': '点击查看',
'/en/': 'DETAILS'
}
}],
// 卡片列表
Expand Down
2 changes: 1 addition & 1 deletion theme-vdoing/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "vuepress-theme-vdoing",
"version": "1.2.4",
"version": "1.3.0",
"description": "Vdoing theme for VuePress. 一个基于VuePress的知识管理兼博客主题。",
"author": {
"name": "gaoyi(Evan) Xu"
Expand Down
21 changes: 18 additions & 3 deletions theme-vdoing/styles/custom-blocks.styl
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,27 @@
color darken(red, 40%)
a
color var(--textColor)
&.right
color var(--textColor)
font-size 0.9rem
text-align right
&.theorem
margin 1rem 0
padding .8rem 1.5rem
border-radius 2px
background-color var(--customBlockBg)
.title
font-weight bold
margin .5rem 0
&.details
display block
position relative
border-radius 2px
margin 1.6em 0
margin 1em 0
padding 1.6em
background-color #eee
background-color var(--customBlockBg)
p
margin .8rem 0
h4
margin-top 0
figure, p
Expand All @@ -45,6 +59,8 @@
summary
outline none
cursor pointer
&:hover
color $accentColor

// 深色模式适配
.theme-mode-dark
Expand All @@ -55,7 +71,6 @@
.custom-block-title
color darken(#ffe564, 15%)
&.tip
&.details
background-color rgba(243, 245, 247, .2)
color darken(#42b983, 0%)
&.danger
Expand Down
3 changes: 3 additions & 0 deletions theme-vdoing/styles/palette.styl
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ $lineNumbersWrapperWidth = 2.5rem
--mainBg: rgba(255,255,255,1)
--sidebarBg: rgba(255,255,255,.8)
--blurBg: rgba(255,255,255,.9)
--customBlockBg: #f1f1f1
--textColor: #004050
--textLightenColor: #0085AD
--borderColor: rgba(0,0,0,.15)
Expand All @@ -61,6 +62,7 @@ $lineNumbersWrapperWidth = 2.5rem
--mainBg: rgba(30,30,34,1)
--sidebarBg: rgba(30,30,34,.8)
--blurBg: rgba(30,30,34,.8)
--customBlockBg: rgb(39,39,43)
--textColor: rgb(155,155,170)
--textLightenColor: #0085AD
--borderColor: #2C2C3A
Expand All @@ -74,6 +76,7 @@ $lineNumbersWrapperWidth = 2.5rem
--mainBg: rgba(245,245,213,1)
--sidebarBg: rgba(245,245,213,.8)
--blurBg: rgba(245,245,213,.9)
--customBlockBg: rgb(236,236,204)
--textColor: #704214
--textLightenColor: #996633
--borderColor: rgba(0,0,0,.15)
Expand Down

0 comments on commit b182561

Please sign in to comment.