From e0b9662b0d30aefd07b9588c85e497fd1e9105fd Mon Sep 17 00:00:00 2001 From: Niels Drost Date: Sun, 4 Feb 2024 12:05:48 +0100 Subject: [PATCH] fix assets --- config/app.php | 2 ++ resources/sass/crater.scss | 10 +++++----- .../modal-components/SelectTemplateModal.vue | 2 +- .../admin/layouts/partials/TheSiteHeader.vue | 2 +- .../scripts/components/InvoicePublicPage.vue | 2 +- .../components/base/BaseFileUploader.vue | 2 +- .../components/base/BaseGlobalLoader.vue | 2 +- .../layouts/partials/TheSiteHeader.vue | 2 +- resources/views/app.blade.php | 18 +++++++++--------- 9 files changed, 22 insertions(+), 20 deletions(-) diff --git a/config/app.php b/config/app.php index 24a1078ce..71aeea952 100644 --- a/config/app.php +++ b/config/app.php @@ -53,6 +53,8 @@ 'url' => env('APP_URL', 'http://localhost'), + 'asset_url' => env('ASSET_URL'), + /* |-------------------------------------------------------------------------- | Application Timezone diff --git a/resources/sass/crater.scss b/resources/sass/crater.scss index 83f0fff77..faef5ac68 100644 --- a/resources/sass/crater.scss +++ b/resources/sass/crater.scss @@ -9,7 +9,7 @@ font-style: normal; font-weight: 400; font-display: swap; - src: url("/fonts/Poppins-Black.ttf") format("truetype"); + src: url("../fonts/Poppins-Black.ttf") format("truetype"); } @font-face { @@ -17,7 +17,7 @@ font-style: normal; font-weight: 300; font-display: swap; - src: url("/fonts/Poppins-Light.ttf") format("truetype"); + src: url("../fonts/Poppins-Light.ttf") format("truetype"); } @font-face { @@ -25,7 +25,7 @@ font-style: normal; font-weight: 500; font-display: swap; - src: url("/fonts/Poppins-Medium.ttf") format("truetype"); + src: url("../fonts/Poppins-Medium.ttf") format("truetype"); } @font-face { @@ -33,7 +33,7 @@ font-style: normal; font-weight: 400; font-display: swap; - src: url("/fonts/Poppins-Regular.ttf") format("truetype"); + src: url("../fonts/Poppins-Regular.ttf") format("truetype"); } @font-face { @@ -41,7 +41,7 @@ font-style: normal; font-weight: 600; font-display: swap; - src: url("/fonts/Poppins-SemiBold.ttf") format("truetype"); + src: url("../fonts/Poppins-SemiBold.ttf") format("truetype"); } // Default Theme diff --git a/resources/scripts/admin/components/modal-components/SelectTemplateModal.vue b/resources/scripts/admin/components/modal-components/SelectTemplateModal.vue index b7280c3fc..ad4fafa74 100644 --- a/resources/scripts/admin/components/modal-components/SelectTemplateModal.vue +++ b/resources/scripts/admin/components/modal-components/SelectTemplateModal.vue @@ -133,7 +133,7 @@ async function chooseTemplate() { } function getTickImage() { - const imgUrl = new URL('/img/tick.png', import.meta.url) + const imgUrl = new URL('../../../../static/img/tick.png', import.meta.url) return imgUrl } diff --git a/resources/scripts/admin/layouts/partials/TheSiteHeader.vue b/resources/scripts/admin/layouts/partials/TheSiteHeader.vue index d573a010c..a8aa6898e 100644 --- a/resources/scripts/admin/layouts/partials/TheSiteHeader.vue +++ b/resources/scripts/admin/layouts/partials/TheSiteHeader.vue @@ -205,7 +205,7 @@ const adminLogo = computed(() => { }) function getDefaultAvatar() { - const imgUrl = new URL('/img/default-avatar.jpg', import.meta.url) + const imgUrl = new URL('../../../../static/img/default-avatar.jpg', import.meta.url) return imgUrl } diff --git a/resources/scripts/components/InvoicePublicPage.vue b/resources/scripts/components/InvoicePublicPage.vue index 1f2ffd9e5..4493ab795 100644 --- a/resources/scripts/components/InvoicePublicPage.vue +++ b/resources/scripts/components/InvoicePublicPage.vue @@ -94,7 +94,7 @@ const shareableLink = computed(() => { }) function getLogo() { - const imgUrl = new URL('/img/crater-logo-gray.png', import.meta.url) + const imgUrl = new URL('../../static/img/crater-logo-gray.png', import.meta.url) return imgUrl } diff --git a/resources/scripts/components/base/BaseFileUploader.vue b/resources/scripts/components/base/BaseFileUploader.vue index 6fc78c561..1d49757c6 100644 --- a/resources/scripts/components/base/BaseFileUploader.vue +++ b/resources/scripts/components/base/BaseFileUploader.vue @@ -562,7 +562,7 @@ function onFileRemove(index) { } function getDefaultAvatar() { - const imgUrl = new URL('/img/default-avatar.jpg', import.meta.url) + const imgUrl = new URL('../../../static/img/default-avatar.jpg', import.meta.url) return imgUrl } diff --git a/resources/scripts/components/base/BaseGlobalLoader.vue b/resources/scripts/components/base/BaseGlobalLoader.vue index f6c1dbd48..09f96868d 100644 --- a/resources/scripts/components/base/BaseGlobalLoader.vue +++ b/resources/scripts/components/base/BaseGlobalLoader.vue @@ -64,7 +64,7 @@ const props = defineProps({ }) function getCraterLogo() { - const imgUrl = new URL('/img/crater-logo.png', import.meta.url) + const imgUrl = new URL('../../../static/img/crater-logo.png', import.meta.url) return imgUrl } diff --git a/resources/scripts/customer/layouts/partials/TheSiteHeader.vue b/resources/scripts/customer/layouts/partials/TheSiteHeader.vue index 29558c2d2..2659556bd 100644 --- a/resources/scripts/customer/layouts/partials/TheSiteHeader.vue +++ b/resources/scripts/customer/layouts/partials/TheSiteHeader.vue @@ -232,7 +232,7 @@ const previewAvatar = computed(() => { }) function getDefaultAvatar() { - const imgUrl = new URL('/img/default-avatar.jpg', import.meta.url) + const imgUrl = new URL('../../../../static/img/default-avatar.jpg', import.meta.url) return imgUrl } diff --git a/resources/views/app.blade.php b/resources/views/app.blade.php index 80aed3113..8dcad4583 100644 --- a/resources/views/app.blade.php +++ b/resources/views/app.blade.php @@ -5,14 +5,14 @@ {{ get_page_title(!Request::header('company')) }} - - - - - - + + + + + + - + @@ -57,12 +57,12 @@ class="h-full overflow-hidden bg-gray-100 font-base window.login_page_description = "{{$login_page_description}}" - @endif + @endif @if(isset($copyright_text)) window.copyright_text = "{{$copyright_text}}" - @endif + @endif window.Crater.start()