From cf679c1c6e384fc2220e426df64adbdb50b3bd21 Mon Sep 17 00:00:00 2001 From: andrewlalis Date: Sun, 7 Sep 2025 09:46:48 -0400 Subject: [PATCH] Improved styling. --- web-app/src/assets/main.css | 41 +++++---------- web-app/src/assets/styles/fonts.css | 17 +++++++ web-app/src/components/AccountCard.vue | 51 ++++--------------- .../src/components/CategoryDisplayItem.vue | 4 +- web-app/src/components/CategoryLabel.vue | 13 ++--- web-app/src/components/HomeModule.vue | 2 +- web-app/src/components/TagLabel.vue | 18 +++---- web-app/src/components/TransactionCard.vue | 15 ++---- web-app/src/components/common/AppBadge.vue | 39 ++++++++++++++ web-app/src/components/common/AppPage.vue | 2 +- .../src/components/common/ModalWrapper.vue | 2 +- .../src/components/history/AccountHistory.vue | 9 +--- web-app/src/pages/ProfilesPage.vue | 4 +- web-app/src/pages/UserAccountLayout.vue | 24 +++------ 14 files changed, 106 insertions(+), 135 deletions(-) create mode 100644 web-app/src/assets/styles/fonts.css create mode 100644 web-app/src/components/common/AppBadge.vue diff --git a/web-app/src/assets/main.css b/web-app/src/assets/main.css index 3fd31ba..55e615e 100644 --- a/web-app/src/assets/main.css +++ b/web-app/src/assets/main.css @@ -1,43 +1,28 @@ -@import url('styles/text.css'); +@import url('@/assets/styles/fonts.css'); +@import url('@/assets/styles/text.css'); :root { - --theme-primary: #01bbff; - --theme-secondary: #00759f; + --theme-primary: #113188; + --theme-secondary: #3b6bd3; --theme-tertiary: #01ffc4; - --bg-primary: #00131a; - --bg-secondary: #003447; - --bg-page: #000b0f; + + --bg: rgb(20, 20, 20); + --bg-darker: rgb(0, 0, 0); + --bg-lighter: rgb(41, 41, 41); --text: rgb(247, 247, 247); --text-muted: gray; - --positive: rgb(30, 197, 14); - --negative: rgb(253, 28, 28); -} - -@font-face { - font-family: 'OpenSans'; - src: url('fonts/open-sans/OpenSans-VariableFont_wdth,wght.woff2'); - font-style: normal; -} - -@font-face { - font-family: 'OpenSans'; - src: url('fonts/open-sans/OpenSans-Italic-VariableFont_wdth,wght.woff2'); - font-style: italic; -} - -@font-face { - font-family: 'PlaywriteNL'; - src: url('fonts/playwrite-nl/PlaywriteNL-VariableFont_wght.woff2'); - font-style: italic; + --positive: rgb(59, 219, 44); + --negative: rgb(253, 52, 52); + --warning: rgb(255, 187, 0); } body { padding: 0; margin: 0; font-family: 'OpenSans', sans-serif; - background-color: var(--bg-primary); - color: var(--theme-primary); + background-color: var(--bg); + color: var(--text); } a { diff --git a/web-app/src/assets/styles/fonts.css b/web-app/src/assets/styles/fonts.css new file mode 100644 index 0000000..0c588d6 --- /dev/null +++ b/web-app/src/assets/styles/fonts.css @@ -0,0 +1,17 @@ +@font-face { + font-family: 'OpenSans'; + src: url('@/assets/fonts/open-sans/OpenSans-VariableFont_wdth,wght.woff2'); + font-style: normal; +} + +@font-face { + font-family: 'OpenSans'; + src: url('@/assets/fonts/open-sans/OpenSans-Italic-VariableFont_wdth,wght.woff2'); + font-style: italic; +} + +@font-face { + font-family: 'PlaywriteNL'; + src: url('@/assets/fonts/playwrite-nl/PlaywriteNL-VariableFont_wght.woff2'); + font-style: italic; +} diff --git a/web-app/src/components/AccountCard.vue b/web-app/src/components/AccountCard.vue index 6a1a609..6e99d4e 100644 --- a/web-app/src/components/AccountCard.vue +++ b/web-app/src/components/AccountCard.vue @@ -4,6 +4,7 @@ import { formatMoney } from '@/api/data'; import { getSelectedProfile } from '@/api/profile'; import { computed } from 'vue'; import { useRoute, useRouter } from 'vue-router'; +import AppBadge from './common/AppBadge.vue'; const router = useRouter() const route = useRoute() @@ -35,13 +36,13 @@ function goToAccount() {
- - + {{ account.name }} + #{{ account.numberSuffix }}
-
- + {{ accountType.name }}
diff --git a/web-app/src/components/CategoryDisplayItem.vue b/web-app/src/components/CategoryDisplayItem.vue index 404a2c7..a6f9ffd 100644 --- a/web-app/src/components/CategoryDisplayItem.vue +++ b/web-app/src/components/CategoryDisplayItem.vue @@ -69,10 +69,10 @@ const canExpand = computed(() => props.category.children.length > 0) } .category-display-item-bg-1 { - background-color: var(--bg-primary); + background-color: var(--bg); } .category-display-item-bg-2 { - background-color: var(--bg-secondary); + background-color: var(--bg-lighter); } diff --git a/web-app/src/components/CategoryLabel.vue b/web-app/src/components/CategoryLabel.vue index 7eac0a4..f4d4dc8 100644 --- a/web-app/src/components/CategoryLabel.vue +++ b/web-app/src/components/CategoryLabel.vue @@ -1,6 +1,7 @@ diff --git a/web-app/src/components/TransactionCard.vue b/web-app/src/components/TransactionCard.vue index f01d774..9e28408 100644 --- a/web-app/src/components/TransactionCard.vue +++ b/web-app/src/components/TransactionCard.vue @@ -5,6 +5,7 @@ import type { TransactionsListItem } from '@/api/transaction'; import { useRoute, useRouter } from 'vue-router'; import CategoryLabel from './CategoryLabel.vue'; import { computed, type Ref } from 'vue'; +import AppBadge from './common/AppBadge.vue'; const router = useRouter() const route = useRoute() @@ -61,13 +62,13 @@ function goToTransaction() {
- {{ tx.vendor.name }} + {{ tx.vendor.name }}
diff --git a/web-app/src/components/common/AppBadge.vue b/web-app/src/components/common/AppBadge.vue new file mode 100644 index 0000000..c9f7820 --- /dev/null +++ b/web-app/src/components/common/AppBadge.vue @@ -0,0 +1,39 @@ + + + diff --git a/web-app/src/components/common/AppPage.vue b/web-app/src/components/common/AppPage.vue index 7f92c57..8ad8133 100644 --- a/web-app/src/components/common/AppPage.vue +++ b/web-app/src/components/common/AppPage.vue @@ -14,7 +14,7 @@ defineProps<{ title: string }>() margin-right: auto; padding: 0.5rem; padding-bottom: 1rem; - background-color: var(--bg-page); + background-color: var(--bg-lighter); border-bottom-left-radius: 2rem; border-bottom-right-radius: 2rem; diff --git a/web-app/src/components/common/ModalWrapper.vue b/web-app/src/components/common/ModalWrapper.vue index 76f3612..a9cfb2f 100644 --- a/web-app/src/components/common/ModalWrapper.vue +++ b/web-app/src/components/common/ModalWrapper.vue @@ -37,7 +37,7 @@ defineExpose({ show, close }) diff --git a/web-app/src/pages/UserAccountLayout.vue b/web-app/src/pages/UserAccountLayout.vue index fa007bf..9f50bbe 100644 --- a/web-app/src/pages/UserAccountLayout.vue +++ b/web-app/src/pages/UserAccountLayout.vue @@ -81,7 +81,7 @@ async function checkAuth() {