From df9ae98f7dab49dbd91f50702ba637dc6eb8d3ad Mon Sep 17 00:00:00 2001 From: LirPes Date: Sun, 16 Nov 2025 21:09:40 +0200 Subject: [PATCH 01/14] added my name --- newsletter-sign-up-with-success-message-main/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/newsletter-sign-up-with-success-message-main/index.html b/newsletter-sign-up-with-success-message-main/index.html index 8e7329b..78eb8ca 100644 --- a/newsletter-sign-up-with-success-message-main/index.html +++ b/newsletter-sign-up-with-success-message-main/index.html @@ -46,7 +46,7 @@
Challenge by Frontend Mentor. - Coded by Your Name Here. + Coded by Liron.
\ No newline at end of file From 95a97b7c26c191db18a8fa7c28266932aa52f38e Mon Sep 17 00:00:00 2001 From: LirPes Date: Mon, 17 Nov 2025 02:18:51 +0200 Subject: [PATCH 02/14] created desktop design --- .../desktop-design.css | 88 +++++++++++++++++++ .../index.html | 50 +++++++---- 2 files changed, 122 insertions(+), 16 deletions(-) create mode 100644 newsletter-sign-up-with-success-message-main/desktop-design.css diff --git a/newsletter-sign-up-with-success-message-main/desktop-design.css b/newsletter-sign-up-with-success-message-main/desktop-design.css new file mode 100644 index 0000000..982d74f --- /dev/null +++ b/newsletter-sign-up-with-success-message-main/desktop-design.css @@ -0,0 +1,88 @@ +html { + height: 100vh; +} + +body { + background-color: hsl(235, 18%, 26%); + display: flex; + flex-direction: column; + justify-content: center; + align-items: center; + height: 100%; + font-family: "Roboto", sans-serif; +} + +article { + display: flex; + flex-direction: row-reverse; + justify-content: space-evenly; + background-color: hsl(0, 0%, 100%); + border-radius: 25px; + max-width: 800px; + max-height: 400px; + color: hsl(234, 29%, 20%); + font-size: 15px; + padding-bottom: 15px; + padding-top: 15px; + padding-left: 30px; +} + +article img { + margin-right: -10px; +} + +article main { + display: flex; + flex-direction: column; + justify-content: center; + width: 50%; +} + +article main h1 { + font-weight: 700; + font-size: 40px; + line-height: 30px; + position: relative; +} + +.article-content { + gap: 10px; +} + +.bullet-point { + display: flex; + gap: 20px; + margin-bottom: -25px; +} + +.bullet-point img { + width: 15px; +} + +article form { + display: flex; + flex-direction: column; + margin-top: 30px; + padding-bottom: 30px; +} + +article label { + font-weight: 700; + font-size: 12px; +} + +article input { + height: 40px; + border-radius: 5px; + margin-top: 10px; + border-color: hsl(0, 0%,58%); + border-width: 0.5px; + color: hsl(0, 0%,58%); +} + +article input[type=button] { + background-color: hsl(234, 29%, 20%); + text-align: center; + color: white; + font-weight: 700; +} diff --git a/newsletter-sign-up-with-success-message-main/index.html b/newsletter-sign-up-with-success-message-main/index.html index 78eb8ca..5b42b40 100644 --- a/newsletter-sign-up-with-success-message-main/index.html +++ b/newsletter-sign-up-with-success-message-main/index.html @@ -5,6 +5,10 @@ + + + + Frontend Mentor | Newsletter sign-up form with success message @@ -17,33 +21,47 @@ - - Stay updated! - - Join 60,000+ product managers receiving monthly updates on: - - Product discovery and building what matters - Measuring to ensure updates are a success - And much more! - - Email address - email@company.com - +
+ +
+
+

Stay updated!

+

Join 60,000+ product managers recieving monthly updates on:

+
+ +

Product discovery and building what matters

+
+
+ +

Measuring to ensure updates are a success

+
+
+ +

And much more!

