big ui refractor

This commit is contained in:
Rene Kievits
2025-12-23 02:23:44 +01:00
parent 4428a2b7be
commit eaed23a678
62 changed files with 2662 additions and 815 deletions

View File

@@ -1,5 +1,6 @@
@forward 'variables/colors';
@forward 'variables/typography';
@forward 'variables/spacing';
@forward 'variables/spacings';
@forward 'variables/layout';
@forward 'variables/effects';
@forward 'mixins';

View File

@@ -13,12 +13,11 @@
gap: $gap;
}
@mixin grid-responsive($min-width: 960px) {
@mixin grid-responsive($min-width: $breakpoint-md) {
display: grid;
grid-template-columns: 1fr;
@media (min-width: $min-width) {
// stylelint-disable-next-line no-invalid-position-declaration
grid-template-columns: 1fr 1fr;
}
}
@@ -26,7 +25,7 @@
@mixin card-base {
background: $color-surface-light;
border-radius: $radius-md;
border: 1px solid transparent;
border: $border-width-sm solid transparent;
background-clip: padding-box;
}
@@ -40,7 +39,7 @@
backface-visibility: hidden;
&:hover {
transform: translateY(-2px);
transform: translateY(-0.125rem);
background: color.adjust($color-surface-light, $lightness: 5%);
box-shadow: $shadow-md;
}
@@ -48,7 +47,7 @@
@mixin scrollbar {
scrollbar-width: thin;
scrollbar-color: #333 transparent;
scrollbar-color: $color-stroke-inactive transparent;
}
@mixin animate-fade-up($duration: 0.4s) {
@@ -57,9 +56,8 @@
@keyframes fade-slide-up {
from {
opacity: 0;
transform: translateY(10px);
transform: translateY(0.625rem);
}
to {
opacity: 1;
transform: translateY(0);

View File

@@ -1,14 +1,35 @@
$color-primary: hsl(178deg 100% 40%);
$color-secondary: hsl(46deg 100% 82%);
$color-bg-dark: hsl(0deg 0% 7%);
$color-surface: hsl(240deg 9% 13%);
$color-surface-light: hsl(221deg 17% 22%);
$color-surface-lighter: hsl(240deg 5% 16%);
$color-zinc-900: hsl(240deg 6% 10%);
$color-text-white: hsl(0deg 0% 100%);
$color-text-grey: hsl(213deg 14% 70%);
$color-text-dark: hsl(0deg 0% 0%);
$color-border: hsl(0deg 0% 100% / 8%);
$color-zinc-900: #18181b;
$color-reading-box: rgb(255 255 255 / 3%);
$color-stroke-drawn: #a1a1aa;
$color-danger: hsl(0deg 85% 65%);
$color-success: hsl(160deg 80% 45%);
$color-warning: hsl(40deg 100% 50%);
$color-info: hsl(210deg 100% 56%);
$color-reading-box: hsl(0deg 0% 100% / 3%);
$color-stroke-drawn: hsl(240deg 5% 65%);
$color-stroke-inactive: hsl(0deg 0% 33%);
$color-dot-base: hsl(0deg 0% 27%);
$color-zen-lesson: hsl(291deg 96% 62%);
$color-zen-review: hsl(180deg 100% 55%);
$color-gold: hsl(51deg 100% 50%);
$color-gold-glow: hsl(51deg 100% 50% / 50%);
$color-gold-glow-strong: hsl(51deg 100% 50% / 60%);
$color-gold-border: hsl(51deg 100% 50% / 30%);
$color-overlay-white: hsl(0deg 0% 100% / 10%);
$color-srs-1: hsl(0deg 100% 73%);
$color-srs-2: hsl(39deg 98% 71%);
$color-srs-3: hsl(163deg 85% 64%);
@@ -18,11 +39,8 @@ $color-srs-6: hsl(247deg 72% 63%);
$color-srs-7: $color-primary;
$color-srs-8: hsl(339deg 97% 73%);
$color-srs-9: hsl(331deg 78% 59%);
$color-srs-10: hsl(51deg 100% 50%);
$color-danger: hsl(0deg 85% 65%);
$color-success: hsl(160deg 80% 45%);
$color-stroke-inactive: hsl(0deg 0% 33%);
$color-dot-base: hsl(0deg 0% 27%);
$color-srs-10: $color-gold;
$srs-colors: (
1: $color-srs-1,
2: $color-srs-2,

View File

@@ -5,26 +5,39 @@ $opacity-disabled: 0.5;
$opacity-inactive: 0.3;
$opacity-hover: 0.8;
$opacity-active: 1;
$opacity-kanji-hint: 0.5;
$blur-sm: blur(4px);
$blur-md: blur(10px);
$blur-lg: blur(20px);
$bg-glass-subtle: hsl(0deg 0% 100% / 5%);
$bg-glass-light: hsl(0deg 0% 100% / 6%);
$bg-glass-strong: hsl(0deg 0% 100% / 10%);
$bg-glass-dark: hsl(0deg 0% 0% / 20%);
$shadow-sm: 0 2px 4px hsl(0deg 0% 0% / 20%);
$shadow-md: 0 4px 15px hsl(0deg 0% 0% / 30%);
$shadow-lg: 0 20px 50px hsl(0deg 0% 0% / 50%);
$shadow-inset: inset 0 0 20px hsl(0deg 0% 0% / 30%);
$text-shadow: 0 2px 10px hsl(0deg 0% 0% / 50%);
$shadow-glow-xs: 0 0 4px hsl(0deg 0% 100% / 50%);
$shadow-glow-base: 0 0 20px color.change($color-primary, $alpha: 0.4);
$shadow-glow-hover: 0 0 40px color.change($color-primary, $alpha: 0.6);
$shadow-glow-active: 0 0 20px color.change($color-primary, $alpha: 0.4);
$dist-slide-sm: 10px;
$shadow-color-base: hsl(0deg 0% 0% / 20%);
$shadow-color-dark: hsl(0deg 0% 0% / 30%);
$shadow-color-darker: hsl(0deg 0% 0% / 50%);
$shadow-sm: 0 0.125rem 0.25rem $shadow-color-base;
$shadow-md: 0 0.25rem 0.9375rem $shadow-color-dark;
$shadow-lg: 0 1.25rem 3.125rem $shadow-color-darker;
$shadow-inset: inset 0 0 1.25rem $shadow-color-dark;
$text-shadow: 0 0.125rem 0.625rem $shadow-color-darker;
$shadow-glow-xs: 0 0 0.25rem hsl(0deg 0% 100% / 50%);
$shadow-glow-base: 0 0 1.25rem color.change($color-primary, $alpha: 0.4);
$shadow-glow-hover: 0 0 2.5rem color.change($color-primary, $alpha: 0.6);
$shadow-glow-active: 0 0 1.25rem color.change($color-primary, $alpha: 0.4);
$shadow-srs-fill: 0 0 0.25rem hsl(0deg 0% 0% / 30%);
$dist-slide-sm: 0.625rem;
$duration-fast: 0.2s;
$duration-normal: 0.3s;
$duration-slow: 0.5s;
$duration-chart: 1s;
$ease-default: ease;
$ease-out-back: cubic-bezier(0.175, 0.885, 0.32, 1.275);

View File

@@ -0,0 +1,5 @@
@forward 'colors';
@forward 'typography';
@forward 'spacings';
@forward 'layout';
@forward 'effects';

View File

@@ -1,54 +1,62 @@
@use 'colors' as *;
$max-width-desktop: 87.5rem;
$max-width-heatmap: 59.375rem;
$breakpoint-md: 60rem;
$breakpoint-sm: 37.5rem;
$breakpoint-xs: 25rem;
$radius-sm: 4px;
$radius-md: 8px;
$radius-lg: 12px;
$radius-xl: 24px;
$radius-pill: 999px;
$padding-page-y: 2.5rem;
$padding-page-x: 1.5rem;
$radius-xs: 0.125rem;
$radius-sm: 0.25rem;
$radius-md: 0.5rem;
$radius-lg: 0.75rem;
$radius-xl: 1.5rem;
$radius-pill: 62.4375rem;
$radius-circle: 50%;
$border-width-sm: 1px;
$border-width-md: 2px;
$border-subtle: $border-width-sm solid $color-border;
$border-focus: $border-width-md solid $color-primary;
$border-transparent: $border-width-md solid transparent;
$size-icon-btn: 2rem;
$size-icon-small: 1.125rem;
$size-avatar-small: 2rem;
$size-card-min: 3.75rem;
$size-loading-spinner: 4rem;
$size-heatmap-cell: 0.625rem;
$size-legend-box: 0.75rem;
$size-streak-dot: 1.5rem;
$size-srs-track: 1.5rem;
$size-srs-track-mobile: 0.375rem;
$size-chart-height: 10rem;
$size-ghost-min-height: 5rem;
$size-button-large-height: 4.375rem;
$size-button-large-width: 17.5rem;
$size-button-zen-height: 5rem;
$size-zen-btn-max-width: 28.125rem;
$size-hero-wrapper: 8.75rem;
$size-lesson-card-width: 28.125rem;
$size-lesson-card-min-height: 31.25rem;
$size-review-card-max-width: 26.25rem;
$size-canvas: 18.75rem;
$size-kanji-preview: 12.5rem;
$size-play-btn-offset: 0.625rem;
$stroke-width-main: 3px;
$stroke-width-arrow: 2px;
$stroke-width-kanji: 6px;
$z-back: -1;
$z-normal: 1;
$z-above: 2;
$z-play-btn: 10;
$z-sticky: 10;
$z-dropdown: 50;
$z-modal: 100;
$z-tooltip: 200;
$z-above: 2;
// Neue Z-Indizes aus dem Refactoring
$z-play-btn: 10;
$size-canvas: 300px;
$size-kanji-preview: 200px;
$size-icon-btn: 32px;
$size-icon-small: 18px;
$stroke-width-main: 3px;
$stroke-width-arrow: 2px;
$font-size-svg-number: 5px;
$radius-xs: 2px;
$size-legend-box: 12px;
$size-streak-dot: 24px;
$size-srs-track: 24px;
$size-chart-height: 160px;
$size-ghost-min-height: 80px;
$max-width-heatmap: 950px;
$max-width-desktop: 1400px;
$padding-page-y: 40px;
$padding-page-x: 24px;
$breakpoint-md: 960px;
$offset-fab: 20px;
$size-heatmap-cell-height: 10px;
$stroke-width-kanji: 6px;
$opacity-kanji-hint: 0.5;
$dash-kanji-hint: 10px 15px;
// --- NEUE VARIABLEN (Wichtig!) ---
$size-hero-wrapper: 140px;
$size-lesson-card-width: 450px;
$size-lesson-card-min-height: 500px;
$size-avatar-small: 32px;
$size-button-large-height: 70px;
$size-button-large-width: 280px;
$offset-fab: 1.25rem;

View File

@@ -1,10 +0,0 @@
$spacing-2xs: 2px;
$spacing-xs: 4px;
$spacing-sm: 8px;
$spacing-md: 16px;
$spacing-lg: 24px;
$spacing-xl: 32px;
$spacing-xxl: 48px;
$size-loading-spinner: 64px;
$gap-heatmap: 3px;
$size-card-min: 60px;

View File

@@ -0,0 +1,12 @@
$spacing-2xs: 0.125rem;
$spacing-xs: 0.25rem;
$spacing-sm: 0.5rem;
$spacing-md: 1rem;
$spacing-lg: 1.5rem;
$spacing-xl: 2rem;
$spacing-xxl: 3rem;
$spacing-3xl: 4rem;
$gap-heatmap: 0.1875rem;
$gap-srs-chart: 0.5rem;
$gap-srs-chart-mobile: 0.25rem;

View File

@@ -4,6 +4,7 @@ $font-family-sans:
-apple-system,
sans-serif;
$font-family-mono: 'Fira Code', monospace;
$font-xs: 0.75rem;
$font-sm: 0.875rem;
$font-md: 1rem;
@@ -11,15 +12,22 @@ $font-lg: 1.25rem;
$font-xl: 1.5rem;
$font-2xl: 2rem;
$font-3xl: 3rem;
$font-size-svg-number: 0.3125rem;
$font-size-srs-label: 0.625rem;
$font-size-heatmap-label: 0.5625rem;
$weight-regular: 400;
$weight-medium: 500;
$weight-bold: 700;
$weight-black: 900;
$tracking-tighter: -0.05em;
$tracking-tight: -0.025em;
$tracking-normal: 0em;
$tracking-wide: 0.025em;
$tracking-wider: 0.05em;
$leading-tight: 1.2;
$leading-normal: 1.5;
$leading-loose: 1.8;

View File

@@ -1,8 +1,9 @@
@use '../abstracts/variables' as *;
@use '../abstracts' as *;
:root {
--v-theme-background: #{$color-bg-dark};
--color-background: #{$color-bg-dark};
--color-surface: #{$color-surface};
--color-primary: #{$color-primary};
@each $level, $color in $srs-colors {
--srs-#{$level}: #{$color};
@@ -16,31 +17,14 @@ html,
background-color: $color-bg-dark !important;
font-family: $font-family-sans;
color: $color-text-white;
}
.v-navigation-drawer {
background-color: $color-surface !important;
// stylelint-disable-next-line selector-class-pattern
.v-list-item--active {
background-color: rgba($color-primary, 0.15);
color: $color-primary !important;
.v-icon {
color: $color-primary !important;
}
}
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
.v-card {
box-shadow: $shadow-lg !important;
}
.app-bar-blur {
border-bottom-color: $color-border !important;
backdrop-filter: $blur-md;
}
.cursor-pointer {
cursor: pointer;
}
@@ -54,15 +38,7 @@ html,
}
.border-subtle {
border: $border-subtle;
}
.logo-hover {
transition: opacity $duration-fast $ease-default;
&:hover {
opacity: $opacity-hover;
}
border: $border-width-sm solid $color-border;
}
@each $level, $color in $srs-colors {
@@ -74,3 +50,20 @@ html,
background-color: var(--srs-#{$level}) !important;
}
}
.page-enter-active,
.page-leave-active {
transition:
opacity 0.4s ease,
transform 0.4s ease;
}
.page-enter-from {
opacity: 0;
transform: translateY(15px);
}
.page-leave-to {
opacity: 0;
transform: translateY(-15px);
}

View File

@@ -0,0 +1,2 @@
@use 'typography';
@use 'base';

View File

@@ -1,4 +1,4 @@
@use '../abstracts/variables' as *;
@use '../abstracts' as *;
body {
font-family: $font-family-sans;

View File

@@ -1,4 +1,4 @@
@use '../abstracts/variables' as *;
@use '../abstracts' as *;
.glow-btn {
box-shadow: $shadow-glow-base;
@@ -8,7 +8,7 @@
will-change: transform, box-shadow;
&:hover {
transform: translateY(-2px);
transform: translateY(-0.125rem);
box-shadow: $shadow-glow-hover;
}
@@ -24,3 +24,46 @@
cursor: not-allowed;
}
}
.lang-switch-wrapper {
position: relative;
display: flex;
width: 100%;
height: 3rem;
background-color: $bg-glass-subtle;
border-radius: $radius-lg;
overflow: hidden;
border: $border-width-sm solid rgba(255, 255, 255, 0.1);
}
.lang-glider {
position: absolute;
top: 0;
left: 0;
width: 33.33%;
height: 100%;
background-color: $color-primary;
transition: transform $duration-normal cubic-bezier(0.25, 0.8, 0.5, 1);
border-radius: calc($radius-lg - 1px);
z-index: 0;
}
.lang-btn {
flex: 1;
border: none;
background: transparent;
color: $color-text-grey;
font-weight: $weight-bold;
font-size: $font-sm;
cursor: pointer;
z-index: 1;
transition: color $duration-fast ease;
&:hover {
color: $color-text-white;
}
&.active {
color: $color-bg-dark;
}
}

View File

@@ -0,0 +1,26 @@
@use '../abstracts' as *;
.widget-card {
@include card-base;
border: $border-width-sm solid $color-border;
background-color: $color-surface !important;
border-radius: $radius-xl !important;
}
.lesson-card {
width: 100%;
max-width: $size-lesson-card-width;
border-radius: $radius-xl !important;
border: $border-width-sm solid $color-border;
background-color: $color-surface !important;
min-height: $size-lesson-card-min-height;
display: flex;
flex-direction: column;
}
.review-card {
border: $border-width-sm solid $color-border;
background-color: $color-surface !important;
width: 100%;
max-width: $size-review-card-max-width;
}

View File

@@ -0,0 +1,4 @@
@use 'buttons';
@use 'cards';
@use 'kanji/index' as kanji;
@use 'dashboard/index' as dashboard;

View File

@@ -1,189 +0,0 @@
@use '../abstracts/variables' as *;
@use '../abstracts/mixins' as *;
@use 'sass:color';
.widget-card {
@include card-base;
border: $border-subtle;
background-color: $color-surface !important;
border-radius: $radius-xl !important;
}
.welcome-btn {
height: $size-button-large-height !important;
width: $size-button-large-width !important;
.v-chip {
color: white !important;
background-color: $color-surface !important;
}
}
.streak-shield-avatar {
border: 1px solid currentcolor;
background: rgb(255 255 255 / 5%);
}
.streak-day-label {
font-size: 9px !important;
}
.heatmap-container {
width: 100%;
@include flex-center;
}
.heatmap-year {
display: grid;
grid-template-columns: repeat(53, 1fr);
gap: $gap-heatmap;
width: 100%;
}
.heatmap-week {
display: grid;
grid-template-rows: repeat(7, max-content);
gap: $gap-heatmap;
}
.heatmap-day-wrapper {
width: 100%;
}
.heatmap-cell {
width: 100%;
height: $size-heatmap-cell-height;
border-radius: $radius-xs;
transition:
opacity $duration-fast,
background-color $duration-fast;
&:hover {
opacity: $opacity-hover;
}
}
.today-cell {
border: $border-width-sm solid $color-text-white;
box-shadow: $shadow-glow-xs;
z-index: $z-above;
position: relative;
box-sizing: border-box;
}
.level-0 {
background-color: $bg-glass-subtle;
}
.level-1 {
background-color: color.mix($color-primary, $color-surface, 25%);
}
.level-2 {
background-color: color.mix($color-primary, $color-surface, 50%);
}
.level-3 {
background-color: $color-primary;
}
.level-4 {
background-color: color.scale($color-primary, $lightness: 40%);
}
.legend-container {
display: flex;
align-items: center;
gap: $spacing-xs;
}
.legend-box {
width: $size-legend-box;
height: $size-legend-box;
border-radius: $radius-xs;
}
.ghost-card {
background: $bg-glass-subtle;
border-radius: $radius-md;
padding: $spacing-sm;
text-align: center;
border: $border-width-sm solid $bg-glass-subtle;
display: flex;
flex-direction: column;
justify-content: center;
min-height: $size-ghost-min-height;
}
.srs-chart-container {
height: $size-chart-height;
width: 100%;
}
.srs-column {
height: 100%;
display: flex;
flex-direction: column;
justify-content: flex-end;
}
.srs-track {
width: $size-srs-track;
flex-grow: 1;
background: $bg-glass-light;
border-radius: $radius-md;
position: relative;
overflow: hidden;
display: flex;
align-items: flex-end;
margin: $spacing-xs 0;
}
.srs-fill {
width: 100%;
border-radius: $radius-sm;
transition: height 1s $ease-out-back;
min-height: 0;
}
.transition-text {
transition: color $duration-normal $ease-default;
}
.streak-dot {
width: $size-streak-dot;
height: $size-streak-dot;
border-radius: $radius-circle;
background: $bg-glass-strong;
@include flex-center;
transition: all $duration-normal;
&.active {
background: $color-primary;
box-shadow: $shadow-glow-active;
}
}
.forecast-list {
overflow-y: auto;
@include scrollbar;
}
.srs-chart-container {
gap: 8px;
@media (max-width: 600px) {
gap: 4px;
}
}
.srs-track {
@media (max-width: 400px) {
width: 6px;
}
}

View File

@@ -0,0 +1,8 @@
@use '../../abstracts' as *;
.accuracy-chart-wrapper {
position: relative;
display: flex;
align-items: center;
justify-content: center;
}

View File

@@ -0,0 +1,55 @@
@use '../../abstracts' as *;
.srs-chart-container {
height: $size-chart-height;
width: 100%;
gap: $gap-srs-chart;
display: flex;
justify-content: space-between;
align-items: flex-end;
padding-inline: $spacing-2xs;
@media (max-width: $breakpoint-sm) {
gap: $gap-srs-chart-mobile;
}
}
.srs-column {
height: 100%;
display: flex;
flex-direction: column;
justify-content: flex-end;
align-items: center;
flex-grow: 1;
}
.srs-track {
width: $size-srs-track;
flex-grow: 1;
background: $bg-glass-light;
border-radius: $radius-md;
position: relative;
overflow: hidden;
display: flex;
align-items: flex-end;
margin: $spacing-xs 0;
@media (max-width: $breakpoint-xs) {
width: $size-srs-track-mobile;
}
}
.srs-fill {
width: 100%;
border-radius: $radius-sm;
transition: height $duration-chart $ease-out-back;
min-height: 0;
}
.transition-text {
transition: color $duration-normal $ease-default;
}
.srs-label {
font-size: $font-size-srs-label !important;
}

View File

@@ -0,0 +1,6 @@
@use '../../abstracts' as *;
.forecast-list {
overflow-y: auto;
@include scrollbar;
}

View File

@@ -0,0 +1,13 @@
@use '../../abstracts' as *;
.ghost-card {
background: $bg-glass-subtle;
border-radius: $radius-md;
padding: $spacing-sm;
text-align: center;
border: $border-width-sm solid $bg-glass-subtle;
display: flex;
flex-direction: column;
justify-content: center;
min-height: $size-ghost-min-height;
}

View File

@@ -0,0 +1,6 @@
@use '../../abstracts' as *;
.mastery-progress {
width: 100%;
margin-top: $spacing-sm;
}

View File

@@ -0,0 +1,73 @@
@use '../../abstracts' as *;
@use 'sass:color';
.heatmap-container {
width: 100%;
@include flex-center;
}
.heatmap-year {
display: grid;
grid-template-columns: repeat(53, 1fr);
gap: $gap-heatmap;
width: 100%;
}
.heatmap-week {
display: grid;
grid-template-rows: repeat(7, max-content);
gap: $gap-heatmap;
}
.heatmap-day-wrapper {
width: 100%;
}
.heatmap-cell {
width: 100%;
height: $size-heatmap-cell;
border-radius: $radius-xs;
transition:
opacity $duration-fast,
background-color $duration-fast;
&:hover {
opacity: $opacity-hover;
}
}
.today-cell {
border: $border-width-sm solid $color-text-white;
box-shadow: $shadow-glow-xs;
z-index: $z-above;
position: relative;
box-sizing: border-box;
}
.level-0 {
background-color: $bg-glass-subtle;
}
.level-1 {
background-color: color.mix($color-primary, $color-surface, 25%);
}
.level-2 {
background-color: color.mix($color-primary, $color-surface, 50%);
}
.level-3 {
background-color: $color-primary;
}
.level-4 {
background-color: color.scale($color-primary, $lightness: 40%);
}
.legend-container {
display: flex;
align-items: center;
gap: $spacing-xs;
}
.legend-box {
width: $size-legend-box;
height: $size-legend-box;
border-radius: $radius-xs;
}

View File

@@ -0,0 +1,24 @@
@use '../../abstracts' as *;
.streak-shield-avatar {
border: $border-width-sm solid currentcolor;
background: $bg-glass-subtle;
}
.streak-day-label {
font-size: $font-size-heatmap-label !important;
}
.streak-dot {
width: $size-streak-dot;
height: $size-streak-dot;
border-radius: $radius-circle;
background: $bg-glass-strong;
@include flex-center;
transition: all $duration-normal;
&.active {
background: $color-primary;
box-shadow: $shadow-glow-active;
}
}

View File

@@ -0,0 +1,82 @@
@use '../../abstracts' as *;
@use 'sass:color';
.zen-wrapper {
max-width: $breakpoint-md;
margin-inline: auto;
}
.zen-btn {
min-width: $size-button-large-width;
max-width: $size-zen-btn-max-width;
height: $size-button-zen-height !important;
transition: all $duration-normal cubic-bezier(0.25, 0.8, 0.5, 1);
backdrop-filter: blur(4px);
-webkit-backdrop-filter: blur(4px);
&:hover:not(:disabled) {
transform: translateY(-0.125rem);
background-color: rgba($color-text-white, 0.08) !important;
box-shadow: $shadow-md;
}
&.zen-disabled {
opacity: $opacity-inactive;
background-color: color.scale($color-surface, $lightness: 10%) !important;
border-color: $color-stroke-inactive !important;
box-shadow: none;
}
@media (max-width: $breakpoint-sm) {
height: auto !important;
padding: $spacing-sm !important;
min-height: $size-button-zen-height;
width: 100%;
max-width: 100%;
.zen-btn-content {
flex-wrap: wrap;
justify-content: flex-start;
}
.zen-counter {
margin-left: 0 !important;
margin-top: $spacing-xs;
flex-basis: 100%;
max-width: 100%;
justify-content: center;
height: 1.75rem;
}
.d-flex.flex-column {
flex-basis: auto;
flex-grow: 1;
}
}
}
.zen-counter {
@include flex-center;
font-size: $font-sm;
font-weight: $weight-black;
height: $size-icon-btn;
min-width: $size-icon-btn;
padding: 0 calc($spacing-md * 0.75);
border-radius: $radius-xl;
}
.line-height-tight {
line-height: $leading-tight;
margin-bottom: $spacing-2xs;
}
.opacity-80 {
opacity: $opacity-hover;
}
.letter-spacing-small {
letter-spacing: $tracking-tighter;
}
.letter-spacing-1 {
letter-spacing: 0.09375rem;
}

View File

@@ -0,0 +1,8 @@
@use 'widget-welcome';
@use 'widget-heatmap';
@use 'widget-ghosts';
@use 'widget-distribution';
@use 'widget-streak';
@use 'widget-forecast';
@use 'widget-accuracy';
@use 'widget-guru-mastery';

View File

@@ -0,0 +1,2 @@
@use 'kanji-canvas';
@use 'kanji-svg-viewer';

View File

@@ -0,0 +1,55 @@
@use '../../abstracts' as *;
.canvas-container {
position: relative;
@include flex-center;
}
.canvas-wrapper {
position: relative;
width: $size-canvas;
height: $size-canvas;
background: $color-surface;
border-radius: $radius-lg;
border: $border-width-sm solid $color-border;
box-shadow: $shadow-inset;
overflow: hidden;
cursor: crosshair;
display: flex;
align-items: center;
justify-content: center;
canvas {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
touch-action: none;
z-index: $z-above;
}
}
@keyframes shake-x {
0%,
100% {
transform: translateX(0);
}
20% {
transform: translateX(-0.375rem);
}
40% {
transform: translateX(0.375rem);
}
60% {
transform: translateX(-0.375rem);
}
80% {
transform: translateX(0.375rem);
}
}
.shake {
animation: shake-x 0.4s ease-in-out;
border-color: $color-danger !important;
}

View File

@@ -1,7 +1,19 @@
@use '../abstracts/variables' as *;
@use '../abstracts/mixins' as *;
@use '../../abstracts' as *;
@use 'sass:color';
.svg-container {
width: 100%;
height: 100%;
position: relative;
display: flex;
align-items: center;
justify-content: center;
overflow: hidden;
background: $color-surface;
border-radius: $radius-lg;
border: $border-width-sm solid $color-border;
box-shadow: $shadow-inset;
@mixin grid-overlay {
&::before,
&::after {
content: '';
@@ -15,78 +27,26 @@
&::before {
top: 50%;
left: 10px;
right: 10px;
border-top-width: 1px;
left: $size-play-btn-offset;
right: $size-play-btn-offset;
border-top-width: $border-width-sm;
}
&::after {
left: 50%;
top: 10px;
bottom: 10px;
border-left-width: 1px;
top: $size-play-btn-offset;
bottom: $size-play-btn-offset;
border-left-width: $border-width-sm;
}
}
.canvas-container {
position: relative;
@include flex-center;
}
// The main drawing canvas wrapper
.canvas-wrapper {
position: relative;
width: $size-canvas;
height: $size-canvas;
background: $color-surface;
border-radius: $radius-lg;
border: $border-subtle;
box-shadow: $shadow-inset;
overflow: hidden;
cursor: crosshair;
display: flex;
align-items: center;
justify-content: center;
canvas {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
touch-action: none;
z-index: $z-above;
}
}
// The SVG Viewer wrapper (Review/Lesson/Collection)
.svg-container {
width: 100%;
height: 100%;
position: relative;
display: flex;
align-items: center;
justify-content: center;
overflow: hidden;
// --- Unified Styles to match Canvas ---
background: $color-surface;
border-radius: $radius-lg; // Matches canvas-wrapper
border: $border-subtle; // Matches canvas-wrapper
box-shadow: $shadow-inset; // Matches canvas-wrapper
// -------------------------------------
@include grid-overlay;
&.hero-mode {
background: linear-gradient(145deg, $color-surface, #18181b);
border: 2px solid $color-border;
box-shadow: 0 4px 20px rgb(0 0 0 / 40%);
background: linear-gradient(145deg, $color-surface, $color-zinc-900);
border: $border-width-md solid $color-border;
box-shadow: 0 0.25rem 1.25rem hsl(0deg 0% 0% / 40%);
.stroke-path.drawn {
stroke: $color-text-white;
filter: drop-shadow(0 0 2px rgb(255 255 255 / 25%));
filter: drop-shadow(0 0 0.125rem hsl(0deg 0% 100% / 25%));
}
&::before,
@@ -110,17 +70,15 @@
stroke-linejoin: round;
stroke-width: $stroke-width-main;
transition:
stroke 0.3s ease,
opacity 0.3s ease;
stroke $duration-normal ease,
opacity $duration-normal ease;
&.drawn {
stroke: $color-stroke-drawn;
}
&.hidden {
opacity: 0;
}
&.animating {
stroke: $color-primary;
stroke-dasharray: var(--len);
@@ -136,18 +94,18 @@
stroke-linecap: round;
stroke-linejoin: round;
opacity: 0.5;
stroke-dasharray: 10 15;
stroke-dasharray: 0.625rem 0.9375rem;
}
.stroke-badge-group {
filter: drop-shadow(0 1px 2px rgb(0 0 0 / 50%));
filter: drop-shadow(0 0.0625rem 0.125rem hsl(0deg 0% 0% / 50%));
pointer-events: none;
}
.stroke-badge-bg {
fill: $color-primary;
opacity: 0.9;
transition: transform 0.2s ease;
transition: transform $duration-fast ease;
}
.stroke-badge-text {
@@ -168,34 +126,31 @@
stroke-linecap: round;
stroke-linejoin: round;
pointer-events: none;
filter: drop-shadow(0 0 2px rgb(0 0 0 / 50%));
filter: drop-shadow(0 0 0.125rem hsl(0deg 0% 0% / 50%));
}
.play-btn {
position: absolute;
top: 10px;
right: 10px;
top: $size-play-btn-offset;
right: $size-play-btn-offset;
width: $size-icon-btn;
height: $size-icon-btn;
border-radius: $radius-circle;
background: rgb(255 255 255 / 10%);
border: 1px solid rgba($color-primary, 0.3);
background: $bg-glass-strong;
border: 1px solid color.change($color-primary, $alpha: 0.3);
color: $color-primary;
@include flex-center;
cursor: pointer;
z-index: $z-play-btn;
transition: all 0.2s ease;
transition: all $duration-fast ease;
&:hover {
transform: scale(1.05);
background: rgba($color-primary, 0.2);
background: color.change($color-primary, $alpha: 0.2);
}
svg {
width: 18px;
height: 18px;
width: $size-icon-small;
height: $size-icon-small;
}
}
@@ -204,31 +159,3 @@
stroke-dashoffset: 0;
}
}
@keyframes shake-x {
0%,
100% {
transform: translateX(0);
}
20% {
transform: translateX(-6px);
}
40% {
transform: translateX(6px);
}
60% {
transform: translateX(-6px);
}
80% {
transform: translateX(6px);
}
}
.shake {
animation: shake-x 0.4s ease-in-out;
border-color: $color-danger !important;
}

View File

@@ -0,0 +1,31 @@
@use '../abstracts' as *;
.v-navigation-drawer {
background-color: $color-surface !important;
border-right: $border-width-sm solid $color-border;
.v-list-item--active {
background-color: $bg-glass-strong;
color: $color-primary !important;
.v-icon {
color: $color-primary !important;
}
}
}
.app-bar-blur {
border-bottom: $border-width-sm solid $color-border !important;
backdrop-filter: $blur-md;
background-color: rgba($color-surface, 0.8) !important;
}
.safe-area-header {
padding-top: env(safe-area-inset-top);
height: auto !important;
:deep(.v-toolbar__content) {
min-height: 4rem;
align-items: center;
}
}

View File

@@ -0,0 +1 @@
@use 'app-shell';

View File

@@ -1,11 +1,7 @@
@use 'abstracts/variables';
@use 'abstracts/mixins';
@use 'base/typography';
@use 'components/buttons';
@use 'components/widgets';
@use 'components/kanji';
@use 'pages/app';
@use 'pages/dashboard';
@use 'pages/review';
@use 'pages/collection';
@use 'pages/lesson';
@charset 'utf-8';
@use 'abstracts';
@use 'base';
@use 'layout';
@use 'components';
@use 'pages';

View File

@@ -1,5 +1,4 @@
@use '../abstracts/variables' as *;
@use '../abstracts/mixins' as *;
@use '../abstracts' as *;
.sticky-search {
position: sticky;
@@ -22,11 +21,10 @@
.kanji-card {
@include card-base;
@include hover-lift;
aspect-ratio: 1;
@include flex-column;
display: flex;
flex-direction: column;
gap: 0;
align-items: center;
justify-content: center;
position: relative;
@@ -36,17 +34,17 @@
font-size: $font-2xl;
font-weight: $weight-medium;
line-height: $leading-tight;
transition: all 0.3s ease;
transition: all $duration-normal ease;
}
&.zen-master {
border: 1px solid rgb(255 215 0 / 50%);
background: linear-gradient(135deg, rgb(30 30 36 / 100%) 0%, rgb(45 45 55 / 100%) 100%);
box-shadow: 0 0 15px rgb(255 215 0 / 15%);
border: $border-width-sm solid $color-gold-glow;
background: linear-gradient(135deg, $color-surface 0%, $color-surface-lighter 100%);
box-shadow: 0 0 0.9375rem $color-gold-glow;
animation: zen-pulse 4s infinite ease-in-out;
.k-char {
text-shadow: 0 0 15px rgb(255 215 0 / 60%);
text-shadow: 0 0 0.9375rem $color-gold-glow-strong;
transform: scale(1.1);
}
}
@@ -66,19 +64,19 @@
.k-bars {
display: flex;
gap: 3px;
gap: 0.1875rem;
width: 60%;
height: 4px;
height: 0.25rem;
margin-top: $spacing-sm;
.bar {
flex: 1;
background: rgb(255 255 255 / 10%);
border-radius: 2px;
transition: background-color 0.3s ease;
background: $color-overlay-white;
border-radius: $radius-xs;
transition: background-color $duration-normal ease;
&.filled {
box-shadow: 0 0 4px rgb(0 0 0 / 30%);
box-shadow: $shadow-srs-fill;
}
}
}
@@ -86,18 +84,16 @@
@keyframes zen-pulse {
0% {
box-shadow: 0 0 10px rgb(255 215 0 / 10%);
border-color: rgb(255 215 0 / 30%);
box-shadow: 0 0 0.625rem $color-gold-border;
border-color: $color-gold-border;
}
50% {
box-shadow: 0 0 20px rgb(255 215 0 / 30%);
border-color: rgb(255 215 0 / 80%);
box-shadow: 0 0 1.25rem $color-gold-border;
border-color: $color-gold-glow;
}
100% {
box-shadow: 0 0 10px rgb(255 215 0 / 10%);
border-color: rgb(255 215 0 / 30%);
box-shadow: 0 0 0.625rem $color-gold-border;
border-color: $color-gold-border;
}
}

View File

@@ -1,5 +1,15 @@
@use '../abstracts/variables' as *;
@use '../abstracts/mixins' as *;
@use '../abstracts' as *;
@keyframes dashboard-pop-in {
0% {
opacity: 0;
transform: translateY(20px) scale(0.95);
}
100% {
opacity: 1;
transform: translateY(0) scale(1);
}
}
.dashboard-layout {
display: grid;
@@ -11,24 +21,61 @@
margin: 0 auto;
padding: $padding-page-y $padding-page-x;
box-sizing: border-box;
min-height: 50vh;
&.fade-in {
@include animate-fade-up($duration-slow);
// Center the loader when state is loading
&.is-loading {
display: flex;
align-items: center;
justify-content: center;
}
// Trigger animations for all items when data is ready
&.is-ready {
.slide-up-item {
animation: dashboard-pop-in 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}
}
.grid-area-full {
grid-column: 1 / -1;
}
// Base state for animated items
.slide-up-item {
opacity: 0;
// Use the --delay variable passed from Vue, defaulting to 0ms
animation-delay: var(--delay, 0ms);
will-change: transform, opacity;
}
.stats-split-layout {
grid-column: 1 / -1;
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: $spacing-lg;
@include grid-responsive($breakpoint-md);
.stats-left {
grid-column: 1 / 3;
display: flex;
flex-direction: column;
gap: $spacing-lg;
}
.stats-left,
.stats-right {
@include flex-column($spacing-lg);
grid-column: 3 / 4;
display: flex;
flex-direction: column;
gap: $spacing-lg;
}
@media (max-width: $breakpoint-md) {
grid-template-columns: 1fr;
.stats-left,
.stats-right {
grid-column: 1 / -1;
}
}
}
}

View File

@@ -0,0 +1,4 @@
@use 'dashboard';
@use 'collection';
@use 'review';
@use 'lesson';

View File

@@ -1,8 +1,8 @@
@use '../abstracts/variables' as *;
@use '../abstracts/mixins' as *;
@use '../abstracts' as *;
.page-container-center {
height: 100%;
min-height: 100%;
height: auto;
display: flex;
flex-direction: column;
justify-content: center;
@@ -11,17 +11,6 @@
overflow-y: auto;
}
.lesson-card {
width: 100%;
max-width: $size-lesson-card-width;
border-radius: $radius-xl !important;
border: $border-subtle;
background-color: $color-surface !important;
min-height: $size-lesson-card-min-height;
display: flex;
flex-direction: column;
}
.hero-wrapper {
width: $size-hero-wrapper;
height: $size-hero-wrapper;
@@ -37,8 +26,8 @@
.radical-chip {
border-radius: $radius-md;
border: $border-subtle;
background-color: #27272a;
border: $border-width-sm solid $color-border;
background-color: $color-surface-lighter;
img {
filter: invert(1);
@@ -62,7 +51,7 @@
.label {
font-size: $font-xs;
color: #666;
letter-spacing: 1px;
letter-spacing: 0.0625rem;
text-transform: uppercase;
margin-bottom: $spacing-xs;
}

View File

@@ -1,12 +1,4 @@
@use '../abstracts/variables' as *;
@use '../abstracts/mixins' as *;
.review-card {
border: $border-subtle;
background-color: $color-surface !important;
width: 100%;
max-width: 420px;
}
@use '../abstracts' as *;
.text-shadow {
text-shadow: $text-shadow;
@@ -18,8 +10,8 @@
.next-fab {
position: absolute;
bottom: 20px;
right: 20px;
bottom: $offset-fab;
right: $offset-fab;
z-index: $z-sticky;
}
}
@@ -28,7 +20,6 @@
.scale-leave-active {
transition: all $duration-normal $ease-out-back;
}
.scale-enter-from,
.scale-leave-to {
opacity: 0;
@@ -39,25 +30,18 @@
.fade-slide-leave-active {
transition: all $duration-normal $ease-default;
}
.fade-slide-enter-from {
opacity: 0;
transform: translateY($dist-slide-sm);
}
.fade-slide-leave-to {
opacity: 0;
transform: translateY(-#{$dist-slide-sm});
}
.opacity-80 {
opacity: 0.8;
}
.progress-bar {
opacity: 0.3;
opacity: $opacity-inactive;
}
.gap-2 {
gap: $spacing-sm;
}