diff --git a/layouts/404.html b/layouts/404.html index f705eb5..9a88a3f 100644 --- a/layouts/404.html +++ b/layouts/404.html @@ -15,5 +15,4 @@ {{ end }} {{ define "footer" }} {{ partial "powered-by.html" . }} - {{ partial "cookie-disclaimer.html" . }} {{ end }} diff --git a/layouts/_default/list.html b/layouts/_default/list.html index cddd9bc..44e5703 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -12,5 +12,4 @@ {{ define "footer" }} {{ partial "pagination.html" . }} {{ partial "powered-by.html" . }} - {{ partial "cookie-disclaimer.html" . }} {{ end }} diff --git a/layouts/_default/search.html b/layouts/_default/search.html index f12e895..e7af9e5 100644 --- a/layouts/_default/search.html +++ b/layouts/_default/search.html @@ -40,7 +40,6 @@ {{ end }} {{ define "footer" }} {{ partial "powered-by.html" . }} - {{ partial "cookie-disclaimer.html" . }} {{ $script := resources.Get "/js/search.js" | resources.ExecuteAsTemplate "search.js" . }} {{ partial "head/modules.html" . }} - {{ if .RSSLink }} - + {{ with .OutputFormats.Get "rss" }} + {{ printf "" .Rel .MediaType.Type .Permalink $.Site.Title | safeHTML }} {{ end }} {{ if (isset .Params "prev") }} diff --git a/themes/after-dark/layouts/_default/home.html b/themes/after-dark/layouts/_default/home.html new file mode 100644 index 0000000..4006b35 --- /dev/null +++ b/themes/after-dark/layouts/_default/home.html @@ -0,0 +1,77 @@ +{{/* +Copyright (C) 2019 Josh Habdas + +This file is part of After Dark. + +After Dark is free software: you can redistribute it and/or modify +it under the terms of the GNU Affero General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +After Dark is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Affero General Public License for more details. + +You should have received a copy of the GNU Affero General Public License +along with this program. If not, see . +*/}} + +{{ define "title" -}} + {{ .Site.Title }} +{{- end }} +{{ define "header" }} + {{ partial "masthead.html" . }} +{{ end }} +{{ define "main" }} +
+

{{ .Title }}

+
+ {{ with .Site.Params.layout.home.section }} + {{ if ne $.Site.Params.hackcss.disabled true }} + {{ with resources.Get "css/conditional/layouts/partials/page-thumbs.css" | minify }} + + {{ end }} + {{ end }} + {{ range sort . "weight" "asc" }} +
+ {{ $index := site.GetPage "section" .type }} + {{ $pages := where site.RegularPages "Type" .type }} + {{ $page_count := (default 1 (len $pages)) }} + {{ if eq $page_count 1 }} + {{ partial "page-summary.html" $index }} + {{ else if gt $page_count 1 }} +
+

+ Recent {{ $index.Title }} +

+
{{ $index.Description }}
+
+ {{ partial "page-thumbs.html" (dict "thumbnail_options" .thumbs "page_count" $page_count "limit" .limit "pages" $pages) }} + {{ end }} + {{ if and (lt .limit $page_count) (ne 1 $page_count) }} + + {{ end }} +
+ {{ end }} + {{ end }} + {{ if not .Site.Params.layout.home.hide_blog }} +
+ {{ range (.Paginate (where .Data.Pages "Type" "in" (site.Params.layout.homepage.sections | default (slice "post")))).Pages }} + {{ partial "page-summary.html" . }} + {{ end }} +
+ {{ end }} +{{ end }} +{{ define "footer" }} + {{ if not .Site.Params.layout.home.hide_blog }} +

{{ partial "pagination.html" . }}

