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
87 changes: 63 additions & 24 deletions Form-Controls/index.html
Original file line number Diff line number Diff line change
@@ -1,27 +1,66 @@
<!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-->
<h2>By HOMEWORK SOLUTION</h2>
</footer>
</body>
<head>
<meta charset="utf-8" />
<title>T-Shirt Order</title>
<meta name="viewport" content="width=device-width, initial-scale=1" />
</head>
<body>
<h2>Confirm Details and Choose Your T-Shirt</h2>

<!-- No action attribute per requirements -->
<form id="tshirt-form">
<div>
<label for="customer-name">Customer name</label><br>
<input
type="text"
id="customer-name"
name="customer_name"
autocomplete="name"
required
minlength="2"
maxlength="60"
/>
</div>

<div>
<label for="email">Email</label><br>
<input
type="email"
id="email"
name="email"
autocomplete="email"
inputmode="email"
required
/>
</div>

<div>
<label for="color">Colour</label><br>
<select id="color" name="color" required>
<option value="" disabled selected>Choose a colour</option>
<option value="blue">Blue</option>
<option value="black">Black</option>
<option value="white">White</option>
</select>
</div>

<div>
<label for="size">Size</label><br>
<select id="size" name="size" required>
<option value="" disabled selected>Choose a size</option>
<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>
</div><br>

<div>
<button type="submit">Submit</button>
</div>
</form>
</body>
</html>
39 changes: 31 additions & 8 deletions Wireframe/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,25 +8,48 @@
</head>
<body>
<header>
<h1>Wireframe</h1>
<h1>Key Concepts in Software Development</h1>
<p>
This is the default, provided code and no changes have been made yet.
The following elements—README files, wireframes, and Git branches—enhance clarity, collaboration, and efficiency in software development.
Below is a brief overview of their purposes, with more detailed information available in the attached links.
</p>
</header>
<main>
<article>
<img src="placeholder.svg" alt="" />
<h2>Title</h2>
<img src="https://www.openapis.org/wp-content/uploads/sites/31/2021/12/readme-blue-1024x185.png" alt="README file" />
<h2>The purpose of a README file</h2>
<p>
Lorem ipsum dolor sit amet consectetur adipisicing elit. Quisquam,
voluptates. Quisquam, voluptates.
A README file serves several important purposes in a project.
It explains what the project is, what it does, and why it is useful.
It also provides clear instructions on how to get started, including how to install, use, and run the project.
Additionally, it helps users understand where to seek support, who maintains the project, and how they can contribute.
Most <i>importantly</i>, the README often acts as the first impression and the main documentation entry point for anyone exploring the project.
</p>
<a href="">Read more</a>
<a href="https://www.mygreatlearning.com/blog/readme-file/">Read more</a>
</article>
<article>
<img src="https://cdn.sanity.io/images/599r6htc/regionalized/4c8605ad998d69b03a6eefb850cce5e23a0a96dc-2880x1440.png?w=2880&h=1440&q=75&fit=max&auto=format" alt="Wireframe" />
<h2>The purpose of wireframes</h2>
<p>
The purpose of a wireframe is to provide a simple visual blueprint of a webpage or application, showing the layout, structure, and placement of key elements.
It helps designers, developers, and stakeholders focus on functionality and user flow before adding visual design details, ensuring clarity and reducing costly changes later in the process.
</p>
<a href="https://www.geeksforgeeks.org/websites-apps/purpose-of-wireframing-in-web-design-process/">Read more</a>
</article>
<article>
<img src="https://miro.medium.com/v2/resize:fit:750/format:webp/1*e6EkEBIDZcOmlwPqCnsJKg.jpeg" alt="understanding Git Branching" />
<h2>A branch in Git</h2>
<p>
A branch in Git is an independent line of development that allows you to work on new features, bug fixes,
or experiments without affecting the main codebase. It serves as a pointer to a specific commit, enabling
you to make changes in isolation and later merge them back into the main branch once they are reviewed and finalized.
</p>
<a href="https://www.varonis.com/blog/git-branching-and-merging">Read more</a>
</article>
</main>
<footer>
<p>
This is the default, provided code and no changes have been made yet.
This document is intended for educational purposes and provides a concise overview of key software development concepts.
</p>
</footer>
</body>
Expand Down
179 changes: 114 additions & 65 deletions Wireframe/style.css
Original file line number Diff line number Diff line change
@@ -1,89 +1,138 @@
/* Here are some starter styles
You can edit these or replace them entirely
It's showing you a common way to organise CSS
And includes solutions to common problems
As well as useful links to learn more */

