-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
130 lines (112 loc) · 5.24 KB
/
Copy pathindex.html
File metadata and controls
130 lines (112 loc) · 5.24 KB
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 name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Grid Composition Generator</title>
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link href="https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@300;400;500&display=swap" rel="stylesheet" />
<link rel="stylesheet" href="styles/main.css" />
</head>
<body>
<div class="mobile-topbar">
<button class="mobile-icon-btn" id="mobile-menu" aria-label="Open controls">
<svg viewBox="0 0 24 24" width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round">
<line x1="3" y1="6" x2="21" y2="6"/>
<line x1="3" y1="12" x2="21" y2="12"/>
<line x1="3" y1="18" x2="21" y2="18"/>
</svg>
</button>
<button class="mobile-icon-btn" id="mobile-export" aria-label="Export">
<svg viewBox="0 0 24 24" width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<path d="M4 12v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8"/>
<polyline points="16 6 12 2 8 6"/>
<line x1="12" y1="2" x2="12" y2="15"/>
</svg>
</button>
</div>
<button class="mobile-icon-btn mobile-dice" id="mobile-randomize" aria-label="Randomize all">
<svg viewBox="0 0 24 24" width="28" height="28" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<rect x="2" y="2" width="20" height="20" rx="3"/>
<circle cx="8" cy="8" r="1.2" fill="currentColor"/>
<circle cx="16" cy="8" r="1.2" fill="currentColor"/>
<circle cx="12" cy="12" r="1.2" fill="currentColor"/>
<circle cx="8" cy="16" r="1.2" fill="currentColor"/>
<circle cx="16" cy="16" r="1.2" fill="currentColor"/>
</svg>
</button>
<button class="mobile-generate-btn" id="mobile-generate">Generate</button>
<div class="sidebar-overlay" id="sidebar-overlay" hidden></div>
<div class="app">
<aside class="sidebar">
<details id="section-canvas" class="sidebar-section" open>
<summary class="section-label">Canvas</summary>
</details>
<details id="section-modules" class="sidebar-section" open>
<summary class="section-label">Modules</summary>
</details>
<details id="section-grid" class="sidebar-section" open>
<summary class="section-label">Grid</summary>
</details>
<details id="section-generation" class="sidebar-section">
<summary class="section-label">Generation</summary>
</details>
<div class="sidebar-section sidebar-section--actions">
<button class="btn-primary" id="generate">↻ Generate</button>
<button class="btn-secondary" id="randomize">⚂ Randomize all</button>
<button class="btn-secondary" id="copy-svg">⎘ Copy SVG</button>
<button class="btn-secondary" id="export-svg">↓ Export…</button>
</div>
<details id="section-about" class="sidebar-section" open>
<summary class="section-label">About</summary>
<div class="section-content about-content">
<p>A client-side web app for generating grid-based geometric compositions, inspired by Sol LeWitt's instruction-based art. Configure a module pool, set grid waveforms and generation rules, then export resolution-independent SVG.</p>
<p><a href="https://github.com/nndrch/grid-composition-generator" target="_blank" rel="noopener noreferrer">View source on GitHub</a></p>
</div>
</details>
</aside>
<main class="canvas-area">
<div class="canvas-frame">
<svg id="canvas-svg"
viewBox="0 0 100 100"
xmlns="http://www.w3.org/2000/svg">
<g id="cells"></g>
<g id="grid-overlay"></g>
</svg>
</div>
</main>
</div>
<dialog id="export-dialog">
<form method="dialog" class="export-form">
<h2>Export composition</h2>
<label class="form-row">
Generations
<select name="count" id="dialog-count">
<option value="1">1</option>
<option value="2">2</option>
<option value="4">4</option>
<option value="8">8</option>
<option value="16">16</option>
</select>
</label>
<fieldset class="format-group">
<legend>Format</legend>
<label><input type="radio" name="format" value="svg" checked> SVG</label>
<label><input type="radio" name="format" value="png"> PNG</label>
</fieldset>
<label class="form-row png-width-row">
Width (px)
<input type="number" name="pngWidth" id="dialog-png-width" min="100" max="8000" step="100" value="1200">
<span class="png-height-readout" id="dialog-height-readout">× 1200 px</span>
</label>
<div class="dialog-actions">
<button type="button" class="btn-secondary" id="dialog-copy">⎘ Copy SVG</button>
<button type="button" class="btn-secondary" id="dialog-cancel">Cancel</button>
<button type="submit" class="btn-primary" id="dialog-download">↓ Download</button>
</div>
</form>
</dialog>
<script type="module" src="src/main.js"></script>
</body>
</html>