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
73 changes: 58 additions & 15 deletions Wireframe/index.html
Original file line number Diff line number Diff line change
@@ -1,33 +1,76 @@
<!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>
<title>Wireframe Project - Mahmoud Shaabo</title>
<link rel="stylesheet" href="style.css" />
</head>

<body>
<!-- Header with navigation -->
<header>
<h1>Wireframe</h1>
<p>
This is the default, provided code and no changes have been made yet.
</p>
<h1>My Website Logo</h1>

<!-- Using aria-label helps screen readers identify the nav purpose -->
<nav aria-label="Main navigation">
<ul>
<li><a href="#home">Home</a></li>
<li><a href="#about">About</a></li>
<li><a href="#contact">Contact</a></li>
</ul>
</nav>
</header>

<!-- Main content -->
<main>
<article>
<img src="placeholder.svg" alt="" />
<h2>Title</h2>
<!-- Big box at the top (spans full width) -->
<article class="card card--featured">
<img src="placeholder.svg" alt="Placeholder image for README article" />
<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 explains what a project is, how to install it, how to
run it, and how to use it. It often includes setup steps, commands,
and helpful links so other people (and future you) can understand the
project quickly.
</p>
<a href="">Read more</a>
<a href="#readme">Read more</a>
</article>

<!-- Two small boxes under the featured one -->
<article class="card">
<img
src="placeholder.svg"
alt="Placeholder image for wireframe article"
/>
<h2>What is the purpose of a wireframe?</h2>
<p>
A wireframe is a simple layout plan for a webpage. It shows where
content goes (header, sections, cards, buttons) before writing the
final HTML and CSS. It helps you focus on structure, spacing, and
hierarchy early.
</p>
<a href="#wireframe">Read more</a>
</article>

<article class="card">
<img
src="placeholder.svg"
alt="Placeholder image for Git branch article"
/>
<h2>What is a branch in Git?</h2>
<p>
A Git branch is a separate line of development. You create a branch to
work on a feature or fix without changing the main branch. When your
work is ready, you can merge your branch back into main.
</p>
<a href="#branch">Read more</a>
</article>
</main>

<!-- Footer (fixed to the bottom of the viewport) -->
<footer>
<p>
This is the default, provided code and no changes have been made yet.
</p>
<p>Created by Mahmoud Shaabo - CYF Sprint 1</p>
</footer>
</body>
</html>
235 changes: 166 additions & 69 deletions Wireframe/style.css
Original file line number Diff line number Diff line change
@@ -1,89 +1,186 @@
/* 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 ====== */
/* =========================
CSS Variables (Design Tokens)
========================= */
: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 */
--paper: #ffffff;
--ink: #333333;
--link-color: #0066cc;
--border-color: #dddddd;
--bg-light: #f5f5f5;
--font: 100%/1.5 system-ui, sans-serif;

--space: 20px;
--space-large: 40px;
--line: 1px solid var(--border-color);
--container: 1100px;
--radius: 8px;

/* Footer height used to avoid content being hidden behind fixed footer */
--footer-height: 64px;
}

* {
box-sizing: border-box;
}

body {
background: var(--paper);
background-color: var(--paper);
color: var(--ink);
font: var(--font);
}
a {
margin: 0;

/* Normal page padding */
padding: var(--space);

/* Important: add extra space so the fixed footer does not cover content */
padding-bottom: calc(var(--space) + var(--footer-height));
}

/* =========================
Header and Navigation
========================= */
header {
border-bottom: var(--line);
padding-bottom: var(--space);
margin-bottom: var(--space-large);
text-align: center;
}

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

/* Navigation list is horizontal */
nav ul {
display: flex;
justify-content: center;
list-style: none;
gap: 30px;
padding: 0;
margin: 0;
}

/* Better to style the link itself (a), not the li */
nav a {
color: var(--ink);
text-decoration: none;
}

nav a:hover,
nav a:focus {
color: var(--link-color);
text-decoration: underline;
}

/* =========================
Main Layout (Wireframe)
Requirement:
- One big box on top (full width)
- Two smaller boxes below side by side
========================= */
main {
max-width: var(--container);
margin: 0 auto;

display: grid;

/* Two columns so we can have 1 big row + 2 cards below */
grid-template-columns: 1fr 1fr;

gap: var(--space);
}

/* The featured card spans across both columns (full width) */
.card--featured {
grid-column: 1 / -1; /* from first column to last column */
}

/* =========================
Card / Article Components
========================= */
article {
border: var(--line);
max-width: fit-content;
padding: var(--space);
border-radius: var(--radius);

display: flex;
flex-direction: column;
}
img,
svg {

article img {
width: 100%;
height: 150px;
background-color: var(--bg-light);
margin-bottom: 15px;
border-radius: var(--radius);
object-fit: cover;
}
/* ====== 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;

article h2 {
margin: 0 0 10px 0;
font-size: 1.25rem;
}

article p {
margin: 0 0 15px 0;
flex-grow: 1; /* pushes the link down */
}

article a {
color: var(--link-color);
text-decoration: none;
font-weight: 600;
align-self: flex-start;
}

article a:hover,
article a:focus {
text-decoration: underline;
}

/* =========================
Footer (Fixed to bottom of viewport)
========================= */
footer {
position: fixed;
left: 0;
right: 0;
bottom: 0;

height: var(--footer-height);
display: flex;
align-items: center;
justify-content: center;

background: var(--paper);
border-top: var(--line);
text-align: center;
font-size: 0.9rem;

/* Ensure it appears above content */
z-index: 10;
}
/* ====== 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: stack cards on small screens
========================= */
@media (max-width: 768px) {
main {
/* On mobile: one column */
grid-template-columns: 1fr;
}
}
/* ====== 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;

/* Featured card naturally becomes full width in one column */
.card--featured {
grid-column: auto;
}

body {
padding: 15px;
padding-bottom: calc(15px + var(--footer-height));
}
> img {
grid-column: span 3;

nav ul {
gap: 15px;
}
}
Loading