Skip to content

Commit

Permalink
callout bridge shortcode (error / danger draft)
Browse files Browse the repository at this point in the history
  • Loading branch information
nakednous committed Sep 26, 2024
1 parent 9dcb9b0 commit 29371af
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions layouts/shortcodes/callout.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
{{ $type := .Get "type" | default "info" }}

{{ $isHugoBook := eq .Site.Params.theme "book" }}

{{ if and $isHugoBook (eq $type "error") }}
{{ $type = "danger" }}
{{ end }}

<blockquote class="book-hint {{ $type }}">
{{ .Inner | .Page.RenderString }}
</blockquote>

0 comments on commit 29371af

Please sign in to comment.