-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPOPUP.html
More file actions
158 lines (153 loc) · 4.64 KB
/
POPUP.html
File metadata and controls
158 lines (153 loc) · 4.64 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
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
<!DOCTYPE html>
<html>
<head>
<style>
body {
height: auto;
width: 300px;
}
hr{
margin-bottom: 10px;
}
h1{
margin: 0px;
}
label {
font-family: arial;
font-size: 1rem;
margin-bottom: 0.3rem;
}
.toggle {
cursor: pointer;
display: inline-block;
}
.toggle-switch {
display: inline-block;
background: #ccc;
border-radius: 16px;
width: 37px;
height: 24px;
position: relative;
vertical-align: middle;
transition: background 0.25s;
}
.toggle-switch:before, .toggle-switch:after {
content: "";
}
.toggle-switch:before {
display: block;
background: linear-gradient(to bottom, #fff 0%, #eee 100%);
border-radius: 50%;
box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.25);
width: 16px;
height: 16px;
position: absolute;
top: 4px;
left: 4px;
transition: left 0.25s;
}
.toggle:hover .toggle-switch:before {
background: linear-gradient(to bottom, #fff 0%, #fff 100%);
box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.5);
}
.toggle-checkbox:checked + .toggle-switch {
background: #56c080;
}
.toggle-checkbox:checked + .toggle-switch:before {
left: 16px;
}
.toggle-checkbox {
position: absolute;
visibility: hidden;
}
.toggle-label {
margin-left: 5px;
position: relative;
top: 2px;
}
span.tooltip{
position: relative;
background-color: rgba(170, 166, 166, 0.87);
padding: .3rem .6rem;
border-radius: 1rem;
cursor: help;
margin-left: .5rem;
}
span.tooltip::before, .tooltip::after{
position: absolute;
opacity: 0;
transition: all ease 0.3s;
}
span.tooltip::before{
content: "";
border-width: 10px;
border-style: solid;
border-color: transparent transparent transparent rgba(0,0,0,1);
margin-right: -10px;
right: 100%;
}
span.tooltip::after{
content: attr(data-tooltip);
background: rgba(0,0,0,1);
transform: translateY(-100%);
font-size: 14px;
margin-right: 10px;
right: 100%;
top: 50px;
width: 150px;
border-radius: 10px;
color: #fff;
padding: 14px;
}
span.tooltip.top::before{
margin-left: 14px;
}
/* Hover states */
.tooltip:hover::before, .tooltip:hover::after{
opacity: 1;
}
form{
justify-content: top;
padding-left: 5px;
margin-bottom: 10px;
}
.wrapper{
display: flex;
flex-direction: column;
}
a{
align-self: center;
bottom: 2px;
color: #56c080;}
hr{
width: 100%;
}
@media (prefers-color-scheme: dark) {
body{
background-color: #2f2f2f;
color: white;
}
}
</style>
</head>
<body>
<div class="wrapper">
<h1>Settings for GTM Variable Mover</h1>
<hr>
<form id="optionsForm">
<label for="save" class="toggle">
<input id="save" class="toggle-checkbox" type="checkbox">
<div class="toggle-switch"></div>
Save on shortcut (Ctrl+S)<span class="tooltip top" data-tooltip="Check this to use Ctrl+S to save when editing tags and triggers, this overrides Ctrl+S to save file">?</span>
</label>
<label for="preview" class="toggle tooltip">
<input id="preview" class="toggle-checkbox" type="checkbox">
<div class="toggle-switch "></div>
Preview on shortcut (Ctrl+P)<span class="tooltip" data-tooltip="Check this to enable preview of the container using Ctrl+P, this overrides Ctrl+P to print">?</span>
</label>
</form>
<a href="https://knapstad.dev">Made by knapstad.dev</a>
<script type="text/javascript" src="popup.js"></script>
</div>
</body>
</html>