diff --git a/client/.eslintrc.json b/client/.eslintrc.json index ebd1a1b..81103ae 100644 --- a/client/.eslintrc.json +++ b/client/.eslintrc.json @@ -1,6 +1,6 @@ { "root": true, - "extends": ["next/core-web-vitals", "plugin:@typescript-eslint/recommended", "prettier"], + "extends": ["next/core-web-vitals", "plugin:@typescript-eslint/recommended", "plugin:tailwindcss/recommended", "prettier"], "plugins": ["@typescript-eslint", "tailwindcss", "import", "unused-imports"], "rules": { "import/no-unused-modules": "error", @@ -8,7 +8,10 @@ "@typescript-eslint/no-unused-vars": ["error", { "varsIgnorePattern": "^_" }], "@typescript-eslint/no-explicit-any": "off", "no-console": ["warn", { "allow": ["warn", "error", "info", "debug"] }], - "@next/next/no-html-link-for-pages": "off" + "@next/next/no-html-link-for-pages": "off", + "tailwindcss/no-custom-classname": "off", + "tailwindcss/migration-from-tailwind-2": "off", + "tailwindcss/classnames-order": "error" }, "settings": { "tailwindcss": { @@ -29,7 +32,8 @@ "rules": { "import/no-unused-modules": "off", "unused-imports/no-unused-imports": "off", - "@typescript-eslint/no-unused-vars": "off" + "@typescript-eslint/no-unused-vars": "off", + "tailwindcss/classnames-order": "off" } } ] diff --git a/client/.lintstagedrc.json b/client/.lintstagedrc.json index 798507c..bb1cc93 100644 --- a/client/.lintstagedrc.json +++ b/client/.lintstagedrc.json @@ -1,3 +1,3 @@ { - "./**/*.{ts,tsx,js,jsx,json}": ["eslint --quiet --fix", "prettier --write"] + "./**/*.{ts,tsx,js,jsx,json}": ["prettier --write", "eslint --quiet --fix"] } diff --git a/client/app/faq/faq.tsx b/client/app/faq/faq.tsx index ee3b246..c2c5018 100644 --- a/client/app/faq/faq.tsx +++ b/client/app/faq/faq.tsx @@ -1,11 +1,12 @@ "use client"; -import Link from "next/link"; import { useEffect, useState } from "react"; +import Link from "next/link"; import { faqs } from "@/constants"; -import { Accordion, AccordionContent, AccordionItem, AccordionTrigger } from "@/components/ui/accordion"; import { FAQLinkData } from "@/interfaces"; +import { Accordion, AccordionContent, AccordionItem, AccordionTrigger } from "@/components/ui/accordion"; + export default function FAQPage() { const [accordionDefaultValue, setAccordionDefaultValue] = useState(`item-0`); @@ -16,7 +17,7 @@ export default function FAQPage() { index % 2 === 0 ? ( segment ) : ( - + {links?.[segment]?.text ?? segment} ), @@ -36,8 +37,8 @@ export default function FAQPage() { return ( <> -
-
+
+

Frequently Asked Questions

diff --git a/client/app/faq/page.tsx b/client/app/faq/page.tsx index 77c999a..01f5a11 100644 --- a/client/app/faq/page.tsx +++ b/client/app/faq/page.tsx @@ -1,4 +1,5 @@ import { Metadata } from "next"; + import FAQPage from "./faq"; export const metadata: Metadata = { diff --git a/client/app/globals.css b/client/app/globals.css index b486a0a..63420a7 100644 --- a/client/app/globals.css +++ b/client/app/globals.css @@ -10,8 +10,8 @@ --card-foreground: 240 10% 3.9%; --popover: 0 0% 100%; --popover-foreground: 240 10% 3.9%; - --primary: 240 5.9% 10%; - --primary-foreground: 0 0% 98%; + --primary: 142.1 76.2% 36.3%; + --primary-foreground: 355.7 100% 97.3%; --secondary: 240 4.8% 95.9%; --secondary-foreground: 240 5.9% 10%; --muted: 240 4.8% 95.9%; @@ -22,30 +22,30 @@ --destructive-foreground: 0 0% 98%; --border: 240 5.9% 90%; --input: 240 5.9% 90%; - --ring: 240 5.9% 10%; + --ring: 142.1 76.2% 36.3%; --radius: 0rem; } .dark { - --background: 240 10% 3.9%; - --foreground: 0 0% 98%; - --card: 240 10% 3.9%; - --card-foreground: 0 0% 98%; - --popover: 240 10% 3.9%; - --popover-foreground: 0 0% 98%; - --primary: 0 0% 98%; - --primary-foreground: 240 5.9% 10%; + --background: 20 14.3% 4.1%; + --foreground: 0 0% 95%; + --card: 24 9.8% 10%; + --card-foreground: 0 0% 95%; + --popover: 0 0% 9%; + --popover-foreground: 0 0% 95%; + --primary: 142.1 70.6% 45.3%; + --primary-foreground: 144.9 80.4% 10%; --secondary: 240 3.7% 15.9%; --secondary-foreground: 0 0% 98%; - --muted: 240 3.7% 15.9%; + --muted: 0 0% 15%; --muted-foreground: 240 5% 64.9%; - --accent: 240 3.7% 15.9%; + --accent: 12 6.5% 15.1%; --accent-foreground: 0 0% 98%; --destructive: 0 62.8% 30.6%; - --destructive-foreground: 0 0% 98%; + --destructive-foreground: 0 85.7% 97.3%; --border: 240 3.7% 15.9%; --input: 240 3.7% 15.9%; - --ring: 240 4.9% 83.9%; + --ring: 142.4 71.8% 29.2%; } } diff --git a/client/app/guide/[guide_name]/guide-name.tsx b/client/app/guide/[guide_name]/guide-name.tsx index dc3b7f2..687de0d 100644 --- a/client/app/guide/[guide_name]/guide-name.tsx +++ b/client/app/guide/[guide_name]/guide-name.tsx @@ -1,13 +1,14 @@ "use client"; import { useEffect, useState } from "react"; -import { getGuideByPath } from "@/lib/index"; -import { HowToGuide } from "@/interfaces"; -import { useRouter } from "next/navigation"; import Head from "next/head"; -import CustomMarkdown from "@/components/custom-markdown"; -import { useToast } from "@/components/ui/use-toast"; +import { useRouter } from "next/navigation"; +import { HowToGuide } from "@/interfaces"; + +import { getGuideByPath } from "@/lib/index"; import { Skeleton } from "@/components/ui/skeleton"; +import { useToast } from "@/components/ui/use-toast"; +import CustomMarkdown from "@/components/custom-markdown"; export default function HowToGuideDetail({ params }: { params: { guide_name: string } }) { const router = useRouter(); @@ -69,7 +70,7 @@ export default function HowToGuideDetail({ params }: { params: { guide_name: str
) : ( <> -
+

“MakeMeDIYspire” Guides

diff --git a/client/app/guide/[guide_name]/page.tsx b/client/app/guide/[guide_name]/page.tsx index 37535ba..1e11c6f 100644 --- a/client/app/guide/[guide_name]/page.tsx +++ b/client/app/guide/[guide_name]/page.tsx @@ -1,5 +1,6 @@ import { Metadata } from "next"; import { getGuideByPath } from "@/lib"; + import HowToGuideDetail from "./guide-name"; export async function generateMetadata({ params }: { params: { guide_name: string } }): Promise { diff --git a/client/app/guide/guide.tsx b/client/app/guide/guide.tsx index 7059de3..0358e61 100644 --- a/client/app/guide/guide.tsx +++ b/client/app/guide/guide.tsx @@ -2,11 +2,12 @@ import { useEffect, useState } from "react"; import Link from "next/link"; + import { getAllGuides } from "@/lib/index"; +import { Label } from "@/components/ui/label"; import { Separator } from "@/components/ui/separator"; import { Skeleton } from "@/components/ui/skeleton"; import { useToast } from "@/components/ui/use-toast"; -import { Label } from "@/components/ui/label"; type Guide = { path: string; @@ -41,10 +42,10 @@ export default function HowToGuidesList() { return ( <> -
-
-

“MakeMeDIYspire” Guides

- +
+
+

“MakeMeDIYspire” Guides

+
{loading ? ( diff --git a/client/app/guide/page.tsx b/client/app/guide/page.tsx index 7fd0ee9..19de2fb 100644 --- a/client/app/guide/page.tsx +++ b/client/app/guide/page.tsx @@ -1,6 +1,7 @@ -import HowToGuidesList from "./guide"; import { Metadata } from "next"; +import HowToGuidesList from "./guide"; + export const metadata: Metadata = { title: "MakeMeDIYspire How-to Guides", description: "Navigate through our comprehensive guides and maximize the potential of the MakeMeDIYspire DIY project generator.", diff --git a/client/app/layout.tsx b/client/app/layout.tsx index c3e346a..f6dbd87 100644 --- a/client/app/layout.tsx +++ b/client/app/layout.tsx @@ -1,10 +1,13 @@ import { ThemeProvider } from "@/components/theme-provider"; + import "./globals.css"; + import type { Metadata } from "next"; import { Inter } from "next/font/google"; -import Navbar from "@/components/navbar"; -import Footer from "@/components/footer"; + import { Toaster } from "@/components/ui/toaster"; +import Footer from "@/components/footer"; +import Navbar from "@/components/navbar"; const inter = Inter({ subsets: ["latin"] }); @@ -47,9 +50,9 @@ export default function RootLayout({ children }: { children: React.ReactNode }) -
+
-
{children}
+
{children}
diff --git a/client/app/page.tsx b/client/app/page.tsx index f3d339e..99dc7cc 100644 --- a/client/app/page.tsx +++ b/client/app/page.tsx @@ -2,19 +2,18 @@ import { useCallback, useEffect, useMemo, useState } from "react"; import dynamic from "next/dynamic"; +import { categories } from "@/constants"; +import { generateProjectIdeas, getTotalCountOfGeneratedIdea, incrementCounterOfGeneratedIdea } from "@/lib"; +import { Info, RefreshCcw } from "lucide-react"; +import { Button } from "@/components/ui/button"; +import { Label } from "@/components/ui/label"; +import { Separator } from "@/components/ui/separator"; +import { useToast } from "@/components/ui/use-toast"; import CategoryFilter from "@/components/generate/category-filter"; import DifficultyFilter from "@/components/generate/difficulty-filter"; import MaterialInput from "@/components/generate/material-input"; import SafetyCheck from "@/components/generate/safety-check"; -import { useToast } from "@/components/ui/use-toast"; -import { Label } from "@/components/ui/label"; -import { Separator } from "@/components/ui/separator"; -import { Button } from "@/components/ui/button"; -import { Info, RefreshCcw } from "lucide-react"; - -import { categories } from "@/constants"; -import { generateProjectIdeas, getTotalCountOfGeneratedIdea, incrementCounterOfGeneratedIdea } from "@/lib"; const TimeAvailabilityFilter = dynamic(() => import("@/components/generate/time-availability-filter")); const ToolsAvailableInput = dynamic(() => import("@/components/generate/tools-available-input")); @@ -131,8 +130,8 @@ export default function Home() {
-
@@ -151,16 +150,16 @@ export default function Home() {
- {showAdvancedOptions && advancedOptions} -
+
-
@@ -170,11 +169,11 @@ export default function Home() { return (
-
-

DIY Project Ideas

+
+

DIY Ideas Generator

- +