vuetify.ts 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. import { createVuetify } from 'vuetify'
  2. import 'vuetify/styles'
  3. import { aliases, fa } from 'vuetify/iconsets/fa'
  4. import '@fortawesome/fontawesome-free/css/all.css'
  5. import { en } from 'vuetify/locale'
  6. import { defineNuxtPlugin } from '#app'
  7. interface Theme {
  8. dark: boolean,
  9. colors: {
  10. 'background': string,
  11. 'on-background': string,
  12. 'surface': string,
  13. 'on-surface': string,
  14. 'primary': string,
  15. 'on-primary': string,
  16. 'card-background': string,
  17. }
  18. }
  19. export const lightTheme: Theme = {
  20. dark: false,
  21. colors: {
  22. 'background': '#f8f3e9', // Warm sand color
  23. 'on-background': '#3a3a3a',
  24. 'on-background--clickable': '#4d4d4d',
  25. 'surface': '#fff9ed', // Light cream
  26. 'on-surface': '#4d4d4d',
  27. 'primary': '#5b88a5', // Ocean blue
  28. 'on-primary': '#ffffff',
  29. 'on-primary--clickable': '#e6e6e6',
  30. 'card-background': '#ffffffd9', // White with 85% opacity (rgba(255, 255, 255, 0.85))
  31. }
  32. }
  33. export const darkTheme: Theme = {
  34. dark: true,
  35. colors: {
  36. 'background': '#1a1a1a',
  37. 'on-background': '#e6e6e6',
  38. 'on-background--clickable': '#e6e6e6',
  39. 'surface': '#262626',
  40. 'on-surface': '#ffffff',
  41. 'primary': '#7ba4d1',
  42. 'on-primary': '#e6e6e6',
  43. 'on-primary-alt--clickable': '#ffffff',
  44. 'card-background': '#2a2a2ad9', // Dark gray with 85% opacity
  45. }
  46. }
  47. export default defineNuxtPlugin((nuxtApp) => {
  48. const vuetify = createVuetify({
  49. ssr: true,
  50. locale: {
  51. locale: 'en',
  52. messages: { en },
  53. },
  54. theme: {
  55. defaultTheme: 'light',
  56. themes: {
  57. light: lightTheme,
  58. dark: darkTheme
  59. },
  60. },
  61. icons: {
  62. defaultSet: 'fa',
  63. aliases,
  64. sets: {
  65. fa,
  66. },
  67. },
  68. })
  69. nuxtApp.vueApp.use(vuetify)
  70. })