From 9fa4b1149e808324dedf751c8536e474facb5e6c Mon Sep 17 00:00:00 2001 From: David Kebler Date: Sat, 1 Apr 2017 19:59:26 -0700 Subject: [PATCH] add in complete link shortcode, other minor fixes --- layouts/partials/head/css.html | 40 ++++++++++++------------- layouts/partials/head/fonts.html | 14 ++++----- layouts/partials/head/styles.html | 2 +- layouts/partials/js.html | 18 +++++++++++- layouts/partials/sections.html | 2 +- layouts/shortcodes/link.html | 28 +++++++++++++++--- layouts/shortcodes/text-justify.html | 3 -- static/css/base.css | 14 +++++++++ static/css/page.css | 44 ++++++++++++++++++---------- static/css/responsive.css | 5 ++-- static/js/docready.js | 1 - static/js/page.js | 2 +- 12 files changed, 115 insertions(+), 58 deletions(-) delete mode 100644 layouts/shortcodes/text-justify.html diff --git a/layouts/partials/head/css.html b/layouts/partials/head/css.html index 7d1988d..49e58fb 100644 --- a/layouts/partials/head/css.html +++ b/layouts/partials/head/css.html @@ -1,27 +1,25 @@ - - - - + + + + + + - - + + - - + + - - + + - - + + - - + +{{ partial "head/styles.html" . }} - - {{ partial "head/styles.html" . }} - - - {{ range .Site.Params.custom_css }} - - {{ end }} + +{{ range .Site.Params.custom_css }} + {{ end }} diff --git a/layouts/partials/head/fonts.html b/layouts/partials/head/fonts.html index 9358733..6fe27ac 100644 --- a/layouts/partials/head/fonts.html +++ b/layouts/partials/head/fonts.html @@ -2,32 +2,32 @@ - + {{ with .Site.Params }} {{ with .font }} - + {{ end }} {{ with .navbar.font }} - + {{ end }} {{ with .hero.font }} - + {{ end }} {{ with .hero.headline_font }} - + {{ end }} {{ with .sections.font }} - + {{ end }} {{ with .sections.font_headline }} - + {{ end }} {{ end }} diff --git a/layouts/partials/head/styles.html b/layouts/partials/head/styles.html index 99aae88..5fa31d0 100644 --- a/layouts/partials/head/styles.html +++ b/layouts/partials/head/styles.html @@ -152,7 +152,7 @@ {{ end }} {{ with .bullet_icon }} - .section__content li::before { + .section__content ul > li::before { content: "{{ . }}"; } diff --git a/layouts/partials/js.html b/layouts/partials/js.html index cbc1a42..9f272be 100644 --- a/layouts/partials/js.html +++ b/layouts/partials/js.html @@ -1,9 +1,10 @@ - + + @@ -22,3 +23,18 @@ + + +{{ range .Site.Params.custom_js }} + +{{ end }} + + +{{ if .Site.Params.galleries }} + +{{ end }} diff --git a/layouts/partials/sections.html b/layouts/partials/sections.html index c2926a8..0ef8265 100644 --- a/layouts/partials/sections.html +++ b/layouts/partials/sections.html @@ -6,7 +6,7 @@

{{ .Title }}

-
+
{{ .Content }}
diff --git a/layouts/shortcodes/link.html b/layouts/shortcodes/link.html index cc5795b..f7627e7 100644 --- a/layouts/shortcodes/link.html +++ b/layouts/shortcodes/link.html @@ -1,4 +1,24 @@ - -
-{{ .Get 1 }} -
+{{ .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/text-justify.html b/layouts/shortcodes/text-justify.html deleted file mode 100644 index 6a708fc..0000000 --- a/layouts/shortcodes/text-justify.html +++ /dev/null @@ -1,3 +0,0 @@ -
-{{ .Inner }} -
diff --git a/static/css/base.css b/static/css/base.css index 5f5b55b..400ff72 100644 --- a/static/css/base.css +++ b/static/css/base.css @@ -110,6 +110,7 @@ a, outline: 0; text-decoration: none; cursor: pointer; + font-weight: bold; } a:hover, @@ -157,6 +158,7 @@ hr { border-style: solid; } + .flex-col-center { display: flex; align-items: center; @@ -180,3 +182,15 @@ hr { .hide { visibility: hidden; } + +.text-center p { + text-align: center; +} + +.text-left p { + text-align: left; +} + +.text-right p { + text-align: right; +} diff --git a/static/css/page.css b/static/css/page.css index 0b8d937..43a82b0 100644 --- a/static/css/page.css +++ b/static/css/page.css @@ -1,6 +1,6 @@ /* sections */ -.section-headline { +.section__headline { text-align: center; } @@ -25,14 +25,14 @@ padding-bottom: 0.7em; } -.section__content li::before { +.section__content ul > li::before { font-family: FontAwesome; content: "\f18e"; padding-right: 0.5em; padding-left: 0; } -.section__content ul li { +.section__content ul > li { text-indent: -1.2rem; } @@ -74,14 +74,12 @@ Components/Shortcodes Styling ---------------- */ -/* box creates a flexbox wrapper */ +/* box creates a flexbox wrapper, row default */ .box { display: flex; - flex-direction: row; - flex-wrap: wrap; + flex-flow: wrap; align-content: center; justify-content: center; - /*padding: 0.0em;*/ } .box--column { @@ -101,13 +99,30 @@ } .box--btn { - padding: 1rem; + padding: 0.5rem; + margin-bottom: 0.5rem; } -.box--avatar { - flex +.box--btn-bar > .box--btn { + margin-right: 0.2em; + margin-bottom: 0.5em; } +.btn__text { + align-self: center; +} + +.btn__icon { + align-self: center; + padding-right: 0.2em; +} + +.btn--large .btn__text, +.btn--large .btn__icon { + font-size: 3rem; +} + + .box--avatar > img, img.avatar { @@ -115,7 +130,7 @@ img.avatar { border-radius: 50%; width: 100px; height: 100px; - padding: .5em; + padding: 0.5em; } .box--avatar > a { @@ -136,19 +151,16 @@ img.avatar { max-width: 800px; } - .box__contact-info > * { padding: 0.1em; align-self: center; } .box__contact-info > * > * { - margin : 0.2em; - align-self: center; + margin: 0.2em; + align-self: center; } - - /*turn off default bullets*/ .box--gallery { list-style: none; diff --git a/static/css/responsive.css b/static/css/responsive.css index 0785c84..e03cc79 100644 --- a/static/css/responsive.css +++ b/static/css/responsive.css @@ -2,8 +2,9 @@ /* small tablets */ @media only screen and (min-width: 600px) { - .section__content ul li { - text-indent: -2rem; + /* undo indent of small screens */ + .section__content ul > li { + text-indent: 1rem; } } diff --git a/static/js/docready.js b/static/js/docready.js index ccf44b7..94577f9 100644 --- a/static/js/docready.js +++ b/static/js/docready.js @@ -5,7 +5,6 @@ $(document).ready(function () { heroResize(); itemResize('iframe'); typeResize(); // for section content - lightbox('#4005') // TODO put this in template instead of hard coding using parameter // resize elements on change $(window).resize(function () { diff --git a/static/js/page.js b/static/js/page.js index 40e0852..3c781fe 100644 --- a/static/js/page.js +++ b/static/js/page.js @@ -79,7 +79,7 @@ function typeResize() { // Lightbox for Gallery -function lightbox(id) { +function lightgallery(id) { // Intialize all the media i.e. photos with "media" id // TODO use Hugo params to initialize multiple galleries/albums var lg = $(id).lightGallery({