fix avatar and embed shortcodes, add small button css

master
David Kebler 2017-04-20 20:18:53 -07:00
parent 0c20def9e6
commit 40299fb971
4 changed files with 28 additions and 27 deletions

View File

@ -4,7 +4,7 @@
<!-- base font --> <!-- base font -->
<link href="//fonts.googleapis.com/css?family=Roboto" rel="stylesheet" type="text/css"> <link href="//fonts.googleapis.com/css?family=Roboto" rel="stylesheet" type="text/css">
<!-- monospaced for code --> <!-- monospaced for code -->
<link href="//fonts.googleapis.com/css?family=Inconsolata" rel="stylesheet" type="text/css"> <link href="//fonts.googleapis.com/css?family=Roboto+Mono" rel="stylesheet" type="text/css">
<!-- Configurable Fonts --> <!-- Configurable Fonts -->
{{ with .Site.Params }} {{ with .Site.Params }}

View File

@ -1,9 +1,13 @@
{{ $numOfParams := ( len .Params ) }} {{ $path := "/images/" }} {{ with $.Site.Params.imagespath }} {{ $path := ( . ) }}{{ end }}
{{ $avatar := "avatar.jpg" }} {{ if .IsNamedParams }}
{{ if eq $numOfParams 1 }}{{ $avatar := .Get 1 }}{{ end }}
<div class="box box--avatar"> <div class="box box--avatar">
{{ if eq $numOfParams 2 }}<a href="{{.Get 1 }}">{{ end }} {{ with .Get "url" }}<a href="{{.}}">{{ end }}
{{ $path := "/images/" }} {{ with $.Site.Params.imagespath }} {{ $path := ( . ) }}{{ end }} <img class="avatar" src="{{ $path }}{{ .Get "img" }}"/>
<img class="avatar" src="{{ $path }}{{ $avatar }}"/> {{ with .Get "url" }}</a>{{ end }}
{{ if eq $numOfParams 2 }}</a>{{ end }}
</div> </div>
{{ else }}
{{ $avatar := ( .Get 0 | default "avatar.jpg" ) }}
<div class="box box--avatar">
<img class="avatar" src="{{ $path }}{{ $avatar }}"/>
</div>
{{ end }}

View File

@ -17,7 +17,7 @@
{{ end }} {{ end }}
</div> </div>
{{ else }} {{ else }}
<div class="box box--embed box--{{ .Get 0 }}"> <div class="box box--embed {{ with .Get 0 }}embed--{{ . }}{{ end }}">
{{ .Inner }} {{ .Inner }}
</div> </div>
{{ end }} {{ end }}

View File

@ -181,6 +181,14 @@
padding-right: 0.5em; padding-right: 0.5em;
} }
.box--embed {
flex-direction: column;
flex-wrap: nowrap;
padding-bottom: 0;
justify-content: center;
align-items: center;
}
.box--embed::before { .box--embed::before {
content: ""; content: "";
height: 0.5em; height: 0.5em;
@ -239,6 +247,11 @@
font-size: 3rem; font-size: 3rem;
} }
.btn--small .btn__text,
.btn--small .btn__icon {
font-size: 1rem;
}
.btn--circle { .btn--circle {
border-radius: 50%; border-radius: 50%;
padding: 0.5em; padding: 0.5em;
@ -266,22 +279,6 @@
opacity: 1; 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 { .thumb--yt {
display: flex; display: flex;
align-items: center; align-items: center;
@ -335,14 +332,14 @@
code { code {
font-size: 0.8em; font-size: 0.8em;
font-family: Inconsolata; font-family: 'Roboto Mono', monospace;
background-color: black; background-color: black;
border-radius: 0.2em; border-radius: 0.2em;
color: white; color: white;
padding-left: 0.2em; padding-left: 0.2em;
padding-right: 0.2em; padding-right: 0.2em;
padding-top: 0.05em; padding-top: 0.05em;
padding-bottom: 0.3em; padding-bottom: 0.07em;
overflow-x: scroll; overflow-x: scroll;
} }