-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Anna Tuhusova
committed
Dec 15, 2024
1 parent
9e0b1c8
commit 37ef958
Showing
8 changed files
with
166 additions
and
78 deletions.
There are no files selected for viewing
This file contains 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 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 +1,31 @@ | ||
/* Put article styles here */ | ||
.article { | ||
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; | ||
} | ||
} |
This file contains 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,5 +1,30 @@ | ||
// import a css file containig article styles | ||
import './Article.css'; | ||
|
||
// Create an Article function returning the HTML of article block | ||
function Article() { | ||
return ( | ||
<article className="article"> | ||
<h1 className="article__title">Headline</h1> | ||
<p className="article__paragraph"> | ||
In elementum lorem eget est euismod ornare. Phasellus sit amet | ||
pellentesque mauris. Aliquam quis malesuada ex... | ||
</p> | ||
<p className="article__paragraph"> | ||
In ac nisi lacus. Fusce est dolor, tincidunt ut bibendum vitae... | ||
</p> | ||
<p className="article__paragraph"> | ||
Donec arcu elit, euismod vel lobortis eu, fringilla sit amet dolor... | ||
</p> | ||
<p className="article__paragraph"> | ||
Cras egestas tempor nibh, a fermentum lorem sollicitudin non... | ||
</p> | ||
<p className="article__paragraph"> | ||
Pellentesque habitant morbi tristique senectus et netus et malesuada... | ||
</p> | ||
</article> | ||
); | ||
} | ||
|
||
// Add a default export statement for Article component to use it in the other files | ||
export default Article; |
This file contains 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 +1,43 @@ | ||
/* 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; | ||
} | ||
} | ||
|
||
.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; | ||
} |
This file contains 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,5 +1,25 @@ | ||
// import a css file containig header styles | ||
import './Header.css'; | ||
|
||
// Create a Header function returning the HTML of header block | ||
function Header() { | ||
return ( | ||
<header className="header"> | ||
<h1 className="header__title">Site Name</h1> | ||
<nav className="navigation"> | ||
<a className="navigation__link" href="#about"> | ||
About | ||
</a> | ||
<a className="navigation__link" href="#services"> | ||
Services | ||
</a> | ||
<a className="navigation__link" href="#contact"> | ||
Contact | ||
</a> | ||
</nav> | ||
</header> | ||
); | ||
} | ||
|
||
// Add a default export statement for Header component to use it in the other files | ||
export default Header; |
This file contains 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 |
---|---|---|
@@ -0,0 +1,19 @@ | ||
iframe { | ||
display: none; | ||
} | ||
|
||
* { | ||
box-sizing: border-box; | ||
} | ||
|
||
html { | ||
font-size: 10pt; | ||
line-height: 1.4; | ||
font-weight: 400; | ||
font-family: "Source Sans Pro", "Open Sans", Roboto, Arial, sans-serif; | ||
} | ||
|
||
body { | ||
margin: 0; | ||
background: #eee; | ||
} |
This file contains 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 +1,15 @@ | ||
/* 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); | ||
display: block; | ||
font-weight: 700; | ||
} |
This file contains 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,5 +1,13 @@ | ||
// import a css file containig welcome styles | ||
import './Welcome.css'; | ||
|
||
// Create a Welcome function returning the HTML of welcome block | ||
|
||
function Welcome() { | ||
return ( | ||
<section className="welcome"> | ||
<span className="welcome__text">Sticky Header!</span> | ||
</section> | ||
); | ||
} | ||
// Add a default export statement for Welcome component to use it in the other files | ||
export default Welcome; |