From 56ccec99c71f05032bd6b15b773ec4ca8619c7b0 Mon Sep 17 00:00:00 2001 From: David Kebler Date: Thu, 30 Mar 2017 16:09:00 -0700 Subject: [PATCH] add disqus shortcode and support comments section. Support hiding sections, navbar items --- layouts/index.html | 1 - layouts/partials/head/styles.html | 7 +++++++ layouts/partials/navbar.html | 15 +++++++-------- layouts/partials/sections.html | 4 +++- layouts/{partials => shortcodes}/disqus.html | 14 ++++++++++---- readme.md | 2 +- static/css/page.css | 6 +++++- 7 files changed, 33 insertions(+), 16 deletions(-) rename layouts/{partials => shortcodes}/disqus.html (87%) diff --git a/layouts/index.html b/layouts/index.html index ed37f80..873d35e 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -7,7 +7,6 @@ {{ partial "hero.html" . }} {{ partial "sections.html" . }} -{{ if .Site.DisqusShortname }} {{ partial "disqus.html" . }} {{ end }} {{ partial "js.html" . }} diff --git a/layouts/partials/head/styles.html b/layouts/partials/head/styles.html index 0dd55b5..99aae88 100644 --- a/layouts/partials/head/styles.html +++ b/layouts/partials/head/styles.html @@ -180,6 +180,13 @@ } {{ end }} + {{ with .comments }} + .section--comments { + color: {{ .color }}; + background-color: {{ .bg_color }}; + } + {{ end }} + {{ end }} /* end sections */ {{ with .buttons }} diff --git a/layouts/partials/navbar.html b/layouts/partials/navbar.html index ec181e7..3d4ad7f 100644 --- a/layouts/partials/navbar.html +++ b/layouts/partials/navbar.html @@ -7,17 +7,16 @@ diff --git a/layouts/partials/sections.html b/layouts/partials/sections.html index 33353a0..c2926a8 100644 --- a/layouts/partials/sections.html +++ b/layouts/partials/sections.html @@ -1,6 +1,7 @@ {{ $parity := "odd" }} {{ range $i, $e := .Data.Pages }} -
+{{ if ne .Params.hidden true }} +

{{ .Title }}

@@ -11,3 +12,4 @@
{{ end }} +{{ end }} diff --git a/layouts/partials/disqus.html b/layouts/shortcodes/disqus.html similarity index 87% rename from layouts/partials/disqus.html rename to layouts/shortcodes/disqus.html index 551b4c5..830761d 100644 --- a/layouts/partials/disqus.html +++ b/layouts/shortcodes/disqus.html @@ -1,19 +1,25 @@ -
+
+
+
+
+ + + comments powered by Disqus diff --git a/readme.md b/readme.md index 1b8ba66..e32fb35 100644 --- a/readme.md +++ b/readme.md @@ -17,7 +17,7 @@ A **complete** theme in a repo that's especially useful for **noobs** who just w **Goal:** Create a mobile first responsive flexbox based Hugo landing page theme including shortcodes that would allow a noob to generate a customized landing page by only knowing a little markdown. Provide a starter repo to make it easy to create one's own landing page in a few minutes -**Further Goal:** Add automated deployment to github pages, S3 bucket or any server using ssh. My other project [4S](https://github.com/dkebler/4S) can do this it just needs to be intregate. Also want to automate building photo galleries. Currently this is done with [Thumbsup](https://github.com/thumbsup/thumbsup) and the generated code is made into a shortcode and the generated thumbs and images added to the project manually. +**Further Goal:** Add automated (via nodejs) deployment to github pages, S3 bucket or any server using ssh. My other project [4S](https://github.com/dkebler/4S) can do this it just needs to be intregated. Also want to automate building photo galleries. Currently this is done with [Thumbsup](https://github.com/thumbsup/thumbsup) and the generated code is made into a shortcode and the generated thumbs and images added to the project manually. Also add in code minification and optimazation for production/distribution builds **Ultimiate Goal:** Put together a noob virtualbox VM with all the tools (e.g. atom, smartgit, hugo, node, etc.) and code installed and configured and ready to go. Fire up the VM and you're instantly productive. diff --git a/static/css/page.css b/static/css/page.css index 762c8aa..0b8d937 100644 --- a/static/css/page.css +++ b/static/css/page.css @@ -123,7 +123,6 @@ img.avatar { } .box__embed { - /*height: 100vh;*/ width: 100%; display: flex; flex-direction: column; @@ -132,6 +131,11 @@ img.avatar { align-items: center; } +.box__embed--disqus { + width: 90vw; + max-width: 800px; +} + .box__contact-info > * { padding: 0.1em;