diff --git a/.env.production b/.env.production deleted file mode 100644 index 6f6a8c8..0000000 --- a/.env.production +++ /dev/null @@ -1,3 +0,0 @@ -DB_NAME= -DB_USER= -DB_PASS= \ No newline at end of file diff --git a/.eslintrc.json b/.eslintrc.json new file mode 100644 index 0000000..1970f8c --- /dev/null +++ b/.eslintrc.json @@ -0,0 +1,21 @@ +{ + "extends": "next/core-web-vitals", + "rules": { + "indent": [ + "error", + 2 + ], + "linebreak-style": [ + "error", + "unix" + ], + "quotes": [ + "error", + "single" + ], + "semi": [ + "error", + "always" + ] + } +} \ No newline at end of file diff --git a/.gitignore b/.gitignore index 8f322f0..a928e7b 100644 --- a/.gitignore +++ b/.gitignore @@ -4,6 +4,7 @@ /node_modules /.pnp .pnp.js +.yarn/install-state.gz # testing /coverage @@ -33,3 +34,6 @@ yarn-error.log* # typescript *.tsbuildinfo next-env.d.ts + +# IntelliJ +.idea/ \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml index 67b8767..ca8b94a 100644 --- a/.idea/modules.xml +++ b/.idea/modules.xml @@ -2,7 +2,7 @@ - + \ No newline at end of file diff --git a/.idea/newdesignedsite.iml b/.idea/newdesignedsite.iml deleted file mode 100644 index 24643cc..0000000 --- a/.idea/newdesignedsite.iml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - - - - \ No newline at end of file diff --git a/README.md b/README.md index a56fd49..789135c 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -![Website Banner](https://cdn.theclashfruit.me/git/Website/web_banner.svg) +Website Banner

Website

@@ -12,15 +12,15 @@

- My website written with Next.JS and Tailwind. + My website written with Next.js.

## Developing -1. Set `DATABASE_CONN` to your MongoDB connection string in `.env.local`. -2. Install dependencies with `npm install`. -3. Run the development server with `npm run dev`. -4. Open [http://localhost:3000](http://localhost:3000) in your browser. + +1. Install dependencies with `npm install`. +2. Run the development server with `npm run dev`. +3. Open [http://localhost:3000](http://localhost:3000) in your browser. ## Contributing @@ -29,7 +29,7 @@ Feel free to contribute, just make sure you are following design patterns I used ## License ``` -Copyright 2023 TheClashFruit +Copyright 2023 - 2024 TheClashFruit Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/components/AdBanner.js b/components/AdBanner.js deleted file mode 100644 index 85fcf0d..0000000 --- a/components/AdBanner.js +++ /dev/null @@ -1,23 +0,0 @@ -import { useEffect } from 'react'; - -export default function AdBanner(props) { - useEffect(() => { - try { - (window.adsbygoogle = window.adsbygoogle || []).push({}); - } catch (err) { - console.log(err); - } - }, []); - - return ( - - ); -} \ No newline at end of file diff --git a/components/BlogItem.js b/components/BlogItem.js deleted file mode 100644 index be108d7..0000000 --- a/components/BlogItem.js +++ /dev/null @@ -1,20 +0,0 @@ -import Image from 'next/image'; -import Link from 'next/link'; - -export default function BlogItem({ blogData }) { - return ( -
- {blogData.title} - -
- - {blogData.title} - -
- -
-

{blogData.content.replace(/(<([^>]+)>)/gi, "").substring(0, 100).trim() + '...'}

-
-
- ) -} \ No newline at end of file diff --git a/components/Button.js b/components/Button.js new file mode 100644 index 0000000..2cafc37 --- /dev/null +++ b/components/Button.js @@ -0,0 +1,21 @@ +import styles from '@/styles/Components.module.scss'; + +import Link from 'next/link'; + +export default function Button({ className, icon: Icon, type, href, children, ...props }) { + if (href) { + return ( + + { Icon && } + { type !== 'icon' && children } + + ); + } + + return ( + + ); +} \ No newline at end of file diff --git a/components/Card.js b/components/Card.js new file mode 100644 index 0000000..6e181a9 --- /dev/null +++ b/components/Card.js @@ -0,0 +1,9 @@ +import styles from '@/styles/Components.module.scss'; + +export default function Card({ className, children, ...props }) { + return ( +
+ { children } +
+ ); +} \ No newline at end of file diff --git a/components/ConsentBanner.js b/components/ConsentBanner.js new file mode 100644 index 0000000..00722d6 --- /dev/null +++ b/components/ConsentBanner.js @@ -0,0 +1,44 @@ +import Button from '@/components/Button'; + +import { Check, X } from 'lucide-react'; +import { push } from '@socialgouv/matomo-next'; + +import styles from '@/styles/Components.module.scss'; + +export default function ConsentBanner() { + const setCookieConsentGiven = (isAccepted) => { + if (typeof window === 'undefined') + return; + + localStorage.setItem('tcf_consent', isAccepted ? 'true' : 'false'); + + if(isAccepted) + push(['setCookieConsentGiven']); + else + push(['forgetCookieConsentGiven']); + + window.dispatchEvent(new Event('consentChange')); + }; + + return ( +
+
+

+ This site uses Matomo to analyze traffic and help us to improve your user experience. +

+

+ We process your email address and IP address and cookies are stored on your browser for 13 months. This data is only processed by us. +

+
+
+ + + +
+
+ ); +} \ No newline at end of file diff --git a/components/Dialog.js b/components/Dialog.js new file mode 100644 index 0000000..c24dfb6 --- /dev/null +++ b/components/Dialog.js @@ -0,0 +1,22 @@ +import styles from '@/styles/Components.module.scss'; + +import Button from '@/components/Button'; + +import { X } from 'lucide-react'; + +export default function Dialog({ className, title, closeAction, children, ...props }) { + return ( +
+
+
+ + +
+
+ {children} +
+
+
+ ); +} \ No newline at end of file diff --git a/components/Footer.js b/components/Footer.js index 14c8d6a..8b243b0 100644 --- a/components/Footer.js +++ b/components/Footer.js @@ -1,73 +1,11 @@ -import Link from 'next/link'; +import styles from '@/styles/Footer.module.scss'; export default function Footer() { return ( -