-
Notifications
You must be signed in to change notification settings - Fork 0
/
popup.html
171 lines (164 loc) · 5.41 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Unsplash Image Link Copier Settings</title>
<link rel="stylesheet" href="popup.css" />
<!-- Font Awesome Link -->
<link
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css"
rel="stylesheet"
/>
</head>
<body>
<div id="settings-container">
<h3>Set Default Image Parameters</h3>
<form id="settings-form">
<div class="row">
<div class="col">
<label for="width">
Width:
<a
href="https://docs.imgix.com/apis/rendering/size/image-width"
target="_blank"
><i class="fas fa-link"></i
></a>
</label>
<input
type="number"
id="width"
name="width"
placeholder="width px"
/>
</div>
<div class="col">
<label for="height">
Height:
<a
href="https://docs.imgix.com/apis/rendering/size/image-height"
target="_blank"
><i class="fas fa-link"></i
></a>
</label>
<input
type="number"
id="height"
name="height"
placeholder="height px"
/>
</div>
</div>
<div class="row">
<div class="col">
<label for="quality">
Quality:
<a
href="https://docs.imgix.com/apis/rendering/format/output-quality"
target="_blank"
><i class="fas fa-link"></i
></a>
</label>
<input
type="number"
id="quality"
name="quality"
min="0"
max="100"
placeholder="1-100 (recommend 80)"
/>
</div>
<div class="col">
<label for="ar">
Aspect Ratio (w:h):
<a
href="https://docs.imgix.com/apis/rendering/size/aspect-ratio"
target="_blank"
><i class="fas fa-link"></i
></a>
</label>
<input type="text" id="ar" name="ar" placeholder="w:h" />
</div>
</div>
<div class="row">
<div class="col">
<label for="fit">
Fit:
<a
href="https://docs.imgix.com/apis/rendering/size/resize-fit-mode"
target="_blank"
><i class="fas fa-link"></i
></a>
</label>
<select id="fit" name="fit">
<option value="">Select</option>
<option value="clamp">Clamp</option>
<option value="clip">Clip</option>
<option value="crop">Crop</option>
<option value="facearea">Facearea</option>
<option value="fill">Fill</option>
<option value="fillmax">Fillmax</option>
<option value="max">Max</option>
<option value="min">Min</option>
<option value="scale">Scale</option>
</select>
</div>
<div class="col">
<label for="crop">
Crop:
<a
href="https://docs.imgix.com/apis/rendering/size/crop-mode"
target="_blank"
><i class="fas fa-link"></i
></a>
</label>
<select id="crop" name="crop">
<option value="">None</option>
<option value="top">Top</option>
<option value="bottom">Bottom</option>
<option value="left">Left</option>
<option value="right">Right</option>
<option value="faces">Faces</option>
<option value="focalpoint">Focalpoint</option>
<option value="edges">Edges</option>
<option value="entropy">Entropy</option>
</select>
</div>
</div>
<label for="custom-query">
Custom Query Parameters:
<a
href="https://docs.imgix.com/apis/rendering/overview"
target="_blank"
><i class="fas fa-link"></i
></a>
</label>
<input
type="text"
id="custom-query"
name="custom-query"
placeholder="e.g., bg=FFFFFF&dpr=2"
/>
<div class="row full-width">
<select id="profiles">
<option value="" disabled selected>Select Profile</option>
</select>
<button type="button" id="load-profile" class="blue">Load</button>
<button type="button" id="delete-profile" class="red">Delete</button>
</div>
<div id="profile-buttons" class="row">
<input type="text" id="profile-name" placeholder="New Profile Name" />
<button type="button" id="save-profile">Create Profile</button>
</div>
<div id="button-group" class="row">
<button type="button" id="save-button" class="green">
Save Settings
</button>
<button type="button" id="reset-button" class="black">Reset</button>
</div>
</form>
</div>
<script src="popup.js"></script>
<div id="toast"></div>
</body>
</html>