mirror of
https://github.com/BBaoVanC/bobatheme.git
synced 2024-12-22 12:13:19 -06:00
Add aside shortcode
This commit is contained in:
parent
42f0046747
commit
4e27a6ce8a
@ -183,6 +183,13 @@ figcaption {
|
|||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
aside {
|
||||||
|
background-color: #222;
|
||||||
|
padding: 12px 16px;
|
||||||
|
margin: 16px 0;
|
||||||
|
border-radius: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
a {
|
a {
|
||||||
color: #4da6ff;
|
color: #4da6ff;
|
||||||
text-decoration: inherit;
|
text-decoration: inherit;
|
||||||
@ -208,6 +215,10 @@ hr {
|
|||||||
|
|
||||||
|
|
||||||
/* Code blocks */
|
/* Code blocks */
|
||||||
|
.highlight {
|
||||||
|
margin: 16px 0;
|
||||||
|
}
|
||||||
|
|
||||||
.highlight > pre {
|
.highlight > pre {
|
||||||
padding: 12px 8px;
|
padding: 12px 8px;
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
|
7
layouts/shortcodes/aside.html
Normal file
7
layouts/shortcodes/aside.html
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
<aside>
|
||||||
|
{{ with .Inner }}
|
||||||
|
{{ . | markdownify }}
|
||||||
|
{{ else }}
|
||||||
|
{{ errorf "The aside shortcode needs to be a closing one (similar to the highlight shortcode, see https://gohugo.io/templates/shortcode-templates/#inner" }}
|
||||||
|
{{ end }}
|
||||||
|
</aside>
|
Loading…
Reference in New Issue
Block a user