mirror of
https://github.com/alex-shpak/hugo-book.git
synced 2024-11-22 11:29:28 +00:00
Add custom class support for mermaid and button shortcodes
This commit is contained in:
parent
2047968370
commit
c9d979514c
@ -28,6 +28,10 @@ $block-border-radius: 0.15rem;
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
img {
|
||||||
|
max-width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
code {
|
code {
|
||||||
padding: 0 $padding-4;
|
padding: 0 $padding-4;
|
||||||
background: $gray-100;
|
background: $gray-100;
|
||||||
|
@ -34,6 +34,10 @@
|
|||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.text-center {
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
@mixin fixed {
|
@mixin fixed {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
top: 0;
|
top: 0;
|
||||||
|
@ -34,7 +34,7 @@ Miseratus fonte Ditis conubia.
|
|||||||
# Buttons
|
# Buttons
|
||||||
|
|
||||||
```tpl
|
```tpl
|
||||||
{{</* button relref="/" */>}}Get Home{{</* /button */>}}
|
{{</* button relref="/" [class="..."] */>}}Get Home{{</* /button */>}}
|
||||||
{{</* button href="https://github.com/alex-shpak/hugo-book" */>}}Contribute{{</* /button */>}}
|
{{</* button href="https://github.com/alex-shpak/hugo-book" */>}}Contribute{{</* /button */>}}
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -134,7 +134,7 @@ Miseratus fonte Ditis conubia.
|
|||||||
|
|
||||||
{{< columns >}}
|
{{< columns >}}
|
||||||
```tpl
|
```tpl
|
||||||
{{</* mermaid */>}}
|
{{</* mermaid [class="text-center"]*/>}}
|
||||||
sequenceDiagram
|
sequenceDiagram
|
||||||
Alice->>Bob: Hello Bob, how are you?
|
Alice->>Bob: Hello Bob, how are you?
|
||||||
alt is sick
|
alt is sick
|
||||||
|
File diff suppressed because one or more lines are too long
@ -1 +1 @@
|
|||||||
{"Target":"book.min.40a7a4a197e0c73ece96b2afec0d34ad394563de6f97699dd68b042cd2f5ae9e.css","MediaType":"text/css","Data":{"Integrity":"sha256-QKekoZfgxz7OlrKv7A00rTlFY95vl2md1osELNL1rp4="}}
|
{"Target":"book.min.1f05d81b275a862f44a849039ab95c032a03abf4aebe5aeff5367876fc7b68ab.css","MediaType":"text/css","Data":{"Integrity":"sha256-HwXYGydahi9EqEkDmrlcAyoDq/Suvlrv9TZ4dvx7aKs="}}
|
@ -7,4 +7,6 @@
|
|||||||
{{ with .Get "relref" }}
|
{{ with .Get "relref" }}
|
||||||
{{ $ref = relref $ . }}
|
{{ $ref = relref $ . }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
<a {{ with $ref }} href="{{.}}" {{ end }} {{ with $target }} target="{{.}}" {{ end }} class="book-btn">{{ $.Inner }}</a>
|
<a {{ with $ref }} href="{{.}}" {{ end }} {{ with $target }} target="{{.}}" {{ end }} class="book-btn{{ with .Get "class" }} {{ . }}{{ end }}">
|
||||||
|
{{ $.Inner }}
|
||||||
|
</a>
|
||||||
|
@ -4,6 +4,6 @@
|
|||||||
{{ .Page.Scratch.Set "mermaid" true }}
|
{{ .Page.Scratch.Set "mermaid" true }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
<p class="mermaid">
|
<p class="mermaid{{ with .Get "class" }} {{ . }}{{ end }}">
|
||||||
{{ .Inner }}
|
{{ .Inner }}
|
||||||
</p>
|
</p>
|
||||||
|
Loading…
Reference in New Issue
Block a user