Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 43 additions & 10 deletions newsletter-sign-up-with-success-message-main/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,54 @@
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <!-- displays site properly based on user's device -->

<link href="./style.css" type="text/css" rel="stylesheet">
<link rel="icon" type="image/png" sizes="32x32" href="./assets/images/favicon-32x32.png">

<title>Frontend Mentor | Newsletter sign-up form with success message</title>

<!-- Feel free to remove these styles or customise in your own stylesheet 👍 -->
<style>
<!-- <style>

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To track changes you have git, we dont need to leave commented code because this is a bad practice

.attribution { font-size: 11px; text-align: center; }
.attribution a { color: hsl(228, 45%, 44%); }
</style>
</style> -->
</head>
<body>

<!-- Sign-up form start -->
<div class="form">

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In terms of semantic you could also use the
form
tag

Why? HTML is like a book for developers, and we all know that form label means that we have a form

So its more readable

<div class="left">

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMO - I think that we can find a better name for this, and this is because if we will have a lot of html that should go to the left of some parent then it will be hard to distinguish between all of the other "left" parts

<div class="text">
<p class="header">Stay Updated!</p>
<p class="small">Join 60,000+ product managers receiving monthly<br>updates on:</p>

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Its not recommended to use br tag, its a bad practice.
Please space your text with css

</div>
<div class="checkbox">
<div class="row">
<img src="./assets/images/icon-list.svg" id="icon">
<p class="small" id="icons">Product discovery and building what matters</p>

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do you need both class and id? you can have multiple classes assigned into one element and this way you will not need to use id

</div>
<div class="row">
<img src="./assets/images/icon-list.svg" id="icon">
<p class="small" id="icons">Measuring to ensure updates are a success</p>
</div>
<div class="row">
<img src="./assets/images/icon-list.svg" id="icon">
<p class="small" id="icons">And much more!</p>
</div>
</div>

<div class="inputbox">
<p class="email">Email Address</p>
<form class="emailform">
<input class="input" placeholder="example@company.com">
<button class="sub">Subscribe to monthly newsletter</button>
</form>
</div>
</div>
<div class="right">

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same comment as above regarding the left/right class name

<img src="./assets/images/illustration-sign-up-desktop.svg" alt="rightimage">
</div>

Stay updated!
</div>
<!-- Stay updated!

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Its a bad practice to leave commented code, we have git to trace changes for it please remove this


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

Expand All @@ -29,24 +61,25 @@
Email address
email@company.com

Subscribe to monthly newsletter
Subscribe to monthly newsletter -->

<!-- Sign-up form end -->

<!-- Success message start -->

Thanks for subscribing!
<!-- Thanks for subscribing!

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I dont want to write you tons of times, so generally take the above comment about the commented out code and implement it all over this file


A confirmation email has been sent to ash@loremcompany.com.
Please open it and click the button inside to confirm your subscription.

Dismiss message
Dismiss message -->

<!-- Success message end -->

<div class="attribution">
<!-- <div class="attribution">
Challenge by <a href="https://www.frontendmentor.io?ref=challenge" target="_blank">Frontend Mentor</a>.
Coded by <a href="#">Your Name Here</a>.
</div>
</div> -->
</body>

</html>
117 changes: 117 additions & 0 deletions newsletter-sign-up-with-success-message-main/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
html{
height: 100%;
width: 100%;
display: flex;
justify-content: center;
align-items: center;
}
body{
background-color: hsl(234, 29%, 20%);
display: flex;
justify-content: center;
align-items: center;
width: 100%;
height: 100%;
font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey why do you need all of those fallbacks? didnt the task already had font inside a folder?

}
.form{
padding: 22px;
display: flex;
flex-direction: row;
background-color: hsl(0, 0%, 100%);
width: 860px;
height: 538px;
border-radius: 30px;
}

.right{
justify-content: right;
display:flex;
height:100%;
width:50%;
}

#rightimage{
position: relative;
width: 70%;
height: 100%;
}
.left{
margin-left: 50px;
justify-content: center;
flex-direction: column;
height:100%;
width:50%;
}

.inputbox{
flex-direction: column;
justify-content: flex-end;
}

.emailform{
display: flex;
flex-direction: column;
}

.text{
padding-top: 10px;
padding-bottom: 20px;
flex-direction: column;
}

.header{
color:hsl(234, 29%, 20%);
font-weight: 700;
font-size: 54px;
margin-bottom: 28px;
margin-top:40px;
}
#icon{

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do you need to use id? can you do the same with class?

height:20px;
width: 20px;
}
.small{
color:hsl(234, 29%, 20%);
font-weight: 400;
font-size: 16px;
margin-top: 0;
}

.input{
margin-bottom: 20px;
width: 365px;
height:36px;
}
#placeholder{

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same comment in here about the class usage

margin-left: 12px;
}
.checkbox{
margin-top: -4px;
}
.email{
color: hsl(234, 29%, 20%);
font-size: 10.5px;
font-weight: 700;
margin-top: 26px;
margin-bottom: 10px;
}
.sub{
background-color:hsl(234, 29%, 20%);
color:hsl(0, 0%, 100%);
font-weight: 700;
font-size: 12px;
width:379px;
height:44px;
border:none;
border-radius: 6px;

}
.row{
display: flex;
flex-direction: row;
}

#icons{
padding-left: 14px;
}