mirror of
https://github.com/phuoc-ng/csslayout.git
synced 2025-08-31 17:41:42 +02:00
Reorganize folders
This commit is contained in:
38
client/patterns/sticky-footer/Cover.jsx
Normal file
38
client/patterns/sticky-footer/Cover.jsx
Normal file
@@ -0,0 +1,38 @@
|
||||
import React from 'react';
|
||||
|
||||
import Frame from '../../placeholders/Frame';
|
||||
import Line from '../../placeholders/Line';
|
||||
|
||||
const Cover = () => {
|
||||
return (
|
||||
<Frame>
|
||||
<div className="h-100 flex flex-column">
|
||||
<div className="flex-shrink-0 b--black-30 br bw2">
|
||||
<div className="w-100 flex items-center pa2">
|
||||
<div className="w1"><Line /></div>
|
||||
<div className="w1 ml-auto"><Line /></div>
|
||||
<div className="w1 ml1"><Line /></div>
|
||||
</div>
|
||||
<Line />
|
||||
</div>
|
||||
<div className="flex-grow-1 b--black-30 br bw2">
|
||||
<div className="pa2">
|
||||
<div className="w3 mb2"><Line /></div>
|
||||
<div className="w3 mb2"><Line /></div>
|
||||
<div className="w2"><Line /></div>
|
||||
</div>
|
||||
</div>
|
||||
<div className="flex-shrink-0">
|
||||
<Line />
|
||||
<div className="w-100 flex items-center pa2">
|
||||
<div className="w1"><Line /></div>
|
||||
<div className="w1 ml1"><Line /></div>
|
||||
<div className="w1 ml1"><Line /></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</Frame>
|
||||
);
|
||||
};
|
||||
|
||||
export default Cover;
|
56
client/patterns/sticky-footer/Details.jsx
Normal file
56
client/patterns/sticky-footer/Details.jsx
Normal file
@@ -0,0 +1,56 @@
|
||||
import React from 'react';
|
||||
|
||||
import DetailsLayout from '../../layouts/DetailsLayout';
|
||||
import Block from '../../placeholders/Block';
|
||||
import BrowserFrame from '../../placeholders/BrowserFrame';
|
||||
import Rectangle from '../../placeholders/Rectangle';
|
||||
import SampleCode from '../../SampleCode';
|
||||
|
||||
const Details = () => {
|
||||
return (
|
||||
<DetailsLayout title="Sticky footer">
|
||||
<div className="lh-copy mb3">
|
||||
The footer always sticks to the bottom if the main content is short.
|
||||
</div>
|
||||
<BrowserFrame
|
||||
content={
|
||||
<div className="h-100 flex flex-column">
|
||||
<div className="flex-shrink-0 bb b--black-30 pa3">
|
||||
<div className="w-50"><Rectangle /></div>
|
||||
</div>
|
||||
<div className="flex-grow-1 pa3">
|
||||
<Block numberOfBlocks={20} />
|
||||
</div>
|
||||
<div className="flex-shrink-0 bt b--black-30 pa3">
|
||||
<div className="w-40"><Rectangle /></div>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
source={
|
||||
<SampleCode
|
||||
lang="html"
|
||||
code={`
|
||||
<div style="
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
height: 100%;
|
||||
">
|
||||
<header style="flex-shrink: 0;">
|
||||
...
|
||||
</header>
|
||||
<main style="flex-grow: 1;">
|
||||
...
|
||||
</main>
|
||||
<footer style="flex-shrink: 0;">
|
||||
...
|
||||
</footer>
|
||||
</div>
|
||||
`}
|
||||
/>
|
||||
}
|
||||
/>
|
||||
</DetailsLayout>
|
||||
);
|
||||
};
|
||||
|
||||
export default Details;
|
Reference in New Issue
Block a user