-
-
Notifications
You must be signed in to change notification settings - Fork 58
Expand file tree
/
Copy pathlayout.tsx
More file actions
141 lines (135 loc) · 5.17 KB
/
layout.tsx
File metadata and controls
141 lines (135 loc) · 5.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
import { Metadata } from "next";
import { TabBar } from "@/components/installation-tabs";
export const metadata: Metadata = {
title: {
template: "%s - Tailwind CSS",
default: "Installation",
},
openGraph: {
type: "article",
title: {
template: "%s - Installation",
default: "Installation",
},
},
};
const tabs = {
"Using Vite": "/docs/installation/using-vite",
"Using PostCSS": "/docs/installation/using-postcss",
"Using webpack": "/docs/installation/using-webpack",
"Tailwind CLI": "/docs/installation/tailwind-cli",
"Framework Guides": "/docs/installation/framework-guides",
"Play CDN": "/docs/installation/play-cdn",
};
const readNext = [
{
title: "Styling with utility classes",
href: "/docs/styling-with-utility-classes",
body: (
<p>Using a utility-first workflow to build complex components from a constrained set of primitive utilities.</p>
),
// icon: {
// className: "dark:bg-indigo-500 dark:highlight-white/20",
// // light: require("@/img/icons/home/utility-first.png").default.src,
// // dark: require("@/img/icons/home/dark/utility-first.png").default.src,
// },
icon: require("@/components/home/icons/css-grid-icon").default,
},
{
title: "Responsive Design",
href: "/docs/responsive-design",
body: <p>Build fully responsive user interfaces that adapt to any screen size using responsive modifiers.</p>,
icon: {
className: "dark:bg-indigo-500 dark:highlight-white/20",
// light: require("@/img/icons/home/mobile-first.png").default.src,
// dark: require("@/img/icons/home/dark/mobile-first.png").default.src,
},
},
{
title: "Hover, Focus & Other States",
href: "/docs/hover-focus-and-other-states",
body: <p>Style elements in interactive states like hover, focus, and more using conditional modifiers.</p>,
icon: {
className: "dark:bg-blue-500 dark:highlight-white/20",
// light: require("@/img/icons/home/state-variants.png").default.src,
// dark: require("@/img/icons/home/dark/state-variants.png").default.src,
},
},
{
title: "Dark Mode",
href: "/docs/dark-mode",
body: <p>Optimize your site for dark mode directly in your HTML using the dark mode modifier.</p>,
icon: {
className: "dark:bg-slate-600 dark:highlight-white/20",
// light: require("@/img/icons/home/dark-mode.png").default.src,
// dark: require("@/img/icons/home/dark/dark-mode.png").default.src,
},
},
{
title: "Reusing Styles",
href: "/docs/reusing-styles",
body: <p>Manage duplication and keep your projects maintainable by creating reusable abstractions.</p>,
icon: {
className: "dark:bg-sky-500 dark:highlight-white/20",
// light: require("@/img/icons/home/component-driven.png").default.src,
// dark: require("@/img/icons/home/dark/component-driven.png").default.src,
},
},
{
title: "Customizing the Framework",
href: "/docs/adding-custom-styles",
body: <p>Customize the framework to match your brand and extend it with your own custom styles.</p>,
icon: {
className: "dark:bg-pink-500 dark:highlight-white/30",
// light: require("@/img/icons/home/customization.png").default.src,
// dark: require("@/img/icons/home/dark/customization.png").default.src,
},
},
];
export default function Page({ children }: { children: React.ReactNode }) {
return (
<>
{/* Add a placeholder div so the Next.js router can find the scrollable element. */}
<div hidden />
<div className="isolate mx-auto grid w-full max-w-2xl grid-cols-1 gap-10 pt-10 md:pb-24 xl:max-w-5xl">
<div className="px-4 sm:px-6">
<p
data-section="true"
className="font-mono text-xs/6 font-medium tracking-widest text-gray-600 uppercase dark:text-gray-400"
>
Installation
</p>
<h1 className="mt-2 text-3xl font-medium tracking-tight text-gray-950 dark:text-white">
Get started with Tailwind CSS
</h1>
<p data-description="true" className="mt-6 text-base/7 text-gray-700 dark:text-gray-300">
Tailwind CSS works by scanning all of your HTML files, JavaScript components, and any other templates for
class names, generating the corresponding styles and then writing them to a static CSS file.
</p>
<p className="mt-4 text-base/7 text-gray-700 dark:text-gray-300">
It's fast, flexible, and reliable — with zero-runtime.
</p>
<div className="mt-10" data-content="true">
<section className="relative mb-16">
<div className="relative z-10">
<h2
data-docsearch-ignore
className="mb-6 text-lg font-semibold tracking-tight text-gray-950 dark:text-white"
>
Installation
</h2>
<TabBar
tabs={Object.entries(tabs).map(([title, url]) => ({
title,
url,
}))}
/>
</div>
{children}
</section>
</div>
</div>
</div>
</>
);
}