forked from progapandist/imgproxy-form
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
152 lines (139 loc) · 5.59 KB
/
index.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>imgproxy URL generator</title>
<!-- Bootstrap -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<link rel="stylesheet" href="./app.css">
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body>
<div class="container">
<div class="row">
<div class="col-md-8 col-md-offset-2" id="form-block">
<h1>imgproxy URL generator</h1>
<form action="#" class="form">
<div class="form-group">
<label for="url">Remote image URL*</label>
<input type="text" id="url" class="form-control">
</div>
<div class="form-group">
<label for="proxy_url">imgproxy host URL (may skip this one if running imgproxy locally)</label>
<input type="text" id="proxy_url" class="form-control">
</div>
<div class="row">
<div class="col-md-6">
<div class="form-group">
<label for="key">imgproxy key*</label>
<input type="text" id="key" class="form-control" value="1b147116e57d9e06df3696b21260169902fe201ccdb9715267999176ccbfaae6f2c2b75b78110d0287643d98cde143e7a3f98a46ec825a1ab7ea10af426c2436">
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<label for="salt">imgproxy salt*</label>
<input type="text" id="salt" class="form-control" value="1e4483006c56f05f1b42af2f2b61765f64b8a074bf993922dd5b4bca78f49280683beb368308b7f76d522027b071a25e6d4b26138686b43e1faa4be4c9b674ea">
</div>
</div>
</div>
<div class="row">
<div class="col-md-3">
<div class="form-group">
<label for="height">Height*</label>
<input type="text" id="height" class="form-control">
</div>
</div>
<div class="col-md-3">
<div class="form-group">
<label for="width">Width*</label>
<input type="text" id="width" class="form-control">
</div>
</div>
<div class="col-md-2">
<div class="form-group">
<label for="resize">Resize</label>
<select class="form-control" id="resize">
<option>fit</option>
<option>fill</option>
<option>auto</option>
</select>
</div>
</div>
<div class="col-md-2">
<div class="form-group">
<label for="gravity">Gravity</label>
<select class="form-control" id="gravity">
<option>no</option>
<option>so</option>
<option>ea</option>
<option>we</option>
<option>ce</option>
<option>sm</option>
</select>
</div>
</div>
<div class="col-md-2">
<div class="form-group">
<label for="extension">Extension</label>
<select class="form-control" id="extension">
<option>jpg</option>
<option>png</option>
<option>webp</option>
<option>avif</option>
</select>
</div>
</div>
</div>
<div class="row">
<div class="col-md-3">
<div class="form-group form-inline">
<label for="enlarge">Enlarge</label>
<div class="checkbox">
<label>
<input type="checkbox" value="" id="enlarge">
</label>
</div>
</div>
</div>
</div>
<div class="row">
<div class="form-group col-md-3">
<input type="submit" id="submit" class="btn btn-primary btn-lg" value="Generate URL">
</div>
<div class="form-group col-md-9">
<div class="input-group">
<input type="text" class="form-control input-lg" id="result" placeholder="Result">
<div class="input-group-addon">
<a href="#" class="copy" data-clipboard-target="#result">
<img class="clippy" src="clippy.svg" width="20" alt="Copy to clipboard">
</a>
</div>
</div>
</div>
</div>
</form>
<div id="info">
<p><strong>Before using this form:</strong></p>
<p>
Make your instance of imgproxy available
by following the instructions
<a href="https://github.com/imgproxy/imgproxy">here</a>
(you can deploy on Heroku with one click).
Note down your IMGPROXY_KEY and IMGPROXY_SALT.
</p>
</div>
</div>
</div>
</div>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<script type="text/javascript" src="lib/sha256.js"></script>
<script type="text/javascript" src="lib/clipboard.min.js"></script>
<script type="text/javascript" src="index.js"></script>
</body>
</html>