mirror of
https://github.com/BBaoVanC/bobatheme.git
synced 2025-07-29 04:51:36 -05:00
Add aside shortcode
This commit is contained in:
@@ -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>
|
Reference in New Issue
Block a user