From a57525de2f6c40ce90dffb884b4a64b71725f273 Mon Sep 17 00:00:00 2001 From: "kebler.net" Date: Wed, 11 Aug 2021 13:52:19 -0700 Subject: [PATCH] feat: allow default light/dark colors as defaults for entire page fix: move shortcodes to their own repo feat: allow offsetting light and dark colors on sections refactor: removed custom hero, just use a regular section --- layouts/index.html | 2 +- layouts/partials/head/styles.html | 126 ++++++++++++++---------------- layouts/partials/sections.html | 8 +- layouts/shortcodes/avatar.html | 13 --- layouts/shortcodes/bookmark.html | 6 -- layouts/shortcodes/box.html | 4 - layouts/shortcodes/contact.html | 23 ------ layouts/shortcodes/disqus.html | 50 ------------ layouts/shortcodes/embed.html | 23 ------ layouts/shortcodes/format.html | 4 - layouts/shortcodes/image.html | 22 ------ layouts/shortcodes/jotform.html | 4 - layouts/shortcodes/link.html | 24 ------ layouts/shortcodes/lorem.html | 7 -- layouts/shortcodes/social.html | 8 -- layouts/shortcodes/youtube.html | 38 --------- static/css/base.css | 7 +- static/css/navbar.css | 10 ++- 18 files changed, 77 insertions(+), 302 deletions(-) delete mode 100644 layouts/shortcodes/avatar.html delete mode 100644 layouts/shortcodes/bookmark.html delete mode 100644 layouts/shortcodes/box.html delete mode 100644 layouts/shortcodes/contact.html delete mode 100644 layouts/shortcodes/disqus.html delete mode 100644 layouts/shortcodes/embed.html delete mode 100755 layouts/shortcodes/format.html delete mode 100644 layouts/shortcodes/image.html delete mode 100644 layouts/shortcodes/jotform.html delete mode 100644 layouts/shortcodes/link.html delete mode 100755 layouts/shortcodes/lorem.html delete mode 100644 layouts/shortcodes/social.html delete mode 100644 layouts/shortcodes/youtube.html diff --git a/layouts/index.html b/layouts/index.html index d34c430..a40a6b6 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -5,7 +5,7 @@ {{ if ne .Site.Params.navbar.hidden true }} {{ partial "navbar.html" . }} {{ end }} -{{ if ne .Site.Params.hero.custom_hero true }} +{{ if eq .Site.Params.use_hero true }} {{ partial "hero.html" . }} {{ end }}
diff --git a/layouts/partials/head/styles.html b/layouts/partials/head/styles.html index 85e3dd7..9978285 100644 --- a/layouts/partials/head/styles.html +++ b/layouts/partials/head/styles.html @@ -1,33 +1,33 @@ diff --git a/layouts/partials/sections.html b/layouts/partials/sections.html index adad9e4..65da214 100644 --- a/layouts/partials/sections.html +++ b/layouts/partials/sections.html @@ -1,9 +1,11 @@ -{{ $.Scratch.Set "offset" 0 }} +{{ if eq .Site.Params.sections.offset true }}{{ $.Scratch.Set "offset" 0 }}{{ else }}{{ $.Scratch.Set "offset" 1 }}{{ end }} +{{ if eq .Site.Params.use_hero true }}{{ $.Scratch.Set "offset" 1 }}{{ end }} {{ range $i, $e := where ( where .Site.RegularPages "Section" "sections" ) ".Params.hidden" "!=" true }} -{{ if eq .File.BaseFileName "hero" }}{{ $.Scratch.Set "offset" 1 }}{{ end }} {{ $j := add ( $.Scratch.Get "offset" ) $i }} -
+

{{ .Title }}

