mirror of
https://github.com/phuoc-ng/csslayout.git
synced 2025-08-27 07:44:28 +02:00
Add split screen
This commit is contained in:
28
client/layouts/split-screen/Cover.jsx
Normal file
28
client/layouts/split-screen/Cover.jsx
Normal file
@@ -0,0 +1,28 @@
|
||||
import React from 'react';
|
||||
|
||||
import Dot from '../../placeholders/Dot';
|
||||
import Frame from '../../placeholders/Frame';
|
||||
import Line from '../../placeholders/Line';
|
||||
|
||||
const Cover = () => {
|
||||
return (
|
||||
<Frame>
|
||||
<div className="h-100 flex">
|
||||
<div className="b--black-30 br flex flex-column justify-center items-center" style={{ flex: 1 }}>
|
||||
<div className="mb1"><Dot /></div>
|
||||
</div>
|
||||
<div className="flex flex-column justify-center" style={{ flex: 1 }}>
|
||||
<div className="pa2">
|
||||
<div className="mb1 w-100"><Line /></div>
|
||||
<div className="mb1 w-100"><Line /></div>
|
||||
<div className="mb1 w-80"><Line /></div>
|
||||
<div className="mb1 w-80"><Line /></div>
|
||||
<div className="w-60"><Line /></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</Frame>
|
||||
);
|
||||
};
|
||||
|
||||
export default Cover;
|
56
client/layouts/split-screen/Details.jsx
Normal file
56
client/layouts/split-screen/Details.jsx
Normal file
@@ -0,0 +1,56 @@
|
||||
import React from 'react';
|
||||
|
||||
import DetailsLayout from '../../DetailsLayout';
|
||||
import BrowserFrame from '../../placeholders/BrowserFrame';
|
||||
import Block from '../../placeholders/Block';
|
||||
import Dot from '../../placeholders/Dot';
|
||||
import Rectangle from '../../placeholders/Rectangle';
|
||||
import SampleCode from '../../SampleCode';
|
||||
import useDocumentTitle from '../../useDocumentTitle';
|
||||
|
||||
const Details = () => {
|
||||
useDocumentTitle('CSS Layout ∙ Split screen');
|
||||
|
||||
return (
|
||||
<DetailsLayout>
|
||||
<h1 className="f1 tc">Split screen</h1>
|
||||
<BrowserFrame
|
||||
content={
|
||||
<div className="h-100 flex">
|
||||
<div className="b--black-30 br flex flex-column justify-center items-center" style={{ flex: 1 }}>
|
||||
<div className="mb3"><Dot size={128} /></div>
|
||||
<div className="w-60"><Rectangle /></div>
|
||||
</div>
|
||||
<div className="flex flex-column justify-center" style={{ flex: 1 }}>
|
||||
<div className="pa4">
|
||||
<div className="mb4"><Rectangle /></div>
|
||||
<div className="mb4"><Block numberOfBlocks={15} /></div>
|
||||
<Block numberOfBlocks={10} />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
source={
|
||||
<SampleCode
|
||||
lang="html"
|
||||
code={`
|
||||
<div style="display: flex;">
|
||||
<!-- Left content -->
|
||||
<div style="flex: 1;">
|
||||
...
|
||||
</div>
|
||||
|
||||
<!-- Right content -->
|
||||
<div style="flex: 1;">
|
||||
...
|
||||
</div>
|
||||
</div>
|
||||
`}
|
||||
/>
|
||||
}
|
||||
/>
|
||||
</DetailsLayout>
|
||||
);
|
||||
};
|
||||
|
||||
export default Details;
|
Reference in New Issue
Block a user