forked from kfurgol/mac-cmd-scroll
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpopup.html
More file actions
103 lines (91 loc) · 2.2 KB
/
popup.html
File metadata and controls
103 lines (91 loc) · 2.2 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
<!DOCTYPE html>
<html>
<head>
<style>
body {
width: 180px;
height: 140px;
margin: 0;
padding: 10px;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
background: #ffffff;
gap: 8px;
cursor: pointer;
user-select: none;
}
.power-button {
width: 50px;
height: 50px;
border: none;
background: none;
cursor: pointer;
position: relative;
transition: transform 0.2s ease;
}
.power-button:hover {
transform: scale(1.1);
}
.power-button:active {
transform: scale(0.95);
}
.power-button svg {
width: 100%;
height: 100%;
}
.power-button.enabled svg path {
stroke: #4CAF50;
}
.power-button.disabled svg path {
stroke: #f44336;
}
.status-text {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
font-size: 14px;
font-weight: 500;
color: #333;
margin: 0;
}
.status-text.enabled {
color: #4CAF50;
}
.status-text.disabled {
color: #f44336;
}
.direction-toggle {
display: flex;
align-items: center;
gap: 6px;
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
font-size: 12px;
color: #555;
cursor: pointer;
padding: 6px 8px;
border-radius: 4px;
transition: background-color 0.2s ease;
}
.direction-toggle:hover {
background-color: #f5f5f5;
}
.direction-label {
font-weight: 500;
color: #333;
}
</style>
</head>
<body>
<button id="powerToggle" class="power-button enabled">
<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M12 2v10M16.2 7.8a6 6 0 11-8.4 0" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
</svg>
</button>
<p id="statusText" class="status-text enabled">Turn off</p>
<div id="directionToggle" class="direction-toggle">
<span class="direction-label">Scroll:</span>
<span id="directionText">↓ Zoom In</span>
</div>
<script src="popup.js"></script>
</body>
</html>