From 40299fb97116785e91e074c04b63ffb013c4f6db Mon Sep 17 00:00:00 2001 From: David Kebler Date: Thu, 20 Apr 2017 20:18:53 -0700 Subject: [PATCH] fix avatar and embed shortcodes, add small button css --- layouts/partials/head/fonts.html | 2 +- layouts/shortcodes/avatar.html | 18 ++++++++++------- layouts/shortcodes/embed.html | 2 +- static/css/page.css | 33 +++++++++++++++----------------- 4 files changed, 28 insertions(+), 27 deletions(-) diff --git a/layouts/partials/head/fonts.html b/layouts/partials/head/fonts.html index 71a635b..e4258b6 100644 --- a/layouts/partials/head/fonts.html +++ b/layouts/partials/head/fonts.html @@ -4,7 +4,7 @@ - + {{ with .Site.Params }} diff --git a/layouts/shortcodes/avatar.html b/layouts/shortcodes/avatar.html index 8b08eaf..96fa424 100644 --- a/layouts/shortcodes/avatar.html +++ b/layouts/shortcodes/avatar.html @@ -1,9 +1,13 @@ -{{ $numOfParams := ( len .Params ) }} -{{ $avatar := "avatar.jpg" }} -{{ if eq $numOfParams 1 }}{{ $avatar := .Get 1 }}{{ end }} +{{ $path := "/images/" }} {{ with $.Site.Params.imagespath }} {{ $path := ( . ) }}{{ end }} +{{ if .IsNamedParams }}
- {{ if eq $numOfParams 2 }}{{ end }} - {{ $path := "/images/" }} {{ with $.Site.Params.imagespath }} {{ $path := ( . ) }}{{ end }} - - {{ if eq $numOfParams 2 }}{{ end }} + {{ with .Get "url" }}{{ end }} + + {{ with .Get "url" }}{{ end }}
+{{ else }} +{{ $avatar := ( .Get 0 | default "avatar.jpg" ) }} +
+ +
+{{ end }} diff --git a/layouts/shortcodes/embed.html b/layouts/shortcodes/embed.html index 26a7ff2..67ea536 100644 --- a/layouts/shortcodes/embed.html +++ b/layouts/shortcodes/embed.html @@ -17,7 +17,7 @@ {{ end }} {{ else }} -
+
{{ .Inner }}
{{ end }} diff --git a/static/css/page.css b/static/css/page.css index aa99b20..040bccb 100644 --- a/static/css/page.css +++ b/static/css/page.css @@ -181,6 +181,14 @@ padding-right: 0.5em; } +.box--embed { + flex-direction: column; + flex-wrap: nowrap; + padding-bottom: 0; + justify-content: center; + align-items: center; +} + .box--embed::before { content: ""; height: 0.5em; @@ -239,6 +247,11 @@ font-size: 3rem; } +.btn--small .btn__text, +.btn--small .btn__icon { + font-size: 1rem; +} + .btn--circle { border-radius: 50%; padding: 0.5em; @@ -266,22 +279,6 @@ opacity: 1; } -/*may get rid of this after fixing embed shortcode */ -.box__embed { - width: 100%; - display: flex; - flex-direction: column; - flex-wrap: nowrap; - justify-content: center; - align-items: center; -} - -.box--embed { - flex-direction: column; - flex-wrap: nowrap; - padding-bottom: 0; -} - .thumb--yt { display: flex; align-items: center; @@ -335,14 +332,14 @@ code { font-size: 0.8em; - font-family: Inconsolata; + font-family: 'Roboto Mono', monospace; background-color: black; border-radius: 0.2em; color: white; padding-left: 0.2em; padding-right: 0.2em; padding-top: 0.05em; - padding-bottom: 0.3em; + padding-bottom: 0.07em; overflow-x: scroll; }