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

Commit

Permalink
feat: add bilibili diagram echarts and improve style
Browse files Browse the repository at this point in the history
  • Loading branch information
dillonzq committed Aug 17, 2019
1 parent 00b6b7f commit 6981f1e
Show file tree
Hide file tree
Showing 26 changed files with 1,180 additions and 131 deletions.
18 changes: 12 additions & 6 deletions archetypes/default.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
---
title: "{{ replace .Name "-" " " | title }}"
title: "{{ replace .TranslationBaseName "-" " " | title }}"
date: {{ .Date }}
lastmod: {{ .Date }}
draft: true
description:
categories:
-
featured_image:
author: ""
description: ""
tags: []
categories: []

featured_image: ""

comment: true
toc: false
autoCollapseToc: true
math: false
---
10 changes: 1 addition & 9 deletions assets/css/_core/_base.scss
Original file line number Diff line number Diff line change
@@ -1,15 +1,7 @@
/** Font **/
/* Lato */
@import url(https://fonts.googleapis.com/css?family=Lato:100,300,400,700,900);

/* Montserrat */
@import url(https://fonts.googleapis.com/css?family=Montserrat:400,500,600,700,800);

/* Roboto */
@import url(https://fonts.googleapis.com/css?family=Roboto:400,900);

html {
font-family: "Roboto", -apple-system, BlinkMacSystemFont, "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", STHeiti, "Microsoft Yahei", "WenQuanYi Micro Hei", Arial, Verdana, sans-serif;
font-family: "Lato", -apple-system, BlinkMacSystemFont, "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", STHeiti, "Microsoft Yahei", "WenQuanYi Micro Hei", Arial, Verdana, sans-serif;

/* scrollbar, only support webkit */
&::-webkit-scrollbar {
Expand Down
14 changes: 13 additions & 1 deletion assets/css/_core/_media.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
display: none;
}

.post-toc {
display: none;
}

.navbar-mobile {
display: block !important;
position: fixed;
Expand Down Expand Up @@ -141,7 +145,15 @@

/* iPads (portrait and landscape) ----------- */

@media only screen and (min-device-width: 768px) and (max-device-width: 1024px) {}
@media only screen and (min-device-width: 768px) and (max-device-width: 1024px) {
.post-warp {
max-width: 560px !important;
}

.post-toc {
margin-left: 580px !important;
}
}

/* Desktops and laptops ----------- */

Expand Down
78 changes: 78 additions & 0 deletions assets/css/_mermaid/class.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
g.classGroup text {
fill: $nodeBorder;
stroke: none;
font-family: 'trebuchet ms', verdana, arial;
font-size: 10px;
}

g.classGroup rect {
fill: $nodeBkg;
stroke: $nodeBorder;
}

g.classGroup line {
stroke: $nodeBorder;
stroke-width: 1;
}

.classLabel .box {
stroke: none;
stroke-width: 0;
fill: $nodeBkg;
opacity: 0.5;
}

.classLabel .label {
fill: $nodeBorder;
font-size: 10px;
}

.relation {
stroke: $nodeBorder;
stroke-width: 1;
fill: none;
}

@mixin composition {
fill: $nodeBorder;
stroke: $nodeBorder;
stroke-width: 1;
}

#compositionStart {
@include composition;
}

#compositionEnd {
@include composition;
}

@mixin aggregation {
fill: $nodeBkg;
stroke: $nodeBorder;
stroke-width: 1;
}

#aggregationStart {
@include aggregation;
}

#aggregationEnd {
@include aggregation;
}

#dependencyStart {
@include composition;
}

#dependencyEnd {
@include composition;
}

#extensionStart {
@include composition;
}

#extensionEnd {
@include composition;
}
59 changes: 59 additions & 0 deletions assets/css/_mermaid/dark/index.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
$mainBkg: #BDD5EA;
$secondBkg: #6D6D65;
$mainContrastColor: lightgrey;
$darkTextColor: #323D47;
$lineColor: $mainContrastColor;
$border1: #81B1DB;
$border2: rgba(255, 255, 255, 0.25);
$arrowheadColor: $mainContrastColor;

/* Flowchart variables */

$nodeBkg: $mainBkg;
$nodeBorder: purple;
$clusterBkg: $secondBkg;
$clusterBorder: $border2;
$defaultLinkColor: $lineColor;
$titleColor: #F9FFFE;
$edgeLabelBackground: #e8e8e8;

/* Sequence Diagram variables */

$actorBorder: $border1;
$actorBkg: $mainBkg;
$actorTextColor: black;
$actorLineColor: $mainContrastColor;
$signalColor: $mainContrastColor;
$signalTextColor: $mainContrastColor;
$labelBoxBkgColor: $actorBkg;
$labelBoxBorderColor: $actorBorder;
$labelTextColor: $darkTextColor;
$loopTextColor: $mainContrastColor;
$noteBorderColor: $border2;
$noteBkgColor: #fff5ad;
$activationBorderColor: #666;
$activationBkgColor: #f4f4f4;
$sequenceNumberColor: white;

/* Gantt chart variables */

$sectionBkgColor: rgba(255, 255, 255, 0.3);
$altSectionBkgColor: white;
$sectionBkgColor2: #EAE8B9;
$taskBorderColor: rgba(255, 255, 255, 0.5);
$taskBkgColor: $mainBkg;
$taskTextColor: $darkTextColor;
$taskTextLightColor: $mainContrastColor;
$taskTextOutsideColor: $taskTextLightColor;
$taskTextClickableColor: #003163;
$activeTaskBorderColor: rgba(255, 255, 255, 0.5);
$activeTaskBkgColor: #81B1DB;
$gridColor: $mainContrastColor;
$doneTaskBkgColor: $mainContrastColor;
$doneTaskBorderColor: grey;
$critBorderColor: #E83737;
$critBkgColor: #E83737;
$taskTextDarkColor: $darkTextColor;
$todayLineColor: #DB5757;

