Skip to content

Commit 351b1dc

Browse files
committed
update website
1 parent ffafeaf commit 351b1dc

File tree

7 files changed

+41
-40
lines changed

7 files changed

+41
-40
lines changed

components/layout/page-map.tsx

+14-12
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,12 @@ import {
88
DialogFooter,
99
Tabs,
1010
TabsHeader,
11-
TabsBody,
1211
Tab,
13-
TabPanel,
1412
Textarea,
1513
IconButton,
1614
} from "@material-tailwind/react";
1715

18-
export default function PageMap({ frontMatter }) {
16+
export default function PageMap({ type, frontMatter }) {
1917
const [open, setOpen] = React.useState(false);
2018
const [hash, setHash] = React.useState(frontMatter[0]);
2119
const [feedbackType, setFeedbackType] = React.useState("issue");
@@ -72,28 +70,30 @@ export default function PageMap({ frontMatter }) {
7270
<ul className="mb-8 list-none pt-2">
7371
<li>
7472
<a
75-
href="#"
73+
target="_blank"
74+
href="https://github.com/creativetimofficial/material-tailwind/blob/main/CONTRIBUTING.md?ref=material-tailwind"
7675
className="relative list-item w-full py-1 text-sm capitalize text-gray-600 transition-colors hover:text-primary focus:text-primary"
7776
>
7877
Contributor guides
7978
</a>
8079
</li>
8180
<li>
8281
<a
83-
href="#"
82+
target="_blank"
83+
href={`https://www.github.com/creativetimofficial/material-tailwind/blob/main/documentation/${type}/${frontMatter.github}.mdx?ref=material-tailwind`}
8484
className="relative list-item w-full py-1 text-sm capitalize text-gray-600 transition-colors hover:text-primary focus:text-primary"
8585
>
8686
Edit this page
8787
</a>
8888
</li>
89-
<li>
89+
{/* <li>
9090
<a
9191
href="#"
9292
className="relative list-item w-full py-1 text-sm capitalize text-gray-600 transition-colors hover:text-primary focus:text-primary"
9393
>
9494
Translate this page
9595
</a>
96-
</li>
96+
</li> */}
9797
</ul>
9898

9999
<Typography
@@ -105,29 +105,31 @@ export default function PageMap({ frontMatter }) {
105105
<ul className="mb-8 list-none pt-2">
106106
<li>
107107
<a
108-
href="#"
108+
target="_blank"
109+
href="https://discord.com/invite/gxtg2rJa?ref=material-tailwind"
109110
className="relative list-item w-full py-1 text-sm capitalize text-gray-600 transition-colors hover:text-primary focus:text-primary"
110111
>
111112
Join un on Discord
112113
</a>
113114
</li>
114115
<li>
115116
<a
116-
href="#"
117+
target="_blank"
118+
href="https://www.creative-tim.com/blog?ref=material-tailwind"
117119
className="relative list-item w-full py-1 text-sm capitalize text-gray-600 transition-colors hover:text-primary focus:text-primary"
118120
>
119121
Read blog posts
120122
</a>
121123
</li>
122124
<li>
123125
<a
124-
href="#"
126+
href="https://opencollective.com/material-tailwind?ref=material-tailwind"
125127
className="relative list-item w-full py-1 text-sm capitalize text-gray-600 transition-colors hover:text-primary focus:text-primary"
126128
>
127129
Open Collective
128130
</a>
129131
</li>
130-
<li className="mt-4">
132+
{/* <li className="mt-4">
131133
<Button
132134
size="sm"
133135
variant="outlined"
@@ -136,7 +138,7 @@ export default function PageMap({ frontMatter }) {
136138
>
137139
give us feedback
138140
</Button>
139-
</li>
141+
</li> */}
140142
</ul>
141143
</div>
142144
<Dialog

pages/docs/[...slug].tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,7 @@ export default function Page({ frontMatter, mdxSource, slug }) {
365365
<DocsRelated routes={frontMatter.related} />
366366
)}
367367
</div>
368-
<PageMap frontMatter={frontMatter} />
368+
<PageMap type={frameworkType} frontMatter={frontMatter} />
369369
</div>
370370
</div>
371371
</div>
@@ -415,7 +415,7 @@ export const getStaticProps = async ({ params: { slug } }) => {
415415
mdxOptions: {
416416
rehypePlugins: [[rehypePrettyCode, config]],
417417
remarkPlugins: [remarkGfm],
418-
development: process.env.NODE_ENV === "development",
418+
development: false,
419419
},
420420
});
421421

routes/react.routes.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ export const routes = [
128128
},
129129
{
130130
name: "Collpase",
131-
route: "collpase",
131+
route: "collapse",
132132
},
133133
{
134134
name: "Carousel",
@@ -184,7 +184,7 @@ export const routes = [
184184
},
185185
{
186186
name: "Rating Bar",
187-
route: "rating bar",
187+
route: "rating-bar",
188188
},
189189
{
190190
name: "Select",

tailwind.config.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,12 @@ const withMT = require("./packages/material-tailwind-html/utils/withMT");
33

44
module.exports = withMT({
55
content: [
6-
"./node_modules/@material-tailwind/react/theme/**/**/*.{js,ts,jsx,tsx}",
6+
"./packages/material-tailwind-react/src/components/**/*.{js,ts,jsx,tsx}",
7+
"./packages/material-tailwind-react/src/theme/**/*.{js,ts,jsx,tsx}",
78
"./pages/**/*.{js,ts,jsx,tsx}",
89
"./components/**/*.{js,ts,jsx,tsx}",
910
"./widgets/**/*.{js,ts,jsx,tsx}",
11+
"./docs-content/**/*.{js,ts,jsx,tsx}",
1012
"./documentation/**/*.mdx",
1113
"./public/material-tailwind-html-v2.js",
1214
],

tsconfig.json

+4-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,10 @@
1717
"baseUrl": ".",
1818
"paths": {
1919
"@utils": ["./utils/index.ts"],
20-
"@widgets": ["./widgets/index.ts"]
20+
"@widgets": ["./widgets/index.ts"],
21+
"@material-tailwind/react": [
22+
"./packages/material-tailwind-react/src/index.ts"
23+
]
2124
}
2225
},
2326
"include": [

widgets/layout/docs-navbar.tsx

+13-19
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ export function DocsNavbar() {
4848

4949
React.useEffect(() => {
5050
const stars = fetch(
51-
"https://api.github.com/repos/creativetimofficial/material-tailwind"
51+
"https://api.github.com/repos/creativetimofficial/material-tailwind",
5252
)
5353
.then((response) => response.json())
5454
.then((data) => setStars(formatNumber(data.stargazers_count, 1)));
@@ -86,6 +86,7 @@ export function DocsNavbar() {
8686
const navbarMenu = (
8787
<div className="flex w-full flex-col justify-end lg:!ml-auto lg:flex-row">
8888
<List className="px-0 lg:!flex-row">
89+
<NavItem href="/docs/react/installation">Docs</NavItem>
8990
<NavItem href="/blocks">Blocks</NavItem>
9091
<Menu placement="bottom" offset={-2.5} allowHover>
9192
<MenuHandler>
@@ -94,25 +95,18 @@ export function DocsNavbar() {
9495
</span>
9596
</MenuHandler>
9697
<MenuList className="rounded-[10px] p-1.5">
97-
<Link className="!outline-none" href="/docs/html/installation">
98-
<MenuItem className="flex items-center gap-2 rounded-lg !p-1 text-blue-gray-800 hover:text-primary">
99-
<div className="grid h-7 w-7 place-items-center rounded bg-orange-900/10">
100-
<i className="fab fa-html5 translate-y-px text-lg text-orange-900" />
101-
</div>
102-
HTML
103-
</MenuItem>
104-
</Link>
105-
<Link className="!outline-none" href="/docs/react/installation">
106-
<MenuItem className="flex items-center gap-2 rounded-lg !p-1 text-blue-gray-800 hover:text-primary">
107-
<div className="grid h-7 w-7 place-items-center rounded bg-blue-500/10">
108-
<i className="fab fa-react text-lg text-blue-500" />
109-
</div>
110-
React JS
98+
<Link
99+
target="_blank"
100+
className="!outline-none"
101+
href="https://www.creative-tim.com/services/updivision?ref=material-tailwind"
102+
>
103+
<MenuItem className="flex items-center gap-2 rounded-md text-blue-gray-800 hover:text-primary">
104+
Custom Development
111105
</MenuItem>
112106
</Link>
113107
</MenuList>
114108
</Menu>
115-
<NavItem href="#">PRO Version</NavItem>
109+
<NavItem href="/figma">Figma</NavItem>
116110
<NavItem href="#">Pricing & FAQ</NavItem>
117111
</List>
118112
<div className="ml-2 flex items-center gap-2">
@@ -134,13 +128,13 @@ export function DocsNavbar() {
134128
href="https://github.com/creativetimofficial/material-tailwind?ref=material-tailwind"
135129
>
136130
<Chip
137-
value={stars}
131+
value={<span className="-ml-1.5">{stars}</span>}
138132
icon={
139133
<svg
140134
xmlns="http://www.w3.org/2000/svg"
141135
viewBox="0 0 20 20"
142136
fill="currentColor"
143-
className="mt-[2.5px] ml-1 h-3.5 w-3.5"
137+
className="mt-[2.5px] !ml-0 h-3.5 w-3.5"
144138
>
145139
<path
146140
fillRule="evenodd"
@@ -149,7 +143,7 @@ export function DocsNavbar() {
149143
/>
150144
</svg>
151145
}
152-
className="flex-items-center gap-2 bg-primary py-[3px] pr-2 pl-5 text-xs"
146+
className="flex-items-center gap-2 bg-primary py-[3px] !pr-2 text-xs"
153147
/>
154148
<i className="fab fa-github text-xl leading-none" />
155149
</a>

widgets/layout/navbar.tsx

+3-3
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ export function Navbar() {
4848

4949
React.useEffect(() => {
5050
const stars = fetch(
51-
"https://api.github.com/repos/creativetimofficial/material-tailwind"
51+
"https://api.github.com/repos/creativetimofficial/material-tailwind",
5252
)
5353
.then((response) => response.json())
5454
.then((data) => setStars(formatNumber(data.stargazers_count, 1)));
@@ -128,7 +128,7 @@ export function Navbar() {
128128
href="https://github.com/creativetimofficial/material-tailwind?ref=material-tailwind"
129129
>
130130
<Chip
131-
value={stars}
131+
value={<span className="-ml-1.5">{stars}</span>}
132132
icon={
133133
<svg
134134
xmlns="http://www.w3.org/2000/svg"
@@ -143,7 +143,7 @@ export function Navbar() {
143143
/>
144144
</svg>
145145
}
146-
className="flex-items-center gap-2 bg-primary py-[3px] !pr-2 !pl-5 text-xs"
146+
className="flex-items-center gap-2 bg-primary py-[3px] !pr-2 text-xs"
147147
/>
148148
<i className="fab fa-github text-xl leading-none" />
149149
</a>

0 commit comments

Comments
 (0)