mirror of
https://github.com/phuoc-ng/csslayout.git
synced 2025-08-14 01:54:47 +02:00
Tweak the details page
This commit is contained in:
@@ -3,14 +3,10 @@ import React from 'react';
|
||||
import DetailsLayout from '../../DetailsLayout';
|
||||
import BrowserFrame from '../../placeholders/BrowserFrame';
|
||||
import SampleCode from '../../SampleCode';
|
||||
import useDocumentTitle from '../../hooks/useDocumentTitle';
|
||||
|
||||
const Details = () => {
|
||||
useDocumentTitle('CSS Layout ∙ Badge');
|
||||
|
||||
return (
|
||||
<DetailsLayout>
|
||||
<h1 className="f1 tc">Badge</h1>
|
||||
<DetailsLayout title="Badge">
|
||||
<BrowserFrame
|
||||
content={
|
||||
<div className="h-100 flex flex-column items-center justify-center">
|
||||
|
@@ -4,14 +4,10 @@ import DetailsLayout from '../../DetailsLayout';
|
||||
import BrowserFrame from '../../placeholders/BrowserFrame';
|
||||
import Rectangle from '../../placeholders/Rectangle';
|
||||
import SampleCode from '../../SampleCode';
|
||||
import useDocumentTitle from '../../hooks/useDocumentTitle';
|
||||
|
||||
const Details = () => {
|
||||
useDocumentTitle('CSS Layout ∙ Breadcrumb');
|
||||
|
||||
return (
|
||||
<DetailsLayout>
|
||||
<h1 className="f1 tc">Breadcrumb</h1>
|
||||
<DetailsLayout title="Breadcrumb">
|
||||
<BrowserFrame
|
||||
content={
|
||||
<div className="h-100 flex flex-column items-center justify-center">
|
||||
|
@@ -5,14 +5,10 @@ import BrowserFrame from '../../placeholders/BrowserFrame';
|
||||
import Circle from '../../placeholders/Circle';
|
||||
import Rectangle from '../../placeholders/Rectangle';
|
||||
import SampleCode from '../../SampleCode';
|
||||
import useDocumentTitle from '../../hooks/useDocumentTitle';
|
||||
|
||||
const Details = () => {
|
||||
useDocumentTitle('CSS Layout ∙ Button with icon');
|
||||
|
||||
return (
|
||||
<DetailsLayout>
|
||||
<h1 className="f1 tc">Button with icon</h1>
|
||||
<DetailsLayout title="Button with icon">
|
||||
<BrowserFrame
|
||||
content={
|
||||
<div className="h-100 flex flex-column items-center justify-center">
|
||||
|
@@ -5,14 +5,10 @@ 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 ∙ Card');
|
||||
|
||||
return (
|
||||
<DetailsLayout>
|
||||
<h1 className="f1 tc">Card</h1>
|
||||
<DetailsLayout title="Card">
|
||||
<BrowserFrame
|
||||
content={
|
||||
<div className="h-100 flex flex-column items-center justify-center pa3">
|
||||
|
@@ -5,14 +5,10 @@ import BrowserFrame from '../../placeholders/BrowserFrame';
|
||||
import Circle from '../../placeholders/Circle';
|
||||
import Rectangle from '../../placeholders/Rectangle';
|
||||
import SampleCode from '../../SampleCode';
|
||||
import useDocumentTitle from '../../hooks/useDocumentTitle';
|
||||
|
||||
const Details = () => {
|
||||
useDocumentTitle('CSS Layout ∙ Centering');
|
||||
|
||||
return (
|
||||
<DetailsLayout>
|
||||
<h1 className="f1 tc">Centering</h1>
|
||||
<DetailsLayout title="Centering">
|
||||
<BrowserFrame
|
||||
content={
|
||||
<div className="h-100 flex flex-column items-center justify-center">
|
||||
|
@@ -4,14 +4,10 @@ import DetailsLayout from '../../DetailsLayout';
|
||||
import BrowserFrame from '../../placeholders/BrowserFrame';
|
||||
import Triangle from '../../placeholders/Triangle';
|
||||
import SampleCode from '../../SampleCode';
|
||||
import useDocumentTitle from '../../hooks/useDocumentTitle';
|
||||
|
||||
const Details = () => {
|
||||
useDocumentTitle('CSS Layout ∙ Fixed at corner');
|
||||
|
||||
return (
|
||||
<DetailsLayout>
|
||||
<h1 className="f1 tc">Fixed at corner</h1>
|
||||
<DetailsLayout title="Fixed at corner">
|
||||
<BrowserFrame
|
||||
content={
|
||||
<div className="relative h-100">
|
||||
|
@@ -5,14 +5,10 @@ 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 ∙ Holy grail');
|
||||
|
||||
return (
|
||||
<DetailsLayout>
|
||||
<h1 className="f1 tc">Holy grail</h1>
|
||||
<DetailsLayout title="Holy grail">
|
||||
<BrowserFrame
|
||||
content={
|
||||
<div className="h-100 flex flex-column">
|
||||
|
@@ -4,14 +4,10 @@ import DetailsLayout from '../../DetailsLayout';
|
||||
import BrowserFrame from '../../placeholders/BrowserFrame';
|
||||
import Rectangle from '../../placeholders/Rectangle';
|
||||
import SampleCode from '../../SampleCode';
|
||||
import useDocumentTitle from '../../hooks/useDocumentTitle';
|
||||
|
||||
const Details = () => {
|
||||
useDocumentTitle('CSS Layout ∙ Input add-on');
|
||||
|
||||
return (
|
||||
<DetailsLayout>
|
||||
<h1 className="f1 tc">Input add-on</h1>
|
||||
<DetailsLayout title="Input add-on">
|
||||
<BrowserFrame
|
||||
content={
|
||||
<div className="h-100 flex flex-column items-center justify-center">
|
||||
|
@@ -6,14 +6,10 @@ import BrowserFrame from '../../placeholders/BrowserFrame';
|
||||
import Rectangle from '../../placeholders/Rectangle';
|
||||
import Square from '../../placeholders/Square';
|
||||
import SampleCode from '../../SampleCode';
|
||||
import useDocumentTitle from '../../hooks/useDocumentTitle';
|
||||
|
||||
const Details = () => {
|
||||
useDocumentTitle('CSS Layout ∙ Media object');
|
||||
|
||||
return (
|
||||
<DetailsLayout>
|
||||
<h1 className="f1 tc">Media object</h1>
|
||||
<DetailsLayout title="Media object">
|
||||
<BrowserFrame
|
||||
content={
|
||||
<div className="h-100 flex items-start pa3">
|
||||
|
@@ -5,14 +5,10 @@ import BrowserFrame from '../../placeholders/BrowserFrame';
|
||||
import Circle from '../../placeholders/Circle';
|
||||
import Rectangle from '../../placeholders/Rectangle';
|
||||
import SampleCode from '../../SampleCode';
|
||||
import useDocumentTitle from '../../hooks/useDocumentTitle';
|
||||
|
||||
const Details = () => {
|
||||
useDocumentTitle('CSS Layout ∙ Menu');
|
||||
|
||||
return (
|
||||
<DetailsLayout>
|
||||
<h1 className="f1 tc">Menu</h1>
|
||||
<DetailsLayout title="Menu">
|
||||
<BrowserFrame
|
||||
content={
|
||||
<div className="h-100 flex flex-column items-center justify-center">
|
||||
|
@@ -6,14 +6,10 @@ import BrowserFrame from '../../placeholders/BrowserFrame';
|
||||
import Circle from '../../placeholders/Circle';
|
||||
import Rectangle from '../../placeholders/Rectangle';
|
||||
import SampleCode from '../../SampleCode';
|
||||
import useDocumentTitle from '../../hooks/useDocumentTitle';
|
||||
|
||||
const Details = () => {
|
||||
useDocumentTitle('CSS Layout ∙ Modal');
|
||||
|
||||
return (
|
||||
<DetailsLayout>
|
||||
<h1 className="f1 tc">Modal</h1>
|
||||
<DetailsLayout title="Modal">
|
||||
<BrowserFrame
|
||||
content={
|
||||
<div className="h-100 flex flex-column items-center justify-center">
|
||||
|
@@ -5,14 +5,10 @@ import Block from '../../placeholders/Block';
|
||||
import BrowserFrame from '../../placeholders/BrowserFrame';
|
||||
import Circle from '../../placeholders/Circle';
|
||||
import SampleCode from '../../SampleCode';
|
||||
import useDocumentTitle from '../../hooks/useDocumentTitle';
|
||||
|
||||
const Details = () => {
|
||||
useDocumentTitle('CSS Layout ∙ Notification');
|
||||
|
||||
return (
|
||||
<DetailsLayout>
|
||||
<h1 className="f1 tc">Notification</h1>
|
||||
<DetailsLayout title="Notification">
|
||||
<BrowserFrame
|
||||
content={
|
||||
<div className="h-100 flex flex-column items-center justify-center">
|
||||
|
@@ -5,14 +5,10 @@ import BrowserFrame from '../../placeholders/BrowserFrame';
|
||||
import Circle from '../../placeholders/Circle';
|
||||
import Rectangle from '../../placeholders/Rectangle';
|
||||
import SampleCode from '../../SampleCode';
|
||||
import useDocumentTitle from '../../hooks/useDocumentTitle';
|
||||
|
||||
const Details = () => {
|
||||
useDocumentTitle('CSS Layout ∙ Pagination');
|
||||
|
||||
return (
|
||||
<DetailsLayout>
|
||||
<h1 className="f1 tc">Pagination</h1>
|
||||
<DetailsLayout title="Pagination">
|
||||
<BrowserFrame
|
||||
content={
|
||||
<div className="h-100 flex flex-column items-center justify-center pa3">
|
||||
|
@@ -4,14 +4,10 @@ import DetailsLayout from '../../DetailsLayout';
|
||||
import BrowserFrame from '../../placeholders/BrowserFrame';
|
||||
import Rectangle from '../../placeholders/Rectangle';
|
||||
import SampleCode from '../../SampleCode';
|
||||
import useDocumentTitle from '../../hooks/useDocumentTitle';
|
||||
|
||||
const Details = () => {
|
||||
useDocumentTitle('CSS Layout ∙ Previous and next buttons');
|
||||
|
||||
return (
|
||||
<DetailsLayout>
|
||||
<h1 className="f1 tc">Previous and next buttons</h1>
|
||||
<DetailsLayout title="Previous and next buttons">
|
||||
<BrowserFrame
|
||||
content={
|
||||
<div className="h-100 flex flex-column items-center justify-center">
|
||||
|
@@ -6,14 +6,10 @@ 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>
|
||||
<DetailsLayout title="Pricing table">
|
||||
<BrowserFrame
|
||||
content={
|
||||
<div className="h-100 flex items-center justify-center pa3">
|
||||
|
@@ -3,19 +3,16 @@ import React, { useState } from 'react';
|
||||
import DetailsLayout from '../../DetailsLayout';
|
||||
import BrowserFrame from '../../placeholders/BrowserFrame';
|
||||
import SampleCode from '../../SampleCode';
|
||||
import useDocumentTitle from '../../hooks/useDocumentTitle';
|
||||
import useInterval from '../../hooks/useInterval';
|
||||
|
||||
const Details = () => {
|
||||
useDocumentTitle('CSS Layout ∙ Progress bar');
|
||||
const [progress, setProgress] = useState(0);
|
||||
useInterval(() => {
|
||||
setProgress(v => v === 100 ? 0 : v + 1);
|
||||
}, 1 * 100);
|
||||
|
||||
return (
|
||||
<DetailsLayout>
|
||||
<h1 className="f1 tc">Progress bar</h1>
|
||||
<DetailsLayout title="Progress bar">
|
||||
<BrowserFrame
|
||||
content={
|
||||
<div className="h-100 flex flex-column items-center justify-center">
|
||||
|
@@ -5,14 +5,10 @@ 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 ∙ Same height columns');
|
||||
|
||||
return (
|
||||
<DetailsLayout>
|
||||
<h1 className="f1 tc">Same height columns</h1>
|
||||
<DetailsLayout title="Same height columns">
|
||||
<BrowserFrame
|
||||
content={
|
||||
<div className="h-100 flex flex-column items-center justify-center pa3">
|
||||
|
@@ -4,14 +4,10 @@ import DetailsLayout from '../../DetailsLayout';
|
||||
import BrowserFrame from '../../placeholders/BrowserFrame';
|
||||
import Block from '../../placeholders/Block';
|
||||
import SampleCode from '../../SampleCode';
|
||||
import useDocumentTitle from '../../hooks/useDocumentTitle';
|
||||
|
||||
const Details = () => {
|
||||
useDocumentTitle('CSS Layout ∙ Sidebar');
|
||||
|
||||
return (
|
||||
<DetailsLayout>
|
||||
<h1 className="f1 tc">Sidebar</h1>
|
||||
<DetailsLayout title="Sidebar">
|
||||
<div className="lh-copy mb3">Try to scroll the main content!</div>
|
||||
<BrowserFrame
|
||||
content={
|
||||
|
@@ -5,14 +5,10 @@ import Circle from '../../placeholders/Circle';
|
||||
import BrowserFrame from '../../placeholders/BrowserFrame';
|
||||
import Rectangle from '../../placeholders/Rectangle';
|
||||
import SampleCode from '../../SampleCode';
|
||||
import useDocumentTitle from '../../hooks/useDocumentTitle';
|
||||
|
||||
const Details = () => {
|
||||
useDocumentTitle('CSS Layout ∙ Slider');
|
||||
|
||||
return (
|
||||
<DetailsLayout>
|
||||
<h1 className="f1 tc">Slider</h1>
|
||||
<DetailsLayout title="Slider">
|
||||
<BrowserFrame
|
||||
content={
|
||||
<div className="h-100 flex flex-column items-center justify-center">
|
||||
|
@@ -6,14 +6,10 @@ import Block from '../../placeholders/Block';
|
||||
import Circle from '../../placeholders/Circle';
|
||||
import Rectangle from '../../placeholders/Rectangle';
|
||||
import SampleCode from '../../SampleCode';
|
||||
import useDocumentTitle from '../../hooks/useDocumentTitle';
|
||||
|
||||
const Details = () => {
|
||||
useDocumentTitle('CSS Layout ∙ Split screen');
|
||||
|
||||
return (
|
||||
<DetailsLayout>
|
||||
<h1 className="f1 tc">Split screen</h1>
|
||||
<DetailsLayout title="Split screen">
|
||||
<BrowserFrame
|
||||
content={
|
||||
<div className="h-100 flex">
|
||||
|
@@ -4,18 +4,15 @@ import { Link } from 'react-router-dom';
|
||||
import DetailsLayout from '../../DetailsLayout';
|
||||
import BrowserFrame from '../../placeholders/BrowserFrame';
|
||||
import SampleCode from '../../SampleCode';
|
||||
import useDocumentTitle from '../../hooks/useDocumentTitle';
|
||||
|
||||
const Details = () => {
|
||||
useDocumentTitle('CSS Layout ∙ Stepper input');
|
||||
const [value, setValue] = useState(0);
|
||||
const decrease = () => setValue(value - 1);
|
||||
const increase = () => setValue(value + 1);
|
||||
const change = (e) => setValue(parseInt(e.target.value, 10));
|
||||
|
||||
return (
|
||||
<DetailsLayout>
|
||||
<h1 className="f1 tc">Stepper input</h1>
|
||||
<DetailsLayout title="Stepper input">
|
||||
<div className="lh-copy mb3">
|
||||
The content of minus and plus buttons are centered by using the technique in the <Link to="/centering" className="link">Centering</Link> page.
|
||||
</div>
|
||||
|
@@ -5,14 +5,10 @@ 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 ∙ Sticky footer');
|
||||
|
||||
return (
|
||||
<DetailsLayout>
|
||||
<h1 className="f1 tc">Sticky footer</h1>
|
||||
<DetailsLayout title="Sticky footer">
|
||||
<div className="lh-copy mb3">
|
||||
The footer always sticks to the bottom if the main content is short.
|
||||
</div>
|
||||
|
@@ -5,14 +5,10 @@ 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 ∙ Sticky header');
|
||||
|
||||
return (
|
||||
<DetailsLayout>
|
||||
<h1 className="f1 tc">Sticky header</h1>
|
||||
<DetailsLayout title="Sticky header">
|
||||
<div className="lh-copy mb3">Try to scroll the main content to see the header sticks to the top of page.</div>
|
||||
<BrowserFrame
|
||||
content={
|
||||
|
@@ -3,16 +3,13 @@ import React, { useState } from 'react';
|
||||
import DetailsLayout from '../../DetailsLayout';
|
||||
import BrowserFrame from '../../placeholders/BrowserFrame';
|
||||
import SampleCode from '../../SampleCode';
|
||||
import useDocumentTitle from '../../hooks/useDocumentTitle';
|
||||
|
||||
const Details = () => {
|
||||
useDocumentTitle('CSS Layout ∙ Switch');
|
||||
const [checked, setChecked] = useState(false);
|
||||
const toggle = () => setChecked(c => !c);
|
||||
|
||||
return (
|
||||
<DetailsLayout>
|
||||
<h1 className="f1 tc">Switch</h1>
|
||||
<DetailsLayout title="Switch">
|
||||
<div className="lh-copy mb3">The checkbox is placed inside a label. So when clicking on the label, the checkbox will be checked even though it's hidden.</div>
|
||||
<BrowserFrame
|
||||
content={
|
||||
|
Reference in New Issue
Block a user