From 4e66b5c4bd7f694ac10942b41d971a2d54526d2b Mon Sep 17 00:00:00 2001 From: seidd Date: Sun, 1 Feb 2026 10:18:25 +0000 Subject: [PATCH 1/6] Refactor CSS styles and layout structure Refactor CSS variables and layout styles for better organization and maintainability. --- Wireframe/style.css | 174 ++++++++++++++++++++++++-------------------- 1 file changed, 95 insertions(+), 79 deletions(-) diff --git a/Wireframe/style.css b/Wireframe/style.css index be835b6c7..378b2e818 100644 --- a/Wireframe/style.css +++ b/Wireframe/style.css @@ -1,89 +1,105 @@ -/* 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 */ + --paper: oklch(7 0 0); + --color: oklch(70% 0.15 250); + --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 ====== */ +*, +*::before, +*::after { box-sizing: border-box; + } body { - background: var(--paper); - color: var(--ink); - font: var(--font); + margin: 0; + background: var(--paper); + color: var(--ink); + font: var(--font); +} +a { + display: inline-block; + padding: var(--space); + border: var(--line); + max-width: fit-content; + text-decoration: none; + color: inherit; } -a { - padding: var(--space); - border: var(--line); - max-width: fit-content; +a:hover, +a:focus-visible { + background: var(--color); +color: black; } img, -svg { - width: 100%; - object-fit: cover; +svg { + width: 100%; + height: auto; + object-fit: cover; +} +/* ====== Site Layout ====== */ +header { + max-width: var(--container); + margin: 0 auto; + padding: calc(var(--space) * 2) var(--space); + text-align: left; } -/* ====== 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; +header h1 { + margin: 0 0 var(--space) 0; +} +header p { + margin: 0; } -footer { - position: fixed; - bottom: 0; - text-align: center; +main { + max-width: var(--container); + margin: 0 auto calc(var(--space) * 4) auto; + padding: 0 var(--space) calc(var(--space) * 6); } -/* ====== 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; - } +/* Footer fixed to bottom */ +footer { + position: fixed; + bottom: 0; left: 0; + right: 0; + text-align: center; + padding: var(--space); + background: var(--paper); + border-top: var(--line); +} +/* ====== Articles Grid Layout ====== */ +main { + display: grid; + grid-template-columns:1fr 1fr; + gap: var(--space); +} +main > *: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; - } +/* ====== Article Layout ====== */ +article { + border: var(--line); + padding-bottom: var(--space); + text-align: left; + display: grid; + grid-template-columns: var(--space) 1fr var(--space); +} +article > * { + grid-column: 2 / 3; + margin-top: var(--space); +} +article > img { + grid-column: 1 / 4; + margin: 0 0 var(--space) 0; +} +article h2 { + margin: 0; +} +/* ====== Responsive tweak ====== */ +@media (max-width: 700px) { + main { grid-template-columns: 1fr; + } + main > *:first-child { + grid-column: auto; + } + footer { + position: static; + } } From 41197c64b6e2ab05e7a8d9a28c119939ad6d9620 Mon Sep 17 00:00:00 2001 From: seidd Date: Sun, 1 Feb 2026 10:29:34 +0000 Subject: [PATCH 2/6] Revise index.html for improved content and structure Updated the content and structure of the index.html file to provide a more comprehensive overview of README files, wireframes, and Git branches. --- index.html | 117 ++++++++++++++++++++++++++++++++++------------------- 1 file changed, 76 insertions(+), 41 deletions(-) diff --git a/index.html b/index.html index 80aa49666..cf50440ab 100644 --- a/index.html +++ b/index.html @@ -1,46 +1,81 @@ - + - + - - Coursework - - + README, Wireframes & Git Branches + + + + -

🧐 CYF Coursework Disposable Branch Previews

+
+

Planning & Documenting Your Code

+

+ Learn what a README is for, why wireframes matter, and how Git branches help you work safely. +

+
-
    -
  1. -

    Project 1: Wireframe

    -

    - Mentors: - open the assignment in a tab -

    -
  2. -
  3. -

    Project 2: Form Controls

    -

    - Mentors: - open the assignment in a tab -

    -
  4. -
-
- - +
+ Abstract illustration representing documentation +

What is the purpose of a README file?

+

+ A README file is the first place someone looks to understand your project. It explains what the project does, how to install and run it, and any important details a user or contributor needs to know. +

+

+ A clear README saves time, reduces confusion, and makes your work more welcoming to others. +

+ + Learn more about writing READMEs + +
+
+ Simple wireframe sketch of a webpage layout +

What is the purpose of a wireframe?

+

+ A wireframe is a simple visual plan of a webpage or app. It focuses on layout, structure, and content placement rather than colours or final design details. +

+

+ Wireframes help you think about user experience early, spot problems before you code, and communicate ideas clearly with others. +

+ + Read more about wireframes + +
+
+ Diagram showing branches in a version control system +

What is a branch in Git?

+

+ A branch in Git is a separate line of development. It lets you work on new features or fixes without changing the main codebase until you are ready. +

+

+ By using branches, you can experiment safely, review changes, and then merge them back into the main branch when they are tested and stable. +

+ + Learn more about Git branches + +
+ +
+

Built with semantic HTML, CSS grid, and Git version control.

+
+ From 47f3580a13561de88bdd4a8d3c480caa3deb667d Mon Sep 17 00:00:00 2001 From: seidd Date: Wed, 4 Feb 2026 20:15:01 +0000 Subject: [PATCH 3/6] purpose of readme file --- Form-Controls/articles.md | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 Form-Controls/articles.md diff --git a/Form-Controls/articles.md b/Form-Controls/articles.md new file mode 100644 index 000000000..e2dada87d --- /dev/null +++ b/Form-Controls/articles.md @@ -0,0 +1,6 @@ +What is the customer's name? I must collect this data, and validate it. But what is a valid name? I must decide something. +What is the customer's email? I must make sure the email is valid. Email addresses have a consistent pattern. +What colour should this t-shirt be? I must give 3 options. How will I make sure they don't pick other colours? +black +What size does the customer want? I must give the following 6 options: XS, S, M, L, XL, XXL +All fields are required. Do not write a form \ No newline at end of file From 8871de98d591fa0b6ea4476d2750c169af951a65 Mon Sep 17 00:00:00 2001 From: seidd Date: Sun, 8 Feb 2026 10:57:00 +0000 Subject: [PATCH 4/6] Update articles.md --- Form-Controls/articles.md | 46 ++++++++++++++++++++++++++++++++++----- 1 file changed, 40 insertions(+), 6 deletions(-) diff --git a/Form-Controls/articles.md b/Form-Controls/articles.md index e2dada87d..c1b6361a5 100644 --- a/Form-Controls/articles.md +++ b/Form-Controls/articles.md @@ -1,6 +1,40 @@ -What is the customer's name? I must collect this data, and validate it. But what is a valid name? I must decide something. -What is the customer's email? I must make sure the email is valid. Email addresses have a consistent pattern. -What colour should this t-shirt be? I must give 3 options. How will I make sure they don't pick other colours? -black -What size does the customer want? I must give the following 6 options: XS, S, M, L, XL, XXL -All fields are required. Do not write a form \ No newline at end of file +
+ + + + + + + + + + + + + +
From e3f29f464f7d44efa1ab891030eb10c6bff61d12 Mon Sep 17 00:00:00 2001 From: seidd Date: Sun, 8 Feb 2026 10:58:20 +0000 Subject: [PATCH 5/6] Update and rename articles.md to index.html. --- Form-Controls/{articles.md => index.html.} | 1 + 1 file changed, 1 insertion(+) rename Form-Controls/{articles.md => index.html.} (96%) diff --git a/Form-Controls/articles.md b/Form-Controls/index.html. similarity index 96% rename from Form-Controls/articles.md rename to Form-Controls/index.html. index c1b6361a5..b6ee7da07 100644 --- a/Form-Controls/articles.md +++ b/Form-Controls/index.html. @@ -38,3 +38,4 @@ + From 667bdb2f4df963d408c074719dc2c59bea5f45d8 Mon Sep 17 00:00:00 2001 From: seidd Date: Sun, 8 Feb 2026 11:11:04 +0000 Subject: [PATCH 6/6] Update index.html --- Form-Controls/index.html | 68 ++++++++++++++++++++++++---------------- 1 file changed, 41 insertions(+), 27 deletions(-) diff --git a/Form-Controls/index.html b/Form-Controls/index.html index 65a866cdb..d0d406bad 100644 --- a/Form-Controls/index.html +++ b/Form-Controls/index.html @@ -1,27 +1,41 @@ - - - - - - My form exercise - - - - -
-

Product Pick

-
-
-
- - -
-
-
- -

By HOMEWORK SOLUTION

-
- - +
+ + + + + + + + + + + + + +
+