diff --git a/layouts/shortcodes/avatar.html b/layouts/shortcodes/avatar.html deleted file mode 100644 index 96fa424..0000000 --- a/layouts/shortcodes/avatar.html +++ /dev/null @@ -1,13 +0,0 @@ -{{ $path := "/images/" }} {{ with $.Site.Params.imagespath }} {{ $path := ( . ) }}{{ end }} -{{ if .IsNamedParams }} -
- {{ with .Get "url" }}{{ end }} - - {{ with .Get "url" }}{{ end }} -
-{{ else }} -{{ $avatar := ( .Get 0 | default "avatar.jpg" ) }} -
- -
-{{ end }} diff --git a/layouts/shortcodes/bookmark.html b/layouts/shortcodes/bookmark.html deleted file mode 100644 index 2de630a..0000000 --- a/layouts/shortcodes/bookmark.html +++ /dev/null @@ -1,6 +0,0 @@ -{{ $numOfParams := ( len .Params ) }} -{{ if eq $numOfParams 1 }} {{ .Get 0 }} {{ end }} -{{ if eq $numOfParams 2 }} {{ .Get 1 }} {{ end }} -{{ if eq $numOfParams 3 }} -{{ .Get 1 }} -{{ end }} diff --git a/layouts/shortcodes/box.html b/layouts/shortcodes/box.html deleted file mode 100644 index acad83f..0000000 --- a/layouts/shortcodes/box.html +++ /dev/null @@ -1,4 +0,0 @@ -{{ $numOfParams := ( len .Params ) }} -
-{{ .Inner }} -
diff --git a/layouts/shortcodes/contact.html b/layouts/shortcodes/contact.html deleted file mode 100644 index 7b50b46..0000000 --- a/layouts/shortcodes/contact.html +++ /dev/null @@ -1,23 +0,0 @@ -{{ with .Site.Params.contact }} {{ $path := "/images/" }} {{ with $.Site.Params.imagespath }} {{ $path := ( . ) }}{{ end }} -
- -
-

{{ .name }}

