diff --git a/Form-Controls/index.html b/Form-Controls/index.html index 65a866cdb..78df92095 100644 --- a/Form-Controls/index.html +++ b/Form-Controls/index.html @@ -13,15 +13,75 @@

Product Pick

- - + +
+ + +
+

+ +
+ + +
+

+ +
+ Choose a Colour: +

+ + +

+

+ + +

+

+ + +

+
+ + +
+ Choose a Size: + + + + + + + + + + + + + + + + + + +
+ +
diff --git a/Wireframe/index.html b/Wireframe/index.html index 0e014e535..3af3dd8e3 100644 --- a/Wireframe/index.html +++ b/Wireframe/index.html @@ -3,31 +3,50 @@ + Wireframe
-

Wireframe

-

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

+

README, Wireframes, and Git Branches

+

Learn three essential concepts in web development and software projects.

+
-
- -

Title

+ +
+ Readme +

What is the purpose of a README file?

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

- Read more + Learn more +
+ + +
+ Wireframe icon +

What is the purpose of a wireframe?

+

+ A wireframe is a simple visual guide that represents the layout of a website or app. It focuses on structure and functionality. +

+ Learn more +
+ + +
+ Git Branch icon +

What is a branch in Git?

+

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

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