chore(lib): update mermaid 8.4.2 -> 8.4.8 echarts 4.5.0 -> 4.6.0 gitalk 1.5.0 -> 1.6.0

This commit is contained in:
Dillon 2020-02-24 20:34:00 +08:00
parent ef88651fe4
commit 7e56922f82
33 changed files with 218 additions and 130 deletions

View file

@ -1,11 +0,0 @@
.mermaid {
width: 100%;
margin: 3% auto;
text-align: center;
@import "../lib/mermaid/neutral/index";
.dark-theme & {
@import "../lib/mermaid/dark/index";
}
}

View file

@ -7,10 +7,10 @@ lazysizes@5.2.0 https://github.com/aFarkas/lazysizes
lightgallery@1.1.3 lg-thumbnail@1.1.0 lg-zoom@1.1.0 https://github.com/sachinchoolur/lightgallery.js
typeit@6.5.1 https://github.com/alexmacarthur/typeit
katex@0.11.1 https://github.com/KaTeX/KaTeX
mermaid@8.4.2 https://github.com/knsv/mermaid
mermaid@8.4.8 https://github.com/knsv/mermaid
aplayer@1.10.1 https://github.com/MoePlayer/APlayer
meting@2.0.1 https://github.com/metowolf/MetingJS
echarts@4.5.0 https://github.com/apache/incubator-echarts
gitalk@1.5.0 https://github.com/gitalk/gitalk
echarts@4.6.0 https://echarts.apache.org/
gitalk@1.6.0 https://github.com/gitalk/gitalk
valine@1.3.10 https://valine.js.org/
iconfont https://www.iconfont.cn/

File diff suppressed because one or more lines are too long

View file

