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
70 changes: 65 additions & 5 deletions Form-Controls/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,75 @@ <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-->
<!-- customer's name.must be a valid name-->
<div>
<label for="name">Name:</label>
<input
type="text"
name="name"
required
minlength="2"
placeholder="Enter your full name"
/>
</div>
<p></p>
<!-- customer's email.must be a valid email-->
<div>
<label for="email">Email:</label>
<input
type="email"
name="email"
required
placeholder="you@example.com"
/>
</div>
<p></p>
<!-- t-shirt 3 color options.make sure to choose 1 color-->
<fieldset>
<legend>Choose a Colour:</legend>
<p>
<input type="radio" id="red" name="colour" value="Red" required />
<label for="red">Red</label>
</p>
<p>
<input type="radio" id="blue" name="colour" value="Blue" />
<label for="blue">Blue</label>
</p>
<p>
<input type="radio" id="green" name="colour" value="Green" />
<label for="green">Green</label>
</p>
</fieldset>

<!--size option-->
<fieldset>
<legend>Choose a Size:</legend>

<input type="radio" id="xs" name="size" value="XS" required />
<label for="xs">XS</label>

<input type="radio" id="s" name="size" value="S" />
<label for="s">S</label>

<input type="radio" id="m" name="size" value="M" />
<label for="m">M</label>

<input type="radio" id="l" name="size" value="L" />
<label for="l">L</label>

<input type="radio" id="xl" name="size" value="XL" />
<label for="xl">XL</label>

<input type="radio" id="xxl" name="size" value="XXL" />
<label for="xxl">XXL</label>
</fieldset>

<button type="submit">Submit</button>
</form>
</main>
<footer>
<!-- change to your name-->
<h2>By HOMEWORK SOLUTION</h2>
<h2>Pinky Benitez</h2>
</footer>
</body>
</html>
45 changes: 32 additions & 13 deletions Wireframe/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,31 +3,50 @@
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="description" content="Learn README files, wireframes, and Git branches" />
<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>
<h1>README, Wireframes, and Git Branches</h1>
<p>Learn three essential concepts in web development and software projects.</p>
</header>

<main>
<article>
<img src="placeholder.svg" alt="" />
<h2>Title</h2>
<!-- README article -->
<article class="readme">
<img src="https://pic.onlinewebfonts.com/thumbnails/icons_688402.svg" alt="Readme" loading="lazy" />
<h2>What is the purpose of a README file?</h2>
<p>
Lorem ipsum dolor sit amet consectetur adipisicing elit. Quisquam,
voluptates. Quisquam, voluptates.
A README file introduces and explains a project. It usually contains instructions on how to install, use, and contribute to the project.
</p>
<a href="">Read more</a>
<a href="https://www.makeareadme.com/" target="_blank" rel="noopener noreferrer">Learn more</a>
</article>

<!-- Wireframe article -->
<article class="wireframe">
<img src="https://static.thenounproject.com/png/3085901-512.png" alt="Wireframe icon" loading="lazy" />
<h2>What is the purpose of a wireframe?</h2>
<p>
A wireframe is a simple visual guide that represents the layout of a website or app. It focuses on structure and functionality.
</p>
<a href="https://www.interaction-design.org/literature/topics/wireframing" target="_blank" rel="noopener noreferrer">Learn more</a>
</article>

<!-- Git branch article -->
<article class="git">
<img src="https://static.thenounproject.com/png/4411741-512.png" alt="Git Branch icon" loading="lazy" />
<h2>What is a branch in Git?</h2>
<p>
A branch in Git is a separate line of development. It allows you to work on new features or fixes without affecting the main codebase.
</p>
<a href="https://git-scm.com/book/en/v2/Git-Branching-Branches-in-a-Nutshell" target="_blank" rel="noopener noreferrer">Learn more</a>
</article>
</main>

<footer>
<p>
This is the default, provided code and no changes have been made yet.
</p>
<p>Created for learning HTML, CSS, and Git basics.</p>
</footer>
</body>
</html>
220 changes: 149 additions & 71 deletions Wireframe/style.css
Original file line number Diff line number Diff line change
@@ -1,89 +1,167 @@
/* 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;
--container: 1280px;
}
/* ====== Base Elements ======
General rules for basic HTML elements in any context */
body {
--paper: #f7f7f7;
--ink: #222;
--font: 16px/1.6 system-ui, sans-serif;
--space: clamp(10px, 2vw, 20px);
--line: 1px solid #ccc;
--container: 1200px;
--link-bg: #333;
--link-hover-bg: #555;
--link-color: #fff;
}

/* ====== Global Styles ====== */
html, body {
margin: 0;
padding: 0;
height: 100%;
font: var(--font);
background: var(--paper);
color: var(--ink);
font: var(--font);
}
a {

body {
display: flex;
flex-direction: column;
min-height: 100vh;
text-align: center;
}

/* Header */
header {
padding: var(--space);
border: var(--line);
max-width: fit-content;
}
img,
svg {
width: 100%;
object-fit: cover;

header h1 {
margin-bottom: 0.2em;
font-size: 2rem;
}

header p {
font-size: 1rem;
color: #555;
}
/* ====== Site Layout ======
Setting the overall rules for page regions
https://www.w3.org/WAI/tutorials/page-structure/regions/
*/

/* ====== Main Layout ====== */
main {
max-width: var(--container);
margin: 0 auto calc(var(--space) * 4) auto;
margin: 0 auto;
display: grid;
grid-template-columns: repeat(2, 1fr);
gap: var(--space);
padding: var(--space);
}

/* First article spans two columns */
main > article:first-child {
grid-column: span 2;
}

/* ====== Article Cards ====== */
article {
border: var(--line);
border-radius: 8px;
background: #fff;
padding: var(--space);
display: flex;
flex-direction: column;
align-items: center;
text-align: center;
transition: transform 0.3s;
}

article:hover {
transform: translateY(-4px);
}

article img {
width: 150px;
height: 150px;
object-fit: contain;
margin-bottom: var(--space);
}

.readme img {
width: 200px;
height: 200px;
}

/* Article text */
article h2 {
font-size: 1.3rem;
margin-bottom: 0.5em;
}

article p {
font-size: 1rem;
color: #444;
}

/* ====== Links (buttons) ====== */
article a {
display: inline-block;
background: var(--link-bg);
color: var(--link-color);
text-decoration: none;
border-radius: 5px;
padding: 8px 16px;
font-size: 0.95rem;
margin-top: 10px;
transition: 0.3s;
}

article a:hover {
background: var(--link-hover-bg);
transform: scale(1.05);
}

/* ====== Footer ====== */
footer {
position: fixed;
bottom: 0;
text-align: center;
padding: var(--space);
border-top: var(--line);
margin-top: auto;
font-size: 0.85rem;
background: var(--paper);
}
/* ====== 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/
*/
main {
display: grid;
grid-template-columns: 1fr 1fr;
gap: var(--space);
> *:first-child {
grid-column: span 2;

/* ====== Responsive ====== */
@media (max-width: 768px) {
main {
grid-template-columns: 1fr;
}

main > article:first-child {
grid-column: 1;
}

article img {
width: 120px;
height: 120px;
}

.readme img {
width: 150px;
height: 150px;
}

article a {
width: 100%;
text-align: center;
}
}
/* ====== 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;

@media (max-width: 480px) {
header h1 {
font-size: 1.6rem;
}
> img {
grid-column: span 3;

article h2 {
font-size: 1.1rem;
}

article p {
font-size: 0.9rem;
}
}