diff --git a/data/panaetius-theme/assets.json b/data/panaetius-theme/assets.json index cc0bfe4..7e02739 100644 --- a/data/panaetius-theme/assets.json +++ b/data/panaetius-theme/assets.json @@ -9,7 +9,7 @@ "js": "2.lazyload.1168fc21175de558d316.min.js" }, "main": { - "css": "main.9098d523cee24093a1f2.min.css", + "css": "main.8112076fb5e1095426f4.min.css", "js": "main.48637aff6f96e597ae05.min.js" }, "vendors~app": { diff --git a/layouts/_default/list.html b/layouts/_default/list.html index 20c97f1..3385bae 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -26,7 +26,6 @@ {{.}} {{ end }} {{ template "_internal/pagination.html" . }} - {{ end }} diff --git a/layouts/index.html b/layouts/index.html index 1003822..81cf6ba 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -9,7 +9,7 @@ {{- with .Site.Params.homepageImage -}}
- +
{{- end -}}
@@ -21,25 +21,29 @@
{{- with .Site.Params.homepageImage -}}
- +
{{- end -}}
-
- - +
+
+
{{- range first 1 (where .Site.RegularPages "Type" "in" .Site.Params.mainSections) -}} - -
+
{{ .Render "card-large" }}
{{- end -}} - +
+
+ {{- range first 1 (where .Site.RegularPages "Type" "in" .Site.Params.mainSections) -}} +
+ {{ .Render "card" }} +
+ {{- end -}}
-
{{ range first 3 (after 1 (where .Site.RegularPages "Type" "in" .Site.Params.mainSections)) }} @@ -47,13 +51,35 @@ {{ end }}
-
-
- - - +
+
+ {{- range first 1 (after 4 (where .Site.RegularPages "Type" "in" .Site.Params.mainSections)) -}} +
+ {{ .Render "card-large" }} +
+ {{- end -}} +
+
+ {{- range first 1 (after 4 (where .Site.RegularPages "Type" "in" .Site.Params.mainSections)) -}} +
+ {{ .Render "card" }} +
+ {{- end -}} +
+
+
+
+ {{ range first 3 (after 5 (where .Site.RegularPages "Type" "in" .Site.Params.mainSections)) }} + {{ .Render "card" }} + {{ end }} +
+
- {{ end }} diff --git a/layouts/post/list.html b/layouts/post/list.html index ad894a0..ed08f9b 100644 --- a/layouts/post/list.html +++ b/layouts/post/list.html @@ -5,7 +5,7 @@

All Posts

-
+
{{ $paginator := .Paginate (where .Pages "Type" "post") }} {{ range $paginator.Pages }} {{ .Render "card" }} diff --git a/layouts/search/single.html b/layouts/search/single.html index 4db7c2d..3cf4903 100644 --- a/layouts/search/single.html +++ b/layouts/search/single.html @@ -19,27 +19,22 @@
-
- +
- - +
+ +
+
{{ $p := slice }} {{ range (where .Site.RegularPages "Section" "==" "post") }} {{ $.Scratch.Set "image" .RelPermalink }} {{ $.Scratch.Add "image" (index .Params.images 0) }} - {{ $post := dict "link" .RelPermalink "author" (index .Params.authors 0) "tags" .Params.tags "title" .Title "date" (.Params.date.Format "January 2, 2006") "image" ($.Scratch.Get "image") "content" (substr .Plain 0 200) -}} + {{ $post := dict "link" .RelPermalink "author" (index .Params.authors 0) "tags" .Params.tags "title" .Title "date" (.Params.date.Format "January 2, 2006") "image" ($.Scratch.Get "image") "content" (substr .Plain 0 200) "readingtime" .ReadingTime -}} {{ $p = $p | append $post -}} {{ end }}
@@ -73,32 +68,29 @@ console.log(matchPosts[0].tags) try { $target.innerHTML = matchPosts.map(p => { - return `
-
-
- - An thumbnail image. - -
-
-

${p.title}

-
${p.content}...
-
-
- ${ - p.tags.map(function (tag) { - return "" + '' + tag + " "}).join('') - } -
-
- - ${p.author}
- -
-
-
-
- `; + return ` +
+
+
+
+
+
${p.date}
+

${p.readingtime} min read

+

${p.title}

+

${p.content}...

+
+
+
+ ${ + p.tags.map(function (tag) { + return "" + "" + tag + "" + }).join('') + } +
+
+
+
+
`; }).join(''); } catch (TypeError) { $target.innerHTML = `
No search results found.
`; diff --git a/layouts/tags/list.html b/layouts/tags/list.html new file mode 100644 index 0000000..1947597 --- /dev/null +++ b/layouts/tags/list.html @@ -0,0 +1,26 @@ +{{ define "main" }} +
+ {{- if or .Title .Content -}} +
+
+ {{ with .Title }}

{{ . }}

{{ end }} + {{- with .Content -}} +
+ {{ . }} +
+ {{- end -}} +
+
+ {{- end -}} + +
+ {{ $paginator := .Paginate (where .Data.Pages "Type" "post") }} + {{ range $paginator.Pages }} + {{ .Render "card" }} + {{ end }} +
+
+ {{ template "_internal/pagination.html" . }} +
+
+{{ end }} diff --git a/src/scss/cards.scss b/src/scss/cards.scss index 8320641..b7f336c 100644 --- a/src/scss/cards.scss +++ b/src/scss/cards.scss @@ -57,7 +57,7 @@ @include card-border; & .card-large-image { - height: 250%; + height: 150%; @include image-zoom; } diff --git a/src/scss/panaetius-theme.scss b/src/scss/panaetius-theme.scss index 48f09ff..1ec90d9 100644 --- a/src/scss/panaetius-theme.scss +++ b/src/scss/panaetius-theme.scss @@ -46,7 +46,6 @@ pre code { background-color: transparent; } -.latest h2 a, .navbar a, .card>a, a.badge {