@ -17,19 +17,22 @@
* under the License.
*/
(function (root, factory) {
(function(root, factory) {
if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module.
define(['exports', 'echarts'], factory);
} else if (typeof exports === 'object' && typeof exports.nodeName !== 'string') {
} else if (
typeof exports === 'object' &&
typeof exports.nodeName !== 'string'
) {
// CommonJS
factory(exports, require('echarts'));
} else {
// Browser globals
factory({}, root.echarts);
}
}(this, function (exports, echarts) {
var log = function (msg) {
})(this, function(exports, echarts) {
var log = function(msg) {
if (typeof console !== 'undefined') {
console && console.error && console.error(msg);
}
@ -40,13 +43,28 @@
}
var colorPalette = [
'#2ec7c9','#b6a2de','#5ab1ef','#ffb980','#d87a80',
'#8d98b3','#e5cf0d','#97b552','#95706d','#dc69aa',
'#07a2a4','#9a7fd1','#588dd5','#f5994e','#c05050',
'#59678c','#c9ab00','#7eb00a','#6f5553','#c14089'
'#2ec7c9',
'#b6a2de',
'#5ab1ef',
'#ffb980',
'#d87a80',
'#8d98b3',
'#e5cf0d',
'#97b552',
'#95706d',
'#dc69aa',
'#07a2a4',
'#9a7fd1',
'#588dd5',
'#f5994e',
'#c05050',
'#59678c',
'#c9ab00',
'#7eb00a',
'#6f5553',
'#c14089'
];
var theme = {
color: colorPalette,
@ -59,7 +77,7 @@
visualMap: {
itemWidth: 15,
color: ['#5ab1ef','#e0ffff']
color: ['#5ab1ef', '#e0ffff']
},
toolbox: {
@ -72,15 +90,15 @@
tooltip: {
backgroundColor: 'rgba(50,50,50,0.5)',
axisPointer : {
type : 'line',
lineStyle : {
axisPointer: {
type: 'line',
lineStyle: {
color: '#008acd'
},
crossStyle: {
color: '#008acd'
},
shadowStyle : {
shadowStyle: {
color: 'rgba(200,200,200,0.2)'
}
}
@ -115,10 +133,10 @@
color: '#008acd'
}
},
splitArea : {
show : true,
areaStyle : {
color: ['rgba(250,250,250,0.1)','rgba(200,200,200,0.1)']
splitArea: {
show: true,
areaStyle: {
color: ['rgba(250,250,250,0.1)', 'rgba(200,200,200,0.1)']
}
},
splitLine: {
@ -128,34 +146,37 @@
}
},
timeline : {
lineStyle : {
color : '#008acd'
timeline: {
lineStyle: {
color: '#008acd'
},
controlStyle : {
normal : { color : '#008acd'},
emphasis : { color : '#008acd'}
controlStyle: {
color: '#008acd',
borderColor: '#008acd'
},
symbol : 'emptyCircle',
symbolSize : 3
symbol: 'emptyCircle',
symbolSize: 3
},
line: {
smooth : true,
smooth: true,
symbol: 'emptyCircle',
symbolSize: 3
},
candlestick: {
itemStyle: {
normal: {
color: '#d87a80',
color0: '#2ec7c9',
lineStyle: {
color: '#d87a80',
color0: '#2ec7c9'
}
}
color: '#d87a80',
color0: '#2ec7c9'
},
lineStyle: {
width: 1,
color: '#d87a80',
color0: '#2ec7c9'
},
areaStyle: {
color: '#2ec7c9',
color0: '#b6a2de'
}
},
@ -165,53 +186,55 @@
},
map: {
label: {
normal: {
textStyle: {
color: '#d87a80'
}
}
},
itemStyle: {
normal: {
borderColor: '#eee',
areaColor: '#ddd'
},
emphasis: {
areaColor: '#fe994e'
}
color: '#ddd'
},
areaStyle: {
color: '#fe994e'
},
label: {
color: '#d87a80'
}
},
graph: {
color: colorPalette
itemStyle: {
color: '#d87a80'
},
linkStyle: {
color: '#2ec7c9'
}
},
gauge : {
gauge: {
axisLine: {
lineStyle: {
color: [[0.2, '#2ec7c9'],[0.8, '#5ab1ef'],[1, '#d87a80']],
color: [
[0.2, '#2ec7c9'],
[0.8, '#5ab1ef'],
[1, '#d87a80']
],
width: 10
}
},
axisTick: {
splitNumber: 10,
length :15,
length: 15,
lineStyle: {
color: 'auto'
}
},
splitLine: {
length :22,
length: 22,
lineStyle: {
color: 'auto'
}
},
pointer : {
width : 5
pointer: {
width: 5
}
}
};
echarts.registerTheme('macarons', theme);
}));
});

View file

@ -1145,6 +1145,16 @@
font-size: 0.875em;
position: relative;
}
.gt-container .gt-comment-block-1 {
float: right;
height: 1.375em;
width: 2em;
}
.gt-container .gt-comment-block-2 {
float: right;
height: 1.375em;
width: 4em;
}
.gt-container .gt-comment-username {
font-weight: 500;
color: #6190e8;
@ -1184,6 +1194,35 @@
.gt-container .gt-comment-body {
color: #333 !important;
}
.gt-container .gt-comment-body .email-hidden-toggle a {
display: inline-block;
height: 12px;
padding: 0 9px;
font-size: 12px;
font-weight: 600;
line-height: 6px;
color: #444d56;
text-decoration: none;
vertical-align: middle;
background: #dfe2e5;
border-radius: 1px;
}
.gt-container .gt-comment-body .email-hidden-toggle a:hover {
background-color: #c6cbd1;
}
.gt-container .gt-comment-body .email-hidden-reply {
display: none;
white-space: pre-wrap;
}
.gt-container .gt-comment-body .email-hidden-reply .email-signature-reply {
padding: 0 15px;
margin: 15px 0;
color: #586069;
border-left: 4px solid #dfe2e5;
}
.gt-container .gt-comment-body .email-hidden-reply.expanded {
display: block;
}
.gt-container .gt-comment-admin .gt-comment-content {
background-color: #f6f9fe;
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -1,20 +1,11 @@
// mermaid@8.4.2
@import 'flowchart';
@import 'sequence';
@import 'gantt';
@import 'class';
@import 'git';
@import 'pie';
@import 'state';
.mermaid {
width: 100%;
margin: 3% auto;
text-align: center;
// .composit {
// fill: white;
// border-bottom: 1px
// }
@import "themes/neutral/index";
:root {
--mermaid-font-family: '"trebuchet ms", verdana, arial';
--mermaid-font-family: "Comic Sans MS", "Comic Sans", cursive;
// --mermaid-alt-font-family: '"Lucida Console", Monaco, monospace';
.dark-theme & {
@import "themes/dark/index";
}
}

View file

@ -10,6 +10,10 @@ g.classGroup text {
}
}
g.clickable {
cursor: pointer;
}
g.classGroup rect {
fill: $nodeBkg;
stroke: $nodeBorder;
@ -38,6 +42,10 @@ g.classGroup line {
fill: none;
}
.dashed-line{
stroke-dasharray: 3;
}
@mixin composition {
fill: $nodeBorder;
stroke: $nodeBorder;

View file

@ -11,7 +11,8 @@
.node rect,
.node circle,
.node ellipse,
.node polygon {
.node polygon,
.node path {
fill: $mainBkg;
stroke: $nodeBorder;
stroke-width: 1px;

View file

@ -54,7 +54,7 @@
.grid .tick {
stroke: $gridColor;
opacity: 0.3;
opacity: 0.8;
shape-rendering: crispEdges;
text {
font-family: 'trebuchet ms', verdana, arial;

View file

@ -0,0 +1,19 @@
@import 'flowchart';
@import 'sequence';
@import 'gantt';
@import 'class';
@import 'git';
@import 'pie';
@import 'state';
// .composit {
// fill: white;
// border-bottom: 1px
// }
:root {
--mermaid-font-family: '"trebuchet ms", verdana, arial';
--mermaid-font-family: "Comic Sans MS", "Comic Sans", cursive;
// --mermaid-alt-font-family: '"Lucida Console", Monaco, monospace';
}

View file

@ -37,6 +37,11 @@ g.stateGroup line {
border-bottom: 1px
}
.stateGroup .alt-composit {
fill: #e0e0e0;
border-bottom: 1px
}
.state-note {
stroke: $noteBorderColor;
fill: $noteBkgColor;

View file

@ -540,17 +540,17 @@ enableEmoji = true
katexCopyTexCSS = ''
katexCopyTexJS = ''
katexMhchemJS = ''
# mermaid@8.4.2 https://github.com/knsv/mermaid
# mermaid@8.4.8 https://github.com/knsv/mermaid
mermaidJS = ''
# aplayer@1.10.1 https://github.com/MoePlayer/APlayer
aplayerCSS = ''
aplayerJS = ''
# meting@2.0.1 https://github.com/metowolf/MetingJS
metingJS = ''
# echarts@4.5.0 https://github.com/apache/incubator-echarts
# echarts@4.6.0 https://echarts.apache.org/
echartsJS = ''
echartsMacaronsJS = ''
# gitalk@1.5.0 https://github.com/gitalk/gitalk
# gitalk@1.6.0 https://github.com/gitalk/gitalk
gitalkCSS = ''
gitalkJS = ''
# valine@1.3.10 https://valine.js.org/

View file

@ -25,16 +25,16 @@
{{- with $CDN.fontawesomeFreeCSS -}}
{{- . | safeHTML -}}
{{- else -}}
{{- $res := resources.Get "lib/fontawesome-free/all.min.css" -}}
<link rel="stylesheet" href="{{ $res.RelPermalink }}">
{{- $res := resources.Get "lib/fontawesome-free/all.min.css" | resources.Fingerprint "sha256" -}}
<link rel="stylesheet" href="{{ $res.RelPermalink }}" integrity="{{ $res.Data.Integrity }}">
{{- end -}}
{{- /* Animate.css */ -}}
{{- with $CDN.animateCSS -}}
{{- . | safeHTML -}}
{{- else -}}
{{ $res := resources.Get "lib/animate/animate.min.css" -}}
<link rel="stylesheet" href="{{ $res.RelPermalink }}">
{{ $res := resources.Get "lib/animate/animate.min.css" | resources.Fingerprint "sha256" -}}
<link rel="stylesheet" href="{{ $res.RelPermalink }}" integrity="{{ $res.Data.Integrity }}">
{{- end -}}
{{- /* style.min.css */ -}}
@ -43,5 +43,5 @@
{{- $options = dict "includePaths" (slice "config/css") | merge $options -}}
{{- $options = dict "outputStyle" "compressed" | merge $options -}}
{{- $options = dict "enableSourceMap" true | merge $options -}}
{{- $res = resources.ExecuteAsTemplate "style.scss" . $res | toCSS $options -}}
<link rel="stylesheet" href="{{ $res.RelPermalink }}">
{{- $res = resources.ExecuteAsTemplate "style.scss" . $res | toCSS $options | resources.Fingerprint "sha256" -}}
<link rel="stylesheet" href="{{ $res.RelPermalink }}" integrity="{{ $res.Data.Integrity }}">

View file

@ -157,7 +157,7 @@
{{- else -}}
{{- slice "lib/mermaid/mermaid.min.js" | $scratch.Add "scriptLocal" -}}
{{- end -}}
{{- slice "css/mermaid.scss" | $scratch.Add "linkLocal" -}}
{{- slice "lib/mermaid/mermaid.scss" | $scratch.Add "linkLocal" -}}
<script>
window.mermaidMap = {{ jsonify . | safeJS }};
</script>
@ -210,6 +210,10 @@
{{- end -}}
{{- end -}}
{{- /* Theme script */ -}}
{{- slice "js/theme.min.js" | $scratch.Add "scriptLocal" -}}
{{- $_ := (resources.Get "js/theme.min.js.map").RelPermalink -}}
{{- range $scratch.Get "linkCDN" -}}
{{- safeHTML . -}}
{{- end -}}
@ -221,7 +225,8 @@
{{- else if not (strings.HasSuffix . ".min.css") -}}
{{- $res = minify $res -}}
{{- end -}}
<link rel="stylesheet" href="{{ $res.RelPermalink }}">
{{- $res = $res | resources.Fingerprint "sha256" -}}
<link rel="stylesheet" href="{{ $res.RelPermalink }}" integrity="{{ $res.Data.Integrity }}">
{{- end -}}
{{- range $scratch.Get "scriptCDN" -}}
@ -232,12 +237,10 @@
{{- if not (strings.HasSuffix . ".min.js") -}}
{{- $res = minify $res -}}
{{- end -}}
<script src="{{ $res.RelPermalink }}"></script>
{{- $res = $res | resources.Fingerprint "sha256" -}}
<script src="{{ $res.RelPermalink }}" integrity="{{ $res.Data.Integrity }}"></script>
{{- end -}}
{{- /* Theme script */ -}}
<script src=/js/theme.min.js></script>
{{- /* Google analytics async */ -}}
{{- if $scratch.Get "production" | and .Site.GoogleAnalytics -}}
{{- template "_internal/google_analytics_async.html" . -}}

View file

@ -12,7 +12,7 @@
"husky": "^4.2.3"
},
"scripts": {
"build": "npx babel src --out-file static/js/theme.min.js --source-maps",
"build": "npx babel src --out-file assets/js/theme.min.js --source-maps",
"start": "hugo server --source=exampleSite --themesDir=../.. --disableFastRender -D",
"copy": "HUGO_ENV=production hugo -v --source=exampleSite --themesDir=../.. -D --gc --minify && rm -rf resources && cp -rf exampleSite/resources resources"
},

File diff suppressed because one or more lines are too long

View file

@ -1 +0,0 @@
{"Target":"css/mermaid.css","MediaType":"text/css","Data":{}}

View file

@ -0,0 +1 @@
{"Target":"css/style.min.0c871a59eda3563babe70ccf804244063ca3f833552e8ca99ccd9c802d6d67f0.css","MediaType":"text/css","Data":{"Integrity":"sha256-DIcaWe2jVjur5wzPgEJEBjyj+DNVLoypnM2cgC1tZ/A="}}

View file

@ -1 +0,0 @@
{"Target":"css/style.min.css","MediaType":"text/css","Data":{}}

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1 @@
{"Target":"lib/mermaid/mermaid.6094c0b431ca63173ab925fcceb838ae3b251b0b0fc0d3974c6ae78ae3c0bc2d.css","MediaType":"text/css","Data":{"Integrity":"sha256-YJTAtDHKYxc6uSX8zrg4rjslGwsPwNOXTGrniuPAvC0="}}