Add see-also shortcode

This commit is contained in:
BBaoVanC 2022-05-03 22:09:18 -05:00
parent 87a6da5c41
commit 2731d9795f
Signed by: bbaovanc
GPG Key ID: 18089E4E3CCF1D3A
2 changed files with 20 additions and 0 deletions

View File

@ -305,6 +305,19 @@
*/ */
/* See also formating */
.see-also {
background-color: var(--background-2);
padding: 8px 12px;
border-radius: 8px;
margin: 10px 0;
}
.see-also p {
margin: 0;
}
/* Back to top */ /* Back to top */
#back-to-top { #back-to-top {
position: fixed; position: fixed;

View File

@ -0,0 +1,7 @@
<div class="see-also">
{{ with .Site.GetPage (.Get 0) }}
<p>SEE ALSO: <a href="{{ .Permalink }}">{{ .Title }}</a></p>
{{ else }}
{{ errorf "Page could not be found for see-also shortcode: %s" .Position }}
{{ end }}
</div>