Skip to content

Commit ffafeaf

Browse files
committed
Merge branch 'pr-388'
2 parents 37272a9 + d883221 commit ffafeaf

File tree

185 files changed

+4764
-1040
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

185 files changed

+4764
-1040
lines changed

components/layout/figma/card.tsx

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
import Image from 'next/image';
2+
import { Card, CardBody, CardFooter, Typography } from '@material-tailwind/react';
3+
4+
interface CardsProps {
5+
title: string;
6+
children: React.ReactNode;
7+
img: string;
8+
minHeight: string;
9+
}
10+
11+
export default function ContentCards({ title, children, img, minHeight }: CardsProps) {
12+
return (
13+
<>
14+
<Card className={`border bg-white shadow-md rounded-2xl ${minHeight} relative overflow-hidden`}>
15+
<div className="bg-[url('/img/header-figma.jpg')] bg-cover bg-center bg-no-repeat h-full w-full absolute top-16"></div>
16+
<CardBody className="z-10">
17+
<Typography variant="h2" className="font-semibold text-3xl md:text-4xl text-blue-gray-900">
18+
{title}
19+
</Typography>
20+
<Typography variant="paragraph" className="py-4 text-lg font-normal text-blue-gray-400">
21+
{children}
22+
</Typography>
23+
</CardBody>
24+
<CardFooter className="py-0 z-10">
25+
<Image src={img} width={1000} height={500} alt={title} />
26+
</CardFooter>
27+
</Card>
28+
</>
29+
);
30+
}

components/layout/footer.tsx

-179
This file was deleted.

components/layout/header.tsx

+15-115
Original file line numberDiff line numberDiff line change
@@ -1,126 +1,26 @@
1-
import { useState, useEffect } from "react";
1+
import { ReactNode, useEffect, useState } from 'react';
22

3-
// next.js components
4-
import Image from "next/image";
5-
import Link from "next/link";
3+
type Props = {
4+
children: ReactNode;
5+
img: string;
6+
};
67

7-
// react-copy-to-clipboard components
8-
import { CopyToClipboard } from "react-copy-to-clipboard";
9-
10-
// @material-tailwind/react components
11-
import {
12-
Tabs,
13-
TabsHeader,
14-
Tab,
15-
Typography,
16-
Button,
17-
Tooltip,
18-
} from "@material-tailwind/react";
19-
20-
export default function Header() {
21-
const [version, setVersion] = useState("npm i @material-tailwind/react");
22-
const [copied, setCopied] = useState(false);
8+
const Header: React.FC<Props> = ({ children, img }) => {
9+
const [image, setImage] = useState('');
2310

2411
useEffect(() => {
25-
setTimeout(() => {
26-
setCopied(false);
27-
}, 3000);
28-
}, [copied]);
12+
setImage(img);
13+
}, [img]);
2914

3015
return (
31-
<div className="h-screen min-h-screen bg-[url('/img/bg-header.jpg')] bg-cover bg-center bg-no-repeat">
32-
<div className="relative z-50 h-fit py-20 lg:py-32">
16+
<div className={`h-screen min-h-screen bg-cover bg-center bg-no-repeat`} style={{backgroundImage: `url(${image})`}}>
17+
<div className="relative z-50 h-fit pt-32">
3318
<div className="container mx-auto px-4">
34-
<div className="flex flex-wrap items-center justify-between">
35-
<div className="mt-48 w-full px-4 md:w-8/12 lg:mt-4 lg:w-5/12">
36-
<div className="w-full max-w-full sm:my-auto md:w-5/6 md:flex-none lg:w-1/2">
37-
<Tabs value="react" className="mb-6">
38-
<TabsHeader
39-
className="h-10 w-auto rounded-full border border-white/80 bg-white/80 shadow-2xl shadow-blue-gray-500/40 backdrop-blur-2xl backdrop-saturate-200"
40-
indicatorProps={{
41-
className: "rounded-full",
42-
}}
43-
>
44-
<Tab
45-
value="react"
46-
className="p-0 font-normal text-[#1A237E]"
47-
onClick={() =>
48-
setVersion("npm i @material-tailwind/react")
49-
}
50-
>
51-
<i className="fab fa-react" />
52-
&nbsp;React
53-
</Tab>
54-
<Tab
55-
value="html"
56-
className="p-0 font-normal text-[#1A237E]"
57-
onClick={() =>
58-
setVersion("npm i @material-tailwind/html")
59-
}
60-
>
61-
<i className="fab fa-html5" />
62-
&nbsp;HTML
63-
</Tab>
64-
</TabsHeader>
65-
</Tabs>
66-
</div>
67-
<Typography
68-
variant="h1"
69-
className="mb-2 font-black tracking-normal text-[#1A237E]"
70-
>
71-
Material Tailwind
72-
</Typography>
73-
<Typography className="mb-6 text-lg font-light text-[#1A237E] lg:pr-12">
74-
Material Tailwind is an easy to use components library for
75-
Tailwind CSS and Material Design.
76-
</Typography>
77-
<div className="flex flex-col-reverse gap-2 lg:flex-row">
78-
<Link
79-
href={
80-
version === "npm i @material-tailwind/react"
81-
? "/docs/react/installation"
82-
: "/docs/html/installation"
83-
}
84-
>
85-
<Button variant="gradient" className="h-full w-full">
86-
Get Started
87-
</Button>
88-
</Link>
89-
<div className="flex rounded-lg border border-white/80 bg-white/80 py-2.5 px-5 text-[#1A237E] shadow-2xl shadow-blue-gray-500/20 backdrop-blur-2xl backdrop-saturate-200">
90-
<CopyToClipboard
91-
text={version}
92-
onCopy={() => setCopied(true)}
93-
>
94-
<p className="mb-0 flex w-full items-center justify-between font-normal">
95-
{version}
96-
<Tooltip
97-
content={copied ? "Copied" : "Copy"}
98-
interactive={false}
99-
>
100-
<i
101-
className={`${
102-
copied ? "fas" : "far"
103-
} fa-copy ml-4 cursor-pointer text-sm`}
104-
/>
105-
</Tooltip>
106-
</p>
107-
</CopyToClipboard>
108-
</div>
109-
</div>
110-
</div>
111-
<div className="hidden w-full max-w-full px-4 pt-24 md:w-7/12 md:pt-0 lg:block">
112-
<Image
113-
src="/img/components-header.png"
114-
alt="components"
115-
width={1000}
116-
height={700}
117-
quality={100}
118-
className="aspect-auto"
119-
/>
120-
</div>
121-
</div>
19+
{children}
12220
</div>
12321
</div>
12422
</div>
12523
);
126-
}
24+
};
25+
26+
export default Header;

0 commit comments

Comments
 (0)