Skip to content

Commit

Permalink
Merge pull request #7 from LiHowe/dev
Browse files Browse the repository at this point in the history
merge Dev into main
  • Loading branch information
LiHowe authored Feb 7, 2023
2 parents 2ab57af + 9c07a2a commit d4e3e75
Show file tree
Hide file tree
Showing 6 changed files with 53 additions and 34 deletions.
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,16 @@

All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.

### [0.1.16](https://github.com/LiHowe/vuepress-plugin-mermaid/compare/v0.1.15...v0.1.16) (2023-01-16)

### [0.1.15](https://github.com/LiHowe/vuepress-plugin-mermaid/compare/v0.1.14...v0.1.15) (2023-01-13)


### Features

* preset theme:ocean [wip] ([4c69bae](https://github.com/LiHowe/vuepress-plugin-mermaid/commit/4c69bae9f6ad97d1806ea26127c65f9e52c92245))
* preset themes ([c2fc4bb](https://github.com/LiHowe/vuepress-plugin-mermaid/commit/c2fc4bb77a27c24bc690e4e3101f0e8a2d91b226))

### [0.1.14](https://github.com/LiHowe/vuepress-plugin-mermaid/compare/v0.1.13...v0.1.14) (2023-01-12)

### [0.1.13-beta.0](https://github.com/LiHowe/vuepress-plugin-mermaid/compare/v0.1.10...v0.1.13) (2023-01-12)
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,13 @@ Mermaid 完整的配置字段可以查看 [Mermaid - Configuration](https://merm

+ `Themes.sky`: 浅蓝色调
![浅蓝色主题](https://s2.loli.net/2023/01/13/e8Y3Rqu4KowCjN6.png)
+ `Themes.ocean`: 深蓝色调

#### 暗黑主题

+ `Themes.brown`
![棕色主题](https://s2.loli.net/2023/01/13/NGYc2A4e7BytmOR.png)
+ `Themes.plain`
![朴素主题](https://s2.loli.net/2023/01/16/XTPdMQw96qRnEfs.png)

#### 自定义主题

Expand Down
7 changes: 4 additions & 3 deletions README_EN.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,14 @@ Except Mermaid built-in theme, the plugin add some additional themes like:
#### Light Mode Themes

+ `Themes.sky`: light blue
![浅蓝色主题](https://s2.loli.net/2023/01/13/e8Y3Rqu4KowCjN6.png)
+ `Themes.ocean`: dark blue
![light blue](https://s2.loli.net/2023/01/13/e8Y3Rqu4KowCjN6.png)

#### Dark Mode Themes

+ `Themes.brown`
![brown themes](https://s2.loli.net/2023/01/13/NGYc2A4e7BytmOR.png)
![brown theme](https://s2.loli.net/2023/01/13/NGYc2A4e7BytmOR.png)
+ `Themes.plain`
![Plain theme](https://s2.loli.net/2023/01/16/XTPdMQw96qRnEfs.png)

#### Theme customization

Expand Down
37 changes: 20 additions & 17 deletions docs/.vuepress/config.ts
Original file line number Diff line number Diff line change
@@ -1,30 +1,33 @@
import { MermaidPlugin, Themes, registerTheme } from '../../lib/node'

const cc = registerTheme('fire', {
background: '#EFF5F5',
background: '#393E46',
fontSize: '14px',
primaryColor: '#EFF5F5',
noteBkgColor: '#497174',
noteTextColor: '#333',
darkMode: true,
lineColor: '#EB6440',
primaryBorderColor: '#D6E4E5',
primaryTextColor: '#497174',
git0: '#D6E4E5',
git1: '#D6E4E5',
git2: '#D6E4E5',
git3: '#D6E4E5',
git4: '#D6E4E5',
git5: '#D6E4E5',
git6: '#D6E4E5',
git7: '#D6E4E5',
primaryColor: '#393E46',
// noteBkgColor: '#00ADB5',
noteTextColor: '#393E46',
darkMode: false,
lineColor: '#EEEEEE',
actorBorder: '#EEEEEE',
primaryTextColor: '#EEEEEE',
attributeBackgroundColorOdd: '#43484e',
attributeBackgroundColorEven: '#393E46'
// primaryBorderColor: '#EEEEEE',
// git0: '#D6E4E5',
// git1: '#D6E4E5',
// git2: '#D6E4E5',
// git3: '#D6E4E5',
// git4: '#D6E4E5',
// git5: '#D6E4E5',
// git6: '#D6E4E5',
// git7: '#D6E4E5',
})

export default {
plugins: [
MermaidPlugin({
theme: cc,
darkTheme: cc,
darkTheme: Themes.ocean,
})
]
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "vuepress-plugin-mermaid-next",
"version": "0.1.14",
"version": "0.1.16",
"description": "A Mermaid plugin for vuepress-next",
"main": "./lib/node/index.js",
"directories": {
Expand Down
28 changes: 16 additions & 12 deletions src/shared/theme/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ enum Themes {
base = 'base',
null = 'null',

ocean = 'ocean',
sky = 'sky',
brown = 'brown',
plain = 'plain',
}

const builtinTheme: Themes[] = [
Expand Down Expand Up @@ -106,17 +106,7 @@ _registerTheme(Themes.sky, {
darkMode: false,
})

// [light] - ocean
_registerTheme(Themes.ocean, {
background: '#e3f2fd',
fontSize: '14px',
primaryColor: '#e3f2fd',
noteBkgColor: '#fffada',
noteTextColor: '#333',
darkMode: false,
})

// [dark] - charcoal
// [dark] - brown
_registerTheme(Themes.brown, {
background: '#1A120B',
fontSize: '14px',
Expand All @@ -130,6 +120,20 @@ _registerTheme(Themes.brown, {
attributeBackgroundColorEven: '#3C2A21'
})

// [dark] - plain
_registerTheme(Themes.plain, {
background: '#393E46',
fontSize: '14px',
primaryColor: '#393E46',
noteTextColor: '#393E46',
darkMode: false,
lineColor: '#EEEEEE',
actorBorder: '#EEEEEE',
primaryTextColor: '#EEEEEE',
attributeBackgroundColorOdd: '#43484e',
attributeBackgroundColorEven: '#393E46'
})

export {
Themes,
ExtraTheme,
Expand Down

0 comments on commit d4e3e75

Please sign in to comment.