Skip to content

Commit

Permalink
Create a scaffold for the next example
Browse files Browse the repository at this point in the history
  • Loading branch information
mayank1513 committed Jun 27, 2024
1 parent 6254f91 commit 38c830c
Show file tree
Hide file tree
Showing 8 changed files with 91 additions and 20 deletions.
Binary file modified examples/app-router/public/favicon.ico
Binary file not shown.
Binary file added examples/pages-router/public/favicon.ico
Binary file not shown.
14 changes: 0 additions & 14 deletions examples/tailwind/src/app/page.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { StarMe } from "@mayank1513/fork-me";
import Image from "next/image";
import { ColorSwitch } from "nextjs-themes";
import Card from "./_components/card";
Expand Down Expand Up @@ -48,19 +47,6 @@ export default function Home() {
title="Examples"
text="Learn through more examples on official GitHub repo."
/>
<StarMe
gitHubUrl="https://github.com/react18-tools/nextjs-themes"
className="group rounded-lg border border-transparent px-5 py-4 transition-colors hover:border-gray-300 hover:bg-gray-100 hover:dark:border-neutral-700 hover:dark:bg-neutral-800/30">
<h2 className={"mb-3 text-2xl font-semibold"}>
Star Me{" "}
<span className="inline-block transition-transform group-hover:translate-x-1 motion-reduce:transform-none">
-&gt;
</span>
</h2>
<p className={"m-0 max-w-[30ch] text-sm opacity-50"}>
Explore and star official <code>nextjs-themes</code> repo.
</p>
</StarMe>
<Card
href="https://vercel.com/new?utm_source=create-next-app&utm_medium=appdir-template&utm_campaign=create-next-app"
title="Deploy"
Expand Down
Binary file added examples/theme-sets/src/app/favicon.ico
Binary file not shown.
13 changes: 13 additions & 0 deletions examples/theme-sets/src/app/layout.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import "@repo/shared/dist/index.css";
import { ThemeSwitcher } from "nextjs-themes";

export default function RootLayout({ children }: { children: React.ReactNode }) {
return (
<html lang="en">
<body>
<ThemeSwitcher />
<main>{children}</main>
</body>
</html>
);
}
6 changes: 6 additions & 0 deletions examples/theme-sets/src/app/page.module.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
.container {
display: flex;
flex-direction: column;
align-items: center;
padding: 20px;
}
14 changes: 14 additions & 0 deletions examples/theme-sets/src/app/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import styles from "./page.module.css";

export default function Page() {
return (
<div className={styles.container}>
<h1>Simple Multi Theme</h1>
<hr />
<p>
Example showing how to use <code>nextjs-themes</code> to implement simple multi theme
switching
</p>
</div>
);
}
64 changes: 58 additions & 6 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 38c830c

Please sign in to comment.