Skip to content
This repository was archived by the owner on Mar 9, 2022. It is now read-only.

Commit

Permalink
chore: refactor css code style
Browse files Browse the repository at this point in the history
  • Loading branch information
dillonzq committed Feb 14, 2020
1 parent 1088f86 commit 73b1250
Show file tree
Hide file tree
Showing 26 changed files with 30 additions and 19 deletions.
14 changes: 0 additions & 14 deletions assets/css/_page/_single.scss
Original file line number Diff line number Diff line change
Expand Up @@ -270,20 +270,6 @@
@import "../_partial/_single/code";
@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 {
width: 100%;
height: 30rem;
Expand Down
1 change: 1 addition & 0 deletions assets/css/lib/VERSION
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ [email protected]
[email protected]
[email protected]
[email protected]
[email protected]
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
11 changes: 11 additions & 0 deletions assets/css/mermaid.scss
Original file line number Diff line number Diff line change
@@ -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";
}
}
2 changes: 1 addition & 1 deletion layouts/partials/head/link.html
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
{{- end -}}

{{- /* 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 -}}
<link rel="stylesheet" href="{{ $res.RelPermalink }}">

Expand Down
7 changes: 6 additions & 1 deletion layouts/partials/script.html
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@
{{- else -}}
{{- slice "js/lib/mermaid/mermaid.min.js" | $.Scratch.Add "scriptLocal" -}}
{{- end -}}
{{- slice "css/mermaid.scss" | $.Scratch.Add "linkLocal" -}}
<script>
window.mermaidMap = {{ jsonify . | safeJS }};
</script>
Expand All @@ -117,6 +118,7 @@
{{- else -}}
{{- slice "css/lib/aplayer/APlayer.min.css" | .Scratch.Add "linkLocal" -}}
{{- end -}}
{{- slice "css/lib/aplayer/dark.scss" | .Scratch.Add "linkLocal" -}}
{{- with $CDN.aplayer_js -}}
{{- slice . | $.Scratch.Add "scriptCDN" -}}
{{- else -}}
Expand Down Expand Up @@ -176,7 +178,10 @@
{{- end -}}
{{- range .Scratch.Get "linkLocal" -}}
{{- $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 -}}
{{- end -}}
<link rel="stylesheet" href="{{ $res.RelPermalink }}">
Expand Down
Original file line number Diff line number Diff line change
@@ -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 */
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"Target":"css/lib/aplayer/dark.css","MediaType":"text/css","Data":{}}

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"Target":"css/lib/forkawesome/fork-awesome.min.css","MediaType":"text/css","Data":{}}

This file was deleted.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"Target":"css/mermaid.css","MediaType":"text/css","Data":{}}

Large diffs are not rendered by default.

0 comments on commit 73b1250

Please sign in to comment.