mirror of
https://github.com/thegeeklab/hugo-geekdoc.git
synced 2024-11-22 04:40:40 +00:00
Robert Kaussow
f6966b8513
BREAKING CHANGE: The types of the `hint` short code have been renamed to `[note|tip|important|caution|warning]` the old types `[info|ok|warning|danger]` are still working, but should be considered as deprecated. BREAKING CHANGE: The `hint` short code is using named arguments now. You have to change, e.g. `{{< hint warning >}}` to `{{< hint type=warning >}}`.
17 lines
550 B
HTML
17 lines
550 B
HTML
{{ $type := default "note" (.Get "type") }}
|
|
{{ $icon := .Get "icon" }}
|
|
{{ $title := default ($type | title) (.Get "title") }}
|
|
|
|
|
|
<blockquote class="gdoc-hint {{ $type | lower }}">
|
|
<div class="gdoc-hint__title flex align-center">
|
|
{{ with $icon }}
|
|
<svg class="gdoc-icon {{ . }}"><use xlink:href="#{{ . }}"></use></svg>
|
|
<span>{{ $title }}</span>
|
|
{{ else }}
|
|
<i class="fa {{ $type | lower }}" title="{{ $title }}"></i>
|
|
{{ end }}
|
|
</div>
|
|
<div class="gdoc-hint__text">{{ .Inner | $.Page.RenderString }}</div>
|
|
</blockquote>
|