-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
44 lines (39 loc) · 3.18 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
<!DOCTYPE html>
<html lang="en" class=" thin-scroll">
<head>
<meta charset="UTF-8">
<title>SVG 2 PIXEL ART</title>
<link rel='stylesheet' href='https://cdnjs.cloudflare.com/ajax/libs/bootstrap/5.0.2/css/bootstrap.min.css'>
<link rel="stylesheet" href="./style.css">
</head>
<body>
<a href="https://github.com/jetrotal/SVG-2-PIXELART" target="_blank">
<button class="float-right" style="display: inline-flex;position: absolute;LEFT: 0;BOTTOM: 0;justify-content: space-around;align-items: center;">
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-github" viewBox="0 0 16 16" style="margin: 5px;">
<path d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.012 8.012 0 0 0 16 8c0-4.42-3.58-8-8-8z"></path>
</svg> SOURCE CODE </button></a>
<script type="module" defer>
import SVGO, * as SVGO_ALL from 'https://unpkg.com/[email protected]/dist/svgo.browser.js'; window.svgo = SVGO; window.SVGO_ALL = SVGO_ALL; console.log('done import asynchronously'); console.log({ svgo, SVGO_ALL }); document.addEventListener( "DOMContentLoaded",
initConversion(baseImg.outerHTML) );
</script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/color-thief/2.3.2/color-thief.min.js" integrity="sha512-mMe7BAZPOkGbq+zhRBMNV3Q+5ZDzcUEOJoUYXbHpEcODkDBYbttaW7P108jX66AQgwgsAjvlP4Ayb/XLJZfmsg==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
<script src="https://giventofly.github.io/pixelit/js/pixelit.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/animejs/3.2.1/anime.min.js"></script>
<script src='https://unpkg.com/[email protected]/dist/svgson.umd.js'></script>
<div id="preloader" class="loading" style="display:none">Loading…</div>
<div class="container">
<div id="pixelProperties" class="pixelProperties thin-scroll"></div>
<div id="content" class=" thin-scroll">
<svg id="baseImg" width="128" height="128" xmlns="http://www.w3.org/2000/svg">
<path style="fill:#fcc21b" d="M128 93c0 14-29 25-64 25S0 107 0 93c0-13 2-83 64-83s64 70 64 83Z"></path>
<path fill="#2f2f2f" d="M 42 58 C 38 58 34 54 34 49 C 34 43 37 39 42 39 C 47 39 50 43 50 48 C 50 54 47 58 42 58 Z"></path>
<path fill="#2f2f2f" d="M 78 48 C 78 43 81 39 86 39 C 91 39 94 43 94 49 C 94 54 90 58 86 58 C 81 58 78 54 78 48 Z"></path>
<path fill="#2f2f2f" d="M22 69a225 225 0 0 0 84 0c0 21-21 31-42 31S22 90 22 69Z"></path>
<path style="opacity:1" fill="#ffffff" d="M 22 69 C 49.752 74.273 78.248 74.273 106 69 C 106 90 22 90 22 69 Z"></path>
</svg>
<div id="temp"></div>
</div>
</div>
<script src="./script.js"></script>
</body>
</html>