generated from eternallycyf/ims-template
-
Notifications
You must be signed in to change notification settings - Fork 0
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
1 parent
ff251d2
commit f6b4e62
Showing
8 changed files
with
119 additions
and
104 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
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 |
---|---|---|
@@ -0,0 +1,15 @@ | ||
html[data-prefers-color='dark'], | ||
html[data-prefers-color='light'] { | ||
.site-section { | ||
&-title { | ||
position: relative; | ||
margin: 0 auto; | ||
color: #fff; | ||
font-size: 50px; | ||
text-align: center; | ||
@media (max-width: 480px) { | ||
font-size: 30px; | ||
} | ||
} | ||
} | ||
} |
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,22 @@ | ||
import React from 'react'; | ||
import './Section.less'; | ||
|
||
export interface ISectionProps { | ||
title?: React.ReactNode; | ||
style?: React.CSSProperties; | ||
titleStyle?: React.CSSProperties; | ||
scale?: number; | ||
} | ||
|
||
export const Section: React.FC<React.PropsWithChildren<ISectionProps>> = (props) => { | ||
return ( | ||
<section className="site-section" style={props.style}> | ||
<div className="site-section-title" style={props.titleStyle}> | ||
{props.title} | ||
</div> | ||
<div className="site-section-body" style={{ transform: `scale(${props.scale || 1})` }}> | ||
{props.children} | ||
</div> | ||
</section> | ||
); | ||
}; |
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,44 @@ | ||
.site-section { | ||
width: 80vw; | ||
margin: 0 auto; | ||
|
||
.codesandbox { | ||
width: 80vw; | ||
height: 700px; | ||
overflow: hidden; | ||
border: 0; | ||
border-radius: 4px; | ||
box-shadow: 0 10px 30px #555; | ||
} | ||
|
||
.site-section-body { | ||
width: 80vw; | ||
text-align: center; | ||
} | ||
|
||
img { | ||
margin: 0 auto; | ||
border-radius: 4px; | ||
transform: scale(0.8); | ||
} | ||
@media screen and(max-width: 500px) { | ||
img { | ||
width: 400px; | ||
margin: 0 auto; | ||
border-radius: 4px; | ||
} | ||
|
||
.codesandbox { | ||
width: 400px; | ||
height: 700px; | ||
overflow: hidden; | ||
border: 0; | ||
border-radius: 4px; | ||
box-shadow: 0 10px 30px #555; | ||
} | ||
} | ||
} | ||
|
||
#root { | ||
overflow: hidden; | ||
} |
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