-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathupdate-cursor-css.cjs
More file actions
71 lines (62 loc) · 1.84 KB
/
Copy pathupdate-cursor-css.cjs
File metadata and controls
71 lines (62 loc) · 1.84 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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
const fs = require('fs');
const path = require('path');
const cssPath = path.join(__dirname, 'src', 'index.css');
let css = fs.readFileSync(cssPath, 'utf8');
// 1. Add cursor: none !important to *
if (!css.includes('cursor: none !important;')) {
css = css.replace(
/\*\s*\{([\s\S]*?)\}/,
`* {$1 cursor: none !important;\n}`
);
}
// 2. Add cursor and reveal styles at the end
const additionalCSS = `
/* Scroll Reveal Animations */
.reveal {
opacity: 0;
transform: translateY(50px);
transition: all 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.reveal.active {
opacity: 1;
transform: translateY(0);
}
/* Custom Cursor */
@media (pointer: fine) {
.cursor-dot {
width: 8px;
height: 8px;
background-color: #ff3333;
border-radius: 50%;
position: fixed;
transform: translate(-50%, -50%);
pointer-events: none;
z-index: 9999;
box-shadow: 0 0 10px rgba(255, 51, 51, 0.8), 0 0 20px rgba(255, 51, 51, 0.6);
transition: opacity 0.3s;
}
.cursor-outline {
width: 40px;
height: 40px;
border: 2px solid rgba(255, 51, 51, 0.5);
border-radius: 50%;
position: fixed;
transform: translate(-50%, -50%);
pointer-events: none;
z-index: 9998;
transition: width 0.2s, height 0.2s, background-color 0.2s, border-color 0.2s, left 0.1s ease-out, top 0.1s ease-out, opacity 0.3s;
}
.cursor-outline.hovering {
width: 60px;
height: 60px;
background-color: rgba(255, 51, 51, 0.1);
border-color: #ff3333;
box-shadow: 0 0 20px rgba(255, 51, 51, 0.4), inset 0 0 10px rgba(255, 51, 51, 0.2);
}
}
`;
if (!css.includes('.cursor-dot')) {
css += additionalCSS;
}
fs.writeFileSync(cssPath, css);
console.log('Appended cursor and reveal CSS');