| | |
| | | {{/* Use $section_name to get the section title. Use "with" to only show it if it exists */}} |
| | | {{ with .Site.GetPage "section" $section_name }} |
| | | <h1 class="flex-none"> |
| | | {{$.Param "recent_copy" | default "Recent" }} {{ .Title }} |
| | | {{ $.Param "recent_copy" | default (i18n "recentTitle" .) }} |
| | | </h1> |
| | | {{ end }} |
| | | |
| | |
| | | |
| | | {{ if ge $section_count (add $n_posts 1) }} |
| | | <section class="w-100"> |
| | | <h1 class="f3">More</h1> |
| | | <h1 class="f3">{{ i18n "more" }}</h1> |
| | | {{/* Now, range through the next four after the initial $n_posts items. Nest the requirements, "after" then "first" on the outside */}} |
| | | {{ range (first 4 (after $n_posts $section)) }} |
| | | <h2 class="f5 fw4 mb4 dib mr3"> |
| | |
| | | |
| | | {{/* As above, Use $section_name to get the section title, and URL. Use "with" to only show it if it exists */}} |
| | | {{ with .Site.GetPage "section" $section_name }} |
| | | <a href="{{ .URL }}" class="link db f6 pa2 br3 bg-mid-gray white dim w4 tc">All {{.Title }}</a> |
| | | <a href="{{ .URL }}" class="link db f6 pa2 br3 bg-mid-gray white dim w4 tc">{{ i18n "allTitle" . }}</a> |
| | | {{ end }} |
| | | </section> |
| | | {{ end }} |