mirror of
https://github.com/phuoc-ng/csslayout.git
synced 2025-08-12 09:04:26 +02:00
Add related patterns for timeline
This commit is contained in:
@@ -7,6 +7,7 @@ import * as React from 'react';
|
|||||||
import { Helmet } from 'react-helmet';
|
import { Helmet } from 'react-helmet';
|
||||||
import Pattern from '../../constants/Pattern';
|
import Pattern from '../../constants/Pattern';
|
||||||
|
|
||||||
|
import RelatedPatterns from '../../components/RelatedPatterns';
|
||||||
import DetailsLayout from '../../layouts/DetailsLayout';
|
import DetailsLayout from '../../layouts/DetailsLayout';
|
||||||
import Block from '../../placeholders/Block';
|
import Block from '../../placeholders/Block';
|
||||||
import BrowserFrame from '../../placeholders/BrowserFrame';
|
import BrowserFrame from '../../placeholders/BrowserFrame';
|
||||||
@@ -22,8 +23,7 @@ const Details: React.FC<{}> = () => {
|
|||||||
<meta name="twitter:description" content="Create a timeline with CSS flexbox" />
|
<meta name="twitter:description" content="Create a timeline with CSS flexbox" />
|
||||||
<meta name="keywords" content="css flexbox, css timeline" />
|
<meta name="keywords" content="css flexbox, css timeline" />
|
||||||
</Helmet>
|
</Helmet>
|
||||||
<div className='p-8 pb-20'>
|
<BrowserFrame
|
||||||
<BrowserFrame
|
|
||||||
html={`
|
html={`
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<!-- Left vertical line -->
|
<!-- Left vertical line -->
|
||||||
@@ -111,77 +111,78 @@ css={`
|
|||||||
margin-left: 48px;
|
margin-left: 48px;
|
||||||
}
|
}
|
||||||
`}
|
`}
|
||||||
|
>
|
||||||
|
<div
|
||||||
|
style={{
|
||||||
|
alignItems: 'center',
|
||||||
|
display: 'flex',
|
||||||
|
flexDirection: 'column',
|
||||||
|
height: '100%',
|
||||||
|
justifyContent: 'center',
|
||||||
|
padding: '8px',
|
||||||
|
}}
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
style={{
|
style={{
|
||||||
alignItems: 'center',
|
position: 'relative',
|
||||||
display: 'flex',
|
width: '60%',
|
||||||
flexDirection: 'column',
|
|
||||||
height: '100%',
|
|
||||||
justifyContent: 'center',
|
|
||||||
padding: '8px',
|
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
style={{
|
style={{
|
||||||
position: 'relative',
|
borderRight: '2px solid #aaa',
|
||||||
width: '60%',
|
height: '100%',
|
||||||
|
left: '16px',
|
||||||
|
position: 'absolute',
|
||||||
|
top: 0,
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
<ul
|
||||||
|
style={{
|
||||||
|
listStyleType: 'none',
|
||||||
|
margin: 0,
|
||||||
|
padding: 0,
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<div
|
<li style={{ marginBottom: '8px' }}>
|
||||||
style={{
|
<div style={{ alignItems: 'center', display: 'flex', marginBottom: '4px' }}>
|
||||||
borderRight: '2px solid #aaa',
|
<Circle backgroundColor='#aaa' size={32} />
|
||||||
height: '100%',
|
<div style={{ flex: 1, marginLeft: '16px' }}>
|
||||||
left: '16px',
|
<div style={{ width: '80%' }}><Rectangle /></div>
|
||||||
position: 'absolute',
|
|
||||||
top: 0,
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
<ul
|
|
||||||
style={{
|
|
||||||
listStyleType: 'none',
|
|
||||||
margin: 0,
|
|
||||||
padding: 0,
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
<li style={{ marginBottom: '8px' }}>
|
|
||||||
<div style={{ alignItems: 'center', display: 'flex', marginBottom: '4px' }}>
|
|
||||||
<Circle backgroundColor='#aaa' size={32} />
|
|
||||||
<div style={{ flex: 1, marginLeft: '16px' }}>
|
|
||||||
<div style={{ width: '80%' }}><Rectangle /></div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
<div style={{ marginLeft: '48px' }}>
|
</div>
|
||||||
<Block numberOfBlocks={10} blockHeight={2} />
|
<div style={{ marginLeft: '48px' }}>
|
||||||
|
<Block numberOfBlocks={10} blockHeight={2} />
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
<li style={{ marginBottom: '8px' }}>
|
||||||
|
<div style={{ alignItems: 'center', display: 'flex', marginBottom: '4px' }}>
|
||||||
|
<Circle backgroundColor='#aaa' size={32} />
|
||||||
|
<div style={{ flex: 1, marginLeft: '16px' }}>
|
||||||
|
<div style={{ width: '60%' }}><Rectangle /></div>
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</div>
|
||||||
<li style={{ marginBottom: '8px' }}>
|
<div style={{ marginLeft: '48px' }}>
|
||||||
<div style={{ alignItems: 'center', display: 'flex', marginBottom: '4px' }}>
|
<Block numberOfBlocks={15} blockHeight={2} />
|
||||||
<Circle backgroundColor='#aaa' size={32} />
|
</div>
|
||||||
<div style={{ flex: 1, marginLeft: '16px' }}>
|
</li>
|
||||||
<div style={{ width: '60%' }}><Rectangle /></div>
|
<li style={{ marginBottom: '8px' }}>
|
||||||
</div>
|
<div style={{ alignItems: 'center', display: 'flex', marginBottom: '4px' }}>
|
||||||
|
<Circle backgroundColor='#aaa' size={32} />
|
||||||
|
<div style={{ flex: 1, marginLeft: '16px' }}>
|
||||||
|
<div style={{ width: '60%' }}><Rectangle /></div>
|
||||||
</div>
|
</div>
|
||||||
<div style={{ marginLeft: '48px' }}>
|
</div>
|
||||||
<Block numberOfBlocks={15} blockHeight={2} />
|
<div style={{ marginLeft: '48px' }}>
|
||||||
</div>
|
<Block numberOfBlocks={10} blockHeight={2} />
|
||||||
</li>
|
</div>
|
||||||
<li style={{ marginBottom: '8px' }}>
|
</li>
|
||||||
<div style={{ alignItems: 'center', display: 'flex', marginBottom: '4px' }}>
|
</ul>
|
||||||
<Circle backgroundColor='#aaa' size={32} />
|
|
||||||
<div style={{ flex: 1, marginLeft: '16px' }}>
|
|
||||||
<div style={{ width: '60%' }}><Rectangle /></div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div style={{ marginLeft: '48px' }}>
|
|
||||||
<Block numberOfBlocks={10} blockHeight={2} />
|
|
||||||
</div>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</BrowserFrame>
|
</div>
|
||||||
</div>
|
</BrowserFrame>
|
||||||
|
|
||||||
|
<RelatedPatterns patterns={[Pattern.ZigzagTimeline]} />
|
||||||
</DetailsLayout>
|
</DetailsLayout>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
@@ -7,6 +7,7 @@ import * as React from 'react';
|
|||||||
import { Helmet } from 'react-helmet';
|
import { Helmet } from 'react-helmet';
|
||||||
import Pattern from '../../constants/Pattern';
|
import Pattern from '../../constants/Pattern';
|
||||||
|
|
||||||
|
import RelatedPatterns from '../../components/RelatedPatterns';
|
||||||
import DetailsLayout from '../../layouts/DetailsLayout';
|
import DetailsLayout from '../../layouts/DetailsLayout';
|
||||||
import Block from '../../placeholders/Block';
|
import Block from '../../placeholders/Block';
|
||||||
import BrowserFrame from '../../placeholders/BrowserFrame';
|
import BrowserFrame from '../../placeholders/BrowserFrame';
|
||||||
@@ -23,8 +24,7 @@ const Details: React.FC<{}> = () => {
|
|||||||
<meta name="twitter:description" content="Create a zigzag timeline" />
|
<meta name="twitter:description" content="Create a zigzag timeline" />
|
||||||
<meta name="keywords" content="css timeline, css zigzag timeline" />
|
<meta name="keywords" content="css timeline, css zigzag timeline" />
|
||||||
</Helmet>
|
</Helmet>
|
||||||
<div className='p-8 pb-20'>
|
<BrowserFrame
|
||||||
<BrowserFrame
|
|
||||||
html={`
|
html={`
|
||||||
<div class="zigzag-timeline__item">
|
<div class="zigzag-timeline__item">
|
||||||
<!-- Milestone -->
|
<!-- Milestone -->
|
||||||
@@ -82,52 +82,53 @@ css={`
|
|||||||
transform: translate(50%, -50%);
|
transform: translate(50%, -50%);
|
||||||
}
|
}
|
||||||
`}
|
`}
|
||||||
|
>
|
||||||
|
<div
|
||||||
|
style={{
|
||||||
|
alignItems: 'center',
|
||||||
|
display: 'flex',
|
||||||
|
flexDirection: 'column',
|
||||||
|
height: '100%',
|
||||||
|
justifyContent: 'center',
|
||||||
|
margin: '0 auto',
|
||||||
|
padding: '0.5rem',
|
||||||
|
width: '60%',
|
||||||
|
}}
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
style={{
|
className='zigzag-timeline__item'
|
||||||
alignItems: 'center',
|
style={{
|
||||||
display: 'flex',
|
padding: '1rem 1.5rem',
|
||||||
flexDirection: 'column',
|
|
||||||
height: '100%',
|
|
||||||
justifyContent: 'center',
|
|
||||||
margin: '0 auto',
|
|
||||||
padding: '0.5rem',
|
|
||||||
width: '60%',
|
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<div
|
<div className='zigzag-timeline__milestone'/>
|
||||||
className='zigzag-timeline__item'
|
<div style={{ marginBottom: '1rem', width: '80%' }}><Rectangle /></div>
|
||||||
style={{
|
<Block numberOfBlocks={10} />
|
||||||
padding: '1rem 1.5rem',
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
<div className='zigzag-timeline__milestone'/>
|
|
||||||
<div style={{ marginBottom: '1rem', width: '80%' }}><Rectangle /></div>
|
|
||||||
<Block numberOfBlocks={10} />
|
|
||||||
</div>
|
|
||||||
<div
|
|
||||||
className='zigzag-timeline__item'
|
|
||||||
style={{
|
|
||||||
padding: '1rem 1.5rem',
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
<div className='zigzag-timeline__milestone' />
|
|
||||||
<div style={{ marginBottom: '1rem', width: '60%' }}><Rectangle /></div>
|
|
||||||
<Block numberOfBlocks={20} />
|
|
||||||
</div>
|
|
||||||
<div
|
|
||||||
className='zigzag-timeline__item'
|
|
||||||
style={{
|
|
||||||
padding: '1rem 1.5rem',
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
<div className='zigzag-timeline__milestone' />
|
|
||||||
<div style={{ marginBottom: '1rem', width: '70%' }}><Rectangle /></div>
|
|
||||||
<Block numberOfBlocks={15} />
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</BrowserFrame>
|
<div
|
||||||
</div>
|
className='zigzag-timeline__item'
|
||||||
|
style={{
|
||||||
|
padding: '1rem 1.5rem',
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<div className='zigzag-timeline__milestone' />
|
||||||
|
<div style={{ marginBottom: '1rem', width: '60%' }}><Rectangle /></div>
|
||||||
|
<Block numberOfBlocks={20} />
|
||||||
|
</div>
|
||||||
|
<div
|
||||||
|
className='zigzag-timeline__item'
|
||||||
|
style={{
|
||||||
|
padding: '1rem 1.5rem',
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<div className='zigzag-timeline__milestone' />
|
||||||
|
<div style={{ marginBottom: '1rem', width: '70%' }}><Rectangle /></div>
|
||||||
|
<Block numberOfBlocks={15} />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</BrowserFrame>
|
||||||
|
|
||||||
|
<RelatedPatterns patterns={[Pattern.Timeline]} />
|
||||||
</DetailsLayout>
|
</DetailsLayout>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
Reference in New Issue
Block a user