forked from pateman/palette-texture-generator
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
84 lines (79 loc) · 4.06 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<link rel="stylesheet" href="./web/css/bootstrap.min.css"/>
<link rel="stylesheet" href="./web/css/all.min.css"/>
<link rel="stylesheet" href="./web/css/colorpicker.css"/>
<link rel="stylesheet" href="./web/css/web-application.css"/>
<title>Palette Texture Generator</title>
</head>
<body>
<div class="container-fluid">
<h1>Palette Texture Generator</h1>
<p>Current file: <span id="open-file">No file open!</span></p>
<div class="card mt-2">
<div class="card-body">
<h3 class="card-title">Swatches</h3>
<a href="#" class="btn btn-primary mb-2" id="new-swatch">Add new</a>
<a href="#" class="btn btn-secondary mb-2" data-toggle="modal" data-target="#importImageModal">Import swatches</a>
<div id="swatches-container" class="d-flex flex-row flex-wrap">
</div>
</div>
</div>
</div>
<div class="modal fade" id="importImageModal" tabindex="-1" role="dialog">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title">Import swatches from image</h5>
<button type="button" class="close" data-dismiss="modal">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body">
<form action="#" method="POST" onsubmit="return false;">
<div class="form-group">
<label for="tileWidth">Tile width:</label>
<input type="number" name="tileWidth" id="tileWidth"/>
</div>
<div class="form-group">
<label for="tileHeight">Tile height: </label>
<input type="number" name="tileHeight" id="tileHeight"/>
</div>
</form>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
<button type="button" class="btn btn-primary" id="importImageModalImport">Import...</button>
</div>
</div>
</div>
</div>
<script>window.$ = window.jQuery = require('./web/js/jquery-3.4.1.min.js');</script>
<script src="./web/js/bootstrap.bundle.min.js"></script>
<script src="./web/js/jsrender.min.js"></script>
<script src="./web/js/colorpicker.js"></script>
<script>window.tinycolor = require('./web/js/tinycolor');</script>
<script src="./web/js/web-application.js"></script>
<script id="swatch-template" type="text/x-jsrender">
<div class="swatch border border-primary rounded p-3 mr-2 mb-2" data-id="{{:id}}">
<a href="#" class="swatch-remove"><i class="far fa-trash-alt"></i></a>
<h6>{{:name}}<a href="#" class="edit-name ml-2"><i class="fas fa-pencil-alt"></i></a></h6>
<form class="swatch-name-edit d-none mb-2" action="#" method="POST">
<input type="text" name="name" value="{{:name}}"/>
</form>
<form class="swatch-color-form" action="#" method="POST" onsubmit="return false;">
<input class="swatch-color" style="background-color: {{:color}}; color: {{:color}}" value="{{:color}}" tabindex="-1" readonly="readonly"/>
</form>
<hr />
<a href="#" class="btn btn-secondary clone-color" title="Clone"><i class="fas fa-clone"></i></a>
<a href="#" class="btn btn-secondary modify-color" data-op="brighten" title="Brighten"><i class="fas fa-sun"></i></a>
<a href="#" class="btn btn-secondary modify-color" data-op="darken" title="Darken"><i class="fas fa-moon"></i></a>
<a href="#" class="btn btn-secondary modify-color" data-op="saturate" title="Saturate"><i class="fas fa-tint"></i></a>
<a href="#" class="btn btn-secondary modify-color" data-op="desaturate" title="Desaturate"><i class="fas fa-tint-slash"></i></a>
</div>
</script>
</body>
</html>