Skip to content
This repository was archived by the owner on Jul 6, 2025. It is now read-only.

Commit 6c110a7

Browse files
committed
Add tailwindcss example
1 parent 0360e78 commit 6c110a7

File tree

4 files changed

+56
-0
lines changed

4 files changed

+56
-0
lines changed

examples/tailwindcss/aleph.config.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
import type { Config } from 'aleph/types'
2+
import windicss from 'https://deno.land/x/[email protected]/plugin.ts'
3+
4+
export default <Config>{
5+
plugins: [windicss]
6+
}

examples/tailwindcss/app.tsx

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import React, { ComponentType } from 'react'
2+
3+
export default function App({ Page, pageProps }: { Page: ComponentType<any>, pageProps: any }) {
4+
return (
5+
<main>
6+
<head>
7+
<meta name="viewport" content="width=device-width" />
8+
</head>
9+
<Page {...pageProps} />
10+
</main>
11+
)
12+
}

examples/tailwindcss/pages/index.tsx

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
import React from 'react'
2+
3+
export default function Index() {
4+
return (
5+
<div className="w-screen h-screen flex items-center justify-center">
6+
<div className="py-8 px-8 max-w-md mx-auto bg-white rounded-xl shadow-md space-y-6 sm:(py-4 space-y-0 space-x-6)">
7+
<img className="block mx-auto h-24 rounded-full sm:(mx-0 flex-shrink-0)" src="/logo.svg" alt="Aleph.js" />
8+
<div className="text-center space-y-2 sm:text-left">
9+
<div className="space-y-0.1">
10+
<p className="text-lg text-black font-semibold">Aleph.js</p>
11+
<p className="text-gray-500 font-medium">CSS Powered by Windi.</p>
12+
</div>
13+
<a
14+
href="https://alephjs.org/docs/get-started"
15+
className="inline-block px-4 py-1 text-sm text-purple-600 font-semibold rounded-full border border-purple-200 hover:(text-white bg-purple-600 border-transparent) focus:(outline-none ring-2 ring-purple-600 ring-offset-2)"
16+
>
17+
Get started
18+
</a>
19+
</div>
20+
</div>
21+
</div>
22+
)
23+
}

examples/tailwindcss/public/logo.svg

Lines changed: 15 additions & 0 deletions
Loading

0 commit comments

Comments
 (0)