generated from CodeYourFuture/Module-Template
-
-
Notifications
You must be signed in to change notification settings - Fork 359
West Midlands | 26-Jan-ITP | Fida H Ali Zada | Sprint 1 | Wireframe to Web Code #941
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
Open
alizada-dev
wants to merge
6
commits into
CodeYourFuture:main
Choose a base branch
from
alizada-dev:feature/wireframe
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+268
−68
Open
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
8659d16
Header and articles section
alizada-dev d7cfd40
Styled the header and article section
alizada-dev 7b750d9
Footer
alizada-dev 621d621
footer styles
alizada-dev 84397ab
Brought minor css changes
alizada-dev 7f7e6e6
Minor CSS changes
alizada-dev File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,46 +1,32 @@ | ||
| /* 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 ====== */ | ||
| :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 { | ||
| background: var(--paper); | ||
| color: var(--ink); | ||
| font: var(--font); | ||
| } | ||
| a { | ||
| padding: var(--space); | ||
| border: var(--line); | ||
| max-width: fit-content; | ||
| margin: 0; | ||
| box-sizing: border-box; | ||
| padding-bottom: 100px; | ||
| } | ||
|
|
||
| img, | ||
| svg { | ||
| width: 100%; | ||
| object-fit: cover; | ||
| } | ||
| /* header styling */ | ||
| .header { | ||
| position: sticky; | ||
| top: 0; | ||
| background-color: black; | ||
| color: white; | ||
| z-index: 10; | ||
| margin: 0; | ||
| } | ||
|
|
||
| .header-content_container{ | ||
| text-align: center; | ||
| } | ||
|
|
||
|
|
||
| /* ====== Site Layout ====== | ||
| Setting the overall rules for page regions | ||
| https://www.w3.org/WAI/tutorials/page-structure/regions/ | ||
|
|
@@ -69,21 +55,135 @@ main { | |
| 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; | ||
|
|
||
|
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. opened the article selector but never closed it. |
||
| .article-section { | ||
| padding: 36px 32px; | ||
| } | ||
|
|
||
| .article-section .title-container { | ||
| text-align: center; | ||
| } | ||
|
|
||
| .articles_container { | ||
| display: grid; | ||
| grid-template-columns: var(--space) 1fr var(--space); | ||
| > * { | ||
| grid-column: 2/3; | ||
| } | ||
| > img { | ||
| grid-column: span 3; | ||
| } | ||
| grid-template-columns: repeat(2 ,minmax(0, 1fr)); | ||
|
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. same rule defines twice |
||
| gap: 32px; | ||
| } | ||
|
|
||
| .first-article-container{ | ||
| grid-column: span 2; | ||
| border: 1px solid lightgray; | ||
| padding: 32px; | ||
| } | ||
|
|
||
| .first-article-img{ | ||
| width: 100%; | ||
| height: 80%; | ||
| } | ||
|
|
||
| .first-article-img img { | ||
| width: 100%; | ||
| height: 100%; | ||
| object-fit: cover; | ||
| } | ||
|
|
||
| .article-title { | ||
| margin: 24px 0px; | ||
| } | ||
|
|
||
| .article-btn { | ||
| background-color: #222; | ||
| color: #fff; | ||
| padding: 0.75rem 1.5rem; | ||
| border: none; | ||
| border-radius: 6px; | ||
| cursor: pointer; | ||
| font-size: 1rem; | ||
| font-weight: 500; | ||
| transition: background-color 0.25s ease, transform 0.2s ease; | ||
| } | ||
|
|
||
| .article-btn a { | ||
| color: inherit; | ||
| text-decoration: none; | ||
| border: none; | ||
| outline: none; | ||
| } | ||
|
|
||
| .article-btn a:focus { | ||
| outline: none; | ||
| border: none; | ||
| } | ||
|
|
||
| .article-btn:hover { | ||
| background-color: #333; | ||
| transform: translateY(-2px); | ||
| } | ||
|
|
||
| .article-container { | ||
| border: 1px solid lightgray; | ||
| padding: 32px; | ||
| } | ||
|
|
||
|
|
||
| /* footer */ | ||
| .site-footer { | ||
| position: fixed; | ||
| bottom: 0; | ||
| left: 0; | ||
| width: 100%; | ||
|
|
||
| background-color: #111; | ||
| color: #ddd; | ||
| border-top: 1px solid #333; | ||
| } | ||
|
|
||
| /* Adjust inner layout */ | ||
| .footer-content { | ||
| display: flex; | ||
| flex-wrap: wrap; | ||
| gap: 2rem; | ||
| justify-content: space-between; | ||
| max-width: 1100px; | ||
| margin: 0 auto; | ||
| } | ||
|
|
||
| .footer-section h3 { | ||
| margin-bottom: 1rem; | ||
| font-size: 1.1rem; | ||
| color: #fff; | ||
| } | ||
|
|
||
| .footer-social { | ||
| justify-content: center; | ||
| align-items: center; | ||
| display: flex; | ||
| } | ||
|
|
||
| .footer-social ul { | ||
| list-style: none; | ||
| padding: 0; | ||
| margin: 0; | ||
| display: flex; | ||
| align-items: center; | ||
| justify-content: center; | ||
| gap: 12px; | ||
| } | ||
|
|
||
| .footer-social a { | ||
| color: #ddd; | ||
| text-decoration: none; | ||
| transition: color 0.2s ease; | ||
| } | ||
|
|
||
| .footer-social a:hover { | ||
| color: #fff; | ||
| } | ||
|
|
||
| .footer-bottom { | ||
| display: flex; | ||
| justify-content: center; | ||
| align-items: center; | ||
| font-size: 0.9rem; | ||
| color: #aaa; | ||
| } | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
duplicate header and its not closed