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

Commit

Permalink
fix(style): dark mode for mermaid and valine
Browse files Browse the repository at this point in the history
  • Loading branch information
dillonzq committed Mar 14, 2020
1 parent c4d4099 commit 92fc2bf
Show file tree
Hide file tree
Showing 14 changed files with 49 additions and 100 deletions.
27 changes: 3 additions & 24 deletions assets/css/_page/_single.scss
Original file line number Diff line number Diff line change
Expand Up @@ -250,31 +250,10 @@
}

@import "../_partial/_single/code";
@import "../_partial/_single/instagram";
@import "../_partial/_single/admonition";

.echarts {
width: 100%;
height: 30rem;
margin: 3% auto;
text-align: center;
}

.bilibili {
position: relative;
width: 100%;
height: 0;
padding-bottom: 75%;
margin: 3% auto;
text-align: center;

iframe {
position: absolute;
width: 100%;
height: 100%;
left: 0;
top: 0;
}
}
@import "../_partial/_single/echarts";
@import "../_partial/_single/bilibili";

hr {
margin: 1rem 0;
Expand Down
16 changes: 16 additions & 0 deletions assets/css/_partial/_single/_bilibili.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
.bilibili {
position: relative;
width: 100%;
height: 0;
padding-bottom: 75%;
margin: 3% auto;
text-align: center;

iframe {
position: absolute;
width: 100%;
height: 100%;
left: 0;
top: 0;
}
}
6 changes: 6 additions & 0 deletions assets/css/_partial/_single/_echarts.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
.echarts {
width: 100%;
height: 30rem;
margin: 3% auto;
text-align: center;
}
5 changes: 5 additions & 0 deletions assets/css/_partial/_single/_instagram.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
iframe.instagram-media {
.dark-theme & {
border: none !important;
}
}
2 changes: 1 addition & 1 deletion assets/lib/mermaid/mermaid.scss
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@
@import "themes/neutral/index";

.dark-theme & {
@import "themes/darker/index";
@import "themes/dark/index";
}
}
62 changes: 0 additions & 62 deletions assets/lib/mermaid/themes/darker/index.scss

This file was deleted.

15 changes: 8 additions & 7 deletions assets/lib/mermaid/themes/gantt.scss
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@
text {
font-family: 'trebuchet ms', verdana, arial;
font-family: var(--mermaid-font-family);
fill: $taskTextOutsideColor;
}
}

Expand Down Expand Up @@ -151,12 +152,12 @@
.taskTextOutside0,
.taskTextOutside2
{
fill: $taskTextOutsideColor;
fill: $taskTextOutsideColor !important;
}

.taskTextOutside1,
.taskTextOutside3 {
fill: $taskTextOutsideColor;
fill: $taskTextOutsideColor !important;
}


Expand All @@ -174,7 +175,7 @@
.activeText1,
.activeText2,
.activeText3 {
fill: $taskTextDarkColor !important;
fill: $taskTextDarkColor;
}


Expand All @@ -193,7 +194,7 @@
.doneText1,
.doneText2,
.doneText3 {
fill: $taskTextDarkColor !important;
fill: $taskTextDarkColor;
}


Expand Down Expand Up @@ -239,20 +240,20 @@
.doneCritText1,
.doneCritText2,
.doneCritText3 {
fill: $taskTextDarkColor !important;
fill: $taskTextDarkColor;
}

.activeCritText0,
.activeCritText1,
.activeCritText2,
.activeCritText3 {
fill: $taskTextDarkColor !important;
fill: $taskTextDarkColor;
}

.titleText {
text-anchor: middle;
font-size: 18px;
fill: $taskTextDarkColor;
fill: $taskTextOutsideColor;
font-family: 'trebuchet ms', verdana, arial;
font-family: var(--mermaid-font-family);
}
4 changes: 4 additions & 0 deletions assets/lib/valine/dark.scss → assets/lib/valine/valine.scss
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@
.v code, .v pre {
background: #272C34;
}

.v .vmark .vinput {
color: #0e0f10;
}
}

.v code, .v pre {
Expand Down
2 changes: 1 addition & 1 deletion layouts/partials/comment.html
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
{{- if .Site.Params.comment.valine.enable -}}
{{- $valine := .Site.Params.comment.valine -}}
<div id="valine"></div>
{{- slice "lib/valine/dark.scss" | $scratch.Add "linkLocal" -}}
{{- slice "lib/valine/valine.scss" | $scratch.Add "linkLocal" -}}
{{- with $CDN.valineJS -}}
{{- slice . | $scratch.Add "scriptCDN" -}}
{{- else -}}
Expand Down

Large diffs are not rendered by default.

Large diffs are not rendered by default.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
.dark-theme .v *,.dark-theme .v .vwrap input,.dark-theme .v .vwrap input::placeholder,.dark-theme .v .veditor,.dark-theme .v .veditor::placeholder,.dark-theme .v a,.dark-theme .v a:hover{color:rgba(255,255,255,0.75);opacity:1}.dark-theme .v .vbtn{color:rgba(255,255,255,0.75);background:#333;border:none}.dark-theme .v .vbtn:hover{color:#3090e4;border-color:#3090e4}.dark-theme .v .vlist .vcard .vhead .vsys{background:#333}.dark-theme .v code,.dark-theme .v pre{background:#272C34}.v code,.v pre{text-align:left}
.dark-theme .v *,.dark-theme .v .vwrap input,.dark-theme .v .vwrap input::placeholder,.dark-theme .v .veditor,.dark-theme .v .veditor::placeholder,.dark-theme .v a,.dark-theme .v a:hover{color:rgba(255,255,255,0.75);opacity:1}.dark-theme .v .vbtn{color:rgba(255,255,255,0.75);background:#333;border:none}.dark-theme .v .vbtn:hover{color:#3090e4;border-color:#3090e4}.dark-theme .v .vlist .vcard .vhead .vsys{background:#333}.dark-theme .v code,.dark-theme .v pre{background:#272C34}.dark-theme .v .vmark .vinput{color:#0e0f10}.v code,.v pre{text-align:left}

/*# sourceMappingURL=dark.css.map */
/*# sourceMappingURL=valine.css.map */
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"Target":"lib/valine/valine.css","MediaType":"text/css","Data":{}}

0 comments on commit 92fc2bf

Please sign in to comment.