- Created Flask backend with REST API endpoints - Built HTML/CSS/JavaScript frontend - Replaced RGB sliders with color pickers for each palette color - Reorganized layout: color palette on left, patterns on right - Added persistence for color changes - Integrated WebSocket client for lighting controller communication - Added tab management, profile support, and pattern selection
506 lines
8.0 KiB
CSS
506 lines
8.0 KiB
CSS
* {
|
|
margin: 0;
|
|
padding: 0;
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
body {
|
|
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
|
|
background-color: #2e2e2e;
|
|
color: white;
|
|
height: 100vh;
|
|
overflow: hidden;
|
|
}
|
|
|
|
.app-container {
|
|
display: flex;
|
|
flex-direction: column;
|
|
height: 100vh;
|
|
}
|
|
|
|
header {
|
|
background-color: #1a1a1a;
|
|
padding: 1rem 2rem;
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
border-bottom: 2px solid #4a4a4a;
|
|
}
|
|
|
|
header h1 {
|
|
font-size: 1.5rem;
|
|
font-weight: 600;
|
|
}
|
|
|
|
.header-actions {
|
|
display: flex;
|
|
gap: 0.5rem;
|
|
}
|
|
|
|
.btn {
|
|
padding: 0.5rem 1rem;
|
|
border: none;
|
|
border-radius: 4px;
|
|
cursor: pointer;
|
|
font-size: 0.9rem;
|
|
font-weight: 500;
|
|
transition: background-color 0.2s;
|
|
}
|
|
|
|
.btn-primary {
|
|
background-color: #4a4a4a;
|
|
color: white;
|
|
}
|
|
|
|
.btn-primary:hover {
|
|
background-color: #5a5a5a;
|
|
}
|
|
|
|
.btn-secondary {
|
|
background-color: #3a3a3a;
|
|
color: white;
|
|
}
|
|
|
|
.btn-secondary:hover {
|
|
background-color: #4a4a4a;
|
|
}
|
|
|
|
.btn-danger {
|
|
background-color: #d32f2f;
|
|
color: white;
|
|
}
|
|
|
|
.btn-danger:hover {
|
|
background-color: #c62828;
|
|
}
|
|
|
|
.btn-small {
|
|
padding: 0.25rem 0.5rem;
|
|
font-size: 0.8rem;
|
|
}
|
|
|
|
.main-content {
|
|
flex: 1;
|
|
display: flex;
|
|
flex-direction: column;
|
|
overflow: hidden;
|
|
}
|
|
|
|
.tabs-container {
|
|
background-color: #1a1a1a;
|
|
border-bottom: 2px solid #4a4a4a;
|
|
padding: 0.5rem 1rem;
|
|
}
|
|
|
|
.tabs-list {
|
|
display: flex;
|
|
gap: 0.5rem;
|
|
overflow-x: auto;
|
|
}
|
|
|
|
.tab-button {
|
|
padding: 0.5rem 1rem;
|
|
background-color: #3a3a3a;
|
|
color: white;
|
|
border: none;
|
|
border-radius: 4px 4px 0 0;
|
|
cursor: pointer;
|
|
font-size: 0.9rem;
|
|
white-space: nowrap;
|
|
transition: background-color 0.2s;
|
|
}
|
|
|
|
.tab-button:hover {
|
|
background-color: #4a4a4a;
|
|
}
|
|
|
|
.tab-button.active {
|
|
background-color: #6a5acd;
|
|
color: white;
|
|
}
|
|
|
|
.tab-content {
|
|
flex: 1;
|
|
display: flex;
|
|
overflow: hidden;
|
|
padding: 1rem;
|
|
gap: 1rem;
|
|
}
|
|
|
|
.left-panel {
|
|
flex: 0 0 50%;
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 1rem;
|
|
overflow-y: auto;
|
|
border-right: 2px solid #4a4a4a;
|
|
padding-right: 1rem;
|
|
}
|
|
|
|
.right-panel {
|
|
flex: 1;
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 1rem;
|
|
overflow-y: auto;
|
|
padding-left: 1rem;
|
|
}
|
|
|
|
.ids-display {
|
|
padding: 0.5rem;
|
|
background-color: #3a3a3a;
|
|
border-radius: 4px;
|
|
font-size: 0.9rem;
|
|
}
|
|
|
|
.controls-section {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 1rem;
|
|
}
|
|
|
|
.control-group {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 0.5rem;
|
|
}
|
|
|
|
.control-group label {
|
|
min-width: 100px;
|
|
font-weight: 500;
|
|
}
|
|
|
|
.slider {
|
|
flex: 1;
|
|
height: 8px;
|
|
background-color: #3a3a3a;
|
|
border-radius: 4px;
|
|
outline: none;
|
|
-webkit-appearance: none;
|
|
margin: 0 0.5rem;
|
|
}
|
|
|
|
.slider::-webkit-slider-thumb {
|
|
-webkit-appearance: none;
|
|
appearance: none;
|
|
width: 20px;
|
|
height: 20px;
|
|
background-color: #6a5acd;
|
|
border-radius: 50%;
|
|
cursor: pointer;
|
|
transition: background-color 0.2s;
|
|
}
|
|
|
|
.slider::-webkit-slider-thumb:hover {
|
|
background-color: #7a6add;
|
|
}
|
|
|
|
.slider::-moz-range-thumb {
|
|
width: 20px;
|
|
height: 20px;
|
|
background-color: #6a5acd;
|
|
border-radius: 50%;
|
|
cursor: pointer;
|
|
border: none;
|
|
transition: background-color 0.2s;
|
|
}
|
|
|
|
.slider::-moz-range-thumb:hover {
|
|
background-color: #7a6add;
|
|
}
|
|
|
|
/* Red slider */
|
|
#red-slider {
|
|
accent-color: #ff0000;
|
|
}
|
|
|
|
#red-slider::-webkit-slider-thumb {
|
|
background-color: #ff0000;
|
|
}
|
|
|
|
#red-slider::-moz-range-thumb {
|
|
background-color: #ff0000;
|
|
}
|
|
|
|
/* Green slider */
|
|
#green-slider {
|
|
accent-color: #00ff00;
|
|
}
|
|
|
|
#green-slider::-webkit-slider-thumb {
|
|
background-color: #00ff00;
|
|
}
|
|
|
|
#green-slider::-moz-range-thumb {
|
|
background-color: #00ff00;
|
|
}
|
|
|
|
/* Blue slider */
|
|
#blue-slider {
|
|
accent-color: #0000ff;
|
|
}
|
|
|
|
#blue-slider::-webkit-slider-thumb {
|
|
background-color: #0000ff;
|
|
}
|
|
|
|
#blue-slider::-moz-range-thumb {
|
|
background-color: #0000ff;
|
|
}
|
|
|
|
/* Brightness slider */
|
|
#brightness-slider {
|
|
accent-color: #ffff00;
|
|
}
|
|
|
|
#brightness-slider::-webkit-slider-thumb {
|
|
background-color: #ffff00;
|
|
}
|
|
|
|
#brightness-slider::-moz-range-thumb {
|
|
background-color: #ffff00;
|
|
}
|
|
|
|
.slider-value {
|
|
min-width: 50px;
|
|
text-align: right;
|
|
font-weight: 500;
|
|
font-size: 0.9rem;
|
|
}
|
|
|
|
.n-params-section {
|
|
margin-top: 1rem;
|
|
}
|
|
|
|
.n-params-section h3 {
|
|
margin-bottom: 0.5rem;
|
|
font-size: 1rem;
|
|
}
|
|
|
|
.n-params-grid {
|
|
display: grid;
|
|
grid-template-columns: 1fr 1fr;
|
|
gap: 1rem;
|
|
}
|
|
|
|
.n-param-group {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 0.5rem;
|
|
}
|
|
|
|
.n-param-group label {
|
|
min-width: 40px;
|
|
font-weight: 500;
|
|
}
|
|
|
|
.n-input {
|
|
flex: 1;
|
|
padding: 0.5rem;
|
|
background-color: #3a3a3a;
|
|
color: white;
|
|
border: 1px solid #4a4a4a;
|
|
border-radius: 4px;
|
|
font-size: 1rem;
|
|
}
|
|
|
|
.n-input:focus {
|
|
outline: none;
|
|
border-color: #6a5acd;
|
|
}
|
|
|
|
.patterns-section,
|
|
.color-palette-section {
|
|
background-color: #1a1a1a;
|
|
border: 2px solid #4a4a4a;
|
|
border-radius: 4px;
|
|
padding: 1rem;
|
|
}
|
|
|
|
.patterns-section h3,
|
|
.color-palette-section h3 {
|
|
margin-bottom: 1rem;
|
|
font-size: 1.1rem;
|
|
}
|
|
|
|
.patterns-list {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 0.5rem;
|
|
}
|
|
|
|
.pattern-button {
|
|
padding: 0.75rem;
|
|
background-color: #3a3a3a;
|
|
color: white;
|
|
border: none;
|
|
border-radius: 4px;
|
|
cursor: pointer;
|
|
font-size: 0.9rem;
|
|
text-align: left;
|
|
transition: background-color 0.2s;
|
|
}
|
|
|
|
.pattern-button:hover {
|
|
background-color: #4a4a4a;
|
|
}
|
|
|
|
.pattern-button.active {
|
|
background-color: #6a5acd;
|
|
color: white;
|
|
}
|
|
|
|
.color-palette {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 0.5rem;
|
|
margin-bottom: 1rem;
|
|
max-height: 300px;
|
|
overflow-y: auto;
|
|
}
|
|
|
|
.color-swatch {
|
|
display: flex;
|
|
align-items: center;
|
|
padding: 0.5rem;
|
|
background-color: #3a3a3a;
|
|
border: 2px solid transparent;
|
|
border-radius: 4px;
|
|
cursor: pointer;
|
|
transition: border-color 0.2s;
|
|
gap: 0.5rem;
|
|
}
|
|
|
|
.color-swatch:hover {
|
|
border-color: #6a5acd;
|
|
}
|
|
|
|
.color-swatch.selected {
|
|
border-color: #FFD700;
|
|
border-width: 3px;
|
|
}
|
|
|
|
.color-swatch-preview {
|
|
width: 40px;
|
|
height: 40px;
|
|
border-radius: 4px;
|
|
border: 1px solid #4a4a4a;
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.color-swatch-label {
|
|
flex: 1;
|
|
font-size: 0.9rem;
|
|
min-width: 80px;
|
|
}
|
|
|
|
.color-picker-input {
|
|
width: 60px;
|
|
height: 40px;
|
|
border: 1px solid #4a4a4a;
|
|
border-radius: 4px;
|
|
cursor: pointer;
|
|
background: none;
|
|
padding: 0;
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.color-picker-input::-webkit-color-swatch-wrapper {
|
|
padding: 0;
|
|
}
|
|
|
|
.color-picker-input::-webkit-color-swatch {
|
|
border: none;
|
|
border-radius: 4px;
|
|
}
|
|
|
|
.color-picker-input::-moz-color-swatch {
|
|
border: none;
|
|
border-radius: 4px;
|
|
}
|
|
|
|
.palette-actions {
|
|
display: flex;
|
|
gap: 0.5rem;
|
|
margin-top: 0.5rem;
|
|
}
|
|
|
|
.modal {
|
|
display: none;
|
|
position: fixed;
|
|
top: 0;
|
|
left: 0;
|
|
width: 100%;
|
|
height: 100%;
|
|
background-color: rgba(0, 0, 0, 0.7);
|
|
z-index: 1000;
|
|
align-items: center;
|
|
justify-content: center;
|
|
}
|
|
|
|
.modal.active {
|
|
display: flex;
|
|
}
|
|
|
|
.modal-content {
|
|
background-color: #2e2e2e;
|
|
padding: 2rem;
|
|
border-radius: 8px;
|
|
min-width: 400px;
|
|
max-width: 500px;
|
|
}
|
|
|
|
.modal-content h2 {
|
|
margin-bottom: 1rem;
|
|
font-size: 1.3rem;
|
|
}
|
|
|
|
.modal-content label {
|
|
display: block;
|
|
margin-top: 1rem;
|
|
margin-bottom: 0.5rem;
|
|
font-weight: 500;
|
|
}
|
|
|
|
.modal-content input {
|
|
width: 100%;
|
|
padding: 0.5rem;
|
|
background-color: #3a3a3a;
|
|
color: white;
|
|
border: 1px solid #4a4a4a;
|
|
border-radius: 4px;
|
|
font-size: 1rem;
|
|
}
|
|
|
|
.modal-content input:focus {
|
|
outline: none;
|
|
border-color: #6a5acd;
|
|
}
|
|
|
|
.modal-actions {
|
|
display: flex;
|
|
gap: 0.5rem;
|
|
margin-top: 1.5rem;
|
|
justify-content: flex-end;
|
|
}
|
|
|
|
/* Scrollbar styling */
|
|
::-webkit-scrollbar {
|
|
width: 8px;
|
|
height: 8px;
|
|
}
|
|
|
|
::-webkit-scrollbar-track {
|
|
background: #1a1a1a;
|
|
}
|
|
|
|
::-webkit-scrollbar-thumb {
|
|
background: #4a4a4a;
|
|
border-radius: 4px;
|
|
}
|
|
|
|
::-webkit-scrollbar-thumb:hover {
|
|
background: #5a5a5a;
|
|
}
|
|
|