-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpopup.html
183 lines (164 loc) · 4.58 KB
/
popup.html
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
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
<!DOCTYPE html>
<html>
<head >
<meta charset="UTF-8">
<title>Silly</title>
<style>
body {
width: 400px;
margin: 20px auto;
padding: 10px;
font-family: Arial, sans-serif;
color: #333;
background-color: #ffffff ;
border-radius: 10px;
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}
button {
width: 100%;
padding: 12px;
margin: 10px 0;
background-color: #4CAF50;
color: white;
border: none;
border-radius: 25px;
cursor: pointer;
font-size: 16px;
font-weight: bold;
transition: background-color 0.3s ease;
}
button:hover {
background-color: #45a049;
}
#result {
display: none;
margin-top: 20px;
font-size: 14px;
background-color: white;
border-radius: 10px;
padding: 15px;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
#loading {
display: none; /* Initially hidden */
width: 100px; /* Width of the GIF */
height: 100px; /* Height of the GIF */
background: url('trees.gif') center center no-repeat; /* Center the GIF */
background-size: cover; /* Ensure the image covers the div */
margin: 20px auto; /* Center it horizontally and add space below the logo */
position: static; /* Ensure it follows the document flow */
}
.circular-progress-container {
display: flex;
justify-content: center; /* Center horizontally */
align-items: center; /* Center vertically */
margin-bottom: 20px;
position: relative;
width: 100%; /* Ensure it takes the full width of the parent container */
}
.circular-progress {
display: flex !important; /* Enable flexbox for the circular progress */
justify-content: center; /* Center the content horizontally */
align-items: center; /* Center the content vertically */
width: 170px; /* Set the width of the circle */
height: 170px; /* Set the height of the circle */
background: conic-gradient(
var(--progress-color, #4CAF50) var(--progress, 0%),
#e0e0e0 0%
);
border-radius: 50%; /* Make it circular */
position: relative;
margin: 0 auto;
}
.circular-progress::before {
content: "";
position: absolute;
width: 130px;
height: 130px;
background: #fff;
border-radius: 50%; /* Inner circle for a donut effect */
}
.progress-text {
position: absolute;
font-size: 25px; /* Adjusted for larger circle */
font-weight: bold;
color: #333;
text-align: center; /* Center the text */
}
.logo {
display: flex;
align-items: center;
justify-content: center;
gap: 10px;
margin-bottom: 20px;
}
.logo img {
width: 50px;
height: 50px;
}
.logo-text {
color: #4CAF50;
font-size: 28px;
font-weight: bold;
letter-spacing: 1px;
}
.category {
margin-bottom: 20px;
padding: 10px 15px;
background-color: #e8f5e9;
border-left: 5px solid #4CAF50;
border-radius: 8px;
}
.header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 8px;
font-weight: bold;
font-size: 16px;
color: #2e7d32;
}
.category-name {
font-weight: bold;
text-transform: capitalize;
}
.score {
font-size: 14px;
color: #2e7d32;
background: #a5d6a7;
padding: 3px 6px;
border-radius: 4px;
}
.reason {
font-size: 14px;
line-height: 1.6;
color: #555;
}
@media (max-width: 480px) {
.logo-text {
font-size: 24px;
}
button {
font-size: 14px;
}
.header {
font-size: 14px;
}
.reason {
font-size: 12px;
}
}
</style>
</head>
<body>
<div class="logo">
<img src="leaf.png" width="40" height="40" alt="Logo">
<span class="logo-text">SILLY</span>
</div>
<div id="loading" class="loading"></div>
<button id="analyzeBtn">Check Silly Score</button>
<div id="avg" class="circular-progress-container"></div>
<div id="result"></div>
<script src="popup.js"></script>
</body>
</html>