changes sidebar styles and positions

This commit is contained in:
Huy Tran 2018-07-26 17:51:50 +10:00
parent 0b25bef171
commit 7eea1bb398
5 changed files with 22 additions and 12 deletions

View file

@ -2,13 +2,13 @@
<div class="sidebar"> <div class="sidebar">
<div class="container {{ with .Site.Params.sidebarSticky -}}sidebar-sticky{{- end }}"> <div class="container {{ with .Site.Params.sidebarSticky -}}sidebar-sticky{{- end }}">
<div class="sidebar-about"> <div class="sidebar-about">
<div class="site__title"> <span class="site__title">
<a href="{{ .Site.BaseURL }}">{{ .Site.Title }}</a> <a href="{{ .Site.BaseURL }}">{{ .Site.Title }}</a>
</div> </span>
{{ with .Site.Params.authorimage }} {{ with .Site.Params.authorimage }}
{{ $strippedSlash := ($.Site.Params.authorimage | replaceRE "^(/)+(.*)" "$2") }} {{ $strippedSlash := ($.Site.Params.authorimage | replaceRE "^(/)+(.*)" "$2") }}
{{ $authorImage := (printf "%s%s" $.Site.BaseURL $strippedSlash) }} {{ $authorImage := (printf "%s%s" $.Site.BaseURL $strippedSlash) }}
<div> <div class="author-image">
<img src="{{$authorImage}}" alt="Author Image" class="img--circle img--headshot element--center"> <img src="{{$authorImage}}" alt="Author Image" class="img--circle img--headshot element--center">
</div> </div>
{{ end }} {{ end }}

View file

@ -2,7 +2,9 @@
// 320px ~ 16rem/16px ~ 18.8235/17px ~ 17.7778/18px // 320px ~ 16rem/16px ~ 18.8235/17px ~ 17.7778/18px
// 480px ~ 30rem/16px ~ 28.2353rem/17px ~ 26.6667rem/18px // 480px ~ 30rem/16px ~ 28.2353rem/17px ~ 26.6667rem/18px
@media only screen and (min-device-width: 320px) and (max-device-width: 480px) { @media only screen and (min-device-width: 320px) and (max-device-width: 480px) {
// styles .sidebar {
padding-top: .5rem;
}
} }
// tablet/medium device ~768px+ // tablet/medium device ~768px+

View file

@ -17,6 +17,10 @@
.sidebar-about { .sidebar-about {
text-align: center; text-align: center;
} }
.author-image {
display: block;
margin-top: 4px;
}
} }
.sidebar-nav { .sidebar-nav {

View file

@ -1,4 +1,6 @@
* { * {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box; } box-sizing: border-box; }
html, html,
@ -295,6 +297,9 @@ a {
color: #268bd2; } color: #268bd2; }
.sidebar .sidebar-about { .sidebar .sidebar-about {
text-align: center; } text-align: center; }
.sidebar .author-image {
display: block;
margin-top: 4px; }
.sidebar-nav { .sidebar-nav {
text-align: center; text-align: center;
@ -422,9 +427,7 @@ a {
font-size: 0.9rem; } font-size: 0.9rem; }
pre { pre {
-moz-tab-size: 2; tab-size: 2; }
-o-tab-size: 2;
tab-size: 2; }
pre code { pre code {
white-space: pre-wrap; } white-space: pre-wrap; }
@ -559,6 +562,10 @@ body .gist td {
max-width: 100%; max-width: 100%;
height: auto; } height: auto; }
@media only screen and (min-device-width: 320px) and (max-device-width: 480px) {
.sidebar {
padding-top: .5rem; } }
@media (min-width: 768px) { @media (min-width: 768px) {
html, html,
body { body {
@ -604,10 +611,7 @@ body .gist td {
@media (min-width: 992px) { @media (min-width: 992px) {
html, html,
body { body {
-webkit-text-size-adjust: none; text-size-adjust: none;
-moz-text-size-adjust: none;
-ms-text-size-adjust: none;
text-size-adjust: none;
font-size: 17px; font-size: 17px;
font-weight: 400; font-weight: 400;
line-height: 1.611em; } line-height: 1.611em; }

File diff suppressed because one or more lines are too long