+ {{ end }} + + {{ partial "copyright-notice.html" . }} + +{{ end }} diff --git a/themes/after-dark/layouts/_default/index.json b/themes/after-dark/layouts/_default/index.json index b1d640a..1e90e3b 100644 --- a/themes/after-dark/layouts/_default/index.json +++ b/themes/after-dark/layouts/_default/index.json @@ -1,3 +1,22 @@ +{{/* +Copyright (C) 2019 Josh Habdas + +This file is part of After Dark. + +After Dark is free software: you can redistribute it and/or modify +it under the terms of the GNU Affero General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +After Dark is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Affero General Public License for more details. + +You should have received a copy of the GNU Affero General Public License +along with this program. If not, see . +*/ -}} + {{- $scratch := newScratch -}} {{- $scratch.Add "index" slice -}} {{- range .Site.RegularPages -}} diff --git a/themes/after-dark/layouts/_default/list.html b/themes/after-dark/layouts/_default/list.html index bd22d05..2012bab 100644 --- a/themes/after-dark/layouts/_default/list.html +++ b/themes/after-dark/layouts/_default/list.html @@ -1,3 +1,22 @@ +{{/* +Copyright (C) 2019 Josh Habdas + +This file is part of After Dark. + +After Dark is free software: you can redistribute it and/or modify +it under the terms of the GNU Affero General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +After Dark is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Affero General Public License for more details. + +You should have received a copy of the GNU Affero General Public License +along with this program. If not, see . +*/}} + {{ define "header" }} {{ partial "masthead.html" . }} {{ end }} @@ -10,7 +29,8 @@ {{ end }} {{ end }} {{ define "footer" }} - {{ partial "pagination.html" . }} - {{ partial "powered-by.html" . }} - {{ partial "cookie-disclaimer.html" . }} +

{{ partial "pagination.html" . }}

