diff options
Diffstat (limited to 'themes/rusticus/layouts/partials/home')
-rw-r--r-- | themes/rusticus/layouts/partials/home/front-page-summary.html | 18 | ||||
-rw-r--r-- | themes/rusticus/layouts/partials/home/tax-news.html | 13 |
2 files changed, 18 insertions, 13 deletions
diff --git a/themes/rusticus/layouts/partials/home/front-page-summary.html b/themes/rusticus/layouts/partials/home/front-page-summary.html new file mode 100644 index 0000000..773503e --- /dev/null +++ b/themes/rusticus/layouts/partials/home/front-page-summary.html @@ -0,0 +1,18 @@ +
+
+<ul class="front-page-summary">
+ {{ $page := .context.Site.GetPage "section" .section }}
+ {{ $pages := $page.Pages.ByExpiryDate }}
+ {{ if eq .section "blog" }}
+ {{ $pages = $page.Pages.ByDate.Reverse }}
+ {{ end }}
+ {{ range first 3 $pages }}
+ <li hugo-nav="{{ .RelPermalink}}">
+ <a href="{{ .Permalink}}">
+ <h3>{{ .LinkTitle }}</h3>
+ <p>{{ .Summary }}</p>
+ </a>
+ </li>
+ {{ end }}
+</ul>
+
diff --git a/themes/rusticus/layouts/partials/home/tax-news.html b/themes/rusticus/layouts/partials/home/tax-news.html deleted file mode 100644 index c6de685..0000000 --- a/themes/rusticus/layouts/partials/home/tax-news.html +++ /dev/null @@ -1,13 +0,0 @@ -
-
-<ul class="front-page-summary">
- {{ range first 3 (.Site.GetPage "section" "news").Pages.ByExpiryDate }}
- <li hugo-nav="{{ .RelPermalink}}">
- <a href="{{ .Permalink}}">
- <h3>{{ .LinkTitle }}</h3>
- <p>{{ .Summary }}</p>
- </a>
- </li>
- {{ end }}
-</ul>
-
|