mirror of
https://github.com/BBaoVanC/bobatheme.git
synced 2024-11-17 05:15:58 -06:00
Add see-also shortcode
This commit is contained in:
parent
87a6da5c41
commit
2731d9795f
@ -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 {
|
||||
position: fixed;
|
||||
|
7
layouts/shortcodes/see-also.html
Normal file
7
layouts/shortcodes/see-also.html
Normal 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>
|
Loading…
Reference in New Issue
Block a user