| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876 |
- :root {
- --background-primary: #f9f9f9;
- --background-secondary: #fff;
- --background-tertiary: #ddd;
- --background-accent: rgba(74, 144, 226, 0.75);
- --background-info: var(--background-accent);
- --background-success: rgba(76, 175, 80, 0.8);
- --background-warning: rgba(255, 152, 0, 0.8);
- --background-error: rgba(229, 57, 53, 0.8);
- --theme-primary: #6A9AD9;
- --theme-primary-hover: #A0CCF2;
- --theme-secondary: #C4B4A0;
- --theme-secondary-hover: #4E453F;
- --color-info: var(--theme-primary);
- --color-success: #4CAF50CC;
- --color-warning: #FF9800CC;
- --color-error: #E53935CC;
- --text-primary: #333;
- --text-secondary: #fff;
- --border-primary: var(--background-tertiary);
- --border-secondary: grey;
- --border-accent: var(--theme-primary);
- --border-hover: var(--theme-primary-hover);
- --shadow-primary: 0 0 20px var(--border-secondary);
- --transition-fast: 0.1s ease-in-out;
- --transition-medium: 0.250s ease;
- --transition-slow: 1s ease;
- }
- /* General
- /* General Styling */
- body {
- margin: 0;
- font-family: 'Roboto', sans-serif;
- background: var(--background-primary);
- display: flex;
- flex-direction: column;
- position: relative;
- }
- body * {
- box-sizing: border-box;
- }
- h1, h2 {
- margin: 0;
- }
- header {
- position: sticky;
- height: 50px;
- top: 0;
- z-index: 10;
- background: var(--background-primary);
- display: flex;
- justify-content: center;
- align-items: center;
- }
- h1, h2 {
- color: var(--theme-secondary-hover);
- transition: var(--transition-slow) color;
- }
- h3 {
- margin: 10px 0;
- }
- /* Inputs */
- input, select {
- display: block;
- width: 100%;
- padding: 10px;
- margin-bottom: 10px;
- border: 1px solid var(--border-primary);
- border-radius: 5px;
- font-size: 1rem;
- }
- /* Custom Input Wrapper */
- .custom-input {
- display: flex;
- align-items: center;
- gap: 10px;
- font-size: 1rem;
- color: var(--text-primary);
- cursor: pointer;
- flex: 1 1 auto;
- }
- /* Hide the Native Input */
- .custom-input input {
- display: none;
- }
- /* Checkbox and Radio Styles */
- .custom-checkbox,
- .custom-radio {
- display: inline-block;
- width: 20px;
- height: 20px;
- border: 2px solid var(--theme-primary);
- background-color: var(--background-secondary);
- position: relative;
- transition: background-color 0.3s ease, border-color 0.3s ease;
- }
- /* Checkbox Specific */
- .custom-checkbox {
- border-radius: 4px;
- }
- .custom-checkbox::after {
- content: '';
- width: 10px;
- height: 10px;
- background-color: var(--theme-primary);
- position: absolute;
- top: 50%;
- left: 50%;
- transform: translate(-50%, -50%) scale(0);
- transition: transform 0.2s ease-in-out;
- }
- /* Radio Specific */
- .custom-radio {
- border-radius: 50%;
- }
- .custom-radio::after {
- content: '';
- width: 10px;
- height: 10px;
- background-color: var(--theme-primary);
- position: absolute;
- top: 50%;
- left: 50%;
- transform: translate(-50%, -50%) scale(0);
- border-radius: 50%;
- transition: transform 0.2s ease-in-out;
- }
- /* Checked State */
- .custom-input input:checked + .custom-checkbox::after,
- .custom-input input:checked + .custom-radio::after {
- transform: translate(-50%, -50%) scale(1);
- }
- .custom-input input:checked + .custom-checkbox,
- .custom-input input:checked + .custom-radio {
- background-color: var(--theme-primary);
- border-color: var(--theme-primary-hover);
- }
- /* Focus State */
- .custom-input input:focus-visible + .custom-checkbox,
- .custom-input input:focus-visible + .custom-radio {
- outline: 2px dashed var(--theme-primary);
- outline-offset: 2px;
- }
- /* Hover Effects */
- .custom-checkbox:hover,
- .custom-radio:hover {
- border-color: var(--theme-primary-hover);
- }
- /* Buttons */
- button {
- background: var(--theme-primary);
- color: var(--text-secondary);
- padding: 10px 15px;
- border: none;
- font-weight: bold;
- border-radius: 5px;
- cursor: pointer;
- font-size: 1rem;
- transition: background 0.3s ease,color 0.3s ease;
- }
- button:not(.close-button, .fullscreen-button, .move-button, .remove-button):hover {
- background: var(--background-info);
- }
- button.cancel {
- flex-grow: 0;
- }
- button.cancel:hover {
- background: var(--color-error);
- }
- button.cta:hover {
- background: var(--color-success);
- }
- button.warn:hover {
- background: var(--color-warning);
- }
- button.warning:hover{}
- /* App Layout */
- .app {
- min-height: calc(100vh - 110px);
- display: flex;
- flex-direction: column;
- }
- .hidden:not(.sticky) {
- display: none !important;
- }
- /* Tabs */
- .tab-content {
- display: none;
- flex: 1;
- overflow-y: auto;
- background: var(--background-secondary);
- }
- .tab-content.active {
- display: flex;
- position: relative;
- flex-direction: column;
- }
- section {
- padding: 15px;
- display: flex;
- flex-direction: column;
- }
- section.main {
- flex-grow: 1;
- }
- section.debug {
- flex-direction: row;
- align-items: center;
- justify-content: space-between;
- }
- section.version {
- flex-direction: row;
- justify-content: space-between;
- flex-wrap: wrap;
- }
- .version .header {
- width: 100%;
- }
- .version #motor_selection h3 {
- width: 100%;
- flex-grow: 1;
- }
- .version #motor_selection {
- display: flex;
- flex-direction: row;
- flex-wrap: wrap;
- width: 100%;
- }
- .version select#manual_motor_type {
- margin: 0 20px 0 0;
- flex: 1;
- }
- section.sticky {
- position: fixed;
- background-color: rgba(255, 255, 255, 0.5);
- backdrop-filter: blur(10px);
- bottom: 60px;
- border-top: 1px solid var(--border-primary);
- box-shadow: var(--shadow-primary);
- transform: translateY(0);
- transition: 250ms transform, 250ms height;
- visibility: visible;
- max-height: 60vh;
- width: 100%;
- z-index: 10;
- }
- section.sticky.fullscreen {
- position: fixed;
- top: 0;
- left: 0;
- width: 100vw;
- max-height: none;
- }
- section.sticky.hidden {
- transform: translateY(100%);
- visibility: hidden;
- width: 100%;
- position: absolute;
- overflow:hidden;
- height: 0;
- padding: 0;
- }
- section .header {
- position: relative;
- display: flex;
- justify-content: space-between;
- align-items: center;
- margin-bottom: 10px;
- }
- section .header h2 {
- flex-grow: 1;
- }
- /* Close Button Styling */
- .close-button,
- .fullscreen-button {
- background: none;
- border: none;
- font-size: 1.5rem;
- font-weight: bold;
- color: var(--text-primary);
- cursor: pointer;
- line-height: 1;
- padding: 0;
- height: 100%;
- width: auto;
- aspect-ratio: 1 / 1;
- display: flex;
- justify-content: center;
- align-items: center;
- margin-left: 10px;
- }
- .close-button:hover {
- color: var(--color-error);
- }
- .fullscreen-button:hover {
- color: var(--color-warning);
- }
- section .header .add-button {
- height: 35px;
- width: 35px;
- font-size: 1.5rem;
- padding: 0;
- }
- /* Playlist */
- .add-to-playlist {
- margin-top: 15px;
- }
- .add-to-playlist button {
- margin-bottom: 10px;
- }
- .add-to-container {
- display: flex;
- flex-wrap: wrap;
- margin-bottom: 20px;
- }
- #add-to-playlist-container select,
- #add-to-playlist-container button {
- margin-top: 10px;
- display: block;
- width: 100%;
- }
- .playlist-parameters {
- display: flex;
- flex-direction: column;
- gap: 10px;
- }
- .playlist-parameters .row {
- display: flex;
- gap: 10px;
- }
- #clear_pattern {
- margin: 0;
- }
- .playlist-parameters .input-group input,
- .playlist-parameters .input-group select {
- width: 100%; /* Ensure inputs/selects stretch to full width */
- padding: 10px;
- border: 1px solid var(--border-primary);
- border-radius: 5px;
- font-size: 1rem;
- }
- .empty-placeholder {
- color: gray;
- font-style: italic;
- text-align: center;
- padding: 10px;
- }
- /* Style for the filename span */
- .filename {
- flex-grow: 1; /* Use available space */
- font-size: 1rem;
- color: var(--text-primary);
- margin-right: 10px; /* Space between filename and buttons */
- word-wrap: break-word;
- width: 100%;
- display: flex;
- align-items: center;
- }
- /* File List */
- .file-list {
- list-style: none;
- padding: 0;
- margin: 0;
- border: 1px solid var(--border-primary);
- border-radius: 5px;
- overflow-y: auto;
- background: var(--background-primary);
- flex-grow: 1;
- }
- .file-list li {
- display: flex;
- padding: 10px;
- border-bottom: 1px solid var(--border-primary);
- cursor: pointer;
- transition: background-color 0.3s ease;
- }
- .file-list li:hover {
- background-color: #f1f1f1;
- }
- .file-list li.selected {
- background: var(--theme-primary);
- color: var(--text-secondary);
- font-weight: bold;
- }
- .file-list li.selected .filename {
- font-weight: bold;
- color: var(--text-secondary);
- }
- .file-list button {
- margin-left: 5px;
- background: none;
- color: black;
- font-weight: bold;
- height: 40px;
- width: 40px;
- flex: 0 0 auto;
- display: flex;
- justify-content: center;
- align-items: center;
- }
- .file-list button:hover:not(:focus) {
- background: var(--background-primary);
- box-shadow: inset 0 0 4px var(--border-secondary);
- }
- .file-list button.remove-button {
- color: var(--color-error);
- }
- .title-container {
- display: flex;
- justify-content: space-between;
- align-items: center;
- }
- .rename-button {
- margin-left: 10px;
- background: var(--theme-primary-hover);
- color: var(--text-secondary);
- border: none;
- border-radius: 5px;
- padding: 5px 10px;
- cursor: pointer;
- transition: background 0.3s ease;
- }
- .rename-button:hover {
- background: #285A8E;
- }
- /* Bottom Navigation */
- .bottom-nav {
- display: flex;
- position: sticky;
- justify-content: space-around;
- bottom: 0;
- height: 60px;
- width: 100%;
- border-top: 1px solid var(--theme-primary);
- flex-wrap: wrap;
- z-index: 10;
- }
- .tab-button {
- flex: 1;
- padding: 20px 10px;
- text-align: center;
- font-size: 1rem;
- font-weight: bold;
- color: var(--text-secondary);
- background: none;
- border: none;
- cursor: pointer;
- transition: background 0.3s ease;
- background: var(--background-info);
- backdrop-filter: blur(2px);
- border-radius: 0;
- }
- .bottom-nav .tab-button.active {
- background: rgba(255, 255, 255, 0.75);
- color: var(--theme-primary);
- }
- /* Quick Action Buttons */
- .action-buttons {
- display: flex;
- gap: 10px;
- flex-wrap: wrap;
- width: 100%;
- }
- .action-buttons button {
- flex: 1;
- }
- .action-buttons button.cta {
- flex-grow: 1;
- }
- button#debug_button {
- width: 40px;
- padding: 0;
- height: 40px;
- background: transparent;
- font-size: 1.5rem;
- margin-left: 40px;
- flex: 0 0 auto;
- transition: 250ms all;
- }
- button#debug_button:hover,
- button#debug_button.active {
- box-shadow: inset 0 0 4px var(--border-secondary);
- }
- #settings-tab button.cancel {
- flex-basis: 100%;
- }
- /* Preview Canvas */
- #patternPreviewCanvas {
- width: 100%;
- max-width: 300px;
- aspect-ratio: 1/1;
- border: 1px solid var(--border-primary);
- background: var(--theme-secondary);
- border-radius: 100%;
- padding: 30px;
- }
- #pattern-preview {
- display: flex;
- flex-direction: column;
- align-items: center;
- margin-bottom: 20px;
- }
- #pattern-preview-container.fullscreen #patternPreviewCanvas {
- width: initial;
- max-width: calc(100vw - 30px);
- }
- /* Debug Log */
- #status_log {
- background: #000;
- color: var(--text-secondary);
- font-family: monospace;
- font-size: 0.9rem;
- border-top: 1px solid var(--border-primary);
- padding: 10px;
- max-height: 200px;
- overflow-y: scroll;
- display: none;
- width: 100%;
- }
- #status_log p {
- margin: 0;
- }
- .control-group {
- display: flex;
- margin-bottom: 10px;
- flex-wrap: wrap;
- width: 100%;
- align-items: center;
- justify-content: space-between;
- gap: 0 10px;
- }
- .control-group input {
- margin-bottom: 0;
- }
- .control-group h3 {
- width: 100%;
- }
- .control-group .item {
- display: flex;
- align-items: center;
- flex: 1;
- }
- .control-group .item.cta {
- justify-content: flex-end;
- }
- .control-group .item.column {
- flex-direction: column;
- text-align: center;
- }
- .control-group .item label {
- padding: 5px;
- }
- #serial_ports_container > * {
- display: inline-block;
- }
- #serial_ports_container select {
- margin: 10px;
- flex-basis: 100px;
- flex-grow: 0;
- }
- #serial_ports {
- width: auto;
- min-width: 200px;
- }
- #serial_status_container {
- margin-bottom: 10px;
- }
- #serial_status_header::before {
- content: '';
- width: 20px;
- height: 20px;
- border-radius: 50%;
- margin-right: 8px;
- background-color: var(--text-primary);
- display: inline-block;
- transition: var(--transition-slow) background-color;
- }
- #serial_status_header.connected::before {
- background-color: var(--color-success);
- }
- #serial_status_header.not-connected::before {
- background-color: var(--color-error);
- }
- #serial_ports_buttons {
- display: inline-block;
- }
- .status.connected {
- color: var(--color-success);
- font-weight: bold;
- }
- .status.not-connected {
- color: var(--color-error);
- font-weight: bold;
- }
- /* Speed Control Section */
- .speed-control {
- display: flex;
- }
- .speed-control label {
- font-weight: bold;
- font-size: 1rem;
- color: var(--text-primary);
- flex-shrink: 0;
- }
- .speed-control input[type="number"] {
- width: 100px; /* Consistent input width */
- padding: 8px;
- font-size: 1rem;
- border: 1px solid var(--border-primary);
- border-radius: 5px;
- outline: none;
- transition: all 0.3s ease;
- }
- input[type="number"]:focus {
- border-color: var(--theme-primary);
- box-shadow: 0 0 4px var(--background-info);
- }
- #speed_status {
- margin-top: 10px;
- font-size: 0.9rem;
- }
- #serial_ports_container > * {
- display: inline-block;
- }
- #serial_ports_container select {
- margin: 10px;
- flex-basis: 100px;
- flex-grow: 0;
- }
- #serial_ports {
- width: auto;
- min-width: 200px;
- }
- #serial_status_container,
- #serial_ports_buttons {
- display: inline-block;
- }
- /* Notification Styles */
- .notification {
- display: flex;
- position: absolute;
- top: 0;
- left: 0;
- font-weight: bold;
- z-index: 1000;
- color: var(--text-secondary);
- width: 100%;
- height: 100%;
- justify-content: center;
- align-items: center;
- backdrop-filter: blur(2px);
- opacity: 0;
- transition: opacity 250ms ease-in-out;
- }
- .notification.show {
- opacity: 1; /* Fully visible */
- }
- .notification .close-button {
- color: var(--text-secondary);
- font-size: 2rem;
- top: 0;
- right: 0;
- }
- /* Notification Types */
- .notification.success { background-color: var(--background-success); }
- .notification.warning { background-color: var(--background-warning); }
- .notification.error { background-color: var(--background-error); }
- .notification.info { background-color: var(--background-info); }
- .footer {
- align-items: center;
- display: flex;
- flex-wrap: wrap;
- justify-content: space-between;
- margin-bottom: 20px;
- width: 100%;
- }
- #github {
- align-content: center;
- display: flex;
- font-size: 0.8em;
- }
- #github img {
- margin: 0 5px
- }
- /* Responsive Design */
- @media (max-width: 1023px) {
- body {
- font-size: 0.9rem;
- }
- .tab-button {
- font-size: 0.9rem;
- }
- .footer {
- display: none;
- }
- button.cancel {
- background: var(--color-error);
- }
- button.cta {
- background: var(--color-success);
- }
- button.warn {
- background: var(--color-warning);
- }
- button.cancel:hover,
- button.warn:hover,
- button.cta:hover {
- background: var(--theme-primary);
- }
- }
- /* On larger screens, display all tabs in a 3-column grid */
- @media screen and (min-width: 1024px) {
- .app {
- display: grid;
- grid-template-columns: repeat(3, 1fr);
- gap: 0 16px;
- height: calc(100vh - 60px);
- }
- .bottom-nav {
- display: none;
- }
- #status_log {
- grid-column: span 3;
- align-self: flex-end;
- height: 100%;
- }
- section.sticky {
- position: sticky;
- bottom: 0;
- }
- /* Show all tabs in grid layout */
- .tab-content {
- display: flex !important; /* Always display tab-content */
- flex-direction: column;
- border: 1px solid var(--border-primary);
- background-color: var(--background-primary);
- border-radius: 8px;
- overflow-y: auto;
- overflow-x: hidden;
- position: relative;
- }
- }
|