mirror of
https://github.com/phuoc-ng/csslayout.git
synced 2025-08-06 14:16:50 +02:00
@@ -19,6 +19,7 @@ import PreviousNextButtons from './layouts/previous-next-buttons/Details';
|
||||
import PricingTable from './layouts/pricing-table/Details';
|
||||
import ProgressBar from './layouts/progress-bar/Details';
|
||||
import SameHeightColumns from './layouts/same-height-columns/Details';
|
||||
import Separator from './layouts/separator/Details';
|
||||
import Sidebar from './layouts/sidebar/Details';
|
||||
import Slider from './layouts/slider/Details';
|
||||
import SplitScreen from './layouts/split-screen/Details';
|
||||
@@ -49,6 +50,7 @@ const App = () => {
|
||||
<Route exact={true} path='/pricing-table'><PricingTable /></Route>
|
||||
<Route exact={true} path='/progress-bar'><ProgressBar /></Route>
|
||||
<Route exact={true} path='/same-height-columns'><SameHeightColumns /></Route>
|
||||
<Route exact={true} path='/separator'><Separator /></Route>
|
||||
<Route exact={true} path='/sidebar'><Sidebar /></Route>
|
||||
<Route exact={true} path='/slider'><Slider /></Route>
|
||||
<Route exact={true} path='/split-screen'><SplitScreen /></Route>
|
||||
|
@@ -18,6 +18,7 @@ import PreviousNextButtonCover from './layouts/previous-next-buttons/Cover';
|
||||
import PricingTableCover from './layouts/pricing-table/Cover';
|
||||
import ProgressBarCover from './layouts/progress-bar/Cover';
|
||||
import SameHeightColumnsCover from './layouts/same-height-columns/Cover';
|
||||
import SeparatorCover from './layouts/separator/Cover';
|
||||
import SidebarCover from './layouts/sidebar/Cover';
|
||||
import SliderCover from './layouts/slider/Cover';
|
||||
import SplitScreenCover from './layouts/split-screen/Cover';
|
||||
@@ -202,6 +203,12 @@ const Home = () => {
|
||||
<h4 className="f5 mv0 pt3">Same height columns</h4>
|
||||
</Link>
|
||||
</div>
|
||||
<div className="pa1 w-20">
|
||||
<Link to="/separator" className="link flex flex-column items-center justify-center tc hover-bg-black-10 br2 pa3">
|
||||
<SeparatorCover />
|
||||
<h4 className="f5 mv0 pt3">Separator</h4>
|
||||
</Link>
|
||||
</div>
|
||||
<div className="pa1 w-20">
|
||||
<Link to="/slider" className="link flex flex-column items-center justify-center tc hover-bg-black-10 br2 pa3">
|
||||
<SliderCover />
|
||||
|
21
client/layouts/separator/Cover.jsx
Normal file
21
client/layouts/separator/Cover.jsx
Normal file
@@ -0,0 +1,21 @@
|
||||
import React from 'react';
|
||||
|
||||
import Frame from '../../placeholders/Frame';
|
||||
import Line from '../../placeholders/Line';
|
||||
import Rectangle from '../../placeholders/Rectangle';
|
||||
|
||||
const Cover = () => {
|
||||
return (
|
||||
<Frame>
|
||||
<div className="h-100 flex flex-column items-center justify-center">
|
||||
<div className="flex items-center h1 w-80">
|
||||
<div style={{ flex: 1 }}><Line /></div>
|
||||
<div className="w-25 mh1"><Rectangle /></div>
|
||||
<div style={{ flex: 1 }}><Line /></div>
|
||||
</div>
|
||||
</div>
|
||||
</Frame>
|
||||
);
|
||||
};
|
||||
|
||||
export default Cover;
|
63
client/layouts/separator/Details.jsx
Normal file
63
client/layouts/separator/Details.jsx
Normal file
@@ -0,0 +1,63 @@
|
||||
import React from 'react';
|
||||
|
||||
import DetailsLayout from '../../DetailsLayout';
|
||||
import BrowserFrame from '../../placeholders/BrowserFrame';
|
||||
import Rectangle from '../../placeholders/Rectangle';
|
||||
import SampleCode from '../../SampleCode';
|
||||
|
||||
const Details = () => {
|
||||
return (
|
||||
<DetailsLayout title="Separator">
|
||||
<BrowserFrame
|
||||
content={
|
||||
<div className="h-100 flex flex-column items-center justify-center">
|
||||
<div className="flex items-center w-60 relative">
|
||||
<div className="absolute bg-white ph2" style={{ left: '50%', top: '50%', transform: 'translate(-50%, -50%)' }}>
|
||||
<div className="w4"><Rectangle height={16} /></div>
|
||||
</div>
|
||||
<div className="bb b--black-30 w-100" style={{ height: '1px' }} />
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
source={
|
||||
<SampleCode
|
||||
lang="html"
|
||||
code={`
|
||||
<div style="
|
||||
/* Content is centered horizontally */
|
||||
align-items: center;
|
||||
display: flex;
|
||||
|
||||
/* Used to set the position of text */
|
||||
position: relative;
|
||||
">
|
||||
<!-- Text -->
|
||||
<div style="
|
||||
/* We won't see the separator line */
|
||||
background: #FFF;
|
||||
|
||||
/* Displayed at the center of container */
|
||||
left: 50%;
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
">
|
||||
...
|
||||
</div>
|
||||
|
||||
<!-- Separator line -->
|
||||
<div style="
|
||||
border-bottom: 1px solid rgba(0, 0, 0, 0.3);
|
||||
height: 1px;
|
||||
width: 100%;
|
||||
" />
|
||||
</div>
|
||||
`}
|
||||
/>
|
||||
}
|
||||
/>
|
||||
</DetailsLayout>
|
||||
);
|
||||
};
|
||||
|
||||
export default Details;
|
Reference in New Issue
Block a user