-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
130 lines (130 loc) · 3.4 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Logo Tool</title>
<script type="module" src="main.js"></script>
<style>
*,
*::before,
*::after {
box-sizing: border-box;
}
html,
body {
width: 100%;
height: 100%;
}
body {
font-family: sans-serif;
margin: 0;
display: flex;
align-items: center;
justify-content: center;
}
canvas {
display: block;
}
button {
background-color: #fff;
border: 1px solid #000;
width: 40px;
height: 40px;
padding: 0;
display: flex;
justify-content: center;
align-items: center;
font-size: 2rem;
}
button:hover {
opacity: 0.5;
}
.selected {
background-color: #eaeaea;
}
#tool {
box-sizing: border-box;
position: absolute;
left: 0;
top: 0;
width: 80px;
margin: 1rem;
display: flex;
flex-wrap: wrap;
}
#color {
width: 100%;
margin: 0.5rem 0;
}
.action {
width: 100%;
font-size: 1rem;
margin: 0.5rem 0;
}
</style>
</head>
<body>
<canvas></canvas>
<div id="tool">
<button value="0" class="mode selected">
<svg width="40px" height="40px">
<rect x="10" y="10" width="20" height="20" fill="black" />
</svg>
</button>
<button value="1" class="mode">
<svg width="40px" height="40px">
<circle cx="20" cy="20" r="10" fill="black" />
</svg>
</button>
<button value="2" class="mode">
<svg width="40px" height="40px">
<path d="M 30 10 A 20 20 0 0 0 10 30 L 30 30" />
</svg>
</button>
<button value="3" class="mode">
<svg width="40px" height="40px">
<path d="M 10 10 A 20 20 0 0 1 30 30 L 10 30" />
</svg>
</button>
<button value="4" class="mode">
<svg width="40px" height="40px">
<path d="M 10 10 A 20 20 0 0 0 30 30 L 30 10" />
</svg>
</button>
<button value="5" class="mode">
<svg width="40px" height="40px">
<path d="M 10 30 A 20 20 0 0 0 30 10 L 10 10" />
</svg>
</button>
<button value="6" class="mode">
<svg width="40px" height="40px">
<path d="M 10 30 L 30 10 L 30 30 Z" />
</svg>
</button>
<button value="7" class="mode">
<svg width="40px" height="40px">
<path d="M 10 10 L 30 30 L 10 30 Z" />
</svg>
</button>
<button value="8" class="mode">
<svg width="40px" height="40px">
<path d="M 10 10 L 30 10 L 30 30 Z" />
</svg>
</button>
<button value="9" class="mode">
<svg width="40px" height="40px">
<path d="M 10 10 L 30 10 L 10 30 Z" />
</svg>
</button>
<input type="color" id="color" />
<label
><input type="checkbox" id="toggle-grid" checked="true" />Grid</label
>
<button class="action" id="export">Export</button>
<button class="action" id="import">Import</button>
<button class="action" id="clear">Clear</button>
</div>
</body>
</html>