diff --git a/hugo.toml b/hugo.toml index 97203295..de646aec 100644 --- a/hugo.toml +++ b/hugo.toml @@ -23,8 +23,10 @@ path = "github.com/hugomods/images" paginate = 12 profile = true profile_metrics = true +list_style = "" # available options: minimalist. [params.hb.blog] +list_style = "" # available options: minimalist. full_width = false paginate = 12 post_date_format = ':date_long' diff --git a/layouts/_default/term.html b/layouts/_default/term.html index 82dde4c9..d83dd086 100644 --- a/layouts/_default/term.html +++ b/layouts/_default/term.html @@ -10,17 +10,34 @@ {{- if default true site.Params.hb.terms.profile }} {{ partialCached "hb/modules/blog/term/profile" . . }} {{- end }} - {{- $cols := "row-cols-1 row-cols-md-2" }} - {{- if not (partialCached "hb/modules/blog/functions/has-sidebar" .) }} - {{- $cols = printf "%s row-cols-lg-3" $cols }} - {{- end }} -
- {{- range .Paginator.Pages }} -
- {{ partial "hb/modules/blog/post/card" (dict "Page" .) }} -
+ {{- if eq site.Params.hb.terms.list_style "minimalist" }} +
+ {{- range .Paginator.Pages }} +
+ + + {{ .Title }} + + + +
+ {{- end }} +
+ {{- else }} + {{- $cols := "row-cols-1 row-cols-md-2" }} + {{- if not (partialCached "hb/modules/blog/functions/has-sidebar" .) }} + {{- $cols = printf "%s row-cols-lg-3" $cols }} {{- end }} -
+
+ {{- range .Paginator.Pages }} +
+ {{ partial "hb/modules/blog/post/card" (dict "Page" .) }} +
+ {{- end }} +
+ {{- end }} {{ partial "hb/modules/pagination/index" .Paginator }} {{ partial "hugopress/functions/render-hooks" (dict "Name" "hb-blog-main-end" "Page" .) }} diff --git a/layouts/partials/hb/modules/blog/index.html b/layouts/partials/hb/modules/blog/index.html index 61d4605b..298d294f 100644 --- a/layouts/partials/hb/modules/blog/index.html +++ b/layouts/partials/hb/modules/blog/index.html @@ -32,8 +32,12 @@ {{- end }} {{- with .Paginator }} - {{- $cols := partialCached "hb/modules/blog/functions/list-cols" . }} - {{ partial "hb/modules/blog/posts" (dict "Pages" .Pages "Cols" $cols) }} + {{- if eq site.Params.hb.blog.list_style "minimalist" }} + {{ partial "hb/modules/blog/posts-minimalist" (dict "Pages" .Pages) }} + {{- else }} + {{- $cols := partialCached "hb/modules/blog/functions/list-cols" . }} + {{ partial "hb/modules/blog/posts" (dict "Pages" .Pages "Cols" $cols) }} + {{- end }} {{ partial "hb/modules/pagination/index" . }} {{- end }} diff --git a/layouts/partials/hb/modules/blog/list.html b/layouts/partials/hb/modules/blog/list.html index 003f2aae..b95c0186 100644 --- a/layouts/partials/hb/modules/blog/list.html +++ b/layouts/partials/hb/modules/blog/list.html @@ -1,8 +1,12 @@
{{ partial "hugopress/functions/render-hooks" (dict "Name" "hb-blog-main-begin" "Page" .) }} - {{- $cols := partialCached "hb/modules/blog/functions/list-cols" . }} - {{ partial "hb/modules/blog/posts" (dict "Pages" .Paginator.Pages "Cols" $cols) }} + {{- if eq site.Params.hb.blog.list_style "minimalist" }} + {{ partial "hb/modules/blog/posts-minimalist" (dict "Pages" .Paginator.Pages) }} + {{- else }} + {{- $cols := partialCached "hb/modules/blog/functions/list-cols" . }} + {{ partial "hb/modules/blog/posts" (dict "Pages" .Paginator.Pages "Cols" $cols) }} + {{- end }} {{ partial "hb/modules/pagination/index" .Paginator }} {{ partial "hugopress/functions/render-hooks" (dict "Name" "hb-blog-main-end" "Page" .) }}
diff --git a/layouts/partials/hb/modules/blog/posts-minimalist.html b/layouts/partials/hb/modules/blog/posts-minimalist.html new file mode 100644 index 00000000..fe2d0a26 --- /dev/null +++ b/layouts/partials/hb/modules/blog/posts-minimalist.html @@ -0,0 +1,14 @@ +
+ {{- range .Pages }} +
+ + + {{ .Title }} + + + +
+ {{- end }} +