diff --git a/hugo.toml b/hugo.toml index 22ba12b..e316dba 100644 --- a/hugo.toml +++ b/hugo.toml @@ -52,3 +52,8 @@ striped = true striped_columns = false style = "" # light, dark, primary, success, warning, danger and so on. thead_style = "" # similar to the style. + +[params.hb.blockquotes] +bordered = true +border_width = 4 # 1-5. +border_style = "primary" diff --git a/layouts/_default/_markup/render-blockquote-regular.html b/layouts/_default/_markup/render-blockquote-regular.html new file mode 100644 index 0000000..d635f4f --- /dev/null +++ b/layouts/_default/_markup/render-blockquote-regular.html @@ -0,0 +1,31 @@ +{{- $params := site.Params.hb.blockquotes }} +{{- $borderClass := "" }} +{{- if $params.bordered }} + {{- $borderClass = "border-start ps-3 py-1" }} + {{- with default "primary" $params.border_style }} + {{- $borderClass = printf "%s border-%s" $borderClass . }} + {{- end }} + {{- with default 4 $params.border_width }} + {{- $borderClass = printf "%s border-%d" $borderClass . }} + {{- end }} +{{- end }} +{{- if .Attributes }} + +{{- else }} +
+ {{ .Text }} ++{{- end }}