1
0
mirror of https://github.com/phuoc-ng/csslayout.git synced 2025-08-16 11:04:30 +02:00
This commit is contained in:
Phuoc Nguyen
2019-11-17 15:55:49 +07:00
parent a8000d1b42
commit d9c87781f1
4 changed files with 100 additions and 0 deletions

View File

@@ -0,0 +1,28 @@
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="flex flex-column h-100 pa2">
<div className="w-100 mb2">
<Rectangle height={32} />
</div>
<div style={{ flex: 1 }}>
<div className="w-100 mb1"><Line /></div>
<div className="w-100 mb1"><Line /></div>
<div className="w-80 mb1"><Line /></div>
<div className="w-60 mb2"><Line /></div>
<div className="w-30">
<Rectangle height={8} />
</div>
</div>
</div>
</Frame>
);
};
export default Cover;

View File

@@ -0,0 +1,63 @@
import React from 'react';
import DetailsLayout from '../../DetailsLayout';
import Block from '../../placeholders/Block';
import BrowserFrame from '../../placeholders/BrowserFrame';
import Rectangle from '../../placeholders/Rectangle';
import SampleCode from '../../SampleCode';
import useDocumentTitle from '../../hooks/useDocumentTitle';
const Details = () => {
useDocumentTitle('CSS Layout ∙ Card');
return (
<DetailsLayout>
<h1 className="f1 tc">Card</h1>
<BrowserFrame
content={
<div className="h-100 flex flex-column items-center justify-center pa3">
<div className="b--black-30 ba br2 flex flex-column w5">
<Rectangle height={150} />
<div className="pa3" style={{ flex: 1 }}>
<div className="mb3"><Block numberOfBlocks={15} /></div>
<div className="w4">
<Rectangle height={32} />
</div>
</div>
</div>
</div>
}
source={
<SampleCode
lang="html"
code={`
<div style="
display: flex;
flex-direction: column;
">
<!-- Cover -->
<div style="
height: 150px;
width: 100%;
">
...
</div>
<!-- Content -->
<div style="
/* Take available height */
flex: 1;
">
...
</div>
...
</div>
`}
/>
}
/>
</DetailsLayout>
);
};
export default Details;