Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

London-ITP-Jan| Rawan_Almutairi| FormControl| week2 #274

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
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
Binary file not shown.
52 changes: 50 additions & 2 deletions Form-Controls/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<link rel="stylesheet" href="style.css" />
<title>My form exercise</title>
<meta name="description" content="" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
Expand All @@ -17,11 +18,58 @@ <h1>Product Pick</h1>
<!--
try writing out the requirements first as comments
this will also help you fill in your PR message later-->
<!-- Writing that out as a series of questions to ask yourself:

1. What is the customer's name? I must collect this data, and validate it. But what is a valid name? I must decide something.
2. What is the customer's email? I must make sure the email is valid. Email addresses have a consistent pattern.
3. What colour should this t-shirt be? I must give 3 options. How will I make sure they don't pick other colours?
4. What size does the customer want? I must give the following 6 options: XS, S, M, L, XL, XXL

All fields are required.-->
<p>
<label for="Customer_Name">Name:</label>
<input minlength="3" maxlength="10" type="text" id="name" name="customer_name"/>
<!-- I used the minlength and maxlength to validate the user input for the name in the range of 3-10 letters-->
</p>
<p>
<label for="Customer_Email">Email:</label>
<input type="email" id="email" email="Customer_Email"/>
<!-- using the input type email will validate the input put by the user to be in the email form-->
</p>

<p>
<label for="t-shirt color">
<span>T-Shirt Color:</span>

</label>
<select id="t-shirt-color" name="t-shirt-color"> <!-- giving the user choices to choose from using the select tag -->

Choose a reason for hiding this comment

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

One color from a defined set of three is supposed to be required. Please look at the task description for clarification

<option value="red">Red t-shirt</option>
<option value="blue">white t-shirt</option>
<option value="green">Green t-shirt</option>


</select>
</p>
<p>
<label for="t-shirt size">
<span>T-Shirt Size:</span>

</label>
<select id="t-shirt-size" name="t-shirt-size">

Choose a reason for hiding this comment

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

Also one size from a defined set of 6 sizes is supposed to be required. Please look at the task description again to understand what to do. Good Job!

<option value="XS">XS size</option>
<option value="S">S Size</option>
<option value="M">M size</option>
<option value="XL">XL Size</option>
<option value="XXL">XXL size</option>

</select>
</p>
<input type="submit" value="submit">
</form>
</main>
<footer>
<!-- change to your name-->
<h2>By HOMEWORK SOLUTION</h2>
<h2>Rawan Almutairi</h2>
</footer>
</body>
</html>
</html>
18 changes: 18 additions & 0 deletions Form-Controls/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
body {
background-color: bisque;
opacity: 0.8;
background-image: url("https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcTpy98dMScFbfgHyrpe367zKGKO7Ui66svLHg&s");
}

form {
width: 420px;
box-sizing: border-box;
border: 2px solid #ccc;
border-radius: 5px;
font-size: 22px;
background-color: rosybrown;
background-image: url("https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcTzGzaWTYf6UTVgexOHtNJHLtyiAJmUGSk8gA&s");
background-position: 20px 20px;
padding: 12px 20px 12px 40px;
transition: width 0.01s;
}
40 changes: 33 additions & 7 deletions Wireframe/index.html

Choose a reason for hiding this comment

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

This is okay, good job, however, the footer is supposed to be fixed to the bottom of the view port, please look at the task description to understand what to do. Good work!

Original file line number Diff line number Diff line change
Expand Up @@ -5,29 +5,55 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Wireframe</title>
<link rel="stylesheet" href="style.css" />
<meta http-equiv="Cache-Control" content="public, max-age=3600"> <!-- Cache for 1 hour.
I used chatgpt to help me understand the problem and how to solveit in a simpler way. -->
<meta name="description" content="this page explain: wireframe, README file, and a branch in git.">
<!-- I used lighthouse link to explain this more to me-->

</head>
<body>
<header>
<title>Wireframe</title>
<h1>Wireframe</h1>
<p>
This is the default, provided code and no changes have been made yet.
we are going to learn a few things.
</p>
</header>
<main>
<article>
<img src="placeholder.svg" alt="" />
<h2>Title</h2>
<img src="placeholder.svg" width="640" height="360" alt="a general image" />
<h2>What is the purpose of a README file?</h2>
<p>
Lorem ipsum dolor sit amet consectetur adipisicing elit. Quisquam,
voluptates. Quisquam, voluptates.
The README.md file acts as a guide for users and developers,
explaining what the project is, how to set it up, and how to contribute.
</p>
<a href="">Read more</a>
<a href="https://www.geeksforgeeks.org/what-is-readme-md-file/">Read more</a>
</article>
<article>
<img src="placeholder.svg" width="640" height="360" alt="a general image" />
<h2>What is the purpose of a wireframe?</h2>
<p>
to layout content and functionality on a page which takes into account user needs and user journeys.
Wireframes are used early in the development process to establish the basic structure of a page before visual design and content is added
</p>
<a href="https://www.experienceux.co.uk/faqs/what-is-wireframing/#:~:text=A%20wireframe%20is%20commonly%20used,design%20and%20content%20is%20added.">Read more</a>
</article>
<article>
<img src="placeholder.svg" width="640" height="360" alt="a general image" />
<h2>What is a branch in Git?</h2>
<p>
a pointer to a snapshot of your changes.
</p>
<a href="https://www.atlassian.com/git/tutorials/using-branches#:~:text=In%20Git%2C%20branches%20are%20a,branch%20to%20encapsulate%20your%20changes.">Read more</a>
</article>
</main>
<footer>
<p>
This is the default, provided code and no changes have been made yet.
check these resources for more info:
</p>
<a href="https://www.productplan.com/glossary/wireframe/">wireframe info</a>
<a href="https://www.w3schools.com/html/html5_semantic_elements.asp">Semantic HTML info</a>
<a href="https://developer.mozilla.org/en-US/docs/Web/CSS/:first-child">first-child info</a>
</footer>
</body>
</html>
5 changes: 3 additions & 2 deletions Wireframe/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,15 @@ As well as useful links to learn more */
--font: 100%/1.5 system-ui;
--space: clamp(6px, 6px + 2vw, 15px);
--line: 1px solid;
--container: 1280px;
--container: 880px;
}
/* ====== Base Elements ======
General rules for basic HTML elements in any context */
body {
background: var(--paper);
color: var(--ink);
font: var(--font);
text-align: center;
}
a {
padding: var(--space);
Expand All @@ -50,7 +51,7 @@ main {
margin: 0 auto calc(var(--space) * 4) auto;
}
footer {
position: fixed;
background: var(--paper);
bottom: 0;
text-align: center;
}
Expand Down