mirror of
https://github.com/phuoc-ng/csslayout.git
synced 2025-08-06 06:07:33 +02:00
@@ -16,6 +16,7 @@ import Modal from './layouts/modal/Details';
|
||||
import Notification from './layouts/notification/Details';
|
||||
import Pagination from './layouts/pagination/Details';
|
||||
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 Sidebar from './layouts/sidebar/Details';
|
||||
@@ -45,6 +46,7 @@ const App = () => {
|
||||
<Route exact={true} path='/notification'><Notification /></Route>
|
||||
<Route exact={true} path='/pagination'><Pagination /></Route>
|
||||
<Route exact={true} path='/previous-next-buttons'><PreviousNextButtons /></Route>
|
||||
<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='/sidebar'><Sidebar /></Route>
|
||||
|
@@ -15,6 +15,7 @@ import ModalCover from './layouts/modal/Cover';
|
||||
import NotificationCover from './layouts/notification/Cover';
|
||||
import PaginationCover from './layouts/pagination/Cover';
|
||||
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 SidebarCover from './layouts/sidebar/Cover';
|
||||
@@ -163,6 +164,12 @@ const Home = () => {
|
||||
<h4 className="f5 mv0 pt3">Previous next buttons</h4>
|
||||
</Link>
|
||||
</div>
|
||||
<div className="pa1 w-20">
|
||||
<Link to="/pricing-table" className="link flex flex-column items-center justify-center tc hover-bg-black-10 br2 pa3">
|
||||
<PricingTableCover />
|
||||
<h4 className="f5 mv0 pt3">Pricing table</h4>
|
||||
</Link>
|
||||
</div>
|
||||
<div className="pa1 w-20">
|
||||
<Link to="/progress-bar" className="link flex flex-column items-center justify-center tc hover-bg-black-10 br2 pa3">
|
||||
<ProgressBarCover />
|
||||
|
45
client/layouts/pricing-table/Cover.jsx
Normal file
45
client/layouts/pricing-table/Cover.jsx
Normal file
@@ -0,0 +1,45 @@
|
||||
import React from 'react';
|
||||
|
||||
import Circle from '../../placeholders/Circle';
|
||||
import Frame from '../../placeholders/Frame';
|
||||
import Line from '../../placeholders/Line';
|
||||
import Rectangle from '../../placeholders/Rectangle';
|
||||
|
||||
const Cover = () => {
|
||||
return (
|
||||
<Frame>
|
||||
<div className="h-100 flex items-center justify-center ph2">
|
||||
<div className="ba br2 b--black-30 flex flex-column items-center justify-center pa1 mr1" style={{ flex: 1 }}>
|
||||
<div className="mb1"><Circle /></div>
|
||||
<div className="mb1 w-100">
|
||||
<div className="w-100 mb1"><Line /></div>
|
||||
<div className="w-100 mb1"><Line /></div>
|
||||
<div className="w-80"><Line /></div>
|
||||
</div>
|
||||
<Rectangle />
|
||||
</div>
|
||||
<div className="ba br2 b--black-30 flex flex-column items-center justify-center pa1 mr1" style={{ flex: 1 }}>
|
||||
<div className="mb1"><Circle /></div>
|
||||
<div className="mb1 w-100">
|
||||
<div className="w-100 mb1"><Line /></div>
|
||||
<div className="w-60 mb1"><Line /></div>
|
||||
<div className="w-80 mb1"><Line /></div>
|
||||
<div className="w-100 mb1"><Line /></div>
|
||||
<div className="w-80"><Line /></div>
|
||||
</div>
|
||||
<Rectangle />
|
||||
</div>
|
||||
<div className="ba br2 b--black-30 flex flex-column items-center justify-center pa1" style={{ flex: 1 }}>
|
||||
<div className="mb1"><Circle /></div>
|
||||
<div className="mb1 w-100">
|
||||
<div className="w-100 mb1"><Line /></div>
|
||||
<div className="w-80"><Line /></div>
|
||||
</div>
|
||||
<Rectangle />
|
||||
</div>
|
||||
</div>
|
||||
</Frame>
|
||||
);
|
||||
};
|
||||
|
||||
export default Cover;
|
100
client/layouts/pricing-table/Details.jsx
Normal file
100
client/layouts/pricing-table/Details.jsx
Normal file
@@ -0,0 +1,100 @@
|
||||
import React from 'react';
|
||||
|
||||
import DetailsLayout from '../../DetailsLayout';
|
||||
import Circle from '../../placeholders/Circle';
|
||||
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 ∙ Pricing table');
|
||||
|
||||
return (
|
||||
<DetailsLayout>
|
||||
<h1 className="f1 tc">Pricing table</h1>
|
||||
<BrowserFrame
|
||||
content={
|
||||
<div className="h-100 flex items-center justify-center pa3">
|
||||
<div className="w-60 flex items-center justify-center">
|
||||
<div className="ba br2 b--black-30 flex flex-column items-center justify-center pa3 mh2" style={{ flex: 1 }}>
|
||||
<div className="mb3 w-60"><Rectangle /></div>
|
||||
<div className="mb3"><Circle size={64} /></div>
|
||||
<div className="mb3 w-100">
|
||||
<Block numberOfBlocks={10} />
|
||||
</div>
|
||||
<div className="w-40"><Rectangle height={32} /></div>
|
||||
</div>
|
||||
<div className="ba br2 b--black-30 flex flex-column items-center justify-center pa3 mh2" style={{ flex: 1 }}>
|
||||
<div className="mb3 w-60"><Rectangle /></div>
|
||||
<div className="mb3"><Circle size={64} /></div>
|
||||
<div className="mb3 w-100">
|
||||
<Block numberOfBlocks={20} />
|
||||
</div>
|
||||
<div className="w-40"><Rectangle height={32} /></div>
|
||||
</div>
|
||||
<div className="ba br2 b--black-30 flex flex-column items-center justify-center pa3 mh2" style={{ flex: 1 }}>
|
||||
<div className="mb3 w-60"><Rectangle /></div>
|
||||
<div className="mb3"><Circle size={64} /></div>
|
||||
<div className="mb3 w-100">
|
||||
<Block numberOfBlocks={10} />
|
||||
</div>
|
||||
<div className="w-40"><Rectangle height={32} /></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
source={
|
||||
<SampleCode
|
||||
lang="html"
|
||||
code={`
|
||||
<div style="
|
||||
/* Content is centered horizontally */
|
||||
align-items: center;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
">
|
||||
<!-- Pricing column -->
|
||||
<div style="
|
||||
/* Content is centered vertically */
|
||||
align-items: center;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
|
||||
/* Make all columns have the same width */
|
||||
flex: 1;
|
||||
|
||||
/* OPTIONAL: Space between columns */
|
||||
margin: 0 8px;
|
||||
|
||||
/* OPTIONAL: Border */
|
||||
border: 1px solid rgba(0, 0, 0, 0.3);
|
||||
border-radius: 4px;
|
||||
">
|
||||
<!-- Title -->
|
||||
...
|
||||
|
||||
<!-- Price -->
|
||||
...
|
||||
|
||||
<!-- Description -->
|
||||
...
|
||||
|
||||
<!-- Button -->
|
||||
...
|
||||
</div>
|
||||
|
||||
<!-- Repeated pricing columns -->
|
||||
...
|
||||
</div>
|
||||
`}
|
||||
/>
|
||||
}
|
||||
/>
|
||||
</DetailsLayout>
|
||||
);
|
||||
};
|
||||
|
||||
export default Details;
|
@@ -7,7 +7,7 @@ const Cover = () => {
|
||||
<Frame>
|
||||
<div className="h-100 flex flex-column items-center justify-center pa2">
|
||||
<div className="h1 w-100 br-pill bg-black-10 pa1">
|
||||
<div className="w-40 br-pill h-100 bg-blue" />
|
||||
<div className="w-40 br-pill h-100 bg-black-30" />
|
||||
</div>
|
||||
</div>
|
||||
</Frame>
|
||||
|
@@ -6,7 +6,7 @@ const Cover = () => {
|
||||
return (
|
||||
<Frame>
|
||||
<div className="h-100 flex flex-column items-center justify-center pa2">
|
||||
<div className="ba b--blue bg-blue br-pill h1 w2 flex justify-end">
|
||||
<div className="ba b--black-10 bg-black-30 br-pill h1 w2 flex justify-end">
|
||||
<div className="bg-white br-pill w1 h-100" />
|
||||
</div>
|
||||
</div>
|
||||
|
@@ -29,7 +29,7 @@ const BrowserFrame = ({ content, source }) => {
|
||||
className="overflow-scroll absolute top-0 left-0 h-100 w-100"
|
||||
style={{
|
||||
backfaceVisibility: 'hidden',
|
||||
'-webkit-backface-visibility': 'hidden',
|
||||
WebkitBackfaceVisibility: 'hidden',
|
||||
}}>
|
||||
{content}
|
||||
</div>
|
||||
@@ -37,8 +37,8 @@ const BrowserFrame = ({ content, source }) => {
|
||||
className="absolute top-0 left-0 h-100 w-100"
|
||||
style={{
|
||||
backfaceVisibility: 'hidden',
|
||||
'-webkit-backface-visibility': 'hidden',
|
||||
transform: 'rotateY(180deg)',
|
||||
WebkitBackfaceVisibility: 'hidden',
|
||||
}}
|
||||
>
|
||||
{source}
|
||||
|
Reference in New Issue
Block a user