mirror of
https://github.com/CharaChorder/DeviceManager.git
synced 2026-01-11 12:32:55 +00:00
layout prototype
This commit is contained in:
@@ -12,17 +12,46 @@
|
|||||||
{/each}
|
{/each}
|
||||||
</fieldset>
|
</fieldset>
|
||||||
|
|
||||||
<div class="row">
|
<div class="col" style="gap: 0">
|
||||||
<RingInput {activeLayer} />
|
<div class="row" style="gap: 156px">
|
||||||
<div class="col">
|
<div class="row">
|
||||||
|
<RingInput {activeLayer} />
|
||||||
|
<div class="col">
|
||||||
|
<RingInput {activeLayer} />
|
||||||
|
<RingInput {activeLayer} />
|
||||||
|
</div>
|
||||||
|
<div class="col">
|
||||||
|
<RingInput {activeLayer} />
|
||||||
|
<RingInput {activeLayer} />
|
||||||
|
</div>
|
||||||
|
<RingInput {activeLayer} />
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
<RingInput {activeLayer} />
|
||||||
|
<div class="col">
|
||||||
|
<RingInput {activeLayer} />
|
||||||
|
<RingInput {activeLayer} />
|
||||||
|
</div>
|
||||||
|
<div class="col">
|
||||||
|
<RingInput {activeLayer} />
|
||||||
|
<RingInput {activeLayer} />
|
||||||
|
</div>
|
||||||
|
<RingInput {activeLayer} />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row" style="gap: 48px; margin-top: -32px">
|
||||||
<RingInput {activeLayer} />
|
<RingInput {activeLayer} />
|
||||||
<RingInput {activeLayer} />
|
<RingInput {activeLayer} />
|
||||||
</div>
|
</div>
|
||||||
<div class="col">
|
<div class="row" style="gap: 160px">
|
||||||
|
<RingInput {activeLayer} />
|
||||||
|
<RingInput {activeLayer} />
|
||||||
|
</div>
|
||||||
|
<div class="row" style="gap: 320px; margin-top: -12px">
|
||||||
<RingInput {activeLayer} />
|
<RingInput {activeLayer} />
|
||||||
<RingInput {activeLayer} />
|
<RingInput {activeLayer} />
|
||||||
</div>
|
</div>
|
||||||
<RingInput {activeLayer} />
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
@@ -40,6 +69,8 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
button.icon {
|
button.icon {
|
||||||
|
cursor: pointer;
|
||||||
|
|
||||||
z-index: 1;
|
z-index: 1;
|
||||||
|
|
||||||
font-size: 24px;
|
font-size: 24px;
|
||||||
@@ -80,18 +111,17 @@
|
|||||||
|
|
||||||
.row,
|
.row,
|
||||||
.col {
|
.col {
|
||||||
|
display: flex;
|
||||||
gap: 8px;
|
gap: 8px;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.row {
|
.row {
|
||||||
display: flex;
|
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
}
|
}
|
||||||
|
|
||||||
.col {
|
.col {
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
<script>
|
<script>
|
||||||
import {serialPort, syncing} from "$lib/serial/connection.js"
|
import {serialPort, syncing} from "$lib/serial/connection.js"
|
||||||
import {browser} from "$app/environment"
|
import {browser} from "$app/environment"
|
||||||
|
import {page} from "$app/stores"
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<nav>
|
<nav>
|
||||||
@@ -31,6 +32,7 @@
|
|||||||
href="/device-manager/"
|
href="/device-manager/"
|
||||||
title="Device Manager"
|
title="Device Manager"
|
||||||
class="icon connect"
|
class="icon connect"
|
||||||
|
class:active={$page.url.pathname === "/device-manager/"}
|
||||||
class:error={$serialPort === undefined}
|
class:error={$serialPort === undefined}
|
||||||
class:syncing={$syncing}
|
class:syncing={$syncing}
|
||||||
>
|
>
|
||||||
@@ -82,7 +84,8 @@
|
|||||||
background: var(--md-sys-color-error);
|
background: var(--md-sys-color-error);
|
||||||
}
|
}
|
||||||
|
|
||||||
&:hover {
|
&.active,
|
||||||
|
&:active {
|
||||||
color: var(--md-sys-color-on-primary);
|
color: var(--md-sys-color-on-primary);
|
||||||
background: var(--md-sys-color-primary);
|
background: var(--md-sys-color-primary);
|
||||||
}
|
}
|
||||||
@@ -103,7 +106,8 @@
|
|||||||
clip-path: polygon(25% 50%, 0% 0%, 75% 0%, 100% 50%, 75% 100%, 0% 100%);
|
clip-path: polygon(25% 50%, 0% 0%, 75% 0%, 100% 50%, 75% 100%, 0% 100%);
|
||||||
border-radius: 0;
|
border-radius: 0;
|
||||||
|
|
||||||
&:hover {
|
&.active,
|
||||||
|
&:active {
|
||||||
color: var(--md-sys-color-on-tertiary);
|
color: var(--md-sys-color-on-tertiary);
|
||||||
background: var(--md-sys-color-tertiary);
|
background: var(--md-sys-color-tertiary);
|
||||||
|
|
||||||
@@ -145,6 +149,10 @@
|
|||||||
bottom: 0;
|
bottom: 0;
|
||||||
left: 0;
|
left: 0;
|
||||||
|
|
||||||
|
display: table-cell;
|
||||||
|
|
||||||
|
padding-top: 0.5px;
|
||||||
|
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
color: var(--md-sys-color-on-background);
|
color: var(--md-sys-color-on-background);
|
||||||
@@ -153,10 +161,18 @@
|
|||||||
background: var(--md-sys-color-background);
|
background: var(--md-sys-color-background);
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
|
|
||||||
|
alignment-baseline: top;
|
||||||
|
|
||||||
transition: opacity 250ms ease;
|
transition: opacity 250ms ease;
|
||||||
animation: sync 1s linear infinite;
|
animation: sync 1s linear infinite;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.connect:active::after,
|
||||||
|
.connect.active::after {
|
||||||
|
color: var(--md-sys-color-on-primary);
|
||||||
|
background: var(--md-sys-color-primary);
|
||||||
|
}
|
||||||
|
|
||||||
.connect.syncing::after {
|
.connect.syncing::after {
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -26,7 +26,7 @@
|
|||||||
|
|
||||||
<div class="radial">
|
<div class="radial">
|
||||||
{#each layout as keys, quadrant}
|
{#each layout as keys, quadrant}
|
||||||
<button on:click={() => (activeLayer = (activeLayer + 1) % 3)} title={getKeyDescriptions(keys)}>
|
<button title={getKeyDescriptions(keys)}>
|
||||||
{#each keys as value, layer}
|
{#each keys as value, layer}
|
||||||
<span
|
<span
|
||||||
class:active={virtualLayerMap[activeLayer] === virtualLayerMap[layer]}
|
class:active={virtualLayerMap[activeLayer] === virtualLayerMap[layer]}
|
||||||
@@ -60,6 +60,8 @@
|
|||||||
span {
|
span {
|
||||||
$cr: math.div($size, 2) - 2 * $offset;
|
$cr: math.div($size, 2) - 2 * $offset;
|
||||||
|
|
||||||
|
will-change: scale, offset-distance;
|
||||||
|
|
||||||
scale: 0.9;
|
scale: 0.9;
|
||||||
offset-path: path(
|
offset-path: path(
|
||||||
"M#{math.div($size, 2)} #{$offset}A#{$cr} #{$cr} 0 1 1 #{math.div($size, 2)} #{$size - $offset}A#{$cr} #{$cr} 0 1 1 #{math.div($size, 2)} #{$offset}Z"
|
"M#{math.div($size, 2)} #{$offset}A#{$cr} #{$cr} 0 1 1 #{math.div($size, 2)} #{$size - $offset}A#{$cr} #{$cr} 0 1 1 #{math.div($size, 2)} #{$offset}Z"
|
||||||
@@ -111,7 +113,7 @@
|
|||||||
mask-image: url("$lib/assets/quater-ring.svg");
|
mask-image: url("$lib/assets/quater-ring.svg");
|
||||||
mask-size: 100% 100%;
|
mask-size: 100% 100%;
|
||||||
|
|
||||||
&:hover {
|
&:active {
|
||||||
color: var(--md-sys-color-on-tertiary);
|
color: var(--md-sys-color-on-tertiary);
|
||||||
background: var(--md-sys-color-tertiary);
|
background: var(--md-sys-color-tertiary);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -59,6 +59,15 @@
|
|||||||
color: var(--md-sys-color-tertiary);
|
color: var(--md-sys-color-tertiary);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
a:hover:not(:active),
|
||||||
|
button:hover:not(:active) {
|
||||||
|
filter: brightness(70%);
|
||||||
|
|
||||||
|
&.active {
|
||||||
|
filter: brightness(120%);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
body {
|
body {
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|||||||
@@ -2,4 +2,12 @@
|
|||||||
import LayoutCC1 from "$lib/components/LayoutCC1.svelte"
|
import LayoutCC1 from "$lib/components/LayoutCC1.svelte"
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<LayoutCC1 />
|
<section>
|
||||||
|
<LayoutCC1 />
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<style lang="scss">
|
||||||
|
section {
|
||||||
|
margin: auto;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|||||||
@@ -71,7 +71,7 @@
|
|||||||
background: var(--md-sys-color-secondary);
|
background: var(--md-sys-color-secondary);
|
||||||
}
|
}
|
||||||
|
|
||||||
&:hover:not(:disabled) {
|
&:active:not(:disabled) {
|
||||||
color: var(--md-sys-color-on-surface-variant);
|
color: var(--md-sys-color-on-surface-variant);
|
||||||
background: var(--md-sys-color-surface-variant);
|
background: var(--md-sys-color-surface-variant);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user