-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathneon-github.cjs
More file actions
49 lines (41 loc) · 1.75 KB
/
Copy pathneon-github.cjs
File metadata and controls
49 lines (41 loc) · 1.75 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
const fs = require('fs');
const path = require('path');
// 1. Update Projects.jsx
const jsxPath = path.join(__dirname, 'src', 'components', 'Projects.jsx');
let jsx = fs.readFileSync(jsxPath, 'utf8');
// Replace standard btn with btn github-btn specifically for GitHub links
jsx = jsx.replace(
/className="btn"\s*target="_blank"\s*rel="noreferrer">GitHub/g,
'className="btn github-btn" target="_blank" rel="noreferrer">GitHub'
);
fs.writeFileSync(jsxPath, jsx);
// 2. Update index.css
const cssPath = path.join(__dirname, 'src', 'index.css');
let css = fs.readFileSync(cssPath, 'utf8');
const githubBtnCSS = `
.btn.github-btn {
background: rgba(0, 0, 0, 0.3);
color: #ff3333;
border: 1.5px solid #ff3333;
box-shadow: 0 0 12px rgba(255, 51, 51, 0.4), inset 0 0 8px rgba(255, 51, 51, 0.2);
text-shadow: 0 0 8px rgba(255, 51, 51, 0.6);
font-weight: 600;
backdrop-filter: blur(10px);
-webkit-backdrop-filter: blur(10px);
}
.btn.github-btn:hover {
background: rgba(255, 51, 51, 0.1);
color: #ffffff;
border: 1.5px solid #ff1a1a;
box-shadow: 0 0 20px rgba(255, 26, 26, 0.8), inset 0 0 15px rgba(255, 26, 26, 0.5);
text-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
transform: translateY(-3px) scale(1.02);
}
`;
// Insert the CSS inside .project-links
css = css.replace(
/(\.project-links\s*{[\s\S]*?\.btn:hover\s*{[^}]*})/,
`$1${githubBtnCSS}`
);
fs.writeFileSync(cssPath, css);
console.log('GitHub buttons updated to neon styles.');