Skip to content

Commit 1bf5884

Browse files
AZQ1994claude
andcommitted
Add anvil+ruby logo, LOADSMITH title styling, default to :main scenario
- Replace lightning bolt logo with anvil + ruby gem SVG (faceted design) - Adapt anvil gradient for dark background visibility - Style title as LOAD + SMITH (red) with no gap - Default scenario select to :main when available - Default server-side fallback to :main scenario Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 38f90c6 commit 1bf5884

1 file changed

Lines changed: 20 additions & 6 deletions

File tree

lib/loadsmith/web.rb

Lines changed: 20 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,8 @@ def handle_start(req, res)
6969
end
7070

7171
body = JSON.parse(req.body || "{}")
72-
scenario_name = (body["scenario"] || @scenarios.keys.first).to_sym
72+
default_scenario = @scenarios.key?(:main) ? :main : @scenarios.keys.first
73+
scenario_name = (body["scenario"] || default_scenario).to_sym
7374

7475
unless @scenarios.key?(scenario_name)
7576
json_response(res, { error: "Unknown scenario: #{scenario_name}" }, status: 400)
@@ -180,7 +181,7 @@ def dashboard_html
180181
181182
.header { background: #161b22; border-bottom: 1px solid #30363d; padding: 16px 24px; display: flex; align-items: center; justify-content: space-between; }
182183
.header h1 { font-size: 20px; font-weight: 600; color: #f0f6fc; display: flex; align-items: center; gap: 10px; }
183-
.logo { width: 28px; height: 28px; }
184+
.logo { width: 32px; height: 32px; }
184185
.state-badge { padding: 4px 12px; border-radius: 12px; font-size: 12px; font-weight: 600; text-transform: uppercase; }
185186
.state-idle { background: #30363d; color: #8b949e; }
186187
.state-running { background: #0d419d; color: #58a6ff; animation: pulse 2s infinite; }
@@ -241,11 +242,23 @@ def dashboard_html
241242
242243
<div class="header">
243244
<h1>
244-
<svg class="logo" viewBox="0 0 100 100" fill="none" xmlns="http://www.w3.org/2000/svg">
245-
<circle cx="50" cy="50" r="46" stroke="#58a6ff" stroke-width="4" fill="#0d1117"/>
246-
<path d="M55 18L30 55h18L42 82l30-40H52L55 18z" fill="#58a6ff"/>
245+
<svg class="logo" viewBox="0 0 512 512" shape-rendering="geometricPrecision">
246+
<g transform="translate(0,50)">
247+
<defs>
248+
<linearGradient id="anvilGrad" x1="0" y1="0" x2="1" y2="1">
249+
<stop offset="0%" stop-color="#8b949e"/>
250+
<stop offset="100%" stop-color="#555d66"/>
251+
</linearGradient>
252+
</defs>
253+
<path d="M24 135L52 201 178 243 178 298 105 322 106 375 194 375 215 340 296 340 318 375 406 375 406 321 333 298 178 117 149 117 149 135Z" fill="url(#anvilGrad)"/>
254+
<polygon points="345,25 279,117 345,283 411,117" fill="#CC342D"/>
255+
<polygon points="257,25 345,25 279,117 201,117" fill="#B52A23"/>
256+
<polygon points="433,25 345,25 411,117 489,117" fill="#B52A23"/>
257+
<polygon points="201,117 279,117 345,283" fill="#E14A42"/>
258+
<polygon points="489,117 411,117 345,283" fill="#8F1B16"/>
259+
</g>
247260
</svg>
248-
Loadsmith
261+
<span>LOAD<span style="color:#E63946">SMITH</span></span>
249262
</h1>
250263
<span id="stateBadge" class="state-badge state-idle">IDLE</span>
251264
</div>
@@ -388,6 +401,7 @@ def dashboard_html
388401
const opt = document.createElement('option');
389402
opt.value = s;
390403
opt.textContent = ':' + s;
404+
if (s === 'main') opt.selected = true;
391405
sel.appendChild(opt);
392406
});
393407
document.getElementById('cfgUsers').value = data.config.users;

0 commit comments

Comments
 (0)