-
-
Notifications
You must be signed in to change notification settings - Fork 982
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Move LandingBackground and Footerfrom navbar to StartScreen component
* Move FooterBackground from footer to StartScreen component
- Loading branch information
1 parent
cc05007
commit 271969f
Showing
8 changed files
with
98 additions
and
70 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import React from 'react'; | ||
import ExecutionEnvironment from '@docusaurus/ExecutionEnvironment'; | ||
import usePageType from '@site/src/hooks/usePageType'; | ||
import { useColorMode } from '@docusaurus/theme-common'; | ||
|
||
import Moon from '@site/src/components/Moon/MoonIcon'; | ||
import DarkMoon from '@site/src/components/Moon/MoonIconDark'; | ||
import styles from './styles.module.css'; | ||
|
||
const FooterBackground = () => { | ||
const { isLanding } = usePageType(); | ||
const currentSvgComponent = | ||
useColorMode().colorMode === 'dark' ? <DarkMoon /> : <Moon />; | ||
|
||
return ( | ||
<div className={styles.moonContainer}> | ||
{isLanding && ( | ||
<>{ExecutionEnvironment.canUseViewport && currentSvgComponent}</> | ||
)} | ||
</div> | ||
); | ||
}; | ||
|
||
export default FooterBackground; |
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,8 @@ | ||
.moonContainer { | ||
position: relative; | ||
margin-top: 106px; | ||
} | ||
|
||
[class*='footerLanding'] { | ||
margin-top: -106px; | ||
} |
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,20 @@ | ||
import React from 'react'; | ||
import Planets from '@site/src/components/Hero/Planets'; | ||
import Stars from '@site/src/components/Hero/Stars'; | ||
import ExecutionEnvironment from '@docusaurus/ExecutionEnvironment'; | ||
import styles from './styles.module.css'; | ||
|
||
const LandingBackground = () => { | ||
return ( | ||
<div className={styles.heroBackground}> | ||
{ExecutionEnvironment.canUseViewport && ( | ||
<> | ||
<Planets /> | ||
<Stars /> | ||
</> | ||
)} | ||
</div> | ||
); | ||
}; | ||
|
||
export default LandingBackground; |
42 changes: 42 additions & 0 deletions
42
docs/src/components/Hero/LandingBackground/styles.module.css
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,42 @@ | ||
.heroBackground { | ||
position: absolute; | ||
top: 0; | ||
|
||
background: linear-gradient( | ||
180deg, | ||
var(--swm-blue-light-40) 0%, | ||
var(--swm-blue-light-20) 23%, | ||
#ffffff 46% | ||
); | ||
width: 100%; | ||
height: 130vh; | ||
min-height: 70vw; | ||
overflow: hidden; | ||
z-index: -20; | ||
} | ||
|
||
[data-theme='dark'] .heroBackground { | ||
background: none; | ||
background-color: var(--swm-navy-dark-140); | ||
} | ||
|
||
@media (max-width: 996px) { | ||
[class*='logoWrapperLanding'] { | ||
width: 50px; | ||
height: 50px; | ||
display: flex; | ||
justify-content: center; | ||
} | ||
} | ||
|
||
@media (max-width: 768px) { | ||
.heroBackground { | ||
height: 70vh; | ||
} | ||
} | ||
|
||
@media (max-width: 420px) { | ||
.navbarLanding { | ||
padding: 0 1.5rem; | ||
} | ||
} |
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
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