+ + {{ partial "copyright-notice.html" . }} + {{ end }} diff --git a/themes/after-dark/layouts/_default/rss.xml b/themes/after-dark/layouts/_default/rss.xml index 4ffde22..e0e6696 100644 --- a/themes/after-dark/layouts/_default/rss.xml +++ b/themes/after-dark/layouts/_default/rss.xml @@ -1,36 +1,53 @@ +{{/* +Copyright (C) 2019 Josh Habdas + +This file is part of After Dark. + +After Dark is free software: you can redistribute it and/or modify +it under the terms of the GNU Affero General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +After Dark is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Affero General Public License for more details. + +You should have received a copy of the GNU Affero General Public License +along with this program. If not, see . +*/ -}} + https://blogs.law.harvard.edu/tech/rss {{ if eq .Title .Site.Title }}{{ .Site.Title }}{{ else }}{{ with .Title }}{{ . }} on {{ end }}{{ .Site.Title }}{{ end }} {{ .Permalink }} - Recent content {{ if ne .Title .Site.Title }}{{ with .Title }}in {{ . }} {{ end }}{{ end }}on {{ .Site.Title }}{{ if .Site.Params.images }}{{ if ge (len .Site.Params.images) 1 }} + Recent content {{ if ne .Title .Site.Title }}{{ with .Title }}in {{ . }} {{ end }}{{ end }}on {{ .Site.Title }}{{ range first 1 (default slice .Site.Params.images) }} - {{ if eq .Title .Site.Title }}{{ .Site.Title }}{{ else }}{{ with .Title }}{{ . }} on {{ end }}{{ .Site.Title }}{{ end }} - {{ .Permalink }} - {{ index .Site.Params.images 0 }} - {{ end }}{{ end }} + {{ if eq $.Title $.Site.Title }}{{ $.Site.Title }}{{ else }}{{ with $.Title }}{{ . }} on {{ end }}{{ $.Site.Title }}{{ end }} + {{ $.Permalink }} + {{ . }} + {{ end }} 1440 - {{ with .Site.Data.npm.latest }}{{ .name | humanize | title }} {{ .version }} (Hugo {{ $.Hugo.Version }}){{ else }}Hugo {{ .Hugo.Version }}{{ end }}{{ with .Site.LanguageCode }} + {{ with .Site.Data.npm.latest }}{{ .name | humanize | title }} {{ .version }} (Hugo {{ hugo.Version }}){{ else }}Hugo {{ hugo.Version }}{{ end }}{{ with .Site.LanguageCode }} {{ . }}{{ end }}{{ with .Site.Author }} {{ .email }}{{ with .name }} ({{ . }}){{ end }}{{ end }}{{ with .Site.Author }} {{ .email }}{{ with .name }} ({{ . }}){{ end }}{{ end }}{{ with .Site.Copyright }} - {{ . }}{{ end }}{{ if not .Date.IsZero }} - {{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}{{ end }} - {{ with .OutputFormats.Get "rss" }} + {{ . }}{{ end }}{{ if not now.IsZero }} + {{ dateFormat "Mon, 02 Jan 2006 15:04:05" now.UTC | safeHTML }} UT{{ end }} + {{ with .OutputFormats.Get "rss" -}} {{ printf "" .Permalink .MediaType | safeHTML }} - {{ end }} - {{ range .Pages }} - - {{ .Title }} - {{ .Permalink }}{{ if not .PublishDate.IsZero }} - {{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}{{ end }}{{ if ne .Site.Params.hide_author true }}{{ if or (.Param "author") .Site.Author.email }} - {{ default .Site.Author.email (.Param "author") }}{{ if and (not (.Param "author")) .Site.Author.name }} ({{ default (.Param "author") .Site.Author.name }}){{ end }}{{ end }}{{ end }} - {{ .Permalink }} - {{ .Summary | plainify }}{{ range .Params.categories }} - {{ . | title }}{{ end }}{{ with .Resources.GetMatch "enclosure" }}{{ if .Params.length }} - {{ end }}{{ end }} - {{ "" | safeHTML }} - - {{ end }} + {{- end }}{{ range .Pages }} + + {{ .Title }} + {{ .Permalink }}{{ if not .PublishDate.IsZero }} + {{ dateFormat "Mon, 02 Jan 2006 15:04:05" .Date.UTC | safeHTML }} UT{{ end }}{{ if ne .Site.Params.hide_author true }}{{ if or (.Param "author") .Site.Author.email }} + {{ default .Site.Author.email (.Param "author") }}{{ if and (not (.Param "author")) .Site.Author.name }} ({{ default (.Param "author") .Site.Author.name }}){{ end }}{{ end }}{{ end }} + {{ .Permalink }} + {{ .Summary | plainify }}{{ range .Params.categories }} + {{ . | title }}{{ end }}{{ with .Resources.GetMatch "enclosure" }}{{ if .Params.length }} + {{ end }}{{ end }} + {{ "" | safeHTML }} + {{ end }} diff --git a/themes/after-dark/layouts/_default/search.html b/themes/after-dark/layouts/_default/search.html index f12e895..fb52762 100644 --- a/themes/after-dark/layouts/_default/search.html +++ b/themes/after-dark/layouts/_default/search.html @@ -1,3 +1,22 @@ +{{/* +Copyright (C) 2019 Josh Habdas + +This file is part of After Dark. + +After Dark is free software: you can redistribute it and/or modify +it under the terms of the GNU Affero General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +After Dark is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Affero General Public License for more details. + +You should have received a copy of the GNU Affero General Public License +along with this program. If not, see . +*/}} + {{ define "title" -}} {{ .Title }} | {{ .Site.Title }} {{- end }} @@ -8,39 +27,42 @@

{{ .Title }}

- -
-
-
- -
-
-

Showing results for “{ resultsForSearch }”.

-
- -
-
-
+
+ {{ with resources.Get "css/conditional/layouts/search.css" | minify }} + + {{ end }} +
+ +
+ +
+

Showing results for “{ resultsForSearch }”.

+ +
{{ end }} {{ define "footer" }} - {{ partial "powered-by.html" . }} - {{ partial "cookie-disclaimer.html" . }} + + {{ partial "copyright-notice.html" . }} + {{ $script := resources.Get "/js/search.js" | resources.ExecuteAsTemplate "search.js" . }}