mirror of
https://github.com/McShelby/hugo-theme-relearn.git
synced 2024-11-23 07:47:54 +00:00
mermaid: fix Gantt chart width #365
This commit is contained in:
parent
07fe4f5c73
commit
5efdd8db6e
3 changed files with 24 additions and 21 deletions
|
@ -107,19 +107,19 @@ Inline math is generated if you use a single `$` as a delimiter around your form
|
|||
|
||||
Inline math is generated if you use a single `$` as a delimiter around your formulae: {{< math >}}$\sqrt{3}${{< /math >}}
|
||||
|
||||
### Blocklevel Math with Left Alignment
|
||||
### Blocklevel Math with Right Alignment
|
||||
|
||||
````md
|
||||
If you delimit your formulae by two consecutive `$$` it generates a new block.
|
||||
|
||||
{{</* math align="left" */>}}
|
||||
{{</* math align="right" */>}}
|
||||
$$\left( \sum_{k=1}^n a_k b_k \right)^2 \leq \left( \sum_{k=1}^n a_k^2 \right) \left( \sum_{k=1}^n b_k^2 \right)$$
|
||||
{{</* /math */>}}
|
||||
````
|
||||
|
||||
If you delimit your formulae by two consecutive `$$` it generates a new block.
|
||||
|
||||
{{< math align="left" >}}
|
||||
{{< math align="right" >}}
|
||||
$$\left( \sum_{k=1}^n a_k b_k \right)^2 \leq \left( \sum_{k=1}^n a_k^2 \right) \left( \sum_{k=1}^n b_k^2 \right)$$
|
||||
{{< /math >}}
|
||||
|
||||
|
|
|
@ -116,7 +116,7 @@ mermaidInitialize = "{ \"theme\": \"dark\" }"
|
|||
### Flowchart with Non-Default Mermaid Theme
|
||||
|
||||
````go
|
||||
{{</* mermaid align="left" */>}}
|
||||
{{</* mermaid */>}}
|
||||
%%{init:{"theme":"forest"}}%%
|
||||
graph LR;
|
||||
A[Hard edge] -->|Link text| B(Round edge)
|
||||
|
@ -126,7 +126,7 @@ graph LR;
|
|||
{{</* /mermaid */>}}
|
||||
````
|
||||
|
||||
{{< mermaid align="left" >}}
|
||||
{{< mermaid >}}
|
||||
%%{init:{"theme":"forest"}}%%
|
||||
graph LR;
|
||||
A[Hard edge] -->|Link text| B(Round edge)
|
||||
|
@ -207,10 +207,10 @@ gantt
|
|||
Add to Mermaid :1d
|
||||
{{< /mermaid >}}
|
||||
|
||||
### Class
|
||||
### Class Diagram Aligned to the Right
|
||||
|
||||
````go
|
||||
{{</* mermaid */>}}
|
||||
{{</* mermaid align="right" */>}}
|
||||
classDiagram
|
||||
Class01 <|-- AveryLongClass : Cool
|
||||
Class03 *-- Class04
|
||||
|
@ -228,7 +228,7 @@ classDiagram
|
|||
{{</* /mermaid */>}}
|
||||
````
|
||||
|
||||
{{< mermaid >}}
|
||||
{{< mermaid align="right" >}}
|
||||
classDiagram
|
||||
Class01 <|-- AveryLongClass : Cool
|
||||
Class03 *-- Class04
|
||||
|
|
|
@ -1466,14 +1466,14 @@ input[type="search"]::-webkit-search-results-decoration { display: none; }
|
|||
display: inline;
|
||||
}
|
||||
|
||||
.math.align-center > mjx-container{
|
||||
text-align: center !important;
|
||||
}
|
||||
|
||||
.math.align-left > mjx-container{
|
||||
text-align: left !important;
|
||||
}
|
||||
|
||||
.math.align-center > mjx-container{
|
||||
text-align: center !important;
|
||||
}
|
||||
|
||||
.math.align-right > mjx-container{
|
||||
text-align: right !important;
|
||||
}
|
||||
|
@ -1524,17 +1524,20 @@ input[type="search"]::-webkit-search-results-decoration { display: none; }
|
|||
}
|
||||
*/
|
||||
|
||||
.align-right {
|
||||
display: flex;
|
||||
justify-content: right;
|
||||
.mermaid-container .align-right > * {
|
||||
display: block;
|
||||
margin-left: auto;
|
||||
margin-right: 0;
|
||||
}
|
||||
|
||||
.align-center {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
.mermaid-container .align-center > * {
|
||||
display: block;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
}
|
||||
|
||||
.align-left {
|
||||
display: flex;
|
||||
justify-content: left;
|
||||
.mermaid-container .align-left > * {
|
||||
display: block;
|
||||
margin-left: 0;
|
||||
margin-right: auto;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue