-
Notifications
You must be signed in to change notification settings - Fork 20
/
Copy pathindex.html
179 lines (156 loc) · 6.8 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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta http-equiv="Content-Security-Policy" content="default-src 'self' 'unsafe-inline'">
<title>Image2Pattern</title>
<link rel="stylesheet" href="node_modules/bootstrap/dist/css/bootstrap.min.css">
<link rel="stylesheet" href="index.css">
<link rel="stylesheet" href="node_modules/bootstrap-colorpicker/dist/css/bootstrap-colorpicker.css">
<script src="node_modules/popper.js/dist/umd/popper.js"></script>
<script src="node_modules/popper.js/dist/umd/popper-utils.js"></script>
<script src="node_modules/jquery/dist/jquery.js"></script>
<script src="node_modules/bootstrap/dist/js/bootstrap.js"></script>
<script src="node_modules/bootstrap-colorpicker/dist/js/bootstrap-colorpicker.js"></script>
</head>
<body>
<div id="drawing" style="display: none;"></div>
<div class="container-fluid">
<div class="text-center m-5">
<h1>Converting images to cross-stitch patterns</h1>
</div>
<div class="row justify-content-center">
<div class="col-md-4 select-file-wrapper">
<div class="row justify-content-center">
<div class="col-md-6 mb-3">
<div style="text-align:center;">
<label for="actual-file"><strong>Select Source File:</strong></label>
<input type="text" placeholder="Please select a file" id="actual-file" disabled="disabled" style="text-align: center;"/>
</div>
</div>
</div>
<div class="row justify-content-center">
<div class="col-md-auto">
<input type="hidden" value="" id="image-file">
<img src="" class="mb-3" id="image-file-display">
</div>
</div>
<!-- buttons -->
<div class="row justify-content-center">
<div class="col-md-auto text-center m-1">
<button type="button" class="btn green btn-secondary" id="select-file">Choose a file</button>
</div>
<div class="col-md-auto text-center m-1">
<button type="button" class="btn btn-primary" id="generate-image">Generate Image</button>
</div>
<div class="col-md-auto text-center m-1">
<button type="button" class="btn btn-primary green" id="generate-pattern" disabled >Generate Pattern</button>
</div>
</div>
</div>
</div>
<!-- <div class="row">
<div class="col-md-12">
</div>
</div> -->
<div class="row justify-content-center mt-3">
<div class="col-3 settings-wrapper m-2 p-4">
<h4 class='pb-2'><strong>Settings:</strong></h4>
<label for="actual-file">Select Output Location</label><br/>
<input type="text" value="./outputs" id="output-folder" disabled="disabled" /><br/>
<button type="button" class="btn green btn-secondary mt-2" id="select-output-folder">Choose a folder</button>
</div>
<div class="col-3 page-settings-wrapper m-2 p-4">
<div >
<label for="edge-margin"><strong>Page edge margin: </strong></label><br/>
<input type="number" value="50" max=500 min=0 id="edge-margin" class="mb-1">
</div>
<div >
<label for="page-margin"><strong>Page top margin: </strong></label><br/>
<input type="number" value="50" max=500 min=0 id="page-margin" class="mb-1">
</div>
<div >
<label for="box-size"><strong>Box Size: </strong></label><br/>
<input type="number" value="10" max=100 min=1 id="box-size" class="mb-1">
</div>
</div>
<div class="col-3 image-controls m-2 p-4">
<div class="col align-items-center">
<h4 class='pb-2'><strong>Image Controls:</strong></h4>
<div id="image-controls" class="control-set--general">
<div class="row">
<div class="col-md-12">
<label for="image-max-width"><strong>Max Width:</strong></label><br/>
<input class='mb-2' type="number" min="10" value="150" id="image-max-width"><br/>
<label for="image-max-height"><strong>Max Height:</strong></label><br/>
<input class='mb-2' type="number" min="10" value="150" id="image-max-height">
</div>
<div class="col-md-12">
<label for="color-mode-selector"><strong>Color Mode: </strong></label>
<select id="color-mode-selector">
<option value="fullcolor">Full Color</option>
<option value="monochrome">Black and White</option>
</select>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-md-12">
<div id="monochrome-controls" class="control-set--monochrome row justify-content-center">
<div class="col-md-6 text-center">
<h4><strong>Monochrome Pattern Controls</strong></h4>
<label for="break-color">Break point (color index to break as dark vs light)</label>
<input type="number" value="10000" id="break-color"><br/>
<label for="opacity-level">Fill Opacity</label>
<input type="number" value="0.3" step=0.1 max=1 min=0 id="opacity-level">
</div>
</div>
<div id="full-color-controls" class="control-set--full-color row justify-content-center">
<div class="col-md-auto text-center m-3">
<h4>Full color pattern controls</h4>
<label for="color-count-limit">Color Count</label>
<input type="number" value="64" max="472" min="2" id="color-count-limit">
</div>
</div>
</div>
</div>
<div class="row control-set--monochrome justify-content-center">
<div class="col-md-3 color-wrapper m-2 p-4">
<div>
<label for="dark-color-swatch">Dark color</label>
<input type="text" id="dark-color" value="#444444" disabled>
<div id="dark-color-swatch"></div>
</div>
</div>
<div class="col-md-3 color-wrapper m-2 p-4">
<div>
<label for="light-color-swatch">Light color</label>
<input type="text" id="light-color" value="#FFFF22" disabled>
<div id="light-color-swatch"></div>
</div>
</div>
<div class="col-md-3 color-wrapper m-2 p-4">
<div>
<label for="grid-color-swatch">Grid line color</label>
<input type="text" id="grid-color" value="#000000" disabled>
<div id="grid-color-swatch"></div>
</div>
</div>
</div>
<hr/>
<div class="row">
<div class="col-md-12">
<h2>Messages</h2>
<div id="console-logger">
<ol id="console-message-list"></ol>
</div>
</div>
</div>
</div>
</body>
<script src="renderer/renderer.js"></script>
<script src="renderer/interactions.js"></script>
</html>