forked from ampproject/amphtml
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathpopup.html
More file actions
152 lines (136 loc) · 3.12 KB
/
popup.html
File metadata and controls
152 lines (136 loc) · 3.12 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
<!doctype html>
<html>
<head>
<title>AMP Proxy</title>
<style>
body {
overflow: hidden;
margin: 0px;
padding: 20px;
border-radius: 3px;
background: white;
width: 200px;
text-align: center;
}
p {
color: gray;
font-size: 12px;
}
.notice {
color: lightgray;
font-size: 10px;
}
#logo {
width: 100px;
}
#switch-wrapper {
display: flex;
align-items: center;
}
#left {
flex-basis: 100%;
text-align: right;
padding-right: 10px;
}
#right {
flex-basis: 100%;
text-align: left;
padding-left: 10px;
}
#switch-container {
display: inline-block;
width: 40px;
height: 22px;
flex-shrink: 0;
position: relative;
}
#switch-container input[type="checkbox"] {
display:none;
}
#switch {
position: absolute;
cursor: pointer;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-color: #005af0;
-webkit-transition: .4s;
transition: .4s;
border-radius: 20px;
}
#switch:before {
position: absolute;
content: "";
height: 16px;
width: 16px;
left: 3px;
bottom: 3px;
background-color: white;
-webkit-transition: .4s;
transition: .4s;
border-radius: 50%;
}
input[type="checkbox"]:checked + #switch {
background-color: #005af0;
}
input[type="checkbox"]:focus + #switch {
box-shadow: 0 0 1px #005af0;
}
input:checked + #switch:before {
-webkit-transform: translateX(18px);
-ms-transform: translateX(18px);
transform: translateX(18px);
}
#base-url-holder, #switch-holder, .notice, .desc {
display: flex;
flex-direction: column;
margin-top: 24px;
}
#base-url {
border-radius: 4px;
padding: 8px;
border: 1px solid #d0d0d0;
color: #333;
width: 100%;
box-sizing: border-box;
}
.section-header {
margin-bottom: 16px;
text-align: left;
display: block;
font-size: 11px;
font-weight: 600;
text-transform: uppercase;
}
</style>
<script src="popup.js"></script>
</head>
<body>
<img id="logo" src="logo.svg" />
<p class="desc">Switch between using a local distribution of AMP HTML or the online
distribution hosted at https://cdn.ampproject.org/</p>
<div id="switch-holder">
<label class="section-header" for="enabled">Local AMP Serving</label>
<div id="switch-wrapper">
<span id="left">
Online CDN
</span>
<div id="switch-container">
<input type="checkbox" id="enabled">
<label id="switch" for="enabled"></label>
</div>
<span id="right">
Local AMP
</span>
</div>
</div>
<div id="base-url-holder">
<label for="base-url" class="section-header">Base URL</label>
<input id="base-url" type="url">
</div>
<span class="notice">
© Copyright 2017 The AMP HTML Authors. All Rights Reserved.
</span>
</body>
</html>