add secondary buttons

This commit is contained in:
Reimar 2025-10-13 14:33:44 +02:00
parent 4f5d4d83e7
commit 8a069d28e3
3 changed files with 21 additions and 9 deletions

View File

@ -21,7 +21,7 @@
href="docs/index.html" href="docs/index.html"
target="_blank" target="_blank"
> >
<button class="icon-button"> <button class="icon-button secondary">
<img <img
src="https://chatgpt.com/favicon.ico" src="https://chatgpt.com/favicon.ico"
width="20" width="20"
@ -72,7 +72,7 @@
💾 Save 💾 Save
</button> </button>
<button id="load-button"> <button id="load-button" class="secondary">
📄 Load 📄 Load
</button> </button>
</div> </div>

View File

@ -114,10 +114,10 @@ runButton.onclick = () => {
if (codeRunner.isRunning) { if (codeRunner.isRunning) {
runButton.textContent = "✋ Stop"; runButton.textContent = "✋ Stop";
runButton.classList.add("active"); runButton.classList.add("running");
} else { } else {
runButton.textContent = "🏃 Run"; runButton.textContent = "🏃 Run";
runButton.classList.remove("active"); runButton.classList.remove("running");
} }
}; };

View File

@ -257,15 +257,27 @@ button {
white-space: nowrap; white-space: nowrap;
} }
.dropdown-wrapper:has(.active) button,
button:active {
background-color: #065275;
}
button:hover { button:hover {
box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.2); box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.2);
} }
button.secondary {
background-color: #616161;
}
button.secondary:active {
background-color: #424242;
}
#run-button {
transition-duration: 0s;
background-color: #388e3c;
}
#run-button.running {
background-color: #d32f2f;
}
footer { footer {
position: absolute; position: absolute;
bottom: 1px; bottom: 1px;