From 44cdbe4531fb84576ff78228be82aa8e9cb9a5bc Mon Sep 17 00:00:00 2001 From: June Hansen <44864244+Kahera@users.noreply.github.com> Date: Tue, 26 Dec 2023 20:15:18 +0100 Subject: [PATCH] fixed various minor visual things, including color on dropdown button, visuals on about me on extremely small screens and making icon buttons not load bigger than they should be --- src/App.vue | 2 +- src/components/ButtonComponent.vue | 11 ++-- src/components/DropdownComponent.vue | 6 +- src/components/NavbarComponent.vue | 18 +++--- src/views/About/AboutView.vue | 2 +- tailwind.config.js | 95 +++++++++++++++------------- 6 files changed, 71 insertions(+), 63 deletions(-) diff --git a/src/App.vue b/src/App.vue index a3a8599..8793543 100644 --- a/src/App.vue +++ b/src/App.vue @@ -9,7 +9,7 @@ import NavbarComponent from './components/NavbarComponent.vue'; - + diff --git a/src/components/ButtonComponent.vue b/src/components/ButtonComponent.vue index d819767..7c2cd76 100644 --- a/src/components/ButtonComponent.vue +++ b/src/components/ButtonComponent.vue @@ -51,7 +51,7 @@ const background = computed(() => { switch (props.color) { case 'primary': if (props.type == 'soft') return 'bg-primary/40'; - return 'bg-primary-hover-bg'; + return 'primary-hover-bg'; case 'secondary': if (props.type == 'soft') return 'bg-secondary/40'; return 'secondary-hover-bg'; @@ -150,11 +150,10 @@ const buttonSize = computed(() => { switch (props.size) { case 'sm': return 'px-2 text-sm'; - case 'md': - return 'px-3 py-1 text-base'; - case 'lg': + case 'lg': return 'px-3 py-2 text-lg'; - default: return 'px-3 py-1 text-base'; + case 'md': + default: return 'px-3 py-1 text-base'; } }); @@ -174,7 +173,7 @@ const iconSize = computed(() => { , default: 'outline' + }, + buttonSize: { + type: String as PropType<'sm' | 'md' | 'lg'>, + default: 'md' } }); @@ -39,7 +43,7 @@ onUnmounted(() => { diff --git a/src/components/NavbarComponent.vue b/src/components/NavbarComponent.vue index 2d4c0c2..aa9d554 100644 --- a/src/components/NavbarComponent.vue +++ b/src/components/NavbarComponent.vue @@ -29,18 +29,18 @@ function getNavIcon(name: string | undefined) { - + - + {{ $t('common.JuneHansen') }} @@ -65,15 +65,15 @@ function getNavIcon(name: string | undefined) { :size="'lg'" :icon="darkModeStore.darkMode ? 'light_mode' : 'dark_mode'" class="max-md:hidden focus:outline-1 focus:outline-primary-light" - @click=" darkModeStore.toggle()" + @click="darkModeStore.toggle()" /> - - {{ getNavIcon(route.name?.toString()) }} - {{ $t('pages.' + route.name?.toString()) }} + {{ getNavIcon(route.name?.toString()) }} + {{ $t('pages.' + route.name?.toString()) }} - + )", - lighter: "rgb(var(--color-primary-lighter) / )", - light: "rgb(var(--color-primary-light) / )", - DEFAULT: "rgb(var(--color-primary) / )", - dark: "rgb(var(--color-primary-dark) / )", - darker: "rgb(var(--color-primary-darker) / )", - darkest: "rgb(var(--color-primary-darkest) / )", - }, - secondary: { - lightest: "rgb(var(--color-secondary-lightest) / )", - light: "rgb(var(--color-secondary-light) / )", - DEFAULT: "rgb(var(--color-secondary) / )", - dark: "rgb(var(--color-secondary-dark) / )", - darker: "rgb(var(--color-secondary-darker) / )", - darkest: "rgb(var(--color-secondary-darkest) / )", - }, - accent: { - lightest: "rgb(var(--color-accent-lightest) / )", - lighter: "rgb(var(--color-accent-lighter) / )", - light: "rgb(var(--color-accent-light) / )", - DEFAULT: "rgb(var(--color-accent) / )", - dark: "rgb(var(--color-accent-dark) / )", - darker: "rgb(var(--color-accent-darker) / )", - darkest: "rgb(var(--color-accent-darkest) / )", - }, - neutral: gray, - success: green[500], - warning: yellow[500], - danger: red[500] - }, - extend: { - transitionDuration: { - '250': '250ms', - } - }, + screens: { + 'xxs': '320px', + 'xs': '475px', + ...defaultTheme.screens, + }, + fontFamily: { + 'sans': ['Seravek, "Gill Sans Nova", Ubuntu, Calibri, "DejaVu Sans", source-sans-pro, sans-serif'], + 'display': ['"Merienda"'], + 'mono': ['ui-monospace, "Cascadia Code", "Source Code Pro", Menlo, Consolas, "DejaVu Sans Mono", monospace'], + 'icon': ['"Material Symbols Outlined"'] + }, + colors: { + transparent: transparent, + primary: { + lightest: "rgb(var(--color-primary-lightest) / )", + lighter: "rgb(var(--color-primary-lighter) / )", + light: "rgb(var(--color-primary-light) / )", + DEFAULT: "rgb(var(--color-primary) / )", + dark: "rgb(var(--color-primary-dark) / )", + darker: "rgb(var(--color-primary-darker) / )", + darkest: "rgb(var(--color-primary-darkest) / )", + }, + secondary: { + lightest: "rgb(var(--color-secondary-lightest) / )", + light: "rgb(var(--color-secondary-light) / )", + DEFAULT: "rgb(var(--color-secondary) / )", + dark: "rgb(var(--color-secondary-dark) / )", + darker: "rgb(var(--color-secondary-darker) / )", + darkest: "rgb(var(--color-secondary-darkest) / )", + }, + accent: { + lightest: "rgb(var(--color-accent-lightest) / )", + lighter: "rgb(var(--color-accent-lighter) / )", + light: "rgb(var(--color-accent-light) / )", + DEFAULT: "rgb(var(--color-accent) / )", + dark: "rgb(var(--color-accent-dark) / )", + darker: "rgb(var(--color-accent-darker) / )", + darkest: "rgb(var(--color-accent-darkest) / )", + }, + neutral: gray, + success: green[500], + warning: yellow[500], + danger: red[500] + }, + extend: { + transitionDuration: { + '250': '250ms', + } + }, } export const plugins = [] -