-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathadd-modal-css.cjs
More file actions
111 lines (99 loc) · 2.55 KB
/
Copy pathadd-modal-css.cjs
File metadata and controls
111 lines (99 loc) · 2.55 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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
const fs = require('fs');
const path = require('path');
const cssPath = path.join(__dirname, 'src', 'index.css');
let css = fs.readFileSync(cssPath, 'utf8');
const modalCSS = `
/* Certificate Modal Styles */
.certificate-modal-overlay {
position: fixed;
top: 0;
left: 0;
width: 100vw;
height: 100vh;
background: rgba(0, 0, 0, 0.7);
backdrop-filter: blur(15px);
-webkit-backdrop-filter: blur(15px);
display: flex;
justify-content: center;
align-items: center;
z-index: 1000;
animation: modalFadeIn 0.3s ease-out forwards;
}
.certificate-modal-content {
background: linear-gradient(145deg, rgba(20, 0, 0, 0.8), rgba(0, 0, 0, 0.9));
border: 1px solid rgba(255, 0, 0, 0.3);
box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8), inset 0 0 15px rgba(255, 0, 0, 0.1);
border-radius: 20px;
padding: 20px;
width: 90%;
max-width: 800px;
position: relative;
display: flex;
flex-direction: column;
align-items: center;
transform: scale(0.9);
animation: modalPopIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}
.close-modal-btn {
position: absolute;
top: -15px;
right: -15px;
width: 40px;
height: 40px;
border-radius: 50%;
background: #1a0000;
border: 1px solid rgba(255, 0, 0, 0.5);
color: #ff3333;
font-size: 24px;
display: flex;
justify-content: center;
align-items: center;
cursor: pointer;
box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
transition: all 0.3s ease;
z-index: 2;
}
.close-modal-btn:hover {
background: #ff0000;
color: #ffffff;
transform: scale(1.1) rotate(90deg);
box-shadow: 0 0 15px rgba(255, 0, 0, 0.5);
}
.certificate-modal-image {
width: 100%;
max-height: 65vh;
object-fit: contain;
border-radius: 12px;
margin-bottom: 20px;
border: 1px solid rgba(255, 0, 0, 0.1);
}
.certificate-modal-info {
text-align: center;
color: #ffffff;
}
.certificate-modal-info h2 {
font-size: 24px;
margin-bottom: 5px;
color: #ffffff;
text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}
.certificate-modal-info p {
font-size: 16px;
color: #ffcccc;
}
@keyframes modalFadeIn {
from { opacity: 0; }
to { opacity: 1; }
}
@keyframes modalPopIn {
from { opacity: 0; transform: scale(0.95) translateY(20px); }
to { opacity: 1; transform: scale(1) translateY(0); }
}
`;
if (!css.includes('.certificate-modal-overlay')) {
css += modalCSS;
fs.writeFileSync(cssPath, css);
console.log('Modal CSS added.');
} else {
console.log('Modal CSS already exists.');
}