-
-
Notifications
You must be signed in to change notification settings - Fork 432
London | 26-ITP-Jan| Daniel Solomon| Sprint 1 | Wireframe #975
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,33 +1,72 @@ | ||
| <!DOCTYPE html> | ||
| <html lang="en"> | ||
| <head> | ||
| <meta charset="UTF-8" /> | ||
| <meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
| <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> | ||
| </header> | ||
| <main> | ||
| <article> | ||
| <img src="placeholder.svg" alt="" /> | ||
| <h2>Title</h2> | ||
| <p> | ||
| Lorem ipsum dolor sit amet consectetur adipisicing elit. Quisquam, | ||
| voluptates. Quisquam, voluptates. | ||
| </p> | ||
| <a href="">Read more</a> | ||
| <head> | ||
| <meta charset="UTF-8"> | ||
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
| <title>Learning Git and Development Tools</title> | ||
| <meta name="description" content="Learn about README files, wireframes, Git branches, and practice with an accessible HTML form." /> | ||
| <link rel="stylesheet" href="style.css"> | ||
| </head> | ||
| <body> | ||
| <header> | ||
| <h1>Learning Git and Development Tools</h1> | ||
| <p>Understanding README files, wireframes, and Git branches</p> | ||
| </header> | ||
|
|
||
| <main> | ||
| <section class="articles"> | ||
| <article class="feature"> | ||
| <img src="https://docs.github.com/assets/cb-55933/mw-1440/images/help/repository/readme-links.webp" | ||
| alt="Scrabble tiles spelling out README on top of papers"> | ||
| <h2>What is the purpose of a README file?</h2> | ||
| <p>A README file introduces and explains a project. It usually contains instructions on how to install, use, and contribute to the project. It helps others quickly understand the purpose and usage of your code.</p> | ||
| <a href="https://www.makeareadme.com/" target="_blank" rel="noopener noreferrer">Read More</a> | ||
| </article> | ||
| </main> | ||
| <footer> | ||
| <p> | ||
| This is the default, provided code and no changes have been made yet. | ||
| </p> | ||
| </footer> | ||
| </body> | ||
| </html> | ||
|
|
||
| <div class="row"> | ||
| <article> | ||
| <img src="https://images.pexels.com/photos/196645/pexels-photo-196645.jpeg" | ||
| alt="Notebook sketch showing a website wireframe layout"> | ||
| <h2>What is the purpose of a wireframe?</h2> | ||
| <p>A wireframe is a visual guide that represents the skeletal framework of a webpage. It helps designers and developers plan the structure and layout before adding colors, images, and content.</p> | ||
| <a href="https://www.productplan.com/glossary/wireframe/" target="_blank" rel="noopener noreferrer">Read More</a> | ||
| </article> | ||
|
|
||
| <article> | ||
| <img src="https://media.istockphoto.com/id/876487150/photo/abstract-background-of-source-code-branch-3d-rendering.jpg?b=1&s=612x612&w=0&k=20&c=P5xSmni20OHy5EqfydTFwiCCN_xRzAOGToUKXAPqZ_o=" | ||
| alt="3D abstract image representing Git branching"> | ||
| <h2>What is a branch in Git?</h2> | ||
| <p>A branch in Git is a separate line of development that allows you | ||
| to work on new features or bug fixes without affecting the main | ||
| codebase. Once changes are ready, branches can be merged back into | ||
| the main branch.</p> | ||
| <a href="https://git-scm.com/book/en/v2/Git-Branching-Branches-in-a-Nutshell" target="_blank" rel="noopener noreferrer">Read More</a> | ||
| </article> | ||
| </div> | ||
| </section> | ||
|
|
||
| <!-- Example form with stricter name validation --> | ||
| <section> | ||
| <h2>Order a T-shirt</h2> | ||
| <form> | ||
| <label for="name">Full Name:</label> | ||
| <input | ||
| type="text" | ||
| id="name" | ||
| name="name" | ||
| minlength="2" | ||
| pattern="^(?!\s*$).+" | ||
| autocomplete="name" | ||
| required | ||
| title="Name must be at least 2 characters and not just spaces." | ||
| /> | ||
| <button type="submit" aria-label="Submit T-shirt order">Submit</button> | ||
| </form> | ||
| </section> | ||
|
Comment on lines
+49
to
+65
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why is there a form element in the wireframe implementation?
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The element is included because it provides the functional logic for the interaction. Even in a wireframe, it serves three main purposes:Native Validation: It enables the browser to enforce the required, minlength, and pattern rules automatically. Accessibility: It tells screen readers that these elements are related, and it allows users to submit by pressing the "Enter" key. Data Handling: It acts as a container that captures the input data to be sent to a server or processed by a script.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Regardless of the relevancy, it is dangerous to introduce feature not described in the spec. It is better to remove it from the wireframe implementation. Note: CYF keeps all exercises belonging to the same module in the same repository, but the the Form-controls and the Wireframe are two independent exercises. |
||
| </main> | ||
|
|
||
| <footer> | ||
| <p>© 2025 Learning Git and Development Tools | Contact: info@example.com</p> | ||
| </footer> | ||
| </body> | ||
| </html> | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,89 +1,95 @@ | ||
| /* 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 */ | ||
| body { | ||
| margin: 0; | ||
| font-family: Arial, sans-serif; | ||
| line-height: 1.6; | ||
| } | ||
|
|
||
| /* ====== 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 ====== */ | ||
| :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; | ||
| header { | ||
| text-align: center; | ||
| padding: 2rem; | ||
| background-color: #f4f4f4; | ||
| } | ||
| /* ====== Base Elements ====== | ||
| General rules for basic HTML elements in any context */ | ||
| body { | ||
| background: var(--paper); | ||
| color: var(--ink); | ||
| font: var(--font); | ||
|
|
||
| header h1 { | ||
| margin: 0; | ||
| font-size: 2rem; | ||
| } | ||
|
|
||
| header p { | ||
| font-size: 1rem; | ||
| color: #555; | ||
| } | ||
|
|
||
| .articles { | ||
| max-width: 1000px; | ||
| margin: 0 auto; | ||
| padding: 1rem; | ||
| } | ||
| a { | ||
| padding: var(--space); | ||
| border: var(--line); | ||
| max-width: fit-content; | ||
|
|
||
| .feature { | ||
| margin-bottom: 2rem; | ||
| } | ||
| img, | ||
| svg { | ||
|
|
||
| .feature img { | ||
| width: 100%; | ||
| object-fit: cover; | ||
| height: auto; | ||
| border-radius: 8px; | ||
| } | ||
| /* ====== 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; | ||
|
|
||
| .feature h2 { | ||
| margin-top: 0.5rem; | ||
| } | ||
| footer { | ||
| position: fixed; | ||
| bottom: 0; | ||
| text-align: center; | ||
|
|
||
| .feature a { | ||
| display: inline-block; | ||
| margin-top: 0.5rem; | ||
| padding: 0.5rem 1rem; | ||
| background: #333; | ||
| color: white; | ||
| text-decoration: none; | ||
| border-radius: 4px; | ||
| } | ||
|
|
||
| .row { | ||
| display: flex; | ||
| gap: 1rem; | ||
| } | ||
|
|
||
| .row article { | ||
| flex: 1; | ||
| background: #fafafa; | ||
| padding: 1rem; | ||
| border: 1px solid #ddd; | ||
| border-radius: 8px; | ||
| } | ||
|
|
||
| .row img { | ||
| width: 100%; | ||
| height: auto; | ||
| border-radius: 8px; | ||
| } | ||
| /* ====== 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; | ||
| } | ||
|
|
||
| .row h2 { | ||
| margin-top: 0.5rem; | ||
| } | ||
| /* ====== 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; | ||
| } | ||
|
|
||
| .row a { | ||
| display: inline-block; | ||
| margin-top: 0.5rem; | ||
| padding: 0.5rem 1rem; | ||
| background: #333; | ||
| color: white; | ||
| text-decoration: none; | ||
| border-radius: 4px; | ||
| } | ||
|
|
||
| footer { | ||
| background: #222; | ||
| color: white; | ||
| text-align: center; | ||
| padding: 1rem; | ||
| position: fixed; | ||
| bottom: 0; | ||
| left: 0; | ||
| width: 100%; | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Line 22 can be better formatted as:
To understand why, you can ask AI these questions:
VSCode's "Format Document" feature can help us format our code for better readability and consistency, including breaking a long line of text into shorter lines of text.
To use the feature, right-click inside the code editor and select the option.
Please note that if there are syntax errors in the code, the "Prettier" extension may not format HTML code properly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have updated line 22