-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfilters.html
93 lines (77 loc) · 3.89 KB
/
filters.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
<!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.0">
<title>Image Viewer</title>
<link rel="stylesheet" href="https://linfindel.github.io/nadircss/nadir.css">
</head>
<body>
<div class="column" style="align-items: flex-start; width: 100%;">
<nav id="navbar">
<h1>Image Viewer</h1>
</nav>
<div class="row">
<a href="index.html" id="back-link">
<button id="back" tabindex="-99">
<span translate="no" class="material-symbols-rounded">arrow_back</span>
Back
</button>
</a>
<button onclick="exportImage()" id="export" inert class="button-subtle">
<span translate="no" id="export-icon" class="material-symbols-rounded">download</span>
<span id="export-text">Download filtered image</span>
</button>
<button onclick="compare()" id="original-button" inert class="button-subtle">
<span translate="no" class="material-symbols-rounded">compare</span>
<span id="original-text">Show original image</span>
</button>
</div>
</div>
<img id="img" style="max-width: 60vw; max-height: 60vh;" crossorigin="anonymous">
<div class="card column" id="filters" style="width: 50vw;">
<h1>Filters</h1>
<div class="row" style="flex-wrap: wrap;">
<div id="blur" class="search-box">
<span translate="no" class="material-symbols-rounded">blur_on</span>
<input id="blur-input" oninput="addFilter('blur')" placeholder="Blur (px)" type="text" class="input-search">
</div>
<div id="brightness" class="search-box">
<span translate="no" class="material-symbols-rounded">brightness_medium</span>
<input id="brightness-input" oninput="addFilter('brightness')" placeholder="Brightness (%)" type="text" class="input-search">
</div>
<div id="contrast" class="search-box">
<span translate="no" class="material-symbols-rounded">contrast</span>
<input id="contrast-input" oninput="addFilter('contrast')" placeholder="Contrast (%)" type="text" class="input-search">
</div>
<div id="grayscale" class="search-box">
<span translate="no" class="material-symbols-rounded">filter_b_and_w</span>
<input id="grayscale-input" oninput="addFilter('grayscale')" placeholder="Grayscale (%)" type="text" class="input-search">
</div>
<div id="hue-rotate" class="search-box">
<span translate="no" class="material-symbols-rounded">colorize</span>
<input id="hue-rotate-input" oninput="addFilter('hue-rotate')" placeholder="Hue rotate (deg)" type="text" class="input-search">
</div>
<div id="invert" class="search-box">
<span translate="no" class="material-symbols-rounded">invert_colors</span>
<input id="invert-input" oninput="addFilter('invert')" placeholder="Invert (%)" type="text" class="input-search">
</div>
<div id="opacity" class="search-box">
<span translate="no" class="material-symbols-rounded">opacity</span>
<input id="opacity-input" oninput="addFilter('opacity')" placeholder="Opacity (%)" type="text" class="input-search">
</div>
<div id="saturate" class="search-box">
<span translate="no" class="material-symbols-rounded">colors</span>
<input id="saturate-input" oninput="addFilter('saturate')" placeholder="Saturation (%)" type="text" class="input-search">
</div>
<div id="sepia" class="search-box">
<span translate="no" class="material-symbols-rounded">history_edu</span>
<input id="sepia-input" oninput="addFilter('sepia')" placeholder="Sepia (%)" type="text" class="input-search">
</div>
</div>
</div>
<script src="https://cdnjs.cloudflare.com/ajax/libs/vibrant.js/1.0.0/Vibrant.min.js"></script>
<script src="filters.js"></script>
</body>
</html>