From 357019fd53940238749f1ade17a5f5104afe79d9 Mon Sep 17 00:00:00 2001 From: Mugundh Date: Tue, 1 Oct 2024 19:45:31 +0530 Subject: [PATCH 1/4] Improved styles --- styles.css | 215 ++++++++++++++++++++++++----------------------------- 1 file changed, 97 insertions(+), 118 deletions(-) diff --git a/styles.css b/styles.css index 7176c83..5829cc6 100644 --- a/styles.css +++ b/styles.css @@ -1,160 +1,128 @@ -/* body { - font-family: Arial, sans-serif; - background-color: #f4f4f4; - color: #333; +body { margin: 0; padding: 0; -} - -header { - background-color: #333; - color: #fff; - padding: 20px; - text-align: center; -} - -section { - padding: 20px; - margin: 20px; - background-color: #fff; - border-radius: 8px; - box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); -} - -#crypto-form { - margin-top: 20px; -} - -input { - padding: 10px; - font-size: 16px; - margin-right: 10px; -} - -button { - padding: 10px 15px; - background-color: #333; - color: #fff; - border: none; - cursor: pointer; -} - -button:hover { - background-color: #555; -} - -#price-result { - margin-top: 20px; -} - -#price { - font-size: 24px; - color: #007BFF; -} */ - -body{ - margin: 0; - padding: 0; - /* background-color: blueviolet; */ - background: #c31432; /* fallback for old browsers */ - background: -webkit-linear-gradient(to right, #240b36, #c31432); /* Chrome 10-25, Safari 5.1-6 */ - background: linear-gradient(to right, #240b36, #c31432); /* W3C, IE 10+/ Edge, Firefox 16+, Chrome 26+, Opera 12+, Safari 7+ */ + background: linear-gradient(135deg, #240b36, #c31432); color: white; height: 100vh; - font-family: "Gowun Batang", serif; font-weight: 400; font-style: normal; + display: flex; + flex-direction: column; + justify-content: space-between; } -h1, h2, h3{ - padding: 0; +h1, h2, h3 { margin: 0; } -.header{ +.header { text-align: center; background-color: #2E073F; - color: #EBD3F8; - padding: 1.4rem; - box-shadow: 0 1px 10px 2px rgb(160, 159, 159); + color: #EBD3F8; + padding: 1.8rem; font-family: "Mate SC", serif; + font-size: 2.5rem; /* Increased font size for emphasis */ + box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3); } -.tagline{ +.tagline { text-align: center; font-family: "Fredoka", sans-serif; - font-weight: 400; - font-style: normal; - font-size: 3rem; - width: 80%; + font-weight: 500; + font-size: 2rem; color: #FFEB55; + margin: 1.5rem auto; + max-width: 70%; } -.central{ +.central { display: flex; + justify-content: center; margin: 2rem 1rem; gap: 2rem; + flex-direction: column; + align-items: center; } -#crypto-price-predictor{ - background-color: #fff; - background-color: rgba(0, 0, 0, 0.281); - border-radius: 30px; - padding: 1rem 1.5rem; - font-size: 20px; +#crypto-price-predictor { + background: rgba(255, 255, 255, 0.1); + border-radius: 15px; + padding: 2rem; + font-size: 1.1rem; text-align: center; + width: 90%; + max-width: 600px; + box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2); } -#crypto-price-predictor h2{ - text-align: center; - margin-bottom: 10px; +#crypto-price-predictor h2 { + margin-bottom: 1rem; + color: #FFEB55; + font-family: "Fredoka", sans-serif; } -#crypto{ + +#crypto { display: block; - width: 80%; - font-size: 1.5rem; - margin: 1rem auto; + width: 100%; + font-size: 1.2rem; + padding: 0.75rem; + border-radius: 10px; + border: none; + margin: 1rem 0; + background-color: #f0f0f0; + color: #000; + box-shadow: 0 3px 6px rgba(0, 0, 0, 0.2); } -#predict-btn{ - -webkit-border-radius: 19; - -moz-border-radius: 19; + +#predict-btn { font-family: "Fredoka", sans-serif; - border-radius: 19px; - color: #000000; - font-size: 20px; + border-radius: 19px; + color: #000; + font-size: 1.2rem; background: #FFEB55; - padding: 10px 30px; - margin: 10px auto; - text-decoration: none; + padding: 0.75rem 2.5rem; border: none; cursor: pointer; + transition: background 0.3s ease; } + #predict-btn:hover { - background: #FBD786; - text-decoration: none; + background: #fbd786; } -#price{ - margin-top: 0; - font-size: 1.5rem; - color: #ffee00; - font-weight: 700; +#price-result { + margin-top: 1.5rem; } +#price { + margin-top: 0; + font-size: 1.8rem; + color: #FFEB55; + font-weight: bold; +} -#repo-info{ +#repo-info { background-color: #fffefe10; - position: absolute; - bottom: 0px; - width: 100%; - text-align: center; + text-align: center; + padding: 1.5rem; + box-shadow: 0 -1px 10px rgba(0, 0, 0, 0.2); } -#repo-info p{ - margin: 0; + +#repo-info p { + margin: 0.5rem 0; + color: #FFF; } -#repo-info a{ - color:#ffee00; + +#repo-info a { + color: #FFEB55; + text-decoration: none; + font-weight: bold; + transition: color 0.3s ease; +} + +#repo-info a:hover { + color: #fbd786; } #crypto-suggestions { @@ -162,14 +130,14 @@ h1, h2, h3{ position: absolute; border: 1px solid #ccc; border-radius: 5px; - background-color: white; + background-color: #fff; max-height: 150px; overflow-y: auto; - width: 384px; + width: 80%; z-index: 1000; - color: #000000; - left: 3rem; - top: 7rem; + left: 10%; + color: #000; + box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2); } #crypto-suggestions div { @@ -181,6 +149,17 @@ h1, h2, h3{ background-color: #f0f0f0; } -#crypto-form { - position: relative; -} \ No newline at end of file +@media (min-width: 768px) { + .central { + flex-direction: row; + justify-content: space-between; + } + + #crypto-price-predictor { + width: 45%; + } + + .tagline { + font-size: 2.5rem; + } +} From d5c37a4f976d26dac4758c5c536b44dc70cd9d25 Mon Sep 17 00:00:00 2001 From: Mugundh Date: Tue, 1 Oct 2024 19:49:04 +0530 Subject: [PATCH 2/4] Added media queries for mobile responsiveness --- styles.css | 42 ++++++++++++++++++++++++------------------ 1 file changed, 24 insertions(+), 18 deletions(-) diff --git a/styles.css b/styles.css index 5829cc6..7e821ff 100644 --- a/styles.css +++ b/styles.css @@ -1,7 +1,7 @@ body { margin: 0; padding: 0; - background: linear-gradient(135deg, #240b36, #c31432); + background: linear-gradient(135deg, #240b36, #c31432); /* Modern gradient background */ color: white; height: 100vh; font-family: "Gowun Batang", serif; @@ -20,9 +20,9 @@ h1, h2, h3 { text-align: center; background-color: #2E073F; color: #EBD3F8; - padding: 1.8rem; + padding: 1.5rem; font-family: "Mate SC", serif; - font-size: 2.5rem; /* Increased font size for emphasis */ + font-size: 2rem; /* Reduced size for mobile */ box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3); } @@ -30,34 +30,33 @@ h1, h2, h3 { text-align: center; font-family: "Fredoka", sans-serif; font-weight: 500; - font-size: 2rem; + font-size: 1.8rem; /* Smaller for mobile */ color: #FFEB55; - margin: 1.5rem auto; - max-width: 70%; + margin: 1.2rem auto; + max-width: 85%; } .central { display: flex; - justify-content: center; - margin: 2rem 1rem; - gap: 2rem; flex-direction: column; align-items: center; + margin: 1.5rem 1rem; + gap: 1.5rem; } #crypto-price-predictor { background: rgba(255, 255, 255, 0.1); border-radius: 15px; - padding: 2rem; - font-size: 1.1rem; + padding: 1.5rem; + font-size: 1rem; /* Smaller for mobile */ text-align: center; width: 90%; - max-width: 600px; + max-width: 400px; box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2); } #crypto-price-predictor h2 { - margin-bottom: 1rem; + margin-bottom: 0.8rem; color: #FFEB55; font-family: "Fredoka", sans-serif; } @@ -66,7 +65,7 @@ h1, h2, h3 { display: block; width: 100%; font-size: 1.2rem; - padding: 0.75rem; + padding: 0.8rem; border-radius: 10px; border: none; margin: 1rem 0; @@ -81,7 +80,7 @@ h1, h2, h3 { color: #000; font-size: 1.2rem; background: #FFEB55; - padding: 0.75rem 2.5rem; + padding: 0.75rem 2rem; border: none; cursor: pointer; transition: background 0.3s ease; @@ -97,7 +96,7 @@ h1, h2, h3 { #price { margin-top: 0; - font-size: 1.8rem; + font-size: 1.5rem; color: #FFEB55; font-weight: bold; } @@ -107,6 +106,7 @@ h1, h2, h3 { text-align: center; padding: 1.5rem; box-shadow: 0 -1px 10px rgba(0, 0, 0, 0.2); + font-size: 1rem; } #repo-info p { @@ -133,9 +133,9 @@ h1, h2, h3 { background-color: #fff; max-height: 150px; overflow-y: auto; - width: 80%; + width: 90%; /* Adjusted for mobile */ z-index: 1000; - left: 10%; + left: 5%; /* Centered for mobile */ color: #000; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2); } @@ -153,6 +153,7 @@ h1, h2, h3 { .central { flex-direction: row; justify-content: space-between; + align-items: flex-start; } #crypto-price-predictor { @@ -161,5 +162,10 @@ h1, h2, h3 { .tagline { font-size: 2.5rem; + max-width: 70%; + } + + #header h1 { + font-size: 3rem; } } From 6b53c2dacf3a19e2f34912bca0fa11f74006635a Mon Sep 17 00:00:00 2001 From: Mugundh Date: Tue, 1 Oct 2024 20:14:22 +0530 Subject: [PATCH 3/4] Improved the crypto predictor box stylings --- styles.css | 65 +++++++++++++++++++++++++++++++++++++----------------- 1 file changed, 45 insertions(+), 20 deletions(-) diff --git a/styles.css b/styles.css index 7e821ff..80394e2 100644 --- a/styles.css +++ b/styles.css @@ -1,7 +1,7 @@ body { margin: 0; padding: 0; - background: linear-gradient(135deg, #240b36, #c31432); /* Modern gradient background */ + background: linear-gradient(135deg, #240b36, #c31432); color: white; height: 100vh; font-family: "Gowun Batang", serif; @@ -20,9 +20,9 @@ h1, h2, h3 { text-align: center; background-color: #2E073F; color: #EBD3F8; - padding: 1.5rem; + padding: 1.2rem; font-family: "Mate SC", serif; - font-size: 2rem; /* Reduced size for mobile */ + font-size: 1.8rem; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3); } @@ -30,9 +30,9 @@ h1, h2, h3 { text-align: center; font-family: "Fredoka", sans-serif; font-weight: 500; - font-size: 1.8rem; /* Smaller for mobile */ + font-size: 1.6rem; color: #FFEB55; - margin: 1.2rem auto; + margin: 1rem auto; max-width: 85%; } @@ -40,47 +40,50 @@ h1, h2, h3 { display: flex; flex-direction: column; align-items: center; - margin: 1.5rem 1rem; - gap: 1.5rem; + margin: 1.2rem 1rem; + gap: 1rem; } #crypto-price-predictor { background: rgba(255, 255, 255, 0.1); border-radius: 15px; - padding: 1.5rem; - font-size: 1rem; /* Smaller for mobile */ + padding: 1.2rem; + font-size: 0.9rem; text-align: center; - width: 90%; + width: 95%; max-width: 400px; box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2); } #crypto-price-predictor h2 { - margin-bottom: 0.8rem; + margin-bottom: 0.6rem; color: #FFEB55; font-family: "Fredoka", sans-serif; + font-size: 1.3rem; } #crypto { display: block; width: 100%; - font-size: 1.2rem; - padding: 0.8rem; + max-width: 100%; /* Ensures it stays within the container */ + font-size: 1.1rem; + padding: 0.7rem; border-radius: 10px; border: none; - margin: 1rem 0; + margin: 0.8rem 0; background-color: #f0f0f0; color: #000; box-shadow: 0 3px 6px rgba(0, 0, 0, 0.2); + box-sizing: border-box; /* Ensures padding does not cause overflow */ } #predict-btn { font-family: "Fredoka", sans-serif; border-radius: 19px; color: #000; - font-size: 1.2rem; + font-size: 1.1rem; background: #FFEB55; - padding: 0.75rem 2rem; + padding: 0.6rem 1.8rem; border: none; cursor: pointer; transition: background 0.3s ease; @@ -91,7 +94,7 @@ h1, h2, h3 { } #price-result { - margin-top: 1.5rem; + margin-top: 1.2rem; } #price { @@ -133,9 +136,9 @@ h1, h2, h3 { background-color: #fff; max-height: 150px; overflow-y: auto; - width: 90%; /* Adjusted for mobile */ + width: 90%; z-index: 1000; - left: 5%; /* Centered for mobile */ + left: 5%; color: #000; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2); } @@ -165,7 +168,29 @@ h1, h2, h3 { max-width: 70%; } - #header h1 { + .header h1 { font-size: 3rem; } } + +/* Additional mobile styling improvements */ +@media (max-width: 767px) { + #crypto-price-predictor { + width: 100%; /* Full width for small screens */ + padding: 1.5rem; /* Better spacing */ + } + + #crypto { + font-size: 1rem; /* Adjust font size for smaller screens */ + } + + #predict-btn { + font-size: 1rem; /* Adjust button font size */ + padding: 0.5rem 1.2rem; + } + + .tagline { + font-size: 1.4rem; /* Smaller tagline for mobile */ + max-width: 90%; + } +} From 390b67afc55b69f5761c2cd818e36e2ac98f2c83 Mon Sep 17 00:00:00 2001 From: Mugundh Date: Tue, 1 Oct 2024 20:42:51 +0530 Subject: [PATCH 4/4] Added mobile responsiveness to tagline and footer --- styles.css | 39 ++++++++++++++++++++++++++++++++------- 1 file changed, 32 insertions(+), 7 deletions(-) diff --git a/styles.css b/styles.css index 80394e2..288ed7d 100644 --- a/styles.css +++ b/styles.css @@ -74,7 +74,7 @@ h1, h2, h3 { background-color: #f0f0f0; color: #000; box-shadow: 0 3px 6px rgba(0, 0, 0, 0.2); - box-sizing: border-box; /* Ensures padding does not cause overflow */ + box-sizing: border-box; } #predict-btn { @@ -173,24 +173,49 @@ h1, h2, h3 { } } -/* Additional mobile styling improvements */ @media (max-width: 767px) { #crypto-price-predictor { - width: 100%; /* Full width for small screens */ - padding: 1.5rem; /* Better spacing */ + width: 100%; + padding: 1.2rem; } #crypto { - font-size: 1rem; /* Adjust font size for smaller screens */ + font-size: 1rem; } #predict-btn { - font-size: 1rem; /* Adjust button font size */ + font-size: 1rem; padding: 0.5rem 1.2rem; } .tagline { - font-size: 1.4rem; /* Smaller tagline for mobile */ + font-size: 1rem; max-width: 90%; + text-align: center; + margin: 0.8rem auto; + } + + .header h1 { + font-size: 1.4rem; + } + + #repo-info { + padding: 1rem; + font-size: 0.9rem; + } + + #repo-info h2{ + font-size: 1rem; + } + + #repo-info p { + font-size: 0.9rem; + margin: 0.5rem auto; + max-width: 90%; + } + + #repo-info a { + font-size: 1rem; + word-wrap: break-word; } }