Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 25 additions & 13 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -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"
}
}
];
22 changes: 22 additions & 0 deletions make-transparent.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
const Jimp = require('jimp');

Check warning on line 1 in make-transparent.js

View workflow job for this annotation

GitHub Actions / Lint · Build

'require' is not defined

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);
});
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
Binary file modified public/main_logo_transparent.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion src/components/Footer.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [
{
Expand Down
2 changes: 1 addition & 1 deletion src/components/Socials.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ export default function Socials() {
aria-label="HexaFalls home"
>
<img
src="/main_logo_transparent.png?v=2"
src="/main_logo_transparent.png?v=3"
alt="HexaFalls"
className="block h-full w-full object-contain p-2 transition duration-300 group-hover:scale-105"
style={{ filter: "drop-shadow(0 0 8px rgba(102,252,241,0.25))" }}
Expand Down
4 changes: 2 additions & 2 deletions src/lib/routes.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export const SITEMAP = [
),
},
{
href: `${MAIN_SITE}/timeline`, label: "Timeline", soon: true,
href: `${MAIN_SITE}/timeline`, label: "Timeline",
icon: (
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="1.7" strokeLinecap="round" strokeLinejoin="round" className="h-4 w-4">
<circle cx="12" cy="12" r="9" />
Expand All @@ -23,7 +23,7 @@ export const SITEMAP = [
),
},
{
href: `${MAIN_SITE}/events`, label: "The Events", soon: true,
href: `${MAIN_SITE}/events`, label: "The Events",
icon: (
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="1.7" strokeLinecap="round" strokeLinejoin="round" className="h-4 w-4">
<path d="M5 4h14a2 2 0 0 1 2 2v3H3V6a2 2 0 0 1 2-2z" />
Expand Down
Loading