-
- - - -
- -
- {{ if .cell_image | or .cell }} - {{ if .cell_image }} - - {{ else }} -
{{ .cell }}
- {{ end }} - {{ end }} -
-
-
-{{ end }} diff --git a/layouts/shortcodes/disqus.html b/layouts/shortcodes/disqus.html deleted file mode 100644 index a66871a..0000000 --- a/layouts/shortcodes/disqus.html +++ /dev/null @@ -1,50 +0,0 @@ -
-
-
-
- - - - - -comments powered by Disqus - - - - - - diff --git a/layouts/shortcodes/embed.html b/layouts/shortcodes/embed.html deleted file mode 100644 index 67ea536..0000000 --- a/layouts/shortcodes/embed.html +++ /dev/null @@ -1,23 +0,0 @@ - -{{ if .IsNamedParams }} -
- {{ with .Get "title" }} -
{{ . }}
- {{ end }} -
- {{ .Inner }} -
- {{ with .Get "caption"}} -
{{ . }}
- {{ end }} -
-{{ else }} -
- {{ .Inner }} -
-{{ end }} diff --git a/layouts/shortcodes/format.html b/layouts/shortcodes/format.html deleted file mode 100755 index cecde2a..0000000 --- a/layouts/shortcodes/format.html +++ /dev/null @@ -1,4 +0,0 @@ - - -{{ .Inner }} - diff --git a/layouts/shortcodes/image.html b/layouts/shortcodes/image.html deleted file mode 100644 index 1ebb969..0000000 --- a/layouts/shortcodes/image.html +++ /dev/null @@ -1,22 +0,0 @@ -{{ $path := "/images/" }} -{{ $filename := .Get "filename" }} -{{ with $.Site.Params.imagespath }} {{ $path := ( . ) }}{{ end }} -
-{{ with .Get "title" }} -
{{ . }}
- {{ end }} -{{ with .Get "link"}} -{{ if eq . "lightbox" }}{{ else }}{{ end }} -{{ end }} - -{{ if .Get "link"}}{{ end }} -{{ with .Get "caption"}} -
{{ . }}
-{{ end }} -
diff --git a/layouts/shortcodes/jotform.html b/layouts/shortcodes/jotform.html deleted file mode 100644 index aa6d093..0000000 --- a/layouts/shortcodes/jotform.html +++ /dev/null @@ -1,4 +0,0 @@ - - diff --git a/layouts/shortcodes/link.html b/layouts/shortcodes/link.html deleted file mode 100644 index fda8f7b..0000000 --- a/layouts/shortcodes/link.html +++ /dev/null @@ -1,24 +0,0 @@ -{{ .Scratch.Set "url" (.Get "url") }} -{{ .Scratch.Set "height" (.Get "height") }} -{{ .Scratch.Set "width" (.Get "width" | default "1000") }} -{{ if .Get "height" }} - {{ .Scratch.Set "height" ( printf ", height=%s" ( .Scratch.Get "height" ) ) }} - {{else}} - {{ .Scratch.Set "height" "" }} - {{ end }} - -{{ if eq (.Get "display") "window" }} -{{ .Scratch.Set "url" ( printf "javascript:void( window.open('%s', 'blank', 'scrollbars=yes, toolbar=no, width=%s %s' ))" (.Scratch.Get "url") (.Scratch.Get "width") (.Scratch.Get "height") ) }} -{{ end }} - -{{ with .Get "icon" }}{{ end }} -{{ if eq (.Get "type") "btn" }}
{{ .Get "text" }}
-{{ else }} -{{ .Get "text" }} -{{ end }} -
diff --git a/layouts/shortcodes/lorem.html b/layouts/shortcodes/lorem.html deleted file mode 100755 index b7ddbfc..0000000 --- a/layouts/shortcodes/lorem.html +++ /dev/null @@ -1,7 +0,0 @@ - -
diff --git a/layouts/shortcodes/social.html b/layouts/shortcodes/social.html deleted file mode 100644 index a1394b4..0000000 --- a/layouts/shortcodes/social.html +++ /dev/null @@ -1,8 +0,0 @@ -{{ range .Site.Params.social }} -
  • - - - {{ .title }} - -
  • -{{ end }} diff --git a/layouts/shortcodes/youtube.html b/layouts/shortcodes/youtube.html deleted file mode 100644 index bb306bb..0000000 --- a/layouts/shortcodes/youtube.html +++ /dev/null @@ -1,38 +0,0 @@ -{{ $.Scratch.Set "maxwidth" ( $.Page.Site.Params.youtube.maxwidth ) }} -{{ $.Scratch.Set "wpad" ( $.Page.Site.Params.youtube.wpad ) }} -{{ $.Scratch.Set "nothumb" ( $.Page.Site.Params.youtube.disable_thumb ) }} -{{ if .IsNamedParams }} -{{ with .Get "maxwidth" }}{{ $.Scratch.Set "maxwidth" . }}{{ end }} -{{ with .Get "wpad" }}{{ $.Scratch.Set "wpad" . }}{{ end }} -{{ with .Get "nothumb" }}{{ $.Scratch.Set "nothumb" . }}{{ end }} -
    - {{ with .Get "title" }} -
    {{ . }}
    - {{ end }} -
    - -
    - {{ with .Get "caption"}} -
    {{ . }}
    - {{ end }} -
    -{{ else }} -{{ $numOfParams := ( len .Params ) }} -
    - -
    -{{ end }} diff --git a/static/css/base.css b/static/css/base.css index 042eb67..9cb897f 100644 --- a/static/css/base.css +++ b/static/css/base.css @@ -103,16 +103,19 @@ ol { a, .clickable { - color: inherit; + color:inherit; outline: 0; text-decoration: none; cursor: pointer; font-weight: bold; + font-style: italic; + filter: saturate(200%); } a:hover, .clickable:hover { - filter: saturate(140%); + color: black; + filter: saturate(100%); } .btn { diff --git a/static/css/navbar.css b/static/css/navbar.css index 12d2ba5..1418af4 100644 --- a/static/css/navbar.css +++ b/static/css/navbar.css @@ -1,5 +1,6 @@ /* NAVIGATION BAR */ +/* mobile first at <1000px */ .nav-bar { display: flex; flex-direction: column; @@ -42,6 +43,7 @@ .nav-bar__menu { overflow-y: scroll; max-height: 75vh; + padding-right: .5em; } .hide-menu { @@ -68,13 +70,15 @@ color: white; } +/* bigger than small tablet */ @media only screen and (min-width: 1000px) { .nav-bar { flex-direction: row; flex-wrap: nowrap; justify-content: space-between; align-items: center; - padding-right: 1em; + padding-right: 2em; + padding-left: 2em; } .nav-bar__menu { @@ -111,10 +115,10 @@ .nav-bar__menu-button { display: none; } -} +} /* end responsive */ -/* Desktop */ +/* full size */ @media screen and (min-width: 1400px) { .nav-bar__menu-item,