diff --git a/layouts/partials/article-list/default.html b/layouts/partials/article-list/default.html index 84fc93b..e58ef18 100644 --- a/layouts/partials/article-list/default.html +++ b/layouts/partials/article-list/default.html @@ -12,42 +12,5 @@ {{ end }} - {{ $i := .Params.image }} - {{ $context := . }} - -
- {{ with $categories := .Params.categories }} -
- {{ range $categories }} - {{ if $i }} - {{- $image := partial "helper/image" $context | resources.Fingerprint "md5" -}} - {{- $20x := $image.Fill "20x20 smart" -}} - {{ . | humanize }} - {{ else }} - {{ . | humanize }} - {{ end }} - {{ end }} -
- {{ end }} - -

- - {{- .Title -}} - -

- - {{ with .Params.description }} -

- {{ . }} -

- {{ end }} - - -
+ {{ partial "article/components/details" . }} \ No newline at end of file diff --git a/layouts/partials/article/components/details.html b/layouts/partials/article/components/details.html new file mode 100644 index 0000000..99c26f8 --- /dev/null +++ b/layouts/partials/article/components/details.html @@ -0,0 +1,38 @@ +{{ $i := .Params.image }} +{{ $context := . }} + +
+ {{ with $categories := .Params.categories }} +
+ {{ range $categories }} + {{ if $i }} + {{- $image := partial "helper/image" $context | resources.Fingerprint "md5" -}} + {{- $20x := $image.Fill "20x20 smart" -}} + {{ . | humanize }} + {{ else }} + {{ . | humanize }} + {{ end }} + {{ end }} +
+ {{ end }} + +

+ + {{- .Title -}} + +

+ + {{ with .Params.description }} +

+ {{ . }} +

+ {{ end }} + + +
\ No newline at end of file diff --git a/layouts/partials/article/components/header.html b/layouts/partials/article/components/header.html index 632be2f..1bd5663 100644 --- a/layouts/partials/article/components/header.html +++ b/layouts/partials/article/components/header.html @@ -13,41 +13,5 @@ {{ end }} - {{ $i := .Params.image }} - {{ $context := . }} -
- {{ with $categories := .Params.categories }} -
- {{ range $categories }} - {{ if $i }} - {{- $image := partial "helper/image" $context | resources.Fingerprint "md5" -}} - {{- $20x := $image.Fill "20x20 smart" -}} - {{ . | humanize }} - {{ else }} - {{ . | humanize }} - {{ end }} - {{ end }} -
- {{ end }} - -

- - {{- .Title -}} - -

- - {{ with .Params.description }} -

- {{ . }} -

- {{ end }} - - -
+ {{ partial "article/components/details" . }} \ No newline at end of file