diff --git a/availabili.tf/src/assets/base.css b/availabili.tf/src/assets/base.css index 2a9e1e8..7184ac5 100644 --- a/availabili.tf/src/assets/base.css +++ b/availabili.tf/src/assets/base.css @@ -34,7 +34,7 @@ --surface-0: #ccd0da; --base: #eff1f5; - --base-extra: #f5f6f7; + --base-0: #fcfdfe; --mantle: #e6e9ef; --crust: #dce0e8; @@ -58,6 +58,7 @@ --lavender: #7287fd; --accent: var(--lavender); + --accent-0: color-mix(in srgb, var(--accent), var(--text) 50%); --lavender-transparent: color-mix(in srgb, var(--lavender), transparent 80%); --accent-transparent-80: color-mix(in srgb, var(--accent), transparent 80%); --accent-transparent-50: color-mix(in srgb, var(--accent), transparent 50%); @@ -84,18 +85,19 @@ --sapphire: #7dc4e4; --blue: #8aadf4; --lavender: #b7bdf8; - --text: #cad3f5; - --subtext-1: #b8c0e0; - --subtext-0: #a5adcb; - --overlay-2: #939ab7; - --overlay-1: #8087a2; - --overlay-0: #6e738d; - --surface-2: #5b6078; - --surface-1: #494d64; - --surface-0: #363a4f; - --base: #24273a; - --mantle: #1e2030; - --crust: #181926; + --text: #dad3d5; + --subtext-1: #bec0c0; + --subtext-0: #abada5; + --overlay-2: #9a9a9a; + --overlay-1: #8b8b8b; + --overlay-0: #717171; + --surface-2: #575757; + --surface-1: #3f3f3f; + --surface-0: #2f2f2f; + --base: #181818; + --base-0: #242424; + --mantle: #121212; + --crust: #0f0f0f; --destructive: var(--red); */ } diff --git a/availabili.tf/src/assets/main.css b/availabili.tf/src/assets/main.css index 24775ab..fcb52aa 100644 --- a/availabili.tf/src/assets/main.css +++ b/availabili.tf/src/assets/main.css @@ -24,8 +24,8 @@ button { align-items: center; gap: 4px; color: var(--text); - background-color: var(--crust); - border: none; + background-color: var(--base-0); + border: 1px solid var(--surface-0); padding: 6px 20px; line-height: 1.6; border-radius: 4px; @@ -46,6 +46,10 @@ button { transition-duration: 200ms; } +button.no-border { + border: none; +} + button.icon-end { justify-content: space-between; } @@ -53,6 +57,7 @@ button.icon-end { button.icon { background-color: transparent; padding: 8px; + border: none; } button.icon:hover { @@ -94,6 +99,7 @@ button:hover { button.accent { background-color: var(--accent); color: var(--base); + border-color: var(--accent-0); /*text-transform: uppercase;*/ } @@ -248,6 +254,11 @@ textarea { resize: vertical; } +input:focus, textarea:focus { + box-shadow: 1px 1px 8px var(--surface-0); + outline: none; +} + .form-group { display: flex; flex-direction: column; @@ -281,7 +292,7 @@ hr { } [role="menu"], [role="listbox"] { - background-color: var(--base); + background-color: var(--base-0); border: 1px solid var(--overlay-0); border-radius: 4px; padding: 4px 0 4px 0; @@ -299,9 +310,10 @@ hr { } [role="menu"] button { - background-color: var(--base); + background-color: var(--base-0); width: 100%; border-radius: 0; + border: none; } [role="menu"] button.destructive { @@ -335,7 +347,7 @@ hr { top: 50%; left: 50%; transform: translateX(-50%) translateY(-50%); - background-color: var(--base); + background-color: var(--base-0); z-index: 10; animation: smooth-appear 0.2s ease; } @@ -363,3 +375,49 @@ div.banner.info { background-color: var(--lavender-transparent); color: var(--lavender); } + +table { + border-collapse: separate; + border-spacing: 0; +} + +th:first-child { + border-top-left-radius: 4px; + border-left: 1px solid var(--surface-0); +} + +th { + text-align: left; + padding: 0.5rem 1rem; + border-top: 1px solid var(--surface-0); + border-bottom: 1px solid var(--surface-0); + font-size: 10pt; +} + +th:last-child { + border-top-right-radius: 4px; + border-right: 1px solid var(--surface-0); +} + +td { + padding: 0.5rem 1rem; + border-bottom: 1px solid var(--surface-0); + background-color: var(--base-0); + font-size: 10pt; +} + +td:first-child { + border-left: 1px solid var(--surface-0); +} + +td:last-child { + border-right: 1px solid var(--surface-0); +} + +tr:last-child > td:first-child { + border-bottom-left-radius: 4px; +} + +tr:last-child > td:last-child { + border-bottom-right-radius: 4px; +} diff --git a/availabili.tf/src/components/AvailabilityGrid.vue b/availabili.tf/src/components/AvailabilityGrid.vue index 1866ad9..e98b674 100644 --- a/availabili.tf/src/components/AvailabilityGrid.vue +++ b/availabili.tf/src/components/AvailabilityGrid.vue @@ -8,6 +8,7 @@ const scheduleStore = useScheduleStore(); const model = defineModel({ required: true }); const selectedTime = defineModel("selectedTime"); +const selectedIndex = defineModel("selectedIndex"); const hoveredIndex = defineModel("hoveredIndex"); @@ -142,11 +143,20 @@ function onSlotMouseUp(_: MouseEvent) { } function onSlotClick(dayIndex: number, hour: number) { + let index = dayIndex * 24 + hour; + if (isEditing.value) { return; } + if (selectedIndex.value == index) { + selectedIndex.value = -1; + selectedTime.value = undefined; + return; + } + selectedTime.value = getTimeAtCell(dayIndex, hour); + selectedIndex.value = index; scheduleStore.selectIndex(24 * dayIndex + hour); } @@ -235,6 +245,7 @@ function getHour(offset: number, tz?: string) { :class="{ 'time-slot': true, 'height-24px': true, + 'selected': selectedIndex == 24 * dayIndex + hour, }" :selection=" selectionInside(dayIndex, hour) ? selectionValue @@ -315,9 +326,34 @@ function getHour(offset: number, tz?: string) { font-weight: 700; } +.time-slot:hover, .time-slot.selected { + outline: 2px inset var(--subtext-0); +} + +.time-slot.selected { + outline-style: solid; + animation: pulse 1s infinite; +} + +.time-slot.selected:hover { + outline-style: solid; +} + +@keyframes pulse { + 0% { + outline-color: var(--overlay-0); + } + 50% { + outline-color: var(--text); + } + 100% { + outline-color: var(--overlay-0); + } +} + .time-slot:hover { background-color: var(--crust); - outline: 2px inset var(--subtext-0); + outline-style: dashed; } .time-slot:nth-child(2n):not(:last-child) { diff --git a/availabili.tf/src/components/EventCard.vue b/availabili.tf/src/components/EventCard.vue index 0efc48e..39028d9 100644 --- a/availabili.tf/src/components/EventCard.vue +++ b/availabili.tf/src/components/EventCard.vue @@ -109,7 +109,8 @@ h3 { .event-card { display: flex; align-items: center; - /*background-color: white;*/ + background-color: var(--base-0); + border-radius: 8px; align-items: stretch; } @@ -139,7 +140,7 @@ h3 { .details { padding: 1rem; - border: 1px solid var(--text); + border: 1px solid var(--surface-0); border-radius: 0 8px 8px 0; display: flex; flex-direction: column; diff --git a/availabili.tf/src/components/EventConfirmButton.vue b/availabili.tf/src/components/EventConfirmButton.vue index db143d2..5307ac9 100644 --- a/availabili.tf/src/components/EventConfirmButton.vue +++ b/availabili.tf/src/components/EventConfirmButton.vue @@ -113,11 +113,12 @@ const selectedOption = computed({ diff --git a/availabili.tf/src/components/EventList.vue b/availabili.tf/src/components/EventList.vue index b7bb694..df9f5a7 100644 --- a/availabili.tf/src/components/EventList.vue +++ b/availabili.tf/src/components/EventList.vue @@ -1,16 +1,36 @@ diff --git a/availabili.tf/src/components/MatchCard.vue b/availabili.tf/src/components/MatchCard.vue index d66b74d..328b98f 100644 --- a/availabili.tf/src/components/MatchCard.vue +++ b/availabili.tf/src/components/MatchCard.vue @@ -65,7 +65,8 @@ const props = defineProps<{ display: flex; flex-direction: column; padding: 1rem; - border: 1px solid var(--text); + border: 1px solid var(--surface-0); + background-color: var(--base-0); border-radius: 8px; gap: 0.5rem; } diff --git a/availabili.tf/src/components/MembersList.vue b/availabili.tf/src/components/MembersList.vue index a4c6655..50a2896 100644 --- a/availabili.tf/src/components/MembersList.vue +++ b/availabili.tf/src/components/MembersList.vue @@ -1,9 +1,10 @@