From 0302ed69efc37fb2141f551b4026a3f919739359 Mon Sep 17 00:00:00 2001 From: ThrRip Date: Fri, 10 Nov 2023 10:56:27 +0800 Subject: [PATCH] admin: Add the main layout --- packages/admin/app.vue | 117 +++++++++++++++++++++++++- packages/admin/plugins/fontawesome.ts | 23 +++++ tailwind.config.js | 6 +- 3 files changed, 144 insertions(+), 2 deletions(-) create mode 100644 packages/admin/plugins/fontawesome.ts diff --git a/packages/admin/app.vue b/packages/admin/app.vue index ee11923..0202a4d 100644 --- a/packages/admin/app.vue +++ b/packages/admin/app.vue @@ -1,5 +1,105 @@ diff --git a/packages/admin/plugins/fontawesome.ts b/packages/admin/plugins/fontawesome.ts new file mode 100644 index 0000000..a1daa00 --- /dev/null +++ b/packages/admin/plugins/fontawesome.ts @@ -0,0 +1,23 @@ +import { library, config } from '@fortawesome/fontawesome-svg-core' +// eslint-disable-next-line import/named +import { FontAwesomeIcon } from '@fortawesome/vue-fontawesome' + +import { + faHouse, + faPenToSquare, + faChartColumn, + faAngleRight +} from '@fortawesome/free-solid-svg-icons' + +config.autoAddCss = false + +library.add( + faHouse, + faPenToSquare, + faChartColumn, + faAngleRight +) + +export default defineNuxtPlugin((nuxtApp) => { + nuxtApp.vueApp.component('font-awesome-icon', FontAwesomeIcon) +}) diff --git a/tailwind.config.js b/tailwind.config.js index cee8afc..87af49d 100644 --- a/tailwind.config.js +++ b/tailwind.config.js @@ -1,5 +1,9 @@ module.exports = { - content: ['./app.vue'], + content: [ + './app.vue', + './pages/**/*.vue', + './components/**/*.vue' + ], theme: { colors: { inherit: 'inherit',