@import '../mermaid';
57 changes: 57 additions & 0 deletions assets/css/_mermaid/default/index.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
$mainBkg: #ECECFF;
$secondBkg: #ffffde;
$lineColor: #333333;
$border1: #CCCCFF;
$border2: #aaaa33;
$arrowheadColor: #333333;

/* Flowchart variables */

$nodeBkg: $mainBkg;
$nodeBorder: #9370DB;
$clusterBkg: $secondBkg;
$clusterBorder: $border2;
$defaultLinkColor: $lineColor;
$titleColor: #333;
$edgeLabelBackground: #e8e8e8;

/* Sequence Diagram variables */

$actorBorder: $border1;
$actorBkg: $mainBkg;
$actorTextColor: black;
$actorLineColor: grey;
$signalColor: #333;
$signalTextColor: #333;
$labelBoxBkgColor: $actorBkg;
$labelBoxBorderColor: $actorBorder;
$labelTextColor: $actorTextColor;
$loopTextColor: $actorTextColor;
$noteBorderColor: $border2;
$noteBkgColor: #fff5ad;
$activationBorderColor: #666;
$activationBkgColor: #f4f4f4;
$sequenceNumberColor: white;

/* Gantt chart variables */

$sectionBkgColor: rgba(102, 102, 255, 0.49);
$altSectionBkgColor: white;
$sectionBkgColor2: #fff400;
$taskBorderColor: #534fbc;
$taskBkgColor: #8a90dd;
$taskTextLightColor: white;
$taskTextColor: $taskTextLightColor;
$taskTextDarkColor: black;
$taskTextOutsideColor: $taskTextDarkColor;
$taskTextClickableColor: #003163;
$activeTaskBorderColor: #534fbc;
$activeTaskBkgColor: #bfc7ff;
$gridColor: lightgrey;
$doneTaskBkgColor: lightgrey;
$doneTaskBorderColor: grey;
$critBorderColor: #ff8888;
$critBkgColor: red;
$todayLineColor: red;

@import '../mermaid';
58 changes: 58 additions & 0 deletions assets/css/_mermaid/flowchart.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
.label {
font-family: 'trebuchet ms', verdana, arial;
color: #333;
}

.label text {
fill: #333;
}

.node rect,
.node circle,
.node ellipse,
.node polygon {
fill: $mainBkg;
stroke: $nodeBorder;
stroke-width: 1px;
}

.node.clickable {
cursor: pointer;
}

.arrowheadPath {
fill: $arrowheadColor;
}

.edgePath .path {
stroke: $lineColor;
stroke-width: 1.5px;
}

.edgeLabel {
background-color: $edgeLabelBackground;
}

.cluster rect {
fill: $secondBkg;
stroke: $clusterBorder;
stroke-width: 1px;
}

.cluster text {
fill: $titleColor;
}

div.mermaidTooltip {
position: absolute;
text-align: center;
max-width: 200px;
padding: 2px;
font-family: 'trebuchet ms', verdana, arial;
font-size: 12px;
background: $secondBkg;
border: 1px solid $border2;
border-radius: 2px;
pointer-events: none;
z-index: 100;
}
58 changes: 58 additions & 0 deletions assets/css/_mermaid/forest/index.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
$mainBkg: #cde498;
$secondBkg: #cdffb2;
$lineColor: #1a3318;
$lineColor: green;
$border1: #13540c;
$border2: #6eaa49;
$arrowheadColor: green;

/* Flowchart variables */

$nodeBkg: $mainBkg;
$nodeBorder: $border1;
$clusterBkg: $secondBkg;
$clusterBorder: $border2;
$defaultLinkColor: $lineColor;
$titleColor: #333;
$edgeLabelBackground: #e8e8e8;

/* Sequence Diagram variables */

$actorBorder: $border1;
$actorBkg: $mainBkg;
$actorTextColor: black;
$actorLineColor: grey;
$signalColor: #333;
$signalTextColor: #333;
$labelBoxBkgColor: $actorBkg;
$labelBoxBorderColor: #326932;
$labelTextColor: $actorTextColor;
$loopTextColor: $actorTextColor;
$noteBorderColor: $border2;
$noteBkgColor: #fff5ad;
$activationBorderColor: #666;
$activationBkgColor: #f4f4f4;
$sequenceNumberColor: white;

/* Gantt chart variables */

$sectionBkgColor: #6eaa49;
$altSectionBkgColor: white;
$sectionBkgColor2: #6eaa49;
$taskBorderColor: $border1;
$taskBkgColor: #487e3a;
$taskTextLightColor: white;
$taskTextColor: $taskTextLightColor;
$taskTextDarkColor: black;
$taskTextOutsideColor: $taskTextDarkColor;
$taskTextClickableColor: #003163;
$activeTaskBorderColor: $taskBorderColor;
$activeTaskBkgColor: $mainBkg;
$gridColor: lightgrey;
$doneTaskBkgColor: lightgrey;
$doneTaskBorderColor: grey;
$critBorderColor: #ff8888;
$critBkgColor: red;
$todayLineColor: red;

@import '../mermaid';
Loading

0 comments on commit 6981f1e

Please sign in to comment.