From b81fbbf97020d37a65567ba03594f36abe996044 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20K=C3=BCrten?= <sebastian@mobanisto.de> Date: Fri, 27 Jan 2023 18:40:35 +0100 Subject: [PATCH] Move news items below main content --- content/_index.html | 9 --------- themes/briar/layouts/_default/list.html | 20 +++++++++++++++----- themes/briar/layouts/partials/header.html | 3 ++- 3 files changed, 17 insertions(+), 15 deletions(-) diff --git a/content/_index.html b/content/_index.html index 432a7a6..5395a28 100644 --- a/content/_index.html +++ b/content/_index.html @@ -25,12 +25,3 @@ src="/img/google_play_badge_web_generic.png" alt="Get it on Google Play"></a> <img src="img/phone.gif" class="phone" alt="Screenshots"> </div> <div class="clearboth"></div> -<div id="flattr"> -<a href="https://liberapay.com/Briar/donate" -rel="noopener noreferrer"> -<img alt="Donate using Liberapay" src="img/liberapay.svg"></a> -<a href="https://flattr.com/t/592836/" rel="noopener noreferrer"> -<img src="img/flattr-badge-large.png" alt="Flattr this" title="Flattr this"></a> -<br> -Bitcoin and BCH: 1NZCKkUCtJV2U2Y9hDb9uq8S7ksFCFGR6K -</div> <!-- flattr --> diff --git a/themes/briar/layouts/_default/list.html b/themes/briar/layouts/_default/list.html index 817139e..23bde78 100644 --- a/themes/briar/layouts/_default/list.html +++ b/themes/briar/layouts/_default/list.html @@ -1,12 +1,22 @@ {{ define "main" }} <h2>{{ with .Title }} {{ . }} {{ else }} {{ .Site.Title }} {{ end }}</h2> <p><strong>Latest Release:</strong> Briar {{ .Params.releaseVersion }} ({{ .Params.releaseDate }})</p> +{{ .Content }} <p><strong>Latest News:</strong> -{{ $num := 3 }} -{{ range $k, $v := first $num (where .Site.RegularPages "Section" "news").ByDate.Reverse }} - <a href="{{.Permalink}}">{{.Title}}</a> - {{- if (lt $k (sub $num 1)) }} ~ {{ end }} +<ul> +{{ range first 3 (where .Site.RegularPages "Section" "news").ByDate.Reverse }} +<li>{{.Date.Format "Jan 2006"}}: +<a href="{{.Permalink}}">{{.Title}}</a> {{ end }} +</ul> </p> -{{ .Content }} +<div id="flattr"> +<a href="https://liberapay.com/Briar/donate" +rel="noopener noreferrer"> +<img alt="Donate using Liberapay" src="img/liberapay.svg"></a> +<a href="https://flattr.com/t/592836/" rel="noopener noreferrer"> +<img src="img/flattr-badge-large.png" alt="Flattr this" title="Flattr this"></a> +<br> +Bitcoin and BCH: 1NZCKkUCtJV2U2Y9hDb9uq8S7ksFCFGR6K +</div> <!-- flattr --> {{ end }} diff --git a/themes/briar/layouts/partials/header.html b/themes/briar/layouts/partials/header.html index de52964..3a26f2f 100644 --- a/themes/briar/layouts/partials/header.html +++ b/themes/briar/layouts/partials/header.html @@ -29,7 +29,8 @@ <ul id="menu"> {{ $currentPage := . }} {{ range .Site.Menus.main }} - {{ $menu_item_url := .URL | relLangURL }} + {{ $menu_item_url + := .URL | relLangURL }} {{ $page_url:= $currentPage.RelPermalink | relLangURL }} <li> <a {{ if eq $menu_item_url $page_url }}id="is-active" {{end}} -- GitLab