-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
181 lines (180 loc) · 6.81 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
180
181
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="stylesheet" href="style.css" />
<style id="style__colors"></style>
<style id="style__tiletype"></style>
<title>Tile Pattern Generator</title>
<link href="https://fonts.googleapis.com/css2?family=Arvo:wght@700&family=Ubuntu&display=swap" rel="stylesheet">
</head>
<body>
<header class="heading">
<h1>Tile Pattern Generator</h1>
</header>
<main>
<section class="tile-generator__config">
<h2>Tile Generator Config</h2>
<form>
<fieldset class="tile-generator__config__grid">
<legend>Grid</legend>
<div>
<label for="row-input">Rows</label>
<input
class="row-input"
name="row-input"
id="row-input"
type="number"
value="10"
/>
</div>
<div>
<label for="column-input">Columns</label>
<input
class="column-input"
name="column-input"
id="column-input"
type="number"
value="5"
/>
</div>
</fieldset>
<fieldset class="tile-generator__config__color">
<legend>Colour
<span>
<button
class="color__btn color__btn__add"
aria-label="add another colour picker"
>
<svg xmlns="http://www.w3.org/2000/svg" class="svg__button" width="44" height="44" viewBox="0 0 24 24" stroke-width="1.5" stroke="#607D8B" fill="none" stroke-linecap="round" stroke-linejoin="round">
<path stroke="none" d="M0 0h24v24H0z"/>
<circle cx="12" cy="12" r="9" />
<line x1="9" y1="12" x2="15" y2="12" />
<line x1="12" y1="9" x2="12" y2="15" />
</svg>
</button>
<button
class="color__btn color__btn__remove"
aria-label="remove the previous colour picker"
>
<svg xmlns="http://www.w3.org/2000/svg" class="svg__button" width="44" height="44" viewBox="0 0 24 24" stroke-width="1.5" stroke="#607D8B" fill="none" stroke-linecap="round" stroke-linejoin="round">
<path stroke="none" d="M0 0h24v24H0z"/>
<circle cx="12" cy="12" r="9" />
<line x1="9" y1="12" x2="15" y2="12" />
</svg>
</button>
</span>
</legend>
<div class="color-picker-container">
<div class="color-picker" oninput="showHexColor(event)">
<label>Colour:</label>
<input
class="color-input"
type="color"
name="color"
value="#dee2ff"
aria-label="color-picker"
/>
</div>
<div class="color-picker" oninput="showHexColor(event)">
<label>Colour:</label>
<input
class="color-input"
type="color"
name="color"
value="#8e9aaf"
aria-label="color-picker"
/>
</div>
<div class="color-picker" oninput="showHexColor(event)">
<label>Colour:</label>
<input
class="color-input"
type="color"
name="color"
value="#efd3d7"
aria-label="color-picker"
/>
</div>
</div>
<div>
<input
class="generate-type"
type="radio"
name="generate-type"
id="randomise"
value="randomise"
checked
/>
<label for="randomise">Randomise</label>
</div>
<div>
<input
class="generate-type"
type="radio"
name="generate-type"
id="not-adjacent"
value="notadjacent"
/>
<label for="not-adjacent">Not Adjacent</label>
</div>
</fieldset>
<fieldset class="tile-generator__config__tile">
<legend>Tile Shape</legend>
<div>
<input type="radio" name="tile-type" id="tile-square" checked>
<label for="tile-sqaure">Square</label>
</div>
<div>
<input type="radio" name="tile-type" id="tile-rectangle">
<label for="tile-rectangle">Rectagle</label>
</div>
<input type="text" maxlength="3" title="Must contain numbers only" name="tile-height" id="tile-height" placeholder="height in mm" aria-label="insert height here">
<input type="text" maxlength="3" title="Must contain numbers only" name="tile-width" id="tile-width" placeholder="width in mm" aria-label="insert width here" class="hidden">
</fieldset>
<fieldset class="tile-generator__config__scale">
<legend>Scale</legend>
<div>
<input type="radio" name="tile-scale" id="scale-fit" checked value=0>
<label for="scale-fit">default</label>
</div>
<div>
<input type="radio" name="tile-scale" id="scale-10" value = 10>
<label for="scale-10">1:10</label>
</div>
<div>
<input type="radio" name="tile-scale" id="scale-25" value=25>
<label for="scale-25">1:25</label>
</div>
<div>
<input type="radio" name="tile-scale" id="scale-50" value=50>
<label for="scale-50">1:50</label>
</div>
</fieldset>
<input type="submit" value="Generate!" class="generate-btn" />
</form>
</section>
<section class="tile-generator__grid">Generate Tiles Here!</section>
</main>
<footer>
<p>
© <a href="https://github.com/mhtien">MHT</a> 2020
</p>
<template>
<div class="tile"></div>
<div class="row-container"></div>
<div class="color-picker" oninput="showHexColor(event)">
<label>Colour:</label>
<input
class="color-input"
type="color"
id="color"
value="#8e9aaf"
aria-label="color-picker"
/>
</div>
</template>
<script src="script.js"></script>
</body>
</html>