Skip to content
Closed
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
91 changes: 66 additions & 25 deletions Form-Controls/index.html
Original file line number Diff line number Diff line change
@@ -1,27 +1,68 @@
<!DOCTYPE html>
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<title>My form exercise</title>
<meta name="description" content="" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
</head>
<body>
<header>
<h1>Product Pick</h1>
</header>
<main>
<form>
<!-- write your html here-->
<!--
try writing out the requirements first as comments
this will also help you fill in your PR message later-->
</form>
</main>
<footer>
<!-- change to your name-->
<p>By HOMEWORK SOLUTION</p>
</footer>
</body>
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<title>My form exercise</title>
<meta name="description" content="" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
</head>
<body>
<header>
<h1>Product Pick</h1>
</header>
<main>
<form aria-label="order form">
<label for="name">name: </label>
<input
type="text"
name="name"
id="name"
minlength="2"
maxlength="100"
autocomplete="name"
pattern="[a-zA-ZÀ-ÖØ-öø-ÿ'\-\s]{2,100}"
aria-label="enter your name"
required />

<label for="email">email: </label>
<input
type="email"
name="email"
id="email"
aria-label="enter your email address"
required />

<label for="shirt-color">shirt color: </label>
<select
name="shirt-color"
id="shirt-color"
aria-label="select shirt color"
required>
<option value="red">red</option>
<option value="red">green</option>
<option value="red">blue</option>
</select>
<select
name="shirt-size"
id="shirt-size"
aria-label="select shirt size"
required>
<option value="xs">XS</option>
<option value="s">S</option>
<option value="m">M</option>
<option value="l">L</option>
<option value="xl">XL</option>
<option value="xxl">XXL</option>
</select>
<button type="submit" aria-label="submit order">
Check out
</button>
</form>
</main>
<footer>
<!-- change to your name-->
<p>By HOMEWORK SOLUTION</p>
</footer>
</body>
</html>
85 changes: 54 additions & 31 deletions Wireframe/index.html
Original file line number Diff line number Diff line change
@@ -1,33 +1,56 @@
<!DOCTYPE html>
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Wireframe</title>
<link rel="stylesheet" href="style.css" />
</head>
<body>
<header>
<h1>Wireframe</h1>
<p>
This is the default, provided code and no changes have been made yet.
</p>
</header>
<main>
<article>
<img src="placeholder.svg" alt="" />
<h2>Title</h2>
<p>
Lorem ipsum dolor sit amet consectetur adipisicing elit. Quisquam,
voluptates. Quisquam, voluptates.
</p>
<a href="">Read more</a>
</article>
</main>
<footer>
<p>
This is the default, provided code and no changes have been made yet.
</p>
</footer>
</body>
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Wireframe</title>
<link rel="stylesheet" href="style.css" />
</head>
<body>
<header>
<h1>Wireframe</h1>
<p>The essential tool to creating perfect web designs.</p>
</header>
<main>
<article>
<img src="placeholder.svg" alt="" />
<h2>The purpose of a README file</h2>
<p>
A README file is the first source of information to guide
anyone who visits your repository. What the code does, how
to contribute, or how to install and use it.
</p>
<a href="">Read more</a>
</article>
<article>
<img src="placeholder.svg" alt="" />
<h2>The purpose of a wireframe</h2>
<p>
A wireframe is used to express the layout of a visual medium
such as a newspaper, or web page. It helps designers and
programmers to get a simple overview of a design.
</p>
<a href="">Read more</a>
</article>
<article>
<img src="placeholder.svg" alt="" />
<h2>What is a git branch</h2>
<p>
A git branch is a copy of the code in a git repository.
Branches are created so that developers can work seperately
on specific features. Once a feature is completed it is
merged into main. If the creation of a feature is not
sucessful, for example there are too many bugs, the branch
can be delete without affecting the main branch.
</p>
<a href="">Read more</a>
</article>
</main>
<footer>
<p>
This is the default, provided code and no changes have been made
yet.
</p>
</footer>
</body>
</html>
102 changes: 66 additions & 36 deletions Wireframe/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -16,43 +16,73 @@ As well as useful links to learn more */
https://web.dev/articles/min-max-clamp
https://scrimba.com/learn-css-variables-c026
====== Design Palette ====== */

/* a basic reset to user agent stylesheets */
* {
margin: 0;
box-sizing: border-box;
}

:root {
--paper: oklch(7 0 0);
--ink: color-mix(in oklab, var(--color) 5%, black);
--font: 100%/1.5 system-ui;
--space: clamp(6px, 6px + 2vw, 15px);
--line: 1px solid;
--container: 1280px;
--paper: oklch(7 0 0);
--ink: color-mix(in oklab, var(--color) 5%, black);
--font: 100%/1.5 system-ui;
--space: clamp(6px, 6px + 2vw, 15px);
--line: 1px solid;
--container: 1280px;
}
/* ====== Base Elements ======
General rules for basic HTML elements in any context */
body {
background: var(--paper);
color: var(--ink);
font: var(--font);
background: var(--paper);
color: var(--ink);
font: var(--font);
display: flex;
flex-direction: column;
align-items: center;
gap: 2rem;
}
a {
padding: var(--space);
border: var(--line);
max-width: fit-content;
padding: var(--space);
border: var(--line);
max-width: fit-content;
}
img,
svg {
width: 100%;
object-fit: cover;
width: 100%;
object-fit: cover;
}
p {
margin-bottom: 0.5rem;
}
h1 {
margin-bottom: 1rem;
}
h2 {
margin-bottom: 0.8rem;
}
/* ====== Site Layout ======
Setting the overall rules for page regions
https://www.w3.org/WAI/tutorials/page-structure/regions/
*/
main {
max-width: var(--container);
margin: 0 auto calc(var(--space) * 4) auto;
max-width: var(--container);
margin: 0 auto calc(var(--space) * 4) auto;
min-height: 0;
}

header {
text-align: center;
}
footer {
position: fixed;
bottom: 0;
text-align: center;
position: fixed;
bottom: 0;
text-align: center;
border-top: 2px solid rgb(158, 158, 158);
padding: 1rem;
min-width: 100%;
background-color: rgb(54, 53, 53);
color: white;
}
/* ====== Articles Grid Layout ====
Setting the rules for how articles are placed in the main element.
Expand All @@ -62,28 +92,28 @@ https://developer.chrome.com/docs/devtools/css/grid
https://gridbyexample.com/learn/
*/
main {
display: grid;
grid-template-columns: 1fr 1fr;
gap: var(--space);
> *:first-child {
grid-column: span 2;
}
display: grid;
grid-template-columns: 1fr 1fr;
gap: var(--space);
> *:first-child {
grid-column: span 2;
}
}
/* ====== Article Layout ======
Setting the rules for how elements are placed in the article.
Now laying out just the INSIDE of the repeated card/article design.
Keeping things orderly and separate is the key to good, simple CSS.
*/
article {
border: var(--line);
padding-bottom: var(--space);
text-align: left;
display: grid;
grid-template-columns: var(--space) 1fr var(--space);
> * {
grid-column: 2/3;
}
> img {
grid-column: span 3;
}
border: var(--line);
padding-bottom: var(--space);
text-align: left;
display: grid;
grid-template-columns: var(--space) 1fr var(--space);
> * {
grid-column: 2/3;
}
> img {
grid-column: span 3;
}
}
Loading