Skip to content

Commit c3f2c80

Browse files
committed
List: Updated list files + added new banner shortcode
1 parent 388b669 commit c3f2c80

File tree

3 files changed

+11
-2
lines changed

3 files changed

+11
-2
lines changed

layouts/_default/list.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,9 @@ <h1>{{ .Title }}</h1>
3333

3434
{{- with .Params.banner -}}
3535
{{- if .enabled -}}
36+
{{- $bannerPage := site.GetPage .md -}}
3637
<div class="banner banner-{{ .type }}">
37-
{{ partial .md . }}
38+
{{ $bannerPage.Content }}
3839
</div>
3940
{{- end -}}
4041
{{- end -}}

layouts/partials/list-main.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,9 @@ <h1 class="bd-title">
2020

2121
{{- with .Params.banner -}}
2222
{{- if .enabled -}}
23+
{{- $bannerPage := site.GetPage .md -}}
2324
<div class="banner banner-{{ .type }}">
24-
{{ partial .md . }}
25+
{{ $bannerPage.Content }}
2526
</div>
2627
{{- end -}}
2728
{{- end -}}

layouts/shortcodes/banner.html

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{{- $type := .Get 0 | default (.Get "type") | default "" -}}
2+
{{- $title := .Get 1 | default (.Get "title") | default "" -}}
3+
<blockquote class="{{ $type }}">
4+
<i class="fa-solid fa-triangle-exclamation"></i><strong>{{ $title }}</strong>
5+
<br>
6+
{{- .Inner | markdownify -}}
7+
</blockquote>

0 commit comments

Comments
 (0)