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/entries.scss | 13 +++++++-- app/assets/stylesheets/main/layout.scss | 48 ++++++++++++++++++++------------ 2 files changed, 41 insertions(+), 20 deletions(-) (limited to 'app/assets/stylesheets') diff --git a/app/assets/stylesheets/main/entries.scss b/app/assets/stylesheets/main/entries.scss index 609a5f7..4afd15d 100644 --- a/app/assets/stylesheets/main/entries.scss +++ b/app/assets/stylesheets/main/entries.scss @@ -3,9 +3,9 @@ // You can use Sass (SCSS) here: http://sass-lang.com/ .blog-post { - font-size: 16px; - line-height: 24px; + line-height: 1.5em; margin: 0 1em 1em; + clear: both; .blog-title { flex-grow: 1; @@ -41,6 +41,7 @@ .post-calendar { width: 45px; height: 49px; + flex-shrink: 0; &.post-date-1 { background: image-url("date-bg-1.gif") no-repeat; @@ -198,6 +199,10 @@ max-width: 100%; } + iframe { + max-width: 100%; + } + figure { background-color: #eee; border: 1px solid #bbb; @@ -205,6 +210,10 @@ font-size: 0.75em; line-height: 24px; + @media only screen and (max-width: 767px) { + margin: 0; + } + img { display: block; border: 1px solid #bbb; 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