From 877e02087739e446cb000b619ac0a12d171d04ab Mon Sep 17 00:00:00 2001 From: Star Rauchenberger Date: Wed, 15 Jan 2025 15:39:09 -0500 Subject: Created mobile layout for blog --- app/assets/stylesheets/main/layout.scss | 48 ++++++++++++++++++++------------- 1 file changed, 30 insertions(+), 18 deletions(-) (limited to 'app/assets/stylesheets/main/layout.scss') diff --git a/app/assets/stylesheets/main/layout.scss b/app/assets/stylesheets/main/layout.scss index 6d79c73..ef31ada 100644 --- a/app/assets/stylesheets/main/layout.scss +++ b/app/assets/stylesheets/main/layout.scss @@ -1,42 +1,47 @@ body#main-body { height: 100%; font-family: sans-serif; + font-size: 16px; } #container { height: 100%; - margin: 10px auto; - width: 75%; /* 66% */ box-sizing: border-box; - min-width: 910px; + + @media only screen and (min-width: 768px) { + margin: 10px auto; + width: 75%; /* 66% */ + min-width: 910px; + } } #banner { - background-image: image-url("fourisland_header.png"); - width: 900px; - height: 200px; margin: 0 auto; h1 { - margin: 0; + display: none; + } - a { - display: block; - width: 900px; - height: 200px; - text-indent: -5000px; - text-decoration: none; - margin: 0; - } + img { + width: 100%; + max-width: 900px; + display: block; + margin: 0 auto; } } #page-body { display: flex; + + @media only screen and (max-width: 767px) { + flex-direction: column-reverse; + } } #main { - width: 70%; + @media only screen and (min-width: 768px) { + width: 70%; + } } #content { @@ -62,15 +67,22 @@ body#main-body { #sidebar { box-sizing: border-box; - width: 30%; font-size: .75em; color: black; margin-top: 1em; margin-bottom: 2em; font-family: sans-serif; + + @media only screen and (max-width: 767px) { + width: 100%; + } + + @media only screen and (min-width: 768px) { + width: 30%; + } } -#sidebar h2 { +#sidebar h2, #mobile-header h2 { font-size: 1em; } -- cgit 1.4.1