From a9c7bfe21cf789f312c6871241396247fd5928d6 Mon Sep 17 00:00:00 2001 From: Blake Ridgway Date: Tue, 11 Feb 2025 20:41:49 -0600 Subject: [PATCH] (refactor): verified viewport, added more responsive css --- static/css/styles.css | 303 ++++++++++++++++++++++++++++-------------- templates/index.html | 4 +- 2 files changed, 203 insertions(+), 104 deletions(-) diff --git a/static/css/styles.css b/static/css/styles.css index 76b6d7f..4da4761 100644 --- a/static/css/styles.css +++ b/static/css/styles.css @@ -1,174 +1,273 @@ +html { + box-sizing: border-box; +} +*, +*:before, +*:after { + box-sizing: inherit; +} + body { - font-family: Arial, sans-serif; - margin: 0; - padding: 0; + font-family: Arial, sans-serif; + margin: 0; + padding: 0; } header { - background-color: #fff; - padding: 10px 20px; - text-align: center; - font-size: 24px; - box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); - margin: 5px auto; + background-color: #fff; + padding: 10px 20px; + text-align: center; + font-size: 24px; + box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); + margin: 5px auto; } header nav { - display: flex; - justify-content: normal; - align-items: center; + display: flex; + justify-content: normal; + align-items: center; } header nav a { - text-decoration: none; - color: #000; - margin-left: 20px; - font-size: 18px; + text-decoration: none; + color: #000; + margin-left: 20px; + font-size: 18px; } .hero-section-1 { - background-image: linear-gradient(to bottom, #337cf2, #fff); - padding: 100px 20px; - width: 100%; + background-image: linear-gradient(to bottom, #337cf2, #fff); + padding: 100px 0;/ + width: 100%; + margin: 0; +} + +.hero-section-1 .inner-container { + padding: 0 20px; } .hero-content { - display: flex; - justify-content: space-between; - align-items: center; + display: flex; + justify-content: space-between; + align-items: center; + /* padding: 0; */ } .hero-illustration { - width: 40%; - height: 500px; - background-size: cover; - background-position: center; - border-radius: 10px; - box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); + width: 650px; + height: 500px; + background-size: cover; + background-position: center; + border-radius: 10px; + box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); } .hero-illustration img { - width: 100%; - height: 100%; - object-fit: cover; - border-radius: 30px; + width: 100%; + height: 100%; + object-fit: cover; + border-radius: 30px; } .hero-text { - width: 60%; - padding: 20px; + width: 60%; + padding: 20px; } .hero-text h1 { - font-size: 48px; - font-weight: bold; - color: #000; - text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); + font-size: 48px; + font-weight: bold; + color: #000; + text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); } .hero-text p { - font-size: 18px; - color: #000; - text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); + font-size: 18px; + color: #000; + text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); } .hero-section-2 { - background-color: #337cf2; - padding: 100px; - text-align: center; - width: 100%; + background-color: #337cf2; + padding: 100px 0; + text-align: center; + width: 100%; + margin: 0; } + +.hero-section-2 .inner-container { + padding: 0 20px; +} + +.hero-sec2-header { + padding-top: 2.5%; + font-size: 40px; +} + .hero-section-2 form { - padding: 10px; - font-size: 1rem; - width: calc(100% - 110px); + padding: 10px; + font-size: 1rem; + width: calc(100% - 50px); + max-width: 600px; + margin: 0 auto; } .hero-section-2 input { - padding: 10px; - width: 15%; - border: 1px solid #ccc; - border-radius: 10px; - box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); + padding: 10px; + width: 15%; + border: 1px solid #ccc; + border-radius: 10px; + box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); } .hero-section-2 button { - padding: 10px 20px; - border: none; - border-radius: 5px; - cursor: pointer; + padding: 10px 20px; + border: none; + border-radius: 5px; + cursor: pointer; } .hero-section-3 { - width: 100%; + width: 100%; } .hero-section-3 h2 { - margin-top: 0; - text-align: center; + margin-top: 0; + text-align: center; } .feature-cards { - display: flex; - flex-wrap: wrap; - justify-content: center; + display: flex; + flex-wrap: wrap; + justify-content: center; } .feature-card { - background-color: #fff; - padding: 20px; - border: 1px solid #ddd; - border-radius: 10px; - box-shadow: 0 0 20px rgba(0, 0, 0, 0.2); - margin: 20px; - width: 30%; - display: flex; - flex-direction: column; - align-items: center; - justify-content: center; + background-color: #fff; + padding: 20px; + border: 1px solid #ddd; + border-radius: 10px; + box-shadow: 0 0 20px rgba(0, 0, 0, 0.2); + margin: 20px; + width: 30%; + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; + word-wrap: break-word; + overflow-wrap: break-word; } .feature-card h3 { - margin-top: 0; - text-align: center; - font-size: 18px; - font-weight: bold; - margin-bottom: 10px; + margin-top: 0; + text-align: center; + font-size: 18px; + font-weight: bold; + margin-bottom: 10px; } .feature-card ul { - list-style: none; - padding: 0; - margin: 0; - text-align: center; + list-style: none; + padding: 0; + margin: 0; + text-align: center; } .feature-card li { - margin-bottom: 10px; - font-size: 16px; - color: #666; + margin-bottom: 10px; + font-size: 16px; + color: #666; } .feature-card li::before { - content: "\2022"; - font-size: 16px; - color: #337cf2; - margin-right: 10px; + content: "\2022"; + font-size: 16px; + color: #337cf2; + margin-right: 10px; } main { - display: flex; - flex-direction: column; - align-items: center; - padding: 20px; - width: 100%; - margin: 0 auto; + width: 100%; + margin: 0; + padding: 0; + display: block; } -footer { - background-color: #333; - color: #fff; - padding: 10px; - text-align: center; - clear: both; +main .inner-container { + padding: 10px 20px; +} + + +footer { + background-color: #337cf2; + color: #fff; + padding: 10px; + text-align: center; + clear: both; +} + +img { + max-width: 100%; + height: auto; +} + +@media (max-width: 768px) { + .hero-content { + flex-direction: column; + padding: 0; + } + + .hero-text { + width: 100%; + padding: 10px; + } + + .hero-illustration { + width: 100%; + height: auto; + } + + .hero-section-2 input { + width: 80%; + } + + .feature-card { + width: 90%; + } + + .hero-text h1 { + font-size: 2.5em; + } + + .hero-section-2 { + padding: 50px 0; + } + + .hero-sec2-header { + font-size: 32px; + } + + .hero-section-2 form { + width: calc(100% - 40px); + padding: 10px; + } +} + +@media (max-width: 480px) { + .hero-text h1 { + font-size: 2em; + } + + .hero-section-2 input { + width: 90%; + } + + .feature-card { + width: 100%; + margin: 10px 0; + } + + .hero-section-1 { + padding: 50px 0; + } } diff --git a/templates/index.html b/templates/index.html index ab3bc83..6321e55 100644 --- a/templates/index.html +++ b/templates/index.html @@ -2,7 +2,7 @@ - + RideAware @@ -40,7 +40,7 @@
-

Features

+

Features

Workout Planning