+
+
+
+ + + +
+
+
+ + Sign-up form end --> - Thanks for subscribing! + - + Success message end -->
Challenge by Frontend Mentor. Coded by Liron. From 60183354a5fa2a8a59028e674ded2a0ca509517d Mon Sep 17 00:00:00 2001 From: LirPes Date: Mon, 17 Nov 2025 02:25:55 +0200 Subject: [PATCH 03/14] added button hover color --- .../desktop-design.css | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/newsletter-sign-up-with-success-message-main/desktop-design.css b/newsletter-sign-up-with-success-message-main/desktop-design.css index 982d74f..18a8598 100644 --- a/newsletter-sign-up-with-success-message-main/desktop-design.css +++ b/newsletter-sign-up-with-success-message-main/desktop-design.css @@ -86,3 +86,7 @@ article input[type=button] { color: white; font-weight: 700; } + +article input[type=button]:hover { + background-color: hsl(4, 100%, 67%); +} From 1803d6743c642d4dffd2fe9587d658c0497e1e01 Mon Sep 17 00:00:00 2001 From: LirPes Date: Tue, 18 Nov 2025 01:52:58 +0200 Subject: [PATCH 04/14] created mobile design --- .../desktop-design.css | 128 +++++++++++++----- .../index.html | 9 +- 2 files changed, 100 insertions(+), 37 deletions(-) diff --git a/newsletter-sign-up-with-success-message-main/desktop-design.css b/newsletter-sign-up-with-success-message-main/desktop-design.css index 18a8598..8cfadac 100644 --- a/newsletter-sign-up-with-success-message-main/desktop-design.css +++ b/newsletter-sign-up-with-success-message-main/desktop-design.css @@ -8,34 +8,110 @@ body { flex-direction: column; justify-content: center; align-items: center; - height: 100%; + height: 100vh; font-family: "Roboto", sans-serif; } +@media(min-width: 600px) { + article { + max-height: 400px; + flex-direction: row-reverse; + justify-content: space-around; + border-radius: 25px; + padding-bottom: 15px; + padding-top: 15px; + padding-left: 30px; + } + article img { + height: 100%; + } + article main { + flex-direction: column; + justify-content: center; + width: 50%; + } + .article-content { + gap: 10px; + } + article form { + margin-top: 30px; + padding-bottom: 30px; + } + + .bullet-point { + gap: 20px; + margin-bottom: -25px; + align-items: baseline; + } + .bullet-point img { + width: 15px; + margin-top: 5px; + } + article input { + height: 40px; + margin-top: 10px; + border-width: 0.5px; + } +} + +@media(max-width: 600px) { + article { + height: 100%; + width: 100%; + flex-direction: column; + padding-bottom: 15px; + } + article main { + flex-direction: column; + } + .article-content { + padding: 30px; + } + article form { + padding-left: 30px; + padding-right: 30px; + padding-bottom: 30px; + } + article img { + height: 100%; + width: 100%; + object-fit: cover; + border-bottom-left-radius: 20px; + border-bottom-right-radius: 20px; + } + .bullet-point img { + width: 20px; + } + .bullet-point { + margin-bottom: -20px; + gap: 15px; + align-items: center; + } + article input { + height: 50px; + margin-top: 10px; + border-width: 0.5px; + } + article input[type=button] { + margin-top: 25px; + } + +} + +.bullet-point { + display: flex; +} + + article { display: flex; - flex-direction: row-reverse; - justify-content: space-evenly; background-color: hsl(0, 0%, 100%); - border-radius: 25px; - max-width: 800px; - max-height: 400px; color: hsl(234, 29%, 20%); font-size: 15px; - padding-bottom: 15px; - padding-top: 15px; - padding-left: 30px; -} - -article img { - margin-right: -10px; } article main { display: flex; - flex-direction: column; - justify-content: center; - width: 50%; } article main h1 { @@ -45,25 +121,9 @@ article main h1 { position: relative; } -.article-content { - gap: 10px; -} - -.bullet-point { - display: flex; - gap: 20px; - margin-bottom: -25px; -} - -.bullet-point img { - width: 15px; -} - article form { display: flex; flex-direction: column; - margin-top: 30px; - padding-bottom: 30px; } article label { @@ -72,9 +132,8 @@ article label { } article input { - height: 40px; border-radius: 5px; - margin-top: 10px; + border-width: 0.5px; border-color: hsl(0, 0%,58%); border-width: 0.5px; color: hsl(0, 0%,58%); @@ -85,6 +144,7 @@ article input[type=button] { text-align: center; color: white; font-weight: 700; + border: none; } article input[type=button]:hover { diff --git a/newsletter-sign-up-with-success-message-main/index.html b/newsletter-sign-up-with-success-message-main/index.html index 5b42b40..d1223fb 100644 --- a/newsletter-sign-up-with-success-message-main/index.html +++ b/newsletter-sign-up-with-success-message-main/index.html @@ -22,7 +22,10 @@
- + + + +

Stay updated!

@@ -62,9 +65,9 @@

Stay updated!

Dismiss message Success message end --> -
+ \ No newline at end of file From 5aa50f7fe81edb93984df6e3664f2e5c8f7c8c1e Mon Sep 17 00:00:00 2001 From: LirPes Date: Wed, 19 Nov 2025 16:01:44 +0200 Subject: [PATCH 05/14] fixed desktop design --- .../desktop-design.css | 24 ++++++++++++++----- 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/newsletter-sign-up-with-success-message-main/desktop-design.css b/newsletter-sign-up-with-success-message-main/desktop-design.css index 8cfadac..3e1bb3d 100644 --- a/newsletter-sign-up-with-success-message-main/desktop-design.css +++ b/newsletter-sign-up-with-success-message-main/desktop-design.css @@ -1,5 +1,8 @@ html { - height: 100vh; + display: flex; + justify-content: center; + align-items: center; + height: 100%; } body { @@ -8,27 +11,35 @@ body { flex-direction: column; justify-content: center; align-items: center; - height: 100vh; + font-family: "Roboto", sans-serif; } @media(min-width: 600px) { article { max-height: 400px; + max-width: 700px; flex-direction: row-reverse; justify-content: space-around; border-radius: 25px; - padding-bottom: 15px; - padding-top: 15px; + padding: 20px; padding-left: 30px; } + article picture { + max-width: 300px; + display: flex; + justify-content: end; + } article img { height: 100%; } article main { flex-direction: column; justify-content: center; - width: 50%; + padding-left: 15px; + padding-top: 15px; + width: 50%; + height: 50%; } .article-content { gap: 10px; @@ -39,7 +50,7 @@ body { } .bullet-point { - gap: 20px; + gap: 10px; margin-bottom: -25px; align-items: baseline; } @@ -108,6 +119,7 @@ article { background-color: hsl(0, 0%, 100%); color: hsl(234, 29%, 20%); font-size: 15px; + font-weight: 400; } article main { From 4739e66e417b6153f321d24a0d7e65cae7a8d4dd Mon Sep 17 00:00:00 2001 From: LirPes Date: Wed, 19 Nov 2025 16:32:05 +0200 Subject: [PATCH 06/14] fix bullet points design --- .../desktop-design.css | 16 ++++--------- .../index.html | 24 +++++++++---------- 2 files changed, 17 insertions(+), 23 deletions(-) diff --git a/newsletter-sign-up-with-success-message-main/desktop-design.css b/newsletter-sign-up-with-success-message-main/desktop-design.css index 3e1bb3d..d1ed4ad 100644 --- a/newsletter-sign-up-with-success-message-main/desktop-design.css +++ b/newsletter-sign-up-with-success-message-main/desktop-design.css @@ -90,14 +90,6 @@ body { border-bottom-left-radius: 20px; border-bottom-right-radius: 20px; } - .bullet-point img { - width: 20px; - } - .bullet-point { - margin-bottom: -20px; - gap: 15px; - align-items: center; - } article input { height: 50px; margin-top: 10px; @@ -109,11 +101,13 @@ body { } -.bullet-point { - display: flex; +.success-icon { + float: left; + width: 20px; + height: 20px; + margin-right: 10px; } - article { display: flex; background-color: hsl(0, 0%, 100%); diff --git a/newsletter-sign-up-with-success-message-main/index.html b/newsletter-sign-up-with-success-message-main/index.html index d1223fb..9dbb4eb 100644 --- a/newsletter-sign-up-with-success-message-main/index.html +++ b/newsletter-sign-up-with-success-message-main/index.html @@ -30,18 +30,18 @@

Stay updated!

Join 60,000+ product managers recieving monthly updates on:

-
- -

Product discovery and building what matters

-
-
- -

Measuring to ensure updates are a success

-
-
- -

And much more!

-
+

+ + Product discovery and building what matters +

+

+ + Measuring to ensure updates are a success +

+

+ + And much more fun! +

From 8246d5e3dea5e73524c14cdd0ebadcd91f7c6b18 Mon Sep 17 00:00:00 2001 From: LirPes Date: Wed, 19 Nov 2025 16:46:13 +0200 Subject: [PATCH 07/14] remove redundent css --- .../desktop-design.css | 32 +++++-------------- .../index.html | 2 +- 2 files changed, 9 insertions(+), 25 deletions(-) diff --git a/newsletter-sign-up-with-success-message-main/desktop-design.css b/newsletter-sign-up-with-success-message-main/desktop-design.css index d1ed4ad..5d73542 100644 --- a/newsletter-sign-up-with-success-message-main/desktop-design.css +++ b/newsletter-sign-up-with-success-message-main/desktop-design.css @@ -20,9 +20,9 @@ body { max-height: 400px; max-width: 700px; flex-direction: row-reverse; - justify-content: space-around; + justify-content: space-between; border-radius: 25px; - padding: 20px; + padding: 15px; padding-left: 30px; } article picture { @@ -30,33 +30,17 @@ body { display: flex; justify-content: end; } - article img { - height: 100%; - } + article main { flex-direction: column; justify-content: center; padding-left: 15px; padding-top: 15px; - width: 50%; - height: 50%; - } - .article-content { - gap: 10px; - } - article form { - margin-top: 30px; - padding-bottom: 30px; } - .bullet-point { - gap: 10px; - margin-bottom: -25px; - align-items: baseline; - } - .bullet-point img { - width: 15px; - margin-top: 5px; + article form { + margin-top: 20px; + padding-bottom: 10px; } article input { height: 40px; @@ -103,8 +87,8 @@ body { .success-icon { float: left; - width: 20px; - height: 20px; + width: 15px; + height: 15px; margin-right: 10px; } diff --git a/newsletter-sign-up-with-success-message-main/index.html b/newsletter-sign-up-with-success-message-main/index.html index 9dbb4eb..1ff4c74 100644 --- a/newsletter-sign-up-with-success-message-main/index.html +++ b/newsletter-sign-up-with-success-message-main/index.html @@ -45,7 +45,7 @@

Stay updated!

- +
From 936c0009b85ebd856c6ea5638f74d68199ce1f09 Mon Sep 17 00:00:00 2001 From: LirPes Date: Wed, 19 Nov 2025 17:17:45 +0200 Subject: [PATCH 08/14] rename css file --- .../index.html | 6 ++---- ...esktop-design.css => subscribe-page-design.css} | 14 +++++++++----- 2 files changed, 11 insertions(+), 9 deletions(-) rename newsletter-sign-up-with-success-message-main/{desktop-design.css => subscribe-page-design.css} (92%) diff --git a/newsletter-sign-up-with-success-message-main/index.html b/newsletter-sign-up-with-success-message-main/index.html index 1ff4c74..a5f9c54 100644 --- a/newsletter-sign-up-with-success-message-main/index.html +++ b/newsletter-sign-up-with-success-message-main/index.html @@ -5,7 +5,7 @@ - + @@ -51,12 +51,10 @@

Stay updated!

- + -
+
-
+ - - + +
- - - + + - + - + Frontend Mentor | Newsletter sign-up form with success message diff --git a/newsletter-sign-up-with-success-message-main/function.js b/newsletter-sign-up-with-success-message-main/script.js similarity index 88% rename from newsletter-sign-up-with-success-message-main/function.js rename to newsletter-sign-up-with-success-message-main/script.js index d1b6461..04bf1c6 100644 --- a/newsletter-sign-up-with-success-message-main/function.js +++ b/newsletter-sign-up-with-success-message-main/script.js @@ -12,7 +12,7 @@ function send(event) { function invalidEmail() { const emailInput = document.getElementById("email-address"); - const invalidEmailLabel = document.getElementsByClassName("invalid-email-label")[0]; + const invalidEmailLabel = document.querySelector(".invalid-email-label"); emailInput.classList.add("invalid"); invalidEmailLabel.classList.add("invalid"); } \ No newline at end of file diff --git a/newsletter-sign-up-with-success-message-main/subscribe-page-design.css b/newsletter-sign-up-with-success-message-main/style.css similarity index 100% rename from newsletter-sign-up-with-success-message-main/subscribe-page-design.css rename to newsletter-sign-up-with-success-message-main/style.css From da6cf886af332c74968d24d64ea8c902bafdd61e Mon Sep 17 00:00:00 2001 From: LirPes Date: Mon, 1 Dec 2025 01:11:27 +0200 Subject: [PATCH 13/14] change px to rem --- .../style.css | 127 +++++++++--------- 1 file changed, 61 insertions(+), 66 deletions(-) diff --git a/newsletter-sign-up-with-success-message-main/style.css b/newsletter-sign-up-with-success-message-main/style.css index bb5c7fa..cd3526b 100644 --- a/newsletter-sign-up-with-success-message-main/style.css +++ b/newsletter-sign-up-with-success-message-main/style.css @@ -1,29 +1,37 @@ -html { - display: flex; - justify-content: center; - align-items: center; - min-height: 100vh; +@font-face { + font-family:Roboto ; + src: url(./assets/fonts/Roboto-Regular.ttf); } -body { - background-color: hsl(235, 18%, 26%); +:root { + --primary-bg-color: hsl(235, 18%, 26%); + --primary-color: hsl(234, 29%, 20%); + --hover-button-color: hsl(4, 100%, 67%); + --form-bg-color: hsl(0, 0%, 100%); + --form-input-color: hsl(0, 0%,58%); +} + +html, body { + background-color: var(--primary-bg-color); display: flex; flex-direction: column; justify-content: center; align-items: center; font-family: "Roboto", sans-serif; + min-height: 100vh; + height: 100%; } @media(min-width: 529px) { .subscribe-form { - max-height: 400px; - max-width: 800px; + max-height: 25rem; + max-width: 50rem; flex-direction: row-reverse; justify-content: space-between; - border-radius: 25px; - padding: 20px; - padding-left: 30px; - gap: 30px; + border-radius: 1.5rem; + padding: 1.25rem; + padding-left: 2rem; + gap: 2rem; } .subscribe-form picture { max-width: 300px; @@ -33,8 +41,8 @@ body { .subscribe-form main { flex-direction: column; justify-content: center; - padding-left: 15px; - padding-top: 15px; + padding-left: 1rem; + padding-top: 1rem; max-height: 370px; } .article-content { @@ -42,72 +50,62 @@ body { } .subscribe-form form { - margin-top: 20px; - padding-bottom: 20px; + margin-top: 1rem; + padding-bottom: 1rem; max-width: 350px;; } .subscribe-success.active { max-width: 340px; height: 350px; - border-radius: 7%; - padding: 50px; - } - .subscribe-success.active input[type=button] { - margin-top: 20px; + border-radius: 1.5rem; + padding: 3rem; } } @media(max-width: 528px) { .subscribe-form { height: 100%; - width: 100%; flex-direction: column; - padding-bottom: 15px; + padding-bottom: 1rem; } .subscribe-form main { flex-direction: column; } .article-content { - padding: 30px; + padding: 2rem; } .subscribe-form form { - padding-left: 30px; - padding-right: 30px; - padding-bottom: 30px; + padding-left: 2rem; + padding-right: 2rem; + padding-bottom: 2rem; } .subscribe-form picture { object-fit: cover; - border-bottom-left-radius: 20px; - border-bottom-right-radius: 20px; + border-bottom-left-radius: 1rem; + border-bottom-right-radius: 1rem; } article input[type=submit] { - margin-top: 25px; - height: 50px; + margin-top: 1.5rem; } .subscribe-success.active { height: 90%; width: 90%; padding: 10%; } - .subscribe-success.active header { - margin-top: 40%; - } - .subscribe-success.active input { - margin-top: 90%; - } } .subscribe-form .icon-list { float: left; - margin-right: 10px; + margin-right: 0.5rem; } .subscribe-form { display: flex; - background-color: hsl(0, 0%, 100%); - color: hsl(234, 29%, 20%); - font-size: 15px; + background-color: var(--form-bg-color); + color: var(--primary-color); + font-size: 1rem; font-weight: 400; + margin: 0 auto; } .subscribe-form main { @@ -116,8 +114,8 @@ body { .subscribe-form main h1 { font-weight: 700; - font-size: 40px; - line-height: 30px; + font-size: 2.5rem; + line-height: 2rem; position: relative; } @@ -128,43 +126,41 @@ body { .subscribe-form label { font-weight: 700; - font-size: 12px; + font-size: 0.75rem; } input { - border-radius: 5px; - border-width: 0.5px; - border-color: hsl(0, 0%,58%); - border-width: 0.5px; - color: hsl(0, 0%,58%); - height: 40px; - margin-top: 10px; - border-width: 0.5px; + border-radius: 0.3rem; + border-width: 0.05rem; + border-color: var(--form-input-color); + color: var(--form-input-color); + margin-top: 0.5rem; outline: 0; + height: 2rem } input[type=submit], input[type=button] { - background-color: hsl(234, 29%, 20%); + background-color: var(--primary-color); text-align: center; - color: white; + color: var(--form-bg-color); font-weight: 700; border: none; } input[type=email] { - color: hsl(234, 29%, 20%); + color: var(--primary-color); } #email-address.invalid { - border-color: hsl(4, 100%, 67%); + border-color: var(--hover-button-color); } .invalid-email-label.invalid { - color: hsl(4, 100%, 67%); + color: var(--hover-button-color); } .invalid-email-label { - color: hsl(0, 0%, 100%); + color: var(--form-bg-color);; } .labels { @@ -173,31 +169,29 @@ input[type=email] { } input[type=submit]:hover, input[type=button]:hover { - background-color: hsl(4, 100%, 67%); + background-color: var(--hover-button-color); } .subscribe-form.active{ display: none; } -.subscribe-success{ +.subscribe-success { display: none; } .subscribe-success.active { display: flex; flex-direction: column; - background-color: hsl(0, 0%, 100%); - color: hsl(234, 29%, 20%); - font-size: 15px; + background-color: var(--form-bg-color); + color: var(--primary-color); + font-size: 1rem; font-weight: 400; } .subscribe-success.active h1 { font-weight: 800; font-size: 3em; - line-height: 1.1; - } .subscribe-success.active p { @@ -207,4 +201,5 @@ input[type=submit]:hover, input[type=button]:hover { .subscribe-success.active input[type=button] { height: 50px; + margin-top: auto; } \ No newline at end of file From e889adf10c238ac23b614d30b3635be8524a611a Mon Sep 17 00:00:00 2001 From: LirPes Date: Mon, 1 Dec 2025 01:11:51 +0200 Subject: [PATCH 14/14] import fonts in css file instead --- newsletter-sign-up-with-success-message-main/index.html | 1 - 1 file changed, 1 deletion(-) diff --git a/newsletter-sign-up-with-success-message-main/index.html b/newsletter-sign-up-with-success-message-main/index.html index 4d361a6..9e719dd 100644 --- a/newsletter-sign-up-with-success-message-main/index.html +++ b/newsletter-sign-up-with-success-message-main/index.html @@ -9,7 +9,6 @@ - Frontend Mentor | Newsletter sign-up form with success message