From db91dfc8fda7e1fdf106b672053b932760cee6bf Mon Sep 17 00:00:00 2001 From: Lucien Cartier-Tilet Date: Sun, 7 Dec 2025 21:27:23 +0100 Subject: [PATCH] feat(ui): basic layout --- app/app.config.ts | 8 +- app/app.vue | 77 ++++--------------- app/assets/css/colors.css | 64 ++++++++-------- app/components/AppLogo.vue | 39 +--------- app/components/AppUser.vue | 5 ++ app/components/TemplateMenu.vue | 49 ------------ app/components/ui/logout.vue | 3 + app/components/ui/sidebar.vue | 39 ++++++++++ app/composables/usePageTitle.ts | 15 ++++ app/layouts/default.vue | 22 ++++++ app/layouts/unauthenticated.vue | 23 ++++++ app/pages/dashboard.vue | 6 ++ app/pages/index.vue | 127 +++++++++++++++++--------------- app/pages/projects.vue | 6 ++ app/pages/reports.vue | 6 ++ app/pages/settings.vue | 6 ++ app/pages/signin.vue | 11 +++ app/pages/tasks.vue | 6 ++ 18 files changed, 265 insertions(+), 247 deletions(-) create mode 100644 app/components/AppUser.vue delete mode 100644 app/components/TemplateMenu.vue create mode 100644 app/components/ui/logout.vue create mode 100644 app/components/ui/sidebar.vue create mode 100644 app/composables/usePageTitle.ts create mode 100644 app/layouts/default.vue create mode 100644 app/layouts/unauthenticated.vue create mode 100644 app/pages/dashboard.vue create mode 100644 app/pages/projects.vue create mode 100644 app/pages/reports.vue create mode 100644 app/pages/settings.vue create mode 100644 app/pages/signin.vue create mode 100644 app/pages/tasks.vue diff --git a/app/app.config.ts b/app/app.config.ts index 9f027bf..1541d20 100644 --- a/app/app.config.ts +++ b/app/app.config.ts @@ -2,7 +2,7 @@ export default defineAppConfig({ ui: { colors: { primary: 'green', - neutral: 'slate' - } - } -}) + neutral: 'slate', + }, + }, +}); diff --git a/app/app.vue b/app/app.vue index c6c8467..de1259a 100644 --- a/app/app.vue +++ b/app/app.vue @@ -1,78 +1,27 @@ diff --git a/app/assets/css/colors.css b/app/assets/css/colors.css index d91ee5e..6523115 100644 --- a/app/assets/css/colors.css +++ b/app/assets/css/colors.css @@ -1,43 +1,43 @@ :root { /* Polar Night */ - --nord0: #2E3440; /* Darkest - base background (dark mode) */ - --nord1: #3B4252; /* Dark - elevated surfaces (cards, panels) */ - --nord2: #434C5E; /* Medium - selections, highlights */ - --nord3: #4C566A; /* Light - borders, disabled states */ + --nord0: #2e3440; /* Darkest - base background (dark mode) */ + --nord1: #3b4252; /* Dark - elevated surfaces (cards, panels) */ + --nord2: #434c5e; /* Medium - selections, highlights */ + --nord3: #4c566a; /* Light - borders, disabled states */ /* Snow Storm */ - --nord4: #D8DEE9; /* Dark - elevated (light mode) */ - --nord5: #E5E9F0; /* Medium - selections (light mode) */ - --nord6: #ECEFF4; /* Lightest - base background (light mode) */ + --nord4: #d8dee9; /* Dark - elevated (light mode) */ + --nord5: #e5e9f0; /* Medium - selections (light mode) */ + --nord6: #eceff4; /* Lightest - base background (light mode) */ /* Frost (Blues) */ - --nord7: #8FBCBB; /* Calm accent */ - --nord8: #88C0D0; /* PRIMARY brand color */ - --nord9: #81A1C1; /* Secondary accent */ - --nord10: #5E81AC; /* Deep accent, links */ + --nord7: #8fbcbb; /* Calm accent */ + --nord8: #88c0d0; /* PRIMARY brand color */ + --nord9: #81a1c1; /* Secondary accent */ + --nord10: #5e81ac; /* Deep accent, links */ /* Aurora (Status colors) */ - --nord11: #BF616A; /* Error, danger (red) */ - --nord12: #D08770; /* Orange accent */ - --nord13: #EBCB8B; /* Warning (yellow) */ - --nord14: #A3BE8C; /* Success (green) */ - --nord15: #B48EAD; /* Uncommon (purple) */ + --nord11: #bf616a; /* Error, danger (red) */ + --nord12: #d08770; /* Orange accent */ + --nord13: #ebcb8b; /* Warning (yellow) */ + --nord14: #a3be8c; /* Success (green) */ + --nord15: #b48ead; /* Uncommon (purple) */ --primary-50: #f0f9ff; --primary-100: #e0f2fe; --primary-200: #b9e6fe; --primary-300: #7dd3fc; - --primary-400: #88C0D0; /* nord8 */ - --primary-500: #88C0D0; /* nord8 - main */ - --primary-600: #5E81AC; /* nord10 */ - --PRIMARY-700: #5E81AC; - --primary-800: #434C5E; /* nord2 */ - --primary-900: #2E3440; /* nord0 */ + --primary-400: #88c0d0; /* nord8 */ + --primary-500: #88c0d0; /* nord8 - main */ + --primary-600: #5e81ac; /* nord10 */ + --PRIMARY-700: #5e81ac; + --primary-800: #434c5e; /* nord2 */ + --primary-900: #2e3440; /* nord0 */ --primary-950: #1a1f2e; --success-50: #f0fdf4; --success-100: #dcfce7; --success-200: #bbf7d0; --success-300: #86efac; - --success-400: #A3BE8C; /* nord14 */ - --success-500: #A3BE8C; /* nord14 - main */ + --success-400: #a3be8c; /* nord14 */ + --success-500: #a3be8c; /* nord14 - main */ --success-600: #8a9f75; --success-700: #71805e; --success-800: #586047; @@ -47,8 +47,8 @@ --warning-100: #fef9c3; --warning-200: #fef08a; --warning-300: #fde047; - --warning-400: #EBCB8B; /* nord13 */ - --warning-500: #EBCB8B; /* nord13 - main */ + --warning-400: #ebcb8b; /* nord13 */ + --warning-500: #ebcb8b; /* nord13 - main */ --warning-600: #c8ac76; --warning-700: #a58d61; --warning-800: #826e4c; @@ -58,17 +58,17 @@ --error-100: #fee2e2; --error-200: #fecaca; --error-300: #fca5a5; - --error-400: #BF616A; /* nord11 */ - --error-500: #BF616A; /* nord11 - main */ + --error-400: #bf616a; /* nord11 */ + --error-500: #bf616a; /* nord11 - main */ --error-600: #a2525a; --error-700: #85434a; --error-800: #68343a; --error-900: #4b252a; - --category-issue: #BF616A; /* nord11 (red) */ - --category-feature: #81A1C1; /* nord9 (blue) */ - --category-assistance: #B48EAD; /* nord15 (purple) */ - --category-other: #4C566A; /* nord3 (gray) */ + --category-issue: #bf616a; /* nord11 (red) */ + --category-feature: #81a1c1; /* nord9 (blue) */ + --category-assistance: #b48ead; /* nord15 (purple) */ + --category-other: #4c566a; /* nord3 (gray) */ --text: var(--nord0); --background: var(--nord6); diff --git a/app/components/AppLogo.vue b/app/components/AppLogo.vue index 521061f..aa39a53 100644 --- a/app/components/AppLogo.vue +++ b/app/components/AppLogo.vue @@ -1,40 +1,3 @@ diff --git a/app/components/AppUser.vue b/app/components/AppUser.vue new file mode 100644 index 0000000..d9b6e76 --- /dev/null +++ b/app/components/AppUser.vue @@ -0,0 +1,5 @@ + + + diff --git a/app/components/TemplateMenu.vue b/app/components/TemplateMenu.vue deleted file mode 100644 index 1a69e0a..0000000 --- a/app/components/TemplateMenu.vue +++ /dev/null @@ -1,49 +0,0 @@ - diff --git a/app/components/ui/logout.vue b/app/components/ui/logout.vue new file mode 100644 index 0000000..9b2f5ae --- /dev/null +++ b/app/components/ui/logout.vue @@ -0,0 +1,3 @@ + diff --git a/app/components/ui/sidebar.vue b/app/components/ui/sidebar.vue new file mode 100644 index 0000000..a5007d2 --- /dev/null +++ b/app/components/ui/sidebar.vue @@ -0,0 +1,39 @@ + + + diff --git a/app/composables/usePageTitle.ts b/app/composables/usePageTitle.ts new file mode 100644 index 0000000..d90277a --- /dev/null +++ b/app/composables/usePageTitle.ts @@ -0,0 +1,15 @@ +export const usePageTitle = () => { + const pageName = useState('pageName', () => ''); + const title = computed(() => (pageName.value.length > 0 ? `${pageName.value} - Tímmál` : 'Tímmál')); + + const setPageName = (newName: string) => { + pageName.value = newName; + useHead({ title: title.value }); + }; + + return { + title: readonly(title), + pageName: readonly(pageName), + setPageName, + }; +}; diff --git a/app/layouts/default.vue b/app/layouts/default.vue new file mode 100644 index 0000000..3250507 --- /dev/null +++ b/app/layouts/default.vue @@ -0,0 +1,22 @@ + + + diff --git a/app/layouts/unauthenticated.vue b/app/layouts/unauthenticated.vue new file mode 100644 index 0000000..457fea8 --- /dev/null +++ b/app/layouts/unauthenticated.vue @@ -0,0 +1,23 @@ +