Skip to content

Commit 7c0dff2

Browse files
committed
svg update
1 parent 1840fdf commit 7c0dff2

File tree

5 files changed

+79
-21
lines changed

5 files changed

+79
-21
lines changed
Lines changed: 3 additions & 0 deletions
Loading
Lines changed: 3 additions & 0 deletions
Loading
Lines changed: 3 additions & 0 deletions
Loading

examples/led-matrix-painter/assets/index.html

Lines changed: 25 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -116,25 +116,33 @@ <h3 class="box-title">Project code preview</h3>
116116
<div class="sidebar-header">
117117
<h3 style="margin:0;font-size:0.9rem;color:#666">Animation</h3>
118118
<div class="anim-buttons">
119-
<button id="play-animation" title="Play Animation"><svg width="16" height="16" viewBox="0 0 16 16" fill="currentColor"><path d="M4 2 L14 8 L4 14 Z"/></svg></button>
120-
<button id="stop-animation" title="Stop Animation"><svg width="16" height="16" viewBox="0 0 16 16" fill="currentColor"><rect x="4" y="4" width="8" height="8"/></svg></button>
119+
<button id="play-animation" title="Play Animation"><img src="img/icon-play.svg" alt="Play"></button>
120+
<button id="stop-animation" title="Stop Animation"><img src="img/icon-stop.svg" alt="Stop"></button>
121121
</div>
122122
</div>
123-
<div class="animation-controls-body">
124-
<div>
125-
<label><input type="radio" name="mode" value="frames" checked> Frames</label>
126-
<label><input type="radio" name="mode" value="anim"> Animations</label>
127-
</div>
128-
<div id="anim-controls">
129-
<input id="anim-name" placeholder="Animation name" />
130-
</div>
131-
<!-- Frame name goes above the list of frames and below animation name (if present) -->
132-
<div>
133-
<input id="name" placeholder="Frame name (optional)" />
134-
<input id="duration" type="number" min="0" step="10" value="1000" title="Duration in ms" />
135-
</div>
136-
<div id="frames" class="frames"></div>
137-
</div> </div>
123+
<div class="animation-controls-body">
124+
<div class="animation-options">
125+
<button id="copy-anim" class="anim-option-btn"><img src="img/copy.svg" alt="Copy"></button>
126+
<button id="delete-anim" class="anim-option-btn"><img src="img/trash.svg" alt="Delete"></button>
127+
<div class="separator"></div>
128+
<button id="duration-anim" class="anim-option-btn"><img src="img/time.svg" alt="Duration"></button>
129+
</div>
130+
<div class="animation-controls-main">
131+
<div>
132+
<label><input type="radio" name="mode" value="frames" checked> Frames</label>
133+
<label><input type="radio" name="mode" value="anim"> Animations</label>
134+
</div>
135+
<div id="anim-controls">
136+
<input id="anim-name" placeholder="Animation name" />
137+
</div>
138+
<!-- Frame name goes above the list of frames and below animation name (if present) -->
139+
<div>
140+
<input id="name" placeholder="Frame name (optional)" />
141+
<input id="duration" type="number" min="0" step="10" value="1000" title="Duration in ms" />
142+
</div>
143+
<div id="frames" class="frames"></div>
144+
</div>
145+
</div> </div>
138146
</div>
139147
<div id="error-container" class="error-message" style="display: none;"></div>
140148
</div>

examples/led-matrix-painter/assets/style.css

Lines changed: 45 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -244,9 +244,51 @@ input:checked + .slider:before {
244244
}
245245

246246
.animation-controls-body {
247+
display: flex;
248+
flex-direction: row; /* Changed to row */
249+
gap: 16px; /* Gap between options and main controls */
250+
}
251+
252+
.animation-options {
253+
display: flex;
254+
flex-direction: column;
255+
gap: 8px;
256+
align-items: center; /* Center buttons in the column */
257+
}
258+
259+
.anim-option-btn {
260+
border: 1px solid #C9D2D2;
261+
border-radius: 8px;
262+
padding: 6px;
263+
background-color: transparent; /* Assuming transparent background */
264+
cursor: pointer;
265+
display: flex;
266+
align-items: center;
267+
justify-content: center;
268+
color: #2C353A; /* Updated icon color */
269+
}
270+
271+
.anim-option-btn:hover {
272+
background-color: rgba(0, 129, 132, 0.08);
273+
}
274+
275+
.anim-option-btn img {
276+
width: 16px;
277+
height: 16px;
278+
}
279+
280+
.animation-options .separator {
281+
width: 100%;
282+
height: 1px;
283+
background-color: #C9D2D2;
284+
margin: 4px 0; /* Vertical margin for spacing */
285+
}
286+
287+
.animation-controls-main {
247288
display: flex;
248289
flex-direction: column;
249290
gap: 12px;
291+
flex: 1; /* Allow this to take remaining space */
250292
}
251293

252294
.row {
@@ -431,10 +473,9 @@ input:checked + .slider:before {
431473
background: #006567;
432474
}
433475

434-
.anim-buttons button svg {
435-
width: 16px;
436-
height: 16px;
437-
fill: currentColor; /* Use button's text color for SVG fill */
476+
.anim-buttons button img {
477+
width: 12px;
478+
height: 12px;
438479
}
439480
.frames {
440481
display: flex;

0 commit comments

Comments
 (0)