Add aside shortcode

This commit is contained in:
BBaoVanC 2021-11-06 17:02:59 -05:00
parent 42f0046747
commit 4e27a6ce8a
Signed by: bbaovanc
GPG Key ID: 18089E4E3CCF1D3A
2 changed files with 18 additions and 0 deletions

View File

@ -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;

View 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>