Skip to content

Commit

Permalink
note shortcode: Use title as title when specified
Browse files Browse the repository at this point in the history
I think this was accidentally changed in
7287ff7?

This isn't a pure revert - it sets up a fallback chain of
title > type > Note rather than just title > Note
  • Loading branch information
illicitonion committed Oct 24, 2024
1 parent ccf7681 commit 9345d8b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions common-theme/layouts/shortcodes/note.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@
"tip" ":bulb:"
"warning" ":warning:"
}}
{{$title := .Get "title" | default "Note"}}
{{$title := .Get "title" | default (.Get "type") | default "Note"}}
{{$noteType := .Get "type" | default "note"}}

<section class="c-note c-note--{{$noteType}}">
<h4 class="c-note__title e-heading__4">
{{ transform.Emojify (index $emojis $noteType) }}
{{ or (i18n $noteType) ($noteType) }}</span>
{{ or (i18n $noteType) ($title) }}</span>
</h4>
<div class="c-note__text ">{{ printf "%s" .Inner | markdownify }}</div>
</section>

0 comments on commit 9345d8b

Please sign in to comment.