From 95cf25a66ce6d29f30c21dfdec518c4e52feb573 Mon Sep 17 00:00:00 2001 From: Fabien CASTERS Date: Sun, 3 Mar 2019 19:04:26 +0100 Subject: Add all feather icons --- layouts/_default/baseof.html | 2 +- layouts/_default/list.html | 2 +- layouts/_default/single.html | 6 +++--- layouts/partials/icon.html | 40 +++++++++------------------------------- 4 files changed, 14 insertions(+), 36 deletions(-) (limited to 'layouts') diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index beb3db4..7b9394f 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -18,7 +18,7 @@

{{ .Site.Params.description | default "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nunc vehicula turpis sit amet elit pretium." }}

{{ range .Site.Params.social }} - {{ partial "icon.html" .name }} + {{ partial "icon.html" (dict "ctx" $ "name" .name ) }} {{ end }}
diff --git a/layouts/_default/list.html b/layouts/_default/list.html index 6b90c77..00884f6 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -6,7 +6,7 @@
  • {{ .Title }} - {{ partial "icon.html" "clock" }} {{ .ReadingTime }} min read - + {{ partial "icon.html" (dict "ctx" $ "name" "clock") }} {{ .ReadingTime }} min read - {{ .PublishDate.Format "Jan 2, 2006" }}
  • diff --git a/layouts/_default/single.html b/layouts/_default/single.html index 7027351..523b8d5 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -4,16 +4,16 @@

    {{ .Title }}

    - {{ partial "icon.html" "calendar" }} + {{ partial "icon.html" (dict "ctx" $ "name" "calendar") }} {{ .PublishDate.Format "Jan 2, 2006" }}
    - {{ partial "icon.html" "clock" }} + {{ partial "icon.html" (dict "ctx" $ "name" "clock") }} {{ .ReadingTime }} min read
    {{- with .Params.tags -}}
    - {{ partial "icon.html" "tag" }} + {{ partial "icon.html" (dict "ctx" $ "name" "tag") }} {{ range . -}} {{- with $.Site.GetPage (printf "/%s/%s" "tags" . ) -}} {{ .Title }} diff --git a/layouts/partials/icon.html b/layouts/partials/icon.html index 38ffe18..e3f67f0 100644 --- a/layouts/partials/icon.html +++ b/layouts/partials/icon.html @@ -1,33 +1,11 @@ -{{- if (eq . "calendar") -}} - -{{- else if (eq . "clock") -}} - -{{- else if (eq . "codepen") -}} - -{{- else if (eq . "email") -}} - -{{- else if (eq . "facebook") -}} - -{{- else if (eq . "github") -}} - -{{- else if (eq . "gitlab") -}} - -{{- else if (eq . "instagram") -}} - -{{- else if (eq . "linkedin") -}} - -{{- else if (eq . "send") -}} - -{{- else if (eq . "slack") -}} - -{{- else if (eq . "tag") -}} - -{{- else if (eq . "telegram") -}} - -{{- else if (eq . "twitter") -}} - -{{- else if (eq . "youtube") -}} - +{{- if isset .ctx.Site.Data.m10c.icons .name -}} + + {{ safeHTML (index .ctx.Site.Data.m10c.icons .name) }} + {{- else -}} - + + + + {{- end -}} + -- cgit v1.2.3