-
Notifications
You must be signed in to change notification settings - Fork 4k
add task solution #4433
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: master
Are you sure you want to change the base?
add task solution #4433
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1,30 @@ | ||
| /* Put article styles here */ | ||
| .article { | ||
|
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. Missing 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. Missing 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. Missing |
||
| margin: 5em auto 0; | ||
| padding: 1em; | ||
| font-size: 140%; | ||
| max-width: 800px; | ||
| background: white; | ||
| box-shadow: rgba(0, 0, 0, 0.05) 0 3px 15px; | ||
| } | ||
|
|
||
| .article__paragraph { | ||
| margin: 0; | ||
| color: #333; | ||
| } | ||
|
|
||
| .article__paragraph:not(:first-child) { | ||
| margin-top: 0.7em; | ||
| } | ||
|
|
||
| @media (min-width: 500px) { | ||
| .article { | ||
| margin: 3.5em auto 0; | ||
| padding: 2em; | ||
| } | ||
| } | ||
|
|
||
| @media (min-width: 800px) { | ||
| .article { | ||
| margin: 3.5em auto; | ||
| } | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,31 @@ | ||
| // import a css file containig article styles | ||
| import React from 'react'; | ||
|
|
||
| // Create an Article function returning the HTML of article block | ||
| import './Article.css'; | ||
|
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. Missing Navigation.css file - referenced by the import in Navigation.jsx |
||
|
|
||
| // Add a default export statement for Article component to use it in the other files | ||
| function Article() { | ||
|
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. Missing Welcome.jsx and Welcome.css files - App.jsx imports Welcome but these files don't exist |
||
| return ( | ||
|
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. Missing Navigation.jsx file - Header.jsx imports Navigation but this file doesn't exist in the provided code 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. Missing Header.jsx file - the component is imported in App.jsx but the file wasn't provided |
||
| <article className="article"> | ||
| <h2 className="article__title">Headline</h2> | ||
|
|
||
| <p className="article__paragraph"> | ||
| In elementum lorem eget est euismod ornare... | ||
| </p> | ||
|
Comment on lines
+8
to
+12
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. This violates checklist item #1: excessive blank lines between JSX elements inside the article component |
||
|
|
||
| <p className="article__paragraph">In ac nisi lacus. Fusce est dolor...</p> | ||
|
Comment on lines
+13
to
+14
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. This violates checklist item #1: excessive blank lines between JSX elements inside the article component |
||
|
|
||
| <p className="article__paragraph"> | ||
| Donec arcu elit, euismod vel lobortis eu... | ||
|
Comment on lines
+15
to
+17
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. This violates checklist item #1: excessive blank lines between JSX elements inside the article component |
||
| </p> | ||
|
|
||
| <p className="article__paragraph"> | ||
| Cras egestas tempor nibh, a fermentum lorem... | ||
| </p> | ||
|
Comment on lines
+18
to
+22
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. This violates checklist item #1: excessive blank lines between JSX elements inside the article component |
||
|
|
||
| <p className="article__paragraph"> | ||
| Pellentesque habitant morbi tristique senectus... | ||
| </p> | ||
|
Comment on lines
+23
to
+26
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. This violates checklist item #1: excessive blank lines between JSX elements inside the article component |
||
| </article> | ||
| ); | ||
| } | ||
|
|
||
| export default Article; | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1,28 @@ | ||
| /* Put header styles here */ | ||
| .header { | ||
| width: 100%; | ||
| padding: 1em; | ||
| font-size: 140%; | ||
| position: sticky; | ||
| top: 0; | ||
| left: 0; | ||
| right: 0; | ||
| transition: opacity 0.2s ease-in-out; | ||
| text-align: center; | ||
| } | ||
|
|
||
| .header__title { | ||
| font-weight: 600; | ||
| display: inline; | ||
| margin: 0; | ||
| padding: 0; | ||
| font-size: inherit; | ||
| } | ||
|
|
||
| @media (min-width: 500px) { | ||
| .header { | ||
| text-align: left; | ||
| display: flex; | ||
| justify-content: space-between; | ||
| } | ||
| } | ||
|
|
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,17 @@ | ||
| // import a css file containig header styles | ||
| import React from 'react'; | ||
|
|
||
| // Create a Header function returning the HTML of header block | ||
| import './Header.css'; | ||
|
|
||
| // Add a default export statement for Header component to use it in the other files | ||
| import Navigation from '../Navigation/Navigation'; | ||
|
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. Missing Welcome.jsx file - App.jsx imports this component but the JSX file doesn't exist in the Welcome folder |
||
|
|
||
| function Header() { | ||
| return ( | ||
| <header className="header"> | ||
| <h1 className="header__title">Site Name</h1> | ||
|
|
||
| <Navigation /> | ||
|
Comment on lines
+10
to
+12
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. Checklist item #1 violation: excessive blank lines between components inside JSX |
||
| </header> | ||
| ); | ||
| } | ||
|
|
||
| export default Header; | ||
|
Comment on lines
+10
to
+17
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. Checklist item #1 violation: excessive blank lines between JSX elements inside nav |
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| .navigation__link { | ||
| display: inline-block; | ||
| outline: none; | ||
| text-decoration: none; | ||
| opacity: 0.7; | ||
| padding: 0 0.5em; | ||
| color: black; | ||
| transition: opacity 0.2s ease-in-out; | ||
| } | ||
|
|
||
| .navigation__link:hover, | ||
| .navigation__link:focus { | ||
| opacity: 1; | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| import React from 'react'; | ||
|
|
||
| import './Navigation.css'; | ||
|
|
||
| function Navigation() { | ||
| return ( | ||
| <nav className="navigation"> | ||
| <a className="navigation__link" href="#about"> | ||
| About | ||
| </a> | ||
|
|
||
| <a className="navigation__link" href="#services"> | ||
|
Comment on lines
+8
to
+12
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. This violates checklist item #1: excessive blank lines between JSX elements (lines 8, 13, 15, 18, 23 contain empty lines between |
||
| Services | ||
| </a> | ||
|
|
||
| <a className="navigation__link" href="#contact"> | ||
|
Comment on lines
+2
to
+16
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. This violates checklist item #1: excessive blank lines between JSX elements (lines 2, 4, 6, 11, 16 contain empty lines). The JSX children should flow directly after each other. |
||
| Contact | ||
| </a> | ||
| </nav> | ||
| ); | ||
| } | ||
|
|
||
|
Comment on lines
+2
to
+22
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. This violates checklist item #1: excessive blank lines between JSX elements (lines 2, 4, 11, 15, 22 contain empty lines). Remove these blank lines to follow the GOOD example pattern. |
||
| export default Navigation; | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1,14 @@ | ||
| /* Put welcome styles here */ | ||
| .welcome { | ||
| height: 100vh; | ||
| background: coral; | ||
| } | ||
|
|
||
| .welcome__text { | ||
| margin: 0; | ||
| font-size: 400%; | ||
| text-align: center; | ||
| line-height: 1; | ||
| padding-top: calc(50vh - 20pt); | ||
|
Comment on lines
+10
to
+11
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. This violates checklist item #1: There's an unnecessary blank line between the h1 and Navigation component inside the header element |
||
| display: block; | ||
| font-weight: 700; | ||
| } | ||
|
Comment on lines
+10
to
+14
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. This violates checklist item #1: Excessive blank line between link elements inside the nav |
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,13 @@ | ||
| // import a css file containig welcome styles | ||
| import React from 'react'; | ||
|
|
||
| // Create a Welcome function returning the HTML of welcome block | ||
| import './Welcome.css'; | ||
|
|
||
| // Add a default export statement for Welcome component to use it in the other files | ||
| function Welcome() { | ||
| return ( | ||
| <section className="welcome"> | ||
| <span className="welcome__text">Sticky Header!</span> | ||
|
Comment on lines
2
to
+8
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. Checklist item #1 violation: excessive empty lines between imports and component definition (lines 2, 4)
Comment on lines
2
to
+8
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. Checklist item #1 violation: excessive empty lines between imports and component definition (lines 2, 4) |
||
| </section> | ||
| ); | ||
|
Comment on lines
2
to
+10
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. Checklist item #1 violation: excessive empty lines between imports and component definition (lines 2, 4) |
||
| } | ||
|
|
||
|
Comment on lines
+10
to
+12
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. Checklist item #1 violation: excessive empty line between h1 and Navigation inside header JSX |
||
| export default Welcome; | ||
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.
Missing
src/components/Header/Header.jsxfile - the task requires using the existing Header folder and splitting CSS from components based on CSS blocks