Skip to content

Commit 6b19a50

Browse files
Merge pull request #131 from netlify-templates/tb/deved-265-remove-daisyui
removed daisyui
2 parents 09056f8 + cf87048 commit 6b19a50

30 files changed

+1124
-2165
lines changed

README.md

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@
22

33
[Live Demo](https://nextjs-platform-starter.netlify.app/)
44

5-
A modern starter based on Next.js 14 (App Router), Tailwind, daisyUI, and [Netlify Core Primitives](https://docs.netlify.com/core/overview/#develop) (Edge Functions, Image CDN, Blob Store).
5+
A modern starter based on Next.js 14 (App Router), Tailwind, and [Netlify Core Primitives](https://docs.netlify.com/core/overview/#develop) (Edge Functions, Image CDN, Blob Store).
66

7-
In this site, Netlify Core Primitives are used both implictly for running Next.js features (e.g. Route Handlers, image optimization via `next/image`, and more) and also explicitly by the user code.
7+
In this site, Netlify Core Primitives are used both implictly for running Next.js features (e.g. Route Handlers, image optimization via `next/image`, and more) and also explicitly by the user code.
88

99
Implicit usage means you're using any Next.js functionality and everything "just works" when deployed - all the plumbing is done for you. Explicit usage is framework-agnostic and typically provides more features than what Next.js exposes.
1010

1111
## Deploying to Netlify
1212

13-
This site requires [Netlify Next Runtime v5](https://docs.netlify.com/frameworks/next-js/overview/) for full functionality. That version is now being gradually rolled out to all Netlify accounts.
13+
This site requires [Netlify Next Runtime v5](https://docs.netlify.com/frameworks/next-js/overview/) for full functionality. That version is now being gradually rolled out to all Netlify accounts.
1414

1515
After deploying via the button below, please visit the **Site Overview** page for your new site to check whether it is already using the v5 runtime. If not, you'll be prompted to opt-in to to v5.
1616

@@ -39,5 +39,3 @@ netlify dev
3939
```
4040

4141
If your browser doesn't navigate to the site automatically, visit [localhost:8888](http://localhost:8888).
42-
43-

app/blobs/editor.jsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@ export function ShapeEditor(props) {
1010
const [lastMutationTime, setLastMutationTime] = useState(0);
1111

1212
return (
13-
<div className="flex w-full flex-col md:flex-row md:items-start gap-8">
14-
<div className="md:w-2/5">
13+
<div className="flex flex-col gap-8 md:flex-row">
14+
<div className="flex-1 w-full">
1515
<NewShape setLastMutationTime={setLastMutationTime} />
1616
</div>
17-
<div className='w-full'>
17+
<div className="flex-1 w-full">
1818
<StoredBlobsList lastMutationTime={lastMutationTime} />
1919
</div>
2020
</div>

app/blobs/list.jsx

Lines changed: 33 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -23,41 +23,50 @@ export function StoredBlobsList({ lastMutationTime }) {
2323
};
2424

2525
return (
26-
<div className="flex flex-col items-center justify-center gap-3">
27-
<div className="text-lg font-bold h-6">Objects in Blob Store</div>
28-
<div className="flex flex-col gap-1 w-full bg-white text-neutral-900 min-h-56 card">
29-
<div className="card-body text-md">
26+
<>
27+
<h2 className="mb-4 text-xl text-center">Objects in Blob Store</h2>
28+
<div className="bg-white rounded-sm text-neutral-900">
29+
<div className="px-4 py-2.5 text-center">
3030
{!keys?.length ? (
31-
<span>Please upload some shapes!</span>
31+
<span className="inline-flex w-full justify-center py-1.5">Please upload some shapes!</span>
3232
) : (
33-
keys.map((keyName) => {
34-
const isSelected = keyName === selectedKey;
35-
return (
36-
<div
37-
key={keyName}
38-
onClick={() => {
39-
onSelect(keyName);
40-
}}
41-
className={'w-full hover:bg-neutral-200 ' + (isSelected ? 'font-bold' : '')}
42-
>
43-
{keyName}
44-
</div>
45-
);
46-
})
33+
<div className="space-y-1">
34+
{keys.map((keyName) => {
35+
const isSelected = keyName === selectedKey;
36+
return (
37+
<button
38+
key={keyName}
39+
onClick={() => {
40+
onSelect(keyName);
41+
}}
42+
className={
43+
'inline-flex items-center justify-center w-full px-4 py-1.5 rounded-sm text-neutral-900 ' +
44+
(isSelected
45+
? 'bg-neutral-200'
46+
: 'cursor-pointer transition hover:bg-neutral-200')
47+
}
48+
>
49+
{keyName}
50+
</button>
51+
);
52+
})}
53+
</div>
4754
)}
48-
{previewData && <BlobPreview data={previewData} />}
4955
</div>
56+
{previewData && <BlobPreview data={previewData} />}
5057
</div>
51-
</div>
58+
</>
5259
);
5360
}
5461

5562
function BlobPreview({ data }) {
5663
const fullBlobData = generateBlob(data); // Recreates the SVG path by the existing parameters
5764
return (
58-
<div className="mt-4 lg:mx-16 border border-neutral-800 rounded">
59-
<div className="p-2 text-center">{data.name}</div>
60-
<div className="bg-neutral-800 text-neutral-100 p-2 font-mono">{JSON.stringify(data, null, ' ')}</div>
65+
<div className="p-4 border-t border-neutral-300 aspect-square">
66+
<div className="mb-4 text-center">{data.name}</div>
67+
<div className="p-2 font-mono rounded-sm bg-neutral-800 text-neutral-100">
68+
{JSON.stringify(data, null, ' ')}
69+
</div>
6170
<ShapeRenderer svgPath={fullBlobData.svgPath} colors={fullBlobData.parameters.colors} />
6271
</div>
6372
);

app/blobs/new-shape.jsx

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -29,24 +29,24 @@ export function NewShape(props) {
2929
}, [blobData]);
3030

3131
return (
32-
<div className="flex flex-col items-center justify-center w-full gap-2">
33-
<div className="text-lg font-bold">New Random Shape</div>
34-
<div className="rounded bg-white">
35-
<div className="text-md w-full text-center text-neutral-900 text-lg p-2 border-b border-neutral-900">
32+
<>
33+
<h2 className="mb-4 text-xl text-center">New Random Shape</h2>
34+
<div className="mb-6 bg-white rounded-sm">
35+
<div className="p-4 text-center border-b text-neutral-900 border-neutral-300">
3636
{blobData?.parameters?.name}
3737
</div>
38-
<div className="p-2">
38+
<div className="p-4">
3939
<ShapeRenderer svgPath={blobData?.svgPath} colors={blobData?.parameters?.colors} />
4040
</div>
4141
</div>
42-
<div className="flex justify-center gap-4">
43-
<button className="btn btn-primary" onClick={randomizeBlob}>
42+
<div className="flex flex-wrap justify-center gap-4">
43+
<button className="btn" onClick={randomizeBlob}>
4444
Randomize
4545
</button>
46-
<button className="btn btn-primary" onClick={onUpload} disabled={uploadDisabled || wasUploaded || !blobData}>
46+
<button className="btn" onClick={onUpload} disabled={uploadDisabled || wasUploaded || !blobData}>
4747
Upload
4848
</button>
4949
</div>
50-
</div>
50+
</>
5151
);
5252
}

app/blobs/page.jsx

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import { Markdown } from 'components/markdown';
21
import { ShapeEditor } from './editor';
32
import { ContextAlert } from 'components/context-alert';
3+
import { Markdown } from 'components/markdown';
44
import { getNetlifyContext, uploadDisabled } from 'utils';
55

66
export const metadata = {
@@ -40,19 +40,18 @@ User uploads are disabled in this site. To run your own and try it out:
4040
export default async function Page() {
4141
return (
4242
<>
43-
<section className="flex flex-col gap-6 sm:gap-8">
44-
<ContextAlert
45-
addedChecksFunction={(ctx) => {
46-
return uploadDisabled ? uploadDisabledText : null;
47-
}}
48-
/>
49-
<h1>Blobs x Blobs</h1>
50-
</section>
43+
<ContextAlert
44+
addedChecksFunction={(ctx) => {
45+
return uploadDisabled ? uploadDisabledText : null;
46+
}}
47+
className="mb-6"
48+
/>
49+
<h1 className="mb-8">Blobs x Blobs</h1>
5150
{!!getNetlifyContext() && (
52-
<div className="flex flex-col gap-8">
53-
<Markdown content={explainer} />
51+
<>
52+
<Markdown content={explainer} className="mb-12" />
5453
<ShapeEditor />
55-
</div>
54+
</>
5655
)}
5756
</>
5857
);

app/classics/page.jsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { FeedbackForm } from 'components/feedback-form';
2-
import { Markdown } from '../../components/markdown';
2+
import { Markdown } from 'components/markdown';
33

44
export const metadata = {
55
title: 'Classics'
@@ -21,11 +21,11 @@ Deploy this site to your Netlify account, [enable the forms feature in the UI](h
2121
export default async function Page() {
2222
return (
2323
<>
24-
<h1>Netlify Classics</h1>
25-
<Markdown content={explainer} />
26-
<div className="flex w-full pt-12 justify-center">
24+
<h1 className="mb-8">Netlify Classics</h1>
25+
<Markdown content={explainer} className="mb-12" />
26+
<div className="flex justify-center">
2727
<FeedbackForm />
2828
</div>
2929
</>
3030
);
31-
}
31+
}

app/edge/australia/page.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ export const metadata = {
77
export default function Page() {
88
return (
99
<>
10-
<h1>You are in Australia!</h1>
10+
<h1 className="mb-8">You are in Australia!</h1>
1111
<EdgeFunctionExplainer />
1212
</>
1313
);

app/edge/explainer.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Markdown } from "components/markdown";
1+
import { Markdown } from 'components/markdown';
22

33
const explainer = `
44
This page is using a Netlify Edge Function (\`netlify/edge-functions/rewrite.js\`) to rewrite the URL based on visitor geography.
@@ -20,5 +20,5 @@ export default rewrite;
2020
`;
2121

2222
export default function EdgeFunctionExplainer() {
23-
return <Markdown content={explainer} />
23+
return <Markdown content={explainer} />;
2424
}

app/edge/not-australia/page.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ export const metadata = {
77
export default function Page() {
88
return (
99
<>
10-
<h1>You&apos;re not in Australia!</h1>
10+
<h1 className="mb-8">You&apos;re not in Australia!</h1>
1111
<EdgeFunctionExplainer />
1212
</>
1313
);

app/edge/page.jsx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
import Link from 'next/link';
2-
import { Alert } from '../../components/alert';
31
import { Markdown } from 'components/markdown';
42

53
export const metadata = {
@@ -15,12 +13,12 @@ Edge Functions are framework-agnostic, but are also used behind the scenes to ru
1513
There are advatanges to using Edge Functions directly, such as the ability to access & transform the response body.
1614
1715
[See more examples](https://edge-functions-examples.netlify.app)
18-
`
16+
`;
1917

2018
export default function FallbackPage() {
2119
return (
2220
<>
23-
<h1>You&apos;ve reached the fallback page.</h1>
21+
<h1 className="mb-8">You&apos;ve reached the fallback page.</h1>
2422
<Markdown content={explainer} />
2523
</>
2624
);

0 commit comments

Comments
 (0)