diff --git a/Wireframe/index.html b/Wireframe/index.html index 0e014e535..d3154b3ee 100644 --- a/Wireframe/index.html +++ b/Wireframe/index.html @@ -1,33 +1,76 @@ - + - Wireframe + Wireframe Project - Mahmoud Shaabo + +
-

Wireframe

-

- This is the default, provided code and no changes have been made yet. -

+

My Website Logo

+ + +
+ +
-
- -

Title

+ + + + +
+ Placeholder image for wireframe article +

What is the purpose of a wireframe?

+

+ 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. +

+ Read more +
+ +
+ Placeholder image for Git branch article +

What is a branch in Git?

+

+ 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. +

+ Read more
+ + diff --git a/Wireframe/style.css b/Wireframe/style.css index be835b6c7..0459925eb 100644 --- a/Wireframe/style.css +++ b/Wireframe/style.css @@ -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; } }