/* ====== Design Palette ======
This is our "design palette".
It sets out the colours, fonts, styles etc to be used in this design
At work, a designer will give these to you based on the corporate brand, but while you are learning
You can design it yourself if you like
Inspect the starter design with Devtools
Click on the colour swatches to see what is happening
I've put some useful CSS you won't have learned yet
For you to explore and play with if you are interested
https://web.dev/articles/min-max-clamp
https://scrimba.com/learn-css-variables-c026
====== Design Palette ====== */
/* ====== Design Palette ====== */
: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;
--paper: #ffffff;
--ink: #111111;
--font: 100%/1.5 system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
--space: clamp(8px, 1.2vw, 16px);
--line: 2px solid #111111;
--container: 1280px;
}
/* ====== Base Elements ======
General rules for basic HTML elements in any context */

/* ====== Base ====== */
* { box-sizing: border-box; }

html, body {
margin: 0;
padding: 0;
}

body {
background: var(--paper);
color: var(--ink);
font: var(--font);
}
a {
padding: var(--space);
border: var(--line);
max-width: fit-content;
}

/* Keep original image colors */
img,
svg {
width: 100%;
height: auto;
display: block;
object-fit: cover;
/* no filters here */
}
/* ====== 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;

/* Links styled as simple buttons */
a {
display: inline-block;
padding: 6px 12px;
border: var(--line);
text-decoration: none;
color: inherit;
background: transparent;
max-width: fit-content;
}
footer {
position: fixed;
bottom: 0;

/* ====== Header ====== */
header {
max-width: var(--container);
margin: calc(var(--space) * 2) auto var(--space);
padding: 0 var(--space);
text-align: center;
}
/* ====== Articles Grid Layout ====
Setting the rules for how articles are placed in the main element.
Inspect this in Devtools and click the "grid" button in the Elements view
Play with the options that come up.
https://developer.chrome.com/docs/devtools/css/grid
https://gridbyexample.com/learn/
*/

header h1 {
margin: 0 0 var(--space) 0;
}

header p {
max-width: 820px;
margin: 0 auto;
}

/* ====== Main Grid (hero on top, two cards below) ====== */
main {
max-width: var(--container);
margin: calc(var(--space) * 2) auto calc(var(--space) * 8);
padding: 0 var(--space);
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.
*/
gap: calc(var(--space) * 1.5);
}

/* First article spans full width (hero) */
main > *:first-child {
grid-column: 1 / -1;
}

/* ====== Article/Card Layout ====== */
article {
border: var(--line);
padding-bottom: var(--space);
text-align: left;
background: #ffffff;
display: grid;
grid-template-columns: var(--space) 1fr var(--space);
> * {
grid-column: 2/3;
}
> img {
grid-column: span 3;
}
grid-auto-rows: max-content;
text-align: left;
padding-bottom: var(--space);
}

article > * {
grid-column: 2 / 3;
}

article > img {
grid-column: 1 / -1;
}

/* Aspect ratios to resemble the sketch */
main > article:first-child > img {
aspect-ratio: 16 / 5; /* wide hero image */
}

main > article:not(:first-child) > img {
aspect-ratio: 4 / 3; /* two smaller cards */
}

article h2 {
margin: var(--space) 0 4px;
font-size: clamp(1.05rem, 1.2vw, 1.25rem);
}

article p {
margin: 0 0 var(--space);
}

article a {
margin-top: 2px; /* left-aligned "Read more" button */
}

/* ====== Footer ====== */
footer {
position: fixed;
left: 0;
right: 0;
bottom: 0;
border-top: var(--line);
background: #ffffff;
text-align: center;
padding: 6px 10px;
font-size: 0.9rem;
}

/* ====== Specific Rule for README Image ====== */
img[alt="README file"] {
aspect-ratio: auto; /* don’t force a ratio */
max-height: 220px; /* shrink to fit grid */
width: 100%; /* responsive width */
object-fit: contain; /* keep full image visible */
}