feat: add Examples dropdown with pre-built circuits

Add 4 example circuits accessible from a new toolbar dropdown:
- SR Flip-Flop (NOR) — basic set-reset latch
- SR Flip-Flop (NAND) — active-low variant
- D Latch (1-bit Memory) — gated latch with enable
- D Flip-Flop (Master-Slave) — edge-triggered with CLK

Each example shows name + description in the dropdown and loads
the full circuit with proper gate placement and wiring.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Jose Luis
2026-03-20 03:54:04 +01:00
parent d78b45841c
commit 2384c489b9
4 changed files with 376 additions and 0 deletions

View File

@@ -42,6 +42,12 @@
</div>
</div>
<!-- Examples Dropdown -->
<div class="toolbar-dropdown" id="examples-section">
<button class="dropdown-toggle">Examples <span class="dropdown-arrow"></span></button>
<div class="dropdown-menu" id="examples-menu"></div>
</div>
<button class="action-btn sim-btn" id="sim-btn">Waveform</button>
<div class="toolbar-right">
<button class="action-btn export-btn" id="export-btn" title="Export circuit">↓ Export</button>