From b113716b320c8682fed59ebf2e84add8a428c640 Mon Sep 17 00:00:00 2001 From: nschoe Date: Mon, 2 Jan 2017 13:06:10 +0100 Subject: [PATCH] Make site a bit responsive --- css/default.css | 67 +++++++++++++++++++++++++++++++++++++++++++++++-- site.hs | 4 ++- 2 files changed, 68 insertions(+), 3 deletions(-) diff --git a/css/default.css b/css/default.css index 371271e..770becc 100644 --- a/css/default.css +++ b/css/default.css @@ -135,6 +135,16 @@ header img { height: 100%; } +@media screen and (max-width: 1148px) { + header { + font-size: 9pt; + } + + header > a { + width: 110px; + } +} + #scrollBar { box-sizing: border-box; position: fixed; @@ -209,8 +219,10 @@ h4:before { #content { margin-top: 70px; - width: 1200px; - margin-left: calc(50% - 600px); + /*width: 1200px;*/ + /*margin-left: calc(50% - 600px);*/ + margin-left: 8%; + margin-right: 8%; } #left_panel { @@ -314,3 +326,54 @@ figcaption { font-size: 0.8em; color: gray; } + +@media screen and (max-width: 900px) { + header { + position: fixed; + box-sizing: border-box; + width: 100px; + height: 100%; + background: linear-gradient(rgba(0,0,0,0.9), rgba(0,0,0,0.7)); + border-right: 3px solid black; + font-size: 9pt; + } + + header > a { + /*box-sizing: border-box;*/ + display: inline-block; + /*height: 100%;*/ + height: 70px; + /*width: 130px;*/ + width: 100%; + text-align: center; + line-height: 60px; + text-transform: uppercase; + color: rgba(200,200,200,1); + transition: background 0.35s; + border: none; + /*border: 1px solid red;*/ + } + + a[href$="rss.xml"] { + position: absolute; + bottom: 10px; + opacity: 0.7; + transition: opacity 0.5s; + } + + #content { + margin-top: 0px; + margin-left: calc(8% + 60px); + margin-right: 8%; + } + + #scrollBar { + box-sizing: border-box; + position: fixed; + top: 0; + left: 100px; + width: 3px; + background: rgb(100, 194, 228); + transition: width 0.5s; + } +} diff --git a/site.hs b/site.hs index f7d30cb..2132973 100644 --- a/site.hs +++ b/site.hs @@ -116,7 +116,9 @@ config :: Configuration config = defaultConfiguration { -- deployCommand = "rsync -avz -e ssh ./_site/ nschoe@nschoe.com:public_html/" - deployCommand = "rsync -avz -e ssh ./_site/ nschoe@178.32.220.77:/www/" + -- deployCommand = "rsync -avz -e ssh ./_site/ nschoe@178.32.220.77:/www/" + deployCommand = "rsync -avz -e ssh ./_site/ nschoe@nschoe.com:/www/" + , previewHost = "0.0.0.0" } --------------------------------------------------------------------------------