mirror of
https://github.com/nunocoracao/blowfish.git
synced 2026-01-30 16:31:52 +01:00
Merge pull request #2704 from RxChi1d/fix/admonition-title-casing
fix(admonition): preserve custom title casing and integrate upstream improvements
This commit is contained in:
17
i18n/en.yaml
17
i18n/en.yaml
@@ -85,3 +85,20 @@ shortcode:
|
|||||||
|
|
||||||
recent:
|
recent:
|
||||||
show_more: "Show More"
|
show_more: "Show More"
|
||||||
|
|
||||||
|
admonition:
|
||||||
|
abstract: "Abstract"
|
||||||
|
bug: "Bug"
|
||||||
|
caution: "Caution"
|
||||||
|
danger: "Danger"
|
||||||
|
example: "Example"
|
||||||
|
failure: "Failure"
|
||||||
|
important: "Important"
|
||||||
|
info: "Info"
|
||||||
|
note: "Note"
|
||||||
|
question: "Question"
|
||||||
|
quote: "Quote"
|
||||||
|
success: "Success"
|
||||||
|
tip: "Tip"
|
||||||
|
todo: "Todo"
|
||||||
|
warning: "Warning"
|
||||||
|
|||||||
@@ -33,10 +33,10 @@
|
|||||||
{{- $normalizedType := index $typeMap $rawType | default $rawType -}}
|
{{- $normalizedType := index $typeMap $rawType | default $rawType -}}
|
||||||
{{- $iconName := .Attributes.icon | default (index $iconMap $normalizedType) | default "circle-info" -}}
|
{{- $iconName := .Attributes.icon | default (index $iconMap $normalizedType) | default "circle-info" -}}
|
||||||
|
|
||||||
{{- $admonitionTitle := .AlertTitle | default (i18n (printf "admonition.%s" $normalizedType) | default $normalizedType) -}}
|
{{- $admonitionTitle := .AlertTitle | default ((i18n (printf "admonition.%s" $normalizedType) | default $normalizedType) | title) -}}
|
||||||
|
|
||||||
{{- $containerClass := "admonition relative overflow-hidden rounded-lg border-l-4 my-3 px-4 py-3 shadow-sm" -}}
|
{{- $containerClass := "admonition relative overflow-hidden rounded-lg border-l-4 my-3 px-4 py-3 shadow-sm" -}}
|
||||||
{{- $headerClass := "flex items-center gap-2 font-semibold text-inherit capitalize" -}}
|
{{- $headerClass := "flex items-center gap-2 font-semibold text-inherit" -}}
|
||||||
{{- $contentClass := "admonition-content mt-3 text-base leading-relaxed text-inherit" -}}
|
{{- $contentClass := "admonition-content mt-3 text-base leading-relaxed text-inherit" -}}
|
||||||
|
|
||||||
{{- $isCollapsible := in (slice "+" "-") .AlertSign -}}
|
{{- $isCollapsible := in (slice "+" "-") .AlertSign -}}
|
||||||
|
|||||||
Reference in New Issue
Block a user