diff --git a/eslint.config.mjs b/eslint.config.mjs index 348c45a..03dd6da 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -1,14 +1,26 @@ -import { dirname } from "path"; -import { fileURLToPath } from "url"; -import { FlatCompat } from "@eslint/eslintrc"; +import js from "@eslint/js"; -const __filename = fileURLToPath(import.meta.url); -const __dirname = dirname(__filename); - -const compat = new FlatCompat({ - baseDirectory: __dirname, -}); - -const eslintConfig = [...compat.extends("next/core-web-vitals")]; - -export default eslintConfig; +export default [ + js.configs.recommended, + { + ignores: [".next/**", "node_modules/**", "public/**"] + }, + { + languageOptions: { + ecmaVersion: 2024, + sourceType: "module", + globals: { + document: "readonly", + window: "readonly", + process: "readonly", + console: "readonly", + setTimeout: "readonly", + clearTimeout: "readonly" + } + }, + rules: { + "no-unused-vars": "warn", + "no-undef": "warn" + } + } +]; diff --git a/make-transparent.js b/make-transparent.js new file mode 100644 index 0000000..b740eec --- /dev/null +++ b/make-transparent.js @@ -0,0 +1,22 @@ +const Jimp = require('jimp'); + +Jimp.read('https://hexafalls.org/logos/main_logo.png') + .then(img => { + img.scan(0, 0, img.bitmap.width, img.bitmap.height, function(x, y, idx) { + const r = this.bitmap.data[idx + 0]; + const g = this.bitmap.data[idx + 1]; + const b = this.bitmap.data[idx + 2]; + // Make pure white or very close to white transparent + if (r > 230 && g > 230 && b > 230) { + this.bitmap.data[idx + 3] = 0; + } + }); + // Resize to a smaller dimension so the file isn't 2.2MB! + img.resize(256, Jimp.AUTO); + return img.writeAsync('public/main_logo_transparent.png'); + }) + .then(() => console.log('Successfully made logo transparent and compressed!')) + .catch(err => { + console.error('Error processing image:', err); + process.exit(1); + }); diff --git a/package.json b/package.json index 46b8da4..32fb336 100644 --- a/package.json +++ b/package.json @@ -44,7 +44,7 @@ "dev": "next dev", "build": "next build", "start": "next start", - "lint": "eslint", + "lint": "eslint .", "preview": "opennextjs-cloudflare build && opennextjs-cloudflare preview", "deploy": "opennextjs-cloudflare build && opennextjs-cloudflare deploy", "cf-typegen": "wrangler types --env-interface CloudflareEnv cloudflare-env.d.ts" diff --git a/public/main_logo_transparent.png b/public/main_logo_transparent.png index d90d713..0706f2f 100644 Binary files a/public/main_logo_transparent.png and b/public/main_logo_transparent.png differ diff --git a/src/components/Footer.jsx b/src/components/Footer.jsx index 9e3cd8a..bdb4bad 100644 --- a/src/components/Footer.jsx +++ b/src/components/Footer.jsx @@ -10,7 +10,7 @@ import RoughTape from "./RoughTape"; const EMAIL = "support@hexafalls.org"; const GDG_LINK = "https://gdg.community.dev/gdg-on-campus-jis-university-kolkata-india/"; const GITHUB_ORG = "https://github.com/hexafest"; -const MAIN_LOGO = "/main_logo_transparent.png?v=2"; +const MAIN_LOGO = "/main_logo_transparent.png?v=3"; const SOCIALS = [ { diff --git a/src/components/Socials.jsx b/src/components/Socials.jsx index 1dbf89f..d450da6 100644 --- a/src/components/Socials.jsx +++ b/src/components/Socials.jsx @@ -270,7 +270,7 @@ export default function Socials() { aria-label="HexaFalls home" > HexaFalls @@ -23,7 +23,7 @@ export const SITEMAP = [ ), }, { - href: `${MAIN_SITE}/events`, label: "The Events", soon: true, + href: `${MAIN_SITE}/events`, label: "The Events", icon: (