diff --git a/.woodpecker/pipeline.yml b/.woodpecker/pipeline.yml
new file mode 100644
index 0000000..d38cb8a
--- /dev/null
+++ b/.woodpecker/pipeline.yml
@@ -0,0 +1,19 @@
+steps:
+ - name: build
+ image: docker:latest
+ commands:
+ - docker build -t nwblog:latest .
+ volumes:
+ - /var/run/docker.sock:/var/run/docker.sock
+ when:
+ - branch: [master, deploy]
+ - event: [push, manual]
+ - name: deploy
+ image: docker:latest
+ commands:
+ - docker run -d -p 127.0.0.1:25010:3000 --restart always --name nwblog nwblog:latest
+ volumes:
+ - /var/run/docker.sock:/var/run/docker.sock
+ when:
+ - branch: deploy
+ - event: manual
\ No newline at end of file
diff --git a/bun.lockb b/bun.lockb
index baf41ca..3f7d49f 100755
Binary files a/bun.lockb and b/bun.lockb differ
diff --git a/package.json b/package.json
index b9946ba..95e6c02 100644
--- a/package.json
+++ b/package.json
@@ -18,14 +18,14 @@
"react-icons": "^5.4.0"
},
"devDependencies": {
- "typescript": "^5",
+ "@eslint/eslintrc": "^3",
"@types/node": "^20",
"@types/react": "^19",
"@types/react-dom": "^19",
- "postcss": "^8",
- "tailwindcss": "^3.4.1",
"eslint": "^9",
"eslint-config-next": "15.1.5",
- "@eslint/eslintrc": "^3"
+ "postcss": "^8",
+ "sass": "^1.83.4",
+ "typescript": "^5"
}
}
diff --git a/postcss.config.mjs b/postcss.config.mjs
index 1a69fd2..4ba5b43 100644
--- a/postcss.config.mjs
+++ b/postcss.config.mjs
@@ -1,8 +1,6 @@
/** @type {import('postcss-load-config').Config} */
const config = {
- plugins: {
- tailwindcss: {},
- },
+ plugins: {},
};
export default config;
diff --git a/src/app/globals.css b/src/app/globals.css
deleted file mode 100644
index b5c61c9..0000000
--- a/src/app/globals.css
+++ /dev/null
@@ -1,3 +0,0 @@
-@tailwind base;
-@tailwind components;
-@tailwind utilities;
diff --git a/src/app/globals.scss b/src/app/globals.scss
new file mode 100644
index 0000000..e69de29
diff --git a/src/app/layout.tsx b/src/app/layout.tsx
index 8163b1e..f23d32f 100644
--- a/src/app/layout.tsx
+++ b/src/app/layout.tsx
@@ -1,7 +1,7 @@
-import { Provider } from "@/components/ui/provider";
import type { Metadata } from "next";
import { Geist, Geist_Mono } from "next/font/google";
-import "./globals.css";
+import "./globals.scss";
+import Providers from "./providers";
const geistSans = Geist({
variable: "--font-geist-sans",
@@ -26,7 +26,7 @@ export default function RootLayout({
return (
- {children}
+ {children}
);
diff --git a/src/app/page.tsx b/src/app/page.tsx
index c75150c..5b1fdc6 100644
--- a/src/app/page.tsx
+++ b/src/app/page.tsx
@@ -1,11 +1,18 @@
+"use client";
+
import { Button } from "@/components/ui/button";
+import { useColorMode, useColorModeValue } from "@/components/ui/color-mode";
import { VStack } from "@chakra-ui/react";
export default function Home() {
+ const { toggleColorMode } = useColorMode();
+ const color = useColorModeValue("red", "blue");
return (
-
-
+
+
);
}
diff --git a/src/app/providers.tsx b/src/app/providers.tsx
new file mode 100644
index 0000000..fdc2ba0
--- /dev/null
+++ b/src/app/providers.tsx
@@ -0,0 +1,5 @@
+import { Provider } from "@/components/ui/provider";
+
+export default function Providers(props: React.PropsWithChildren) {
+ return {props.children};
+}
diff --git a/src/components/ui/button.tsx b/src/components/ui/button.tsx
index 21d5f4b..f8d4edb 100644
--- a/src/components/ui/button.tsx
+++ b/src/components/ui/button.tsx
@@ -1,40 +1,33 @@
-import type { ButtonProps as ChakraButtonProps } from "@chakra-ui/react"
-import {
- AbsoluteCenter,
- Button as ChakraButton,
- Span,
- Spinner,
-} from "@chakra-ui/react"
-import * as React from "react"
+import type { ButtonProps as ChakraButtonProps } from "@chakra-ui/react";
+import { AbsoluteCenter, Button as ChakraButton, Span, Spinner } from "@chakra-ui/react";
+import * as React from "react";
interface ButtonLoadingProps {
- loading?: boolean
- loadingText?: React.ReactNode
+ loading?: boolean;
+ loadingText?: React.ReactNode;
}
export interface ButtonProps extends ChakraButtonProps, ButtonLoadingProps {}
-export const Button = React.forwardRef(
- function Button(props, ref) {
- const { loading, disabled, loadingText, children, ...rest } = props
- return (
-
- {loading && !loadingText ? (
- <>
-
-
-
- {children}
- >
- ) : loading && loadingText ? (
- <>
+export const Button = React.forwardRef(function Button(props, ref) {
+ const { loading, disabled, loadingText, children, ...rest } = props;
+ return (
+
+ {loading && !loadingText ? (
+ <>
+
- {loadingText}
- >
- ) : (
- children
- )}
-
- )
- },
-)
+
+ {children}
+ >
+ ) : loading && loadingText ? (
+ <>
+
+ {loadingText}
+ >
+ ) : (
+ children
+ )}
+
+ );
+});
diff --git a/tailwind.config.ts b/tailwind.config.ts
deleted file mode 100644
index 109807b..0000000
--- a/tailwind.config.ts
+++ /dev/null
@@ -1,18 +0,0 @@
-import type { Config } from "tailwindcss";
-
-export default {
- content: [
- "./src/pages/**/*.{js,ts,jsx,tsx,mdx}",
- "./src/components/**/*.{js,ts,jsx,tsx,mdx}",
- "./src/app/**/*.{js,ts,jsx,tsx,mdx}",
- ],
- theme: {
- extend: {
- colors: {
- background: "var(--background)",
- foreground: "var(--foreground)",
- },
- },
- },
- plugins: [],
-} satisfies Config;