chore: refactor css code style
This commit is contained in:
@@ -270,20 +270,6 @@
|
|||||||
@import "../_partial/_single/code";
|
@import "../_partial/_single/code";
|
||||||
@import "../_partial/_single/admonition";
|
@import "../_partial/_single/admonition";
|
||||||
|
|
||||||
.mermaid {
|
|
||||||
width: 100%;
|
|
||||||
margin: 3% auto;
|
|
||||||
text-align: center;
|
|
||||||
|
|
||||||
@import "../_mermaid/neutral/index";
|
|
||||||
|
|
||||||
.dark-theme & {
|
|
||||||
@import "../_mermaid/dark/index";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@import "../_aplayer/dark.scss";
|
|
||||||
|
|
||||||
.echarts {
|
.echarts {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 30rem;
|
height: 30rem;
|
||||||
|
|||||||
@@ -4,3 +4,4 @@ gittalk@1.5.0
|
|||||||
katex@0.11.1
|
katex@0.11.1
|
||||||
aplayer@1.10.1
|
aplayer@1.10.1
|
||||||
animate.css@3.7.2
|
animate.css@3.7.2
|
||||||
|
mermaid@8.4.2
|
||||||
|
|||||||
11
assets/css/mermaid.scss
Normal file
11
assets/css/mermaid.scss
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
.mermaid {
|
||||||
|
width: 100%;
|
||||||
|
margin: 3% auto;
|
||||||
|
text-align: center;
|
||||||
|
|
||||||
|
@import "lib/mermaid/neutral/index";
|
||||||
|
|
||||||
|
.dark-theme & {
|
||||||
|
@import "lib/mermaid/dark/index";
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -38,7 +38,7 @@
|
|||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
|
||||||
{{- /* Fork Awesome https://forkaweso.me/ */ -}}
|
{{- /* Fork Awesome https://forkaweso.me/ */ -}}
|
||||||
{{- $options := dict "targetPath" "css/lib/forkawesome/forkawesome.min.css" "outputStyle" "compressed" "enableSourceMap" true -}}
|
{{- $options := dict "targetPath" "css/lib/forkawesome/fork-awesome.min.css" "outputStyle" "compressed" "enableSourceMap" true -}}
|
||||||
{{- $res := resources.Get "css/lib/forkawesome/fork-awesome.scss"| toCSS $options -}}
|
{{- $res := resources.Get "css/lib/forkawesome/fork-awesome.scss"| toCSS $options -}}
|
||||||
<link rel="stylesheet" href="{{ $res.RelPermalink }}">
|
<link rel="stylesheet" href="{{ $res.RelPermalink }}">
|
||||||
|
|
||||||
|
|||||||
@@ -104,6 +104,7 @@
|
|||||||
{{- else -}}
|
{{- else -}}
|
||||||
{{- slice "js/lib/mermaid/mermaid.min.js" | $.Scratch.Add "scriptLocal" -}}
|
{{- slice "js/lib/mermaid/mermaid.min.js" | $.Scratch.Add "scriptLocal" -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
{{- slice "css/mermaid.scss" | $.Scratch.Add "linkLocal" -}}
|
||||||
<script>
|
<script>
|
||||||
window.mermaidMap = {{ jsonify . | safeJS }};
|
window.mermaidMap = {{ jsonify . | safeJS }};
|
||||||
</script>
|
</script>
|
||||||
@@ -117,6 +118,7 @@
|
|||||||
{{- else -}}
|
{{- else -}}
|
||||||
{{- slice "css/lib/aplayer/APlayer.min.css" | .Scratch.Add "linkLocal" -}}
|
{{- slice "css/lib/aplayer/APlayer.min.css" | .Scratch.Add "linkLocal" -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
{{- slice "css/lib/aplayer/dark.scss" | .Scratch.Add "linkLocal" -}}
|
||||||
{{- with $CDN.aplayer_js -}}
|
{{- with $CDN.aplayer_js -}}
|
||||||
{{- slice . | $.Scratch.Add "scriptCDN" -}}
|
{{- slice . | $.Scratch.Add "scriptCDN" -}}
|
||||||
{{- else -}}
|
{{- else -}}
|
||||||
@@ -176,7 +178,10 @@
|
|||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{- range .Scratch.Get "linkLocal" -}}
|
{{- range .Scratch.Get "linkLocal" -}}
|
||||||
{{- $res := resources.Get . -}}
|
{{- $res := resources.Get . -}}
|
||||||
{{- if not (strings.HasSuffix . ".min.css") -}}
|
{{- if strings.HasSuffix . ".scss" -}}
|
||||||
|
{{- $options := dict "outputStyle" "compressed" "enableSourceMap" true -}}
|
||||||
|
{{- $res = toCSS $options $res -}}
|
||||||
|
{{- else if not (strings.HasSuffix . ".min.css") -}}
|
||||||
{{- $res = minify $res -}}
|
{{- $res = minify $res -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
<link rel="stylesheet" href="{{ $res.RelPermalink }}">
|
<link rel="stylesheet" href="{{ $res.RelPermalink }}">
|
||||||
|
|||||||
@@ -0,0 +1,3 @@
|
|||||||
|
.dark-theme .aplayer{background:#212121}.dark-theme .aplayer.aplayer-withlist .aplayer-info{border-bottom-color:#5c5c5c}.dark-theme .aplayer.aplayer-fixed .aplayer-list{border-color:#5c5c5c}.dark-theme .aplayer .aplayer-body{background-color:#212121}.dark-theme .aplayer .aplayer-info{border-top-color:#212121}.dark-theme .aplayer .aplayer-info .aplayer-music .aplayer-title{color:#fff}.dark-theme .aplayer .aplayer-info .aplayer-music .aplayer-author{color:#fff}.dark-theme .aplayer .aplayer-info .aplayer-controller .aplayer-time{color:#eee}.dark-theme .aplayer .aplayer-info .aplayer-controller .aplayer-time .aplayer-icon path{fill:#eee}.dark-theme .aplayer .aplayer-list{background-color:#212121}.dark-theme .aplayer .aplayer-list::-webkit-scrollbar-thumb{background-color:#999}.dark-theme .aplayer .aplayer-list::-webkit-scrollbar-thumb:hover{background-color:#bbb}.dark-theme .aplayer .aplayer-list li{color:#fff;border-top-color:#666}.dark-theme .aplayer .aplayer-list li:hover{background:#4e4e4e}.dark-theme .aplayer .aplayer-list li.aplayer-list-light{background:#6c6c6c}.dark-theme .aplayer .aplayer-list li .aplayer-list-index{color:#ddd}.dark-theme .aplayer .aplayer-list li .aplayer-list-author{color:#ddd}.dark-theme .aplayer .aplayer-lrc{text-shadow:-1px -1px 0 #666}.dark-theme .aplayer .aplayer-lrc:before{background:-moz-linear-gradient(top, #212121 0%, rgba(33,33,33,0) 100%);background:-webkit-linear-gradient(top, #212121 0%, rgba(33,33,33,0) 100%);background:linear-gradient(to bottom, #212121 0%, rgba(33,33,33,0) 100%);filter:progid:DXImageTransform.Microsoft.gradient( startColorstr='#212121', endColorstr='#00212121',GradientType=0 )}.dark-theme .aplayer .aplayer-lrc:after{background:-moz-linear-gradient(top, rgba(33,33,33,0) 0%, rgba(33,33,33,0.8) 100%);background:-webkit-linear-gradient(top, rgba(33,33,33,0) 0%, rgba(33,33,33,0.8) 100%);background:linear-gradient(to bottom, rgba(33,33,33,0) 0%, rgba(33,33,33,0.8) 100%);filter:progid:DXImageTransform.Microsoft.gradient( startColorstr='#00212121', endColorstr='#cc212121',GradientType=0 )}.dark-theme .aplayer .aplayer-lrc p{color:#fff}.dark-theme .aplayer .aplayer-miniswitcher{background:#484848}.dark-theme .aplayer .aplayer-miniswitcher .aplayer-icon path{fill:#eee}
|
||||||
|
|
||||||
|
/*# sourceMappingURL=dark.css.map */
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
{"Target":"css/lib/aplayer/dark.css","MediaType":"text/css","Data":{}}
|
||||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
|
|||||||
|
{"Target":"css/lib/forkawesome/fork-awesome.min.css","MediaType":"text/css","Data":{}}
|
||||||
@@ -1 +0,0 @@
|
|||||||
{"Target":"css/lib/forkawesome/forkawesome.min.css","MediaType":"text/css","Data":{}}
|
|
||||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
|
|||||||
|
{"Target":"css/mermaid.css","MediaType":"text/css","Data":{}}
|
||||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user