mirror of
https://github.com/phuoc-ng/csslayout.git
synced 2025-08-30 17:19:51 +02:00
Add CSS code for layout patterns
This commit is contained in:
@@ -22,45 +22,49 @@ const Details: React.FC<{}> = () => {
|
||||
<div className='p-8 pb-20'>
|
||||
<BrowserFrame
|
||||
html={`
|
||||
<div style="
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
">
|
||||
<div class="container">
|
||||
<header>
|
||||
...
|
||||
</header>
|
||||
<main style="
|
||||
/* Take the remaining height */
|
||||
flex-grow: 1;
|
||||
|
||||
/* Layout the left sidebar, main content and right sidebar */
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
">
|
||||
<main class="main">
|
||||
<!-- Left sidebar -->
|
||||
<aside style="
|
||||
width: 25%;
|
||||
">...</aside>
|
||||
<aside class="left">...</aside>
|
||||
|
||||
<!-- Main content -->
|
||||
<article style="
|
||||
/* Take the remaining width */
|
||||
flex-grow: 1;
|
||||
">
|
||||
...
|
||||
</article>
|
||||
<article class="middle">...</article>
|
||||
|
||||
<!-- Right sidebar -->
|
||||
<nav style="
|
||||
width: 20%;
|
||||
">...</nav>
|
||||
<nav class="right">...</nav>
|
||||
</main>
|
||||
<footer>
|
||||
...
|
||||
</footer>
|
||||
</div>
|
||||
`}
|
||||
css={``}
|
||||
css={`
|
||||
.container {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
.main {
|
||||
/* Take the remaining height */
|
||||
flex-grow: 1;
|
||||
|
||||
/* Layout the left sidebar, main content and right sidebar */
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
}
|
||||
.left {
|
||||
width: 25%;
|
||||
}
|
||||
.middle {
|
||||
/* Take the remaining width */
|
||||
flex-grow: 1;
|
||||
}
|
||||
.right {
|
||||
width: 20%;
|
||||
}
|
||||
`}
|
||||
>
|
||||
<div
|
||||
style={{
|
||||
|
Reference in New Issue
Block a user