-
Notifications
You must be signed in to change notification settings - Fork 12
/
preview.html
59 lines (56 loc) · 1.43 KB
/
preview.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Pretty File Icons</title>
<style type="text/css">
body {
margin: 0;
padding: 0 10px;
font-family: sans-serif;
}
h1 {
font-size: 22px;
margin: 1em 0;
}
img {
width: 100px;
height: 100px;
margin: 0.5em 0;
}
#svg-examples {
margin: 1em -10px;
}
</style>
</head>
<body>
<h1>Pretty file icons</h1>
<p>
Project page on GitHub:
<a href="https://github.com/kravets-levko/pretty-file-icons" title="Pretty File Icons">
https://github.com/kravets-levko/pretty-file-icons</a>.</p>
<div id="svg-examples"></div>
<script type="text/javascript">
(function(svg) {
[
'unknown', 'text', 'archive', 'audio', 'video',
'png', 'jpg', 'gif', 'tiff', 'svg', 'ai', 'psd', 'dwg',
'avi', 'fla', 'mp2', 'mp3', 'mp4', 'aac', 'flac', 'wma', 'wav', 'mxf',
'iso', 'mdf', 'nrg',
'zip', '7z', 'arj', 'rar',
'pdf', 'doc', 'rtf', 'txt', 'xls', 'ppt',
'css', 'csv', 'html', 'json', 'js', 'xml',
'dbf', 'exe'
].forEach(function(item) {
var img = document.createElement('img');
img.src = 'svg/' + item + '.svg';
img.setAttribute('alt', item);
img.setAttribute('title', item);
svg.appendChild(img);
});
})(
document.getElementById('svg-examples')
);
</script>
</body>
</html>