From 1a0692d23e15f80afcc0c1e9a394fa33ff125628 Mon Sep 17 00:00:00 2001 From: Eltrac Date: Thu, 28 Nov 2024 23:55:20 +0800 Subject: remove(theme): unnecessary dom layers with rows and cols --- themes/yinyang/layouts/_default/list.html | 38 +++++----- themes/yinyang/layouts/_default/single.html | 114 ++++++++++++++-------------- themes/yinyang/layouts/index.html | 100 ++++++++++++------------ 3 files changed, 121 insertions(+), 131 deletions(-) diff --git a/themes/yinyang/layouts/_default/list.html b/themes/yinyang/layouts/_default/list.html index ca7e50c4..5ccc0e3f 100644 --- a/themes/yinyang/layouts/_default/list.html +++ b/themes/yinyang/layouts/_default/list.html @@ -1,29 +1,25 @@ {{ partial "snippets/document-start.html" . }}
-
-
- {{ partial "header.html" . }} -

{{.Data.Term}}

-
- {{ range .Pages }} -
-
- -
-
- + {{ partial "header.html" . }} +

{{.Data.Term}}

+
+ {{ range .Pages }} +
+
+ +
+
-
+ {{ end }}
{{ partial "snippets/document-end.html" . }} \ No newline at end of file diff --git a/themes/yinyang/layouts/_default/single.html b/themes/yinyang/layouts/_default/single.html index 0810a11d..49abf0ff 100644 --- a/themes/yinyang/layouts/_default/single.html +++ b/themes/yinyang/layouts/_default/single.html @@ -1,69 +1,67 @@ {{ partial "snippets/document-start.html" . }}
-
-
- - - -
- {{ if in .Site.Params.mainSections .Type }} - -

- {{ .Title }} - {{ with .Params.subtitle }} - {{ . }} - {{ end }} -

- -
-
- {{ if .Date }} - - {{ end }} - / - … Views -
-
- {{ end }} -
- -
- {{ .Site.Params.postHeaderContent | safeHTML }} - {{ .Content }} + + + +
+ {{ if in .Site.Params.mainSections .Type }} + +

+ {{ .Title }} + {{ with .Params.subtitle }} + {{ . }} + {{ end }} +

+ +
+
+ {{ if .Date }} + + {{ end }} + / + … Views
+
+ {{ end }} +
- - + +
+ {{ .Site.Params.postHeaderContent | safeHTML }} + {{ .Content }} +
- - {{ if in .Site.Params.mainSections .Type }} - -
-
-
- -
+ + + + + {{ if in .Site.Params.mainSections .Type }} + +
+
+
+ +
+ {{ end }} +
diff --git a/themes/yinyang/layouts/index.html b/themes/yinyang/layouts/index.html index ba5aaa55..c59f3abd 100644 --- a/themes/yinyang/layouts/index.html +++ b/themes/yinyang/layouts/index.html @@ -1,62 +1,58 @@ {{ partial "snippets/document-start.html" . }}
-
-
- {{ partial "header.html" . }} -
- {{ $currentYear := now.Format "2006" }} - - {{ $isFirstPost := true }} - - {{ range (where site.RegularPages "Type" "in" site.Params.mainSections).GroupByDate "2006" -}} -
-

{{ .Key }}

- - {{ range .Pages.GroupByDate "01" }} -

{{ .Key }} 月

-
    - {{ range .Pages }} -
  • - -
    -
    - -
    -
    -
    -
    - {{ .Title }} -
    - {{ if $isFirstPost }} - {{ if .Params.description }} -

    {{.Params.description }}

    - {{ else }} -

    {{ .Summary }}

    - {{ end }} - {{ $isFirstPost = false }} - {{ end }} -
    -
    -
    - {{ with .Params.categories }} -
    - {{ . }} -
    + {{ partial "header.html" . }} +
    + {{ $currentYear := now.Format "2006" }} + + {{ $isFirstPost := true }} + + {{ range (where site.RegularPages "Type" "in" site.Params.mainSections).GroupByDate "2006" -}} +
    +

    {{ .Key }}

    + + {{ range .Pages.GroupByDate "01" }} +

    {{ .Key }} 月

    +
      + {{ range .Pages }} +
    • + +
      +
      + +
      +
      +
      +
      + {{ .Title }} +
      + {{ if $isFirstPost }} + {{ if .Params.description }} +

      {{.Params.description }}

      + {{ else }} +

      {{ .Summary }}

      {{ end }} -
      + {{ $isFirstPost = false }} + {{ end }} +
      +
      +
      + {{ with .Params.categories }} + + {{ end }}
      -
    • - {{ end }} -
    +
    +
    +
  • {{ end }} - -
-
- {{ end }} -
-
+ + {{ end }} + + +
+ {{ end }}
{{ partial "snippets/document-end.html" . }} -- cgit v1.2.3