From 27e930dbe120d74db2a3a4c3c20a1f533254eb9b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arturo=20Filast=C3=B2?= Date: Thu, 6 Feb 2020 15:12:40 +0100 Subject: [PATCH] Separate blog posts from research reports --- content/reports/content.md | 0 layouts/index.html | 24 ++++++++++++++++++--- layouts/partials/nav.html | 5 +++++ layouts/section/post.html | 6 ++++-- layouts/section/reports.html | 41 ++++++++++++++++++++++++++++++++++++ 5 files changed, 71 insertions(+), 5 deletions(-) create mode 100644 content/reports/content.md create mode 100644 layouts/section/reports.html diff --git a/content/reports/content.md b/content/reports/content.md new file mode 100644 index 000000000..e69de29bb diff --git a/layouts/index.html b/layouts/index.html index d033da210..1bcd61660 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -88,19 +88,37 @@

How OONI Works

-
+
+
+
+

Research Reports

+
+
+ {{ range first 5 .Site.Taxonomies.categories.report }} + +

{{ .Title }}

+ +
+ {{ end }} + View all +
+
+ +

Blog Posts

- {{ range first 5 (where (where .Site.Pages.ByDate.Reverse "Section" "post") "Kind" "page") }} + {{ with .Site.Taxonomies.categories.blog }} + {{ range first 5 . }}

{{ .Title }}

{{ end }} - Read More + {{ end }} + View all
diff --git a/layouts/partials/nav.html b/layouts/partials/nav.html index 9c2617bd9..e85dda0c4 100644 --- a/layouts/partials/nav.html +++ b/layouts/partials/nav.html @@ -26,6 +26,11 @@ class="active" {{end}} >Get Involved +Reports +

Blog posts

-

Blog posts

- {{ range where .Data.Pages.ByDate.Reverse "Section" "post" }} + {{ with .Site.Taxonomies.categories.blog }} + {{ range . }}
@@ -34,6 +35,7 @@

Blog posts

{{ end }} + {{ end }}
diff --git a/layouts/section/reports.html b/layouts/section/reports.html new file mode 100644 index 000000000..5aeb0e94e --- /dev/null +++ b/layouts/section/reports.html @@ -0,0 +1,41 @@ +{{ .Scratch.Set "basePrefix" "../../" }} +{{ partial "head.html" . }} + +
+ + + +

Research reports

+
+ {{ range .Site.Taxonomies.categories.report }} + +
+ +
+ + {{ end }} +
+ +
+ +{{ partial "footer.html" . }}