1
0
mirror of https://github.com/phuoc-ng/csslayout.git synced 2025-08-08 07:07:15 +02:00

Update layout

This commit is contained in:
Phuoc Nguyen
2020-04-04 21:55:03 +07:00
parent e23ecae35b
commit 90946d08b2
6 changed files with 162 additions and 217 deletions

View File

@@ -7,7 +7,7 @@
<link href="https://fonts.googleapis.com/css?family=Source+Code+Pro&display=swap" rel="stylesheet"> <link href="https://fonts.googleapis.com/css?family=Source+Code+Pro&display=swap" rel="stylesheet">
</head> </head>
<body class='font-sans w-full'> <body class='font-sans w-full'>
<div id="root" class="m-auto max-w-6xl"></div> <div id="root"></div>
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-139616701-3"></script> <script async src="https://www.googletagmanager.com/gtag/js?id=UA-139616701-3"></script>
<script> <script>
window.dataLayer = window.dataLayer || []; window.dataLayer = window.dataLayer || [];

View File

@@ -39,7 +39,7 @@ const DetailsLayout: React.FC<DetailsLayoutProps> = ({ title, children }) => {
<span className='mx-2'>/</span> <span className='mx-2'>/</span>
<h1>{title}</h1> <h1>{title}</h1>
</div> </div>
<div className='xl:border-l xl:border-t xl:border-r xl:border-gray-400'> <div className='xl:border xl:border-gray-400'>
{children} {children}
</div> </div>
</Layout> </Layout>

View File

@@ -9,79 +9,13 @@ import SubscribeForm from './SubscribeForm';
const Footer: React.FC<{}> = () => { const Footer: React.FC<{}> = () => {
return ( return (
<> <div className='border-t pt-6 pb-16 border-gray-400'>
<div <div className='ml-auto mr-auto max-w-4xl px-2 lg:px-0'>
className='xl:border-l xl:border-r xl:border-gray-400'
style={{
padding: '32px',
textAlign: 'center',
}}
>
<div style={{ lineHeight: 1.5, marginBottom: '12px' }}>
Hit the Subscribe button for the latest news on my tools. No spam. Ever!
</div>
<SubscribeForm /> <SubscribeForm />
</div> <div>
<div <h3 className='text-xl sm:text-2xl font-semibold mb-2'>Products</h3>
className='sm:flex md:border-b md:border-gray-400 xl:border-l xl:border-r xl:border-b xl:border-gray-400 xl:mb-16' <ul className='flex flex-wrap -ml-1 -mr-1'>
> <li className='w-1/2 sm:w-1/3 px-1 mb-6'>
<div
className='border-t border-gray-400 sm:border-r'
style={{
display: 'flex',
flex: 1,
fontSize: '16px',
lineHeight: 1.5,
padding: '24px',
}}
>
<ul
style={{
fontWeight: 500,
lineHeight: 1.5,
listStyleType: 'none',
margin: 0,
padding: 0,
width: '100%',
}}
>
<li style={{ alignItems: 'center', display: 'flex' }}>
<h3
style={{
fontSize: '20px',
fontWeight: 700,
margin: 0,
padding: '0 8px 0 0',
}}
>
.products
</h3>
&#123;
</li>
<ul style={{ listStyleType: 'none', margin: 0, paddingLeft: '24px' }}>
<li>
<a
href="https://csslayout.io"
rel="noopener noreferrer"
style={{ textDecoration: 'none' }}
target="_blank"
title="CSS Layout - a collection of popular layouts and patterns made with CSS"
>
css-layout,
</a>
</li>
<li>
<a
href="https://formvalidation.io"
rel="noopener noreferrer"
style={{ textDecoration: 'none' }}
target="_blank"
title="FormValidation - the best validation library for JavaScript"
>
form-validation,
</a>
</li>
<li>
<a <a
href="https://blur.page" href="https://blur.page"
rel="noopener noreferrer" rel="noopener noreferrer"
@@ -89,10 +23,59 @@ const Footer: React.FC<{}> = () => {
target="_blank" target="_blank"
title="BlurPage - a browser extension to hide sensitive element on page" title="BlurPage - a browser extension to hide sensitive element on page"
> >
blur-page, <div className='font-semibold'>Blur Page</div>
<span className='text-gray-600'>a browser extension to hide sensitive element on page</span>
</a> </a>
</li> </li>
<li> <li className='w-1/2 sm:w-1/3 px-1 mb-6'>
<a
href="https://csslayout.io"
rel="noopener noreferrer"
style={{ textDecoration: 'none' }}
target="_blank"
title="CSS Layout - a collection of popular layouts and patterns made with CSS"
>
<div className='font-semibold'>CSS Layout</div>
<span className='text-gray-600'>a collection of popular layouts and patterns made with CSS</span>
</a>
</li>
<li className='w-1/2 sm:w-1/3 px-1 mb-6'>
<a
href="https://fakenumbers.io"
rel="noopener noreferrer"
style={{ textDecoration: 'none' }}
target="_blank"
title="Fake Numbers - a JavaScript library to fake a number"
>
<div className='font-semibold'>Fake Numbers</div>
<span className='text-gray-600'>a JavaScript library to fake a number</span>
</a>
</li>
<li className='w-1/2 sm:w-1/3 px-1 mb-6'>
<a
href="https://formvalidation.io"
rel="noopener noreferrer"
style={{ textDecoration: 'none' }}
target="_blank"
title="FormValidation - the best validation library for JavaScript"
>
<div className='font-semibold'>Form Validation</div>
<span className='text-gray-600'>the best validation library for JavaScript</span>
</a>
</li>
<li className='w-1/2 sm:w-1/3 px-1 mb-6'>
<a
href="https://htmldom.dev"
rel="noopener noreferrer"
style={{ textDecoration: 'none' }}
target="_blank"
title="HTML DOM - Common tasks of managing HTML DOM with native API"
>
<div className='font-semibold'>HTML DOM</div>
<span className='text-gray-600'>common tasks of managing HTML DOM with vanilla JavaScript</span>
</a>
</li>
<li className='w-1/2 sm:w-1/3 px-1 mb-6'>
<a <a
href="https://react-pdf-viewer.dev" href="https://react-pdf-viewer.dev"
rel="noopener noreferrer" rel="noopener noreferrer"
@@ -100,100 +83,57 @@ const Footer: React.FC<{}> = () => {
target="_blank" target="_blank"
title="React PDF Viewer - a PDF viewer made for React" title="React PDF Viewer - a PDF viewer made for React"
> >
react-pdf-viewer, <div className='font-semibold'>React PDF Viewer</div>
<span className='text-gray-600'>a PDF viewer made for React</span>
</a> </a>
</li> </li>
</ul> </ul>
<li>&#125;</li>
</ul>
</div> </div>
<div
className='border-t border-gray-400' <div className='mt-6'>
style={{ <h3 className='text-xl sm:text-2xl font-semibold mb-2'>Follow me <span className='font-light text-gray-600 ml-2'>I love building products!</span></h3>
flex: 1, <ul className='flex'>
fontSize: '16px', <li className='flex-1'>
lineHeight: 1.5,
padding: '24px',
}}
>
<ul
style={{
fontWeight: 500,
lineHeight: 1.5,
listStyleType: 'none',
margin: '0 0 16px 0',
padding: 0,
width: '100%',
}}
>
<li style={{ alignItems: 'center', display: 'flex' }}>
<h3
style={{
fontSize: '20px',
fontWeight: 700,
margin: 0,
padding: '0 8px 0 0',
}}
>
.about
</h3>
&#123;
</li>
<ul style={{ listStyleType: 'none', margin: 0, paddingLeft: '24px' }}>
<li style={{ alignItems: 'center', display: 'flex' }}>
<div>twitter:</div>
<a <a
href="https://twitter.com/nghuuphuoc" href="https://twitter.com/nghuuphuoc"
rel="noopener noreferrer" rel="noopener noreferrer"
style={{ marginLeft: 'auto', textDecoration: 'none' }} style={{ textDecoration: 'none' }}
target="_blank" target="_blank"
> >
@nghuuphuoc <div className='font-semibold'>Twitter</div>
<span className='text-gray-600'>@nghuuphuoc</span>
</a> </a>
<div>;</div>
</li> </li>
<li style={{ alignItems: 'center', display: 'flex' }}> <li className='flex-1'>
<div>dev.to:</div>
<a <a
href="https://dev.to/phuocng" href="https://dev.to/phuocng"
rel="noopener noreferrer" rel="noopener noreferrer"
style={{ marginLeft: 'auto', textDecoration: 'none' }} style={{ textDecoration: 'none' }}
target="_blank" target="_blank"
> >
@phuocng <div className='font-semibold'>dev.to</div>
<span className='text-gray-600'>@phuocng</span>
</a> </a>
<div>;</div>
</li> </li>
<li style={{ alignItems: 'center', display: 'flex' }}> <li className='flex-1'>
<div>email:</div>
<a <a
href="mailto: me@phuoc.ng" href="https://github.com/phuoc-ng"
rel="noopener noreferrer" rel="noopener noreferrer"
style={{ marginLeft: 'auto', textDecoration: 'none' }} style={{ textDecoration: 'none' }}
target="_blank" target="_blank"
> >
me@phuoc.ng <div className='font-semibold'>GitHub</div>
<span className='text-gray-600'>@phuoc-ng</span>
</a> </a>
<div>;</div>
</li>
<li style={{ alignItems: 'center', display: 'flex' }}>
<div>github:</div>
<a
href="https://github.com/phuoc-ng/csslayout"
rel="noopener noreferrer"
style={{ marginLeft: 'auto', textDecoration: 'none' }}
target="_blank"
>
phuoc-ng/csslayout
</a>
<div>;</div>
</li> </li>
</ul> </ul>
<li>&#125;</li> </div>
</ul>
<div className='pt-4'>
© 2020 Nguyen Huu Phuoc. All rights reserved
</div>
</div> </div>
</div> </div>
</>
); );
}; };

View File

@@ -16,10 +16,10 @@ const Layout: React.FC<{}> = ({ children }) => {
return ( return (
<> <>
<Github /> <Github />
<div style={{ margin: '0 auto', position: 'relative' }}> <div className="ml-auto mr-auto max-w-4xl mb-12">
{children} {children}
<Footer />
</div> </div>
<Footer />
</> </>
); );
}; };

View File

@@ -7,6 +7,10 @@ import React from 'react';
const SubscribeForm: React.FC<{}> = () => { const SubscribeForm: React.FC<{}> = () => {
return ( return (
<div className='text-center mb-8'>
<div className='mb-4'>
Hit the Subscribe button for the latest news on my tools. No spam. Ever!
</div>
<form <form
action="https://csslayout.us4.list-manage.com/subscribe/post?u=77d0bf6497a2cdbb36f08587c&amp;id=e8a912009a" action="https://csslayout.us4.list-manage.com/subscribe/post?u=77d0bf6497a2cdbb36f08587c&amp;id=e8a912009a"
method="post" method="post"
@@ -48,6 +52,7 @@ const SubscribeForm: React.FC<{}> = () => {
Subscribe Subscribe
</button> </button>
</form> </form>
</div>
); );
}; };

View File

@@ -166,7 +166,7 @@ const ExplorePage = () => {
<section> <section>
<Heading title="Feedback" /> <Heading title="Feedback" />
<div className='xl:border-l xl:border-r xl:border-gray-400' style={{ display: 'flex', flexWrap: 'wrap', padding: '32px' }}> <div className='xl:border-b xl:border-l xl:border-r xl:border-gray-400' style={{ display: 'flex', flexWrap: 'wrap', padding: '32px' }}>
<CoverCard pattern={Pattern.Modal} /> <CoverCard pattern={Pattern.Modal} />
<CoverCard pattern={Pattern.Notification} /> <CoverCard pattern={Pattern.Notification} />
<CoverCard pattern={Pattern.PopoverArrow} /> <CoverCard pattern={Pattern.PopoverArrow} />