From 9882ba22acd139980243f48e8b49fea1dc6d0d4d Mon Sep 17 00:00:00 2001 From: "Rico Sta. Cruz" Date: Sun, 24 Sep 2017 04:58:34 +0800 Subject: [PATCH] More mobile improvements --- _includes/2017/code-sponsor.html | 2 +- _sass/2017/components/search-box.scss | 3 ++- _sass/2017/components/site-header.scss | 7 +++++++ _sass/2017/components/top-nav.scss | 8 +++++--- 4 files changed, 15 insertions(+), 5 deletions(-) diff --git a/_includes/2017/code-sponsor.html b/_includes/2017/code-sponsor.html index 9aa4dfb0a..3234d0f5d 100644 --- a/_includes/2017/code-sponsor.html +++ b/_includes/2017/code-sponsor.html @@ -4,7 +4,7 @@ if (window.localStorage && window.localStorage._NOADS) return var s=d.createElement('script'),r=d.getElementById(id) s.async=true - s.src='https://app.codesponsor.io/scripts/{{ site.data.codesponsor.id }}?theme=light&image=hide&height=100&width=300' + s.src='https://app.codesponsor.io/scripts/{{ site.data.codesponsor.id }}?theme=light&image=hide&height=100&width=319' setTimeout(function(){r.parentNode.insertBefore(s,r)}) })(document, 'code-sponsor-embed') diff --git a/_sass/2017/components/search-box.scss b/_sass/2017/components/search-box.scss index 27d205c53..e0b9f70a3 100644 --- a/_sass/2017/components/search-box.scss +++ b/_sass/2017/components/search-box.scss @@ -13,10 +13,11 @@ height: 64px; background: transparent; border: 0; - flex: 1 0 auto; + flex: 1 1 auto; padding-left: 0; font-weight: bold; color: $base-head; + min-width: 48px; &::placeholder { font-weight: normal; diff --git a/_sass/2017/components/site-header.scss b/_sass/2017/components/site-header.scss index 1d47a02a5..3a11417d7 100644 --- a/_sass/2017/components/site-header.scss +++ b/_sass/2017/components/site-header.scss @@ -33,4 +33,11 @@ margin-top: 32px; margin-bottom: -16px; } + + @media (max-width: 480px) { + & > .adbox { + margin-left: -16px; + margin-right: -16px; + } + } } diff --git a/_sass/2017/components/top-nav.scss b/_sass/2017/components/top-nav.scss index 7c0ab0319..d0bb0d086 100644 --- a/_sass/2017/components/top-nav.scss +++ b/_sass/2017/components/top-nav.scss @@ -97,8 +97,10 @@ } // Offset so it doesn't look misasligned - & > .left > .home { - position: relative; - left: -16px; + @media (min-width: $area-width) { + & > .left > .home { + position: relative; + left: -16px; + } } }