Skip to content

Commit

Permalink
fix the template
Browse files Browse the repository at this point in the history
  • Loading branch information
roumail committed Aug 2, 2024
1 parent f7c003a commit c1662b7
Show file tree
Hide file tree
Showing 4 changed files with 64 additions and 17 deletions.
19 changes: 13 additions & 6 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
{
"proseWrap": "always",
"printWidth": 80,
"tabWidth": 2,
"useTabs": false
}

"proseWrap": "always",
"printWidth": 80,
"tabWidth": 2,
"useTabs": false,
"overrides": [
{
"files": "*.html",
"options": {
"parser": "none"
}
}
]
}
8 changes: 8 additions & 0 deletions content/series/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
title: "All Series"
layout: "overview"
---

This listing shows the various blog series I'm working on

<br>
28 changes: 17 additions & 11 deletions layouts/series/list.html
Original file line number Diff line number Diff line change
@@ -1,19 +1,25 @@
{{- define "main" -}} {{ partial "page_header.html" . }}
{{- define "main" -}}
{{ partial "page_header.html" . }}

<div class="universal-wrapper">
{{ with .Content }}
<div class="article-style">{{ . }}</div>
{{ end }} {{ if templates.Exists (printf "partials/views/%s-start.html" (lower
$.Params.view | default "compact")) }} {{ partial "functions/render_view"
{{ end }}
{{ if templates.Exists (printf "partials/views/%s-start.html" (lower
$.Params.view | default "compact")) }}
{{ partial "functions/render_view"
(dict "page" $ "item" . "view" (printf "%s-start" $.Params.view) "index" 0) }}
{{ end }} {{ $currentPage := . }} {{ $sortedPages := sort (where .Pages
"RelPermalink" "!=" $currentPage.RelPermalink) "Date" "asc" }} {{ range
$index, $post := $sortedPages }} {{ partial "functions/render_view" (dict
"page" $ "item" $post "view" ($.Params.view | default "compact") "index"
$index) }} {{ end }} {{ if templates.Exists (printf
"partials/views/%s-end.html" (lower $.Params.view | default "compact")) }} {{
partial "functions/render_view" (dict "page" $ "item" . "view" (printf
"%s-end" $.Params.view) "index" 0) }} {{ end }} {{ partial "pagination" . }}
{{ end }}
{{ $sortedPages := sort .Pages "Date" "asc" }}
{{ range $index, $post := $sortedPages }}
{{ if ne $post.Type "series" }}
{{ partial "functions/render_view" (dict "page" $ "item" $post "view" ($.Params.view | default "compact") "index" $index) }}
{{ end }}
{{ end }}
{{ if templates.Exists (printf "partials/views/%s-end.html" (lower $.Params.view | default "compact")) }}
{{ partial "functions/render_view" (dict "page" $ "item" . "view" (printf "%s-end" $.Params.view) "index" 0) }}
{{ end }}
{{ partial "pagination" . }}
</div>

{{- end -}}
26 changes: 26 additions & 0 deletions layouts/series/overview.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{{ define "main" }}
{{ partial "page_header.html" . }}

<div class="universal-wrapper">
{{ with .Content }}
<div class="article-style">{{ . }}</div>
{{ end }}
{{ if templates.Exists (printf "partials/views/%s-start.html" (lower $.Params.view | default "compact")) }}
{{ partial "functions/render_view" (dict "page" $ "item" . "view" (printf "%s-start" $.Params.view) "index" 0) }}
{{ end }}

{{ $sortedPages := sort .Pages "Date" "asc" }}
{{ range $index, $post := $sortedPages }}
{{ if eq $post.Type "series" }}
{{ partial "functions/render_view" (dict "page" $ "item" $post "view" ($.Params.view | default "compact") "index" $index) }}
{{ end }}
{{ end }}


{{ if templates.Exists (printf "partials/views/%s-end.html" (lower $.Params.view | default "compact")) }}
{{ partial "functions/render_view" (dict "page" $ "item" . "view" (printf "%s-end" $.Params.view) "index" 0) }}
{{ end }}
{{ partial "pagination" . }}
</div>

{{ end }}

0 comments on commit c1662b7

Please sign in to comment.