-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
65 lines (49 loc) · 2.09 KB
/
index.html
File metadata and controls
65 lines (49 loc) · 2.09 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Flex Uploader</title>
<style>
body {
margin: 0;
padding: 1rem;
font-family: sans-serif;
}
</style>
<link rel="stylesheet" href="dist/css/flex-uploader.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.8.0/styles/default.min.css">
</head>
<body>
<p>Example:</p>
<label for="input-file" id="drop-area" class="drop-area">
<input type="file" name="image" id="input-file" accept="image/*" hidden>
<div id="img-view" class="img-view">
<img src="dist/images/gallery-export.svg" id="img" width="50">
<p id="img-info">Chose Image To Upload</p>
</div>
</label>
<p>HTML:</p>
<pre><code class="html"><label for="input-file" id="change-this-drop-area" class="drop-area">
<input type="file" name="image" id="change-this-input-file" accept="image/*" hidden>
<div id="change-this-img-view" class="img-view">
<img src="https://cdn.jsdelivr.net/gh/xrafffcode/flex-uploader/dist/images/gallery-export.svg" id="img" width="50">
<p id="img-info">Chose Image To Upload</p>
</div>
</label></code></pre>
<p>JS:</p>
<pre><code class="js">new FlexUploader("drop-area", "input-file", "img-view");</code></pre>
<p>CDN:</p>
<pre><code class="html"><link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/xrafffcode/flex-uploader/dist/css/flex-uploader.css">
<script src="https://cdn.jsdelivr.net/gh/xrafffcode/flex-uploader/dist/js/flex-uploader.js"></script></code></pre>
<script src="dist/js/flex-uploader.js"></script>
<script>
// init uploader
new FlexUploader("drop-area", "input-file", "img-view");
</script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.8.0/highlight.min.js"></script>
<script>
hljs.highlightAll();
</script>
</body>
</html>