0
mirror of https://github.com/torvalds/GuitarPedal.git synced 2026-06-08 04:55:36 +00:00
Files
Linus Torvalds 8453cc2fd5 WebMIDI: add "reset to programming mode" command
This completes the "no need for any UI on the pedal itself" at least for
now.  I'll try out a completely headless pedal - with just a global
bypass stomp switch and the LED associated with it - to see how that
works with just a phone or desktop connected to it.  But I think it's
good to go.

Of course, from the standpoint of a "satisfying UI experience" you
probably *do* want an actual piece of hardware with knobs, but now that
could be optional, or just that separate UI-only box that started this
whole "let's do remote programming over USB-C and MIDI" journey.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2026-06-01 13:24:01 -07:00

509 lines
8.3 KiB
CSS

:root {
--bg-color: #0f1115;
--panel-bg: rgba(255, 255, 255, 0.03);
--panel-border: rgba(255, 255, 255, 0.05);
--text-main: #e2e8f0;
--text-muted: #94a3b8;
--accent: #3b82f6;
--accent-hover: #60a5fa;
--danger: #ef4444;
--success: #10b981;
}
* {
box-sizing: border-box;
margin: 0;
padding: 0;
}
body {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
background-color: var(--bg-color);
color: var(--text-main);
line-height: 1.5;
padding: 20px;
}
.app-container {
max-width: 800px;
margin: 0 auto;
display: flex;
flex-direction: column;
gap: 20px;
}
.glass-panel {
background: var(--panel-bg);
border: 1px solid var(--panel-border);
border-radius: 12px;
padding: 20px;
backdrop-filter: blur(10px);
-webkit-backdrop-filter: blur(10px);
}
header {
display: flex;
justify-content: space-between;
align-items: center;
}
h1 {
font-size: 1.5rem;
font-weight: 600;
}
h2 {
font-size: 1.2rem;
margin-bottom: 15px;
color: var(--text-muted);
}
.app-header {
display: flex;
justify-content: space-between;
align-items: center;
}
.header-controls {
display: flex;
align-items: center;
gap: 15px;
}
#app-title {
transition: color 0.3s;
}
.title-connected {
color: var(--success);
}
.title-disconnected {
color: var(--text-muted);
}
.control-group label {
font-size: 0.9rem;
color: var(--text-muted);
}
select {
background-color: rgba(0, 0, 0, 0.2);
border: 1px solid var(--panel-border);
color: var(--text-main);
padding: 10px 15px;
border-radius: 8px;
font-size: 1rem;
outline: none;
cursor: pointer;
appearance: none;
}
select:focus {
border-color: var(--accent);
}
option {
background-color: var(--bg-color);
color: var(--text-main);
}
/* Toggle Switch */
.switch {
position: relative;
display: inline-block;
width: 50px;
height: 28px;
}
.switch input {
opacity: 0;
width: 0;
height: 0;
}
.slider {
position: absolute;
cursor: pointer;
top: 0; left: 0; right: 0; bottom: 0;
background-color: rgba(255, 255, 255, 0.1);
transition: .3s;
}
.slider:before {
position: absolute;
content: "";
height: 20px;
width: 20px;
left: 4px;
bottom: 4px;
background-color: white;
transition: .3s;
}
input:checked + .slider {
background-color: var(--accent);
}
input:checked + .slider:before {
transform: translateX(22px);
}
.slider.round {
border-radius: 34px;
}
.slider.round:before {
border-radius: 50%;
}
.enable-group {
flex-direction: row;
align-items: center;
gap: 8px;
}
.action-btn {
background: rgba(255, 255, 255, 0.05);
border: 1px solid var(--panel-border);
color: var(--text-muted);
font-size: 1.1rem;
width: 32px;
height: 32px;
border-radius: 50%;
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
transition: all 0.2s;
padding-bottom: 2px;
}
.action-btn:hover {
background: rgba(255, 255, 255, 0.15);
color: var(--text-main);
transform: scale(1.1);
}
.action-btn:active {
transform: scale(0.95);
}
/* Pots */
.pots-section {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
gap: 20px;
}
.pot-control {
display: flex;
flex-direction: column;
align-items: center;
gap: 10px;
}
.pot-label {
font-size: 0.9rem;
color: var(--text-muted);
text-align: center;
}
.pot-value {
font-size: 1.1rem;
font-weight: 500;
}
input[type=range] {
-webkit-appearance: none;
width: 100%;
background: transparent;
}
input[type=range]::-webkit-slider-thumb {
-webkit-appearance: none;
height: 16px;
width: 16px;
border-radius: 50%;
background: var(--accent);
cursor: pointer;
margin-top: -6px;
}
input[type=range]::-webkit-slider-runnable-track {
width: 100%;
height: 4px;
cursor: pointer;
background: rgba(255, 255, 255, 0.1);
border-radius: 2px;
}
input[type=range]:focus {
outline: none;
}
/* Diagnostics */
.diag-grid {
display: flex;
gap: 30px;
}
.diag-item {
display: flex;
align-items: center;
gap: 10px;
}
.diag-label {
font-size: 0.9rem;
color: var(--text-muted);
}
.indicator {
width: 12px;
height: 12px;
border-radius: 50%;
background-color: rgba(255, 255, 255, 0.1);
}
.indicator.active {
background-color: var(--danger);
box-shadow: 0 0 10px var(--danger);
}
.value {
font-family: monospace;
font-size: 1.1rem;
background: rgba(0, 0, 0, 0.2);
padding: 4px 8px;
border-radius: 4px;
}
/* Effect Cards */
#effects-container {
display: flex;
flex-direction: column;
gap: 20px;
}
.effect-card {
display: flex;
flex-direction: column;
gap: 15px;
}
.effect-header {
display: flex;
justify-content: space-between;
align-items: center;
border-bottom: 1px solid var(--panel-border);
padding-bottom: 10px;
cursor: pointer;
}
.effect-title {
font-size: 1.2rem;
font-weight: 600;
color: var(--accent);
}
.effect-controls {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
gap: 20px;
}
/* Graphic EQ specific styles */
.effect-controls.eq-container {
display: block;
position: relative;
padding-bottom: 20px;
}
.eq-curve-wrapper {
position: absolute;
top: 40px;
left: 0;
right: 0;
height: 200px;
z-index: 0;
pointer-events: none;
}
.eq-curve-svg {
width: 100%;
height: 100%;
overflow: visible;
}
.eq-path {
fill: rgba(59, 130, 246, 0.15); /* var(--accent) transparent */
stroke: var(--accent);
stroke-width: 3px;
vector-effect: non-scaling-stroke;
}
.eq-sliders {
display: flex;
justify-content: space-between;
align-items: center;
position: relative;
z-index: 1;
margin-top: 10px;
}
.eq-pot {
display: flex;
flex-direction: column;
justify-content: space-between;
align-items: center;
height: 260px; /* enough space for val, slider, label */
width: 10%;
}
.eq-slider-wrapper {
width: 20px;
height: 180px;
position: relative;
display: flex;
justify-content: center;
align-items: center;
}
input[type=range].eq-range {
transform: rotate(-90deg);
width: 180px; /* this becomes the visual height */
margin: 0;
}
/* Bottom Panels (Generic) */
.bottom-panel {
position: fixed;
bottom: 0;
left: 0;
right: 0;
margin: 0;
border-radius: 20px 20px 0 0;
border-bottom: none;
z-index: 1000;
padding: 20px 30px;
background: rgba(15, 17, 21, 0.95);
box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.8);
transform: translateY(110%);
transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.bottom-panel:not(.hidden) {
transform: translateY(0);
}
.panel-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 25px;
}
.panel-header h2 {
margin: 0;
color: var(--text-main);
}
.menu-actions {
display: flex;
flex-direction: column;
gap: 15px;
padding-bottom: 20px;
}
.menu-item {
display: flex;
justify-content: space-between;
align-items: center;
font-size: 1.1rem;
padding: 10px 0;
}
.menu-btn {
background: rgba(255, 255, 255, 0.05);
border: 1px solid var(--panel-border);
color: var(--text-main);
padding: 15px;
border-radius: 12px;
font-size: 1.1rem;
text-align: left;
cursor: pointer;
transition: all 0.2s;
}
.menu-btn:hover {
background: rgba(255, 255, 255, 0.1);
}
.menu-btn.danger-btn {
color: var(--danger);
border-color: rgba(239, 68, 68, 0.3);
}
.menu-btn.danger-btn:hover {
background: rgba(239, 68, 68, 0.1);
}
.menu-btn.success {
background: rgba(16, 185, 129, 0.2);
color: var(--success);
border-color: var(--success);
}
.menu-btn.error {
background: rgba(239, 68, 68, 0.2);
color: var(--danger);
border-color: var(--danger);
}
.active-pot-info {
display: flex;
align-items: center;
gap: 15px;
}
#active-pot-title {
font-size: 1.2rem;
font-weight: 600;
color: var(--text-main);
}
#active-pot-value {
font-size: 1.3rem;
color: var(--accent);
background: rgba(0, 0, 0, 0.3);
padding: 4px 12px;
border-radius: 8px;
}
.active-pot-slider-container {
padding-bottom: 20px;
}
/* Larger slider for fine adjustments */
input[type=range].large-slider {
height: 40px;
}
input[type=range].large-slider::-webkit-slider-thumb {
height: 32px;
width: 32px;
margin-top: -14px;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}
input[type=range].large-slider::-webkit-slider-runnable-track {
height: 8px;
border-radius: 4px;
}
/* Make pot-controls clickable */
.pot-control, .pot-control * {
cursor: pointer;
}