From c0cba50f7f23301edf38b27cedd8902392333f08 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Erik=20Pedersen?= Date: Sun, 16 Apr 2017 12:55:31 +0200 Subject: Make inline CSS loading Hugo 0.21.2 compatible Released later today. Note that this also works fine with older Hugo versions. --- layouts/partials/css/screen.css | 3 +-- layouts/partials/head.html | 5 +++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/layouts/partials/css/screen.css b/layouts/partials/css/screen.css index 57cd18e..4fc798d 100644 --- a/layouts/partials/css/screen.css +++ b/layouts/partials/css/screen.css @@ -1,4 +1,3 @@ - + diff --git a/layouts/partials/head.html b/layouts/partials/head.html index 9007fde..43805df 100644 --- a/layouts/partials/head.html +++ b/layouts/partials/head.html @@ -16,8 +16,9 @@ - - {{ partial "css/screen.css" . }} + -- cgit v1.2.3 From 6416d231bb8425a24f62d80c836a7f3bab99bb91 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Erik=20Pedersen?= Date: Sun, 16 Apr 2017 13:06:43 +0200 Subject: Add some conditionals To get a demo running on the themes site without all the params set. --- layouts/partials/article.html | 6 ++++-- layouts/partials/header.html | 4 +++- layouts/partials/post/sharing.html | 2 ++ 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/layouts/partials/article.html b/layouts/partials/article.html index a3d7133..5149e0a 100644 --- a/layouts/partials/article.html +++ b/layouts/partials/article.html @@ -18,7 +18,9 @@
{{ .post.Content }}
{{ end }}
- {{ if .theme.disqus_shortname }} - Comments + {{ with .theme }} + {{ if .disqus_shortname }} + Comments + {{ end }} {{ end }}
diff --git a/layouts/partials/header.html b/layouts/partials/header.html index 78bf8a4..88094db 100644 --- a/layouts/partials/header.html +++ b/layouts/partials/header.html @@ -8,6 +8,8 @@ {{ if $theme.subtitle }}{{ $theme.subtitle }}{{ end }}
-{{ partial "social.html" (dict "theme" $theme) }} +{{ with $theme }} +{{ partial "social.html" (dict "theme" .) }} +{{ end }} {{ partial "navigation.html" . }} diff --git a/layouts/partials/post/sharing.html b/layouts/partials/post/sharing.html index 34e6a60..0d59531 100644 --- a/layouts/partials/post/sharing.html +++ b/layouts/partials/post/sharing.html @@ -1,3 +1,4 @@ +{{ if .theme }} +{{ end }} \ No newline at end of file -- cgit v1.2.3