Skip to content
This repository has been archived by the owner on Oct 14, 2024. It is now read-only.

[CI-1222]: Fix asset paths #28

Merged
merged 1 commit into from
Feb 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions config/app.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@

'url' => env('APP_URL', 'http://localhost'),

'asset_url' => env('ASSET_URL'),

/*
|--------------------------------------------------------------------------
| Application Timezone
Expand Down
10 changes: 5 additions & 5 deletions resources/sass/crater.scss
Original file line number Diff line number Diff line change
Expand Up @@ -9,39 +9,39 @@
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 {
font-family: "Poppins";
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 {
font-family: "Poppins";
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 {
font-family: "Poppins";
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 {
font-family: "Poppins";
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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down
2 changes: 1 addition & 1 deletion resources/scripts/admin/layouts/partials/TheSiteHeader.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down
2 changes: 1 addition & 1 deletion resources/scripts/components/InvoicePublicPage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down
2 changes: 1 addition & 1 deletion resources/scripts/components/base/BaseFileUploader.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down
2 changes: 1 addition & 1 deletion resources/scripts/components/base/BaseGlobalLoader.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
</script>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down
18 changes: 9 additions & 9 deletions resources/views/app.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@
<meta charset="utf-8">
<title>{{ get_page_title(!Request::header('company')) }}</title>
<meta name="viewport" content="width=device-width,initial-scale=1">
<link rel="apple-touch-icon" sizes="180x180" href="/favicons/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="/favicons/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="/favicons/favicon-16x16.png">
<link rel="manifest" href="/favicons/site.webmanifest">
<link rel="mask-icon" href="/favicons/safari-pinned-tab.svg" color="#5851d8">
<link rel="shortcut icon" href="/favicons/favicon.ico">
<link rel="apple-touch-icon" sizes="180x180" href="{{asset('/favicons/apple-touch-icon.png')}}">
<link rel="icon" type="image/png" sizes="32x32" href="{{asset('/favicons/favicon-32x32.png')}}">
<link rel="icon" type="image/png" sizes="16x16" href="{{asset('/favicons/favicon-16x16.png')}}">
<link rel="manifest" href="{{asset('/favicons/site.webmanifest')}}">
<link rel="mask-icon" href="{{asset('/favicons/safari-pinned-tab.svg')}}" color="#5851d8">
<link rel="shortcut icon" href="{{asset('/favicons/favicon.ico')}}">
<meta name="msapplication-TileColor" content="#ffffff">
<meta name="msapplication-config" content="/favicons/browserconfig.xml">
<meta name="msapplication-config" content="{{asset('/favicons/browserconfig.xml')}}">
<meta name="theme-color" content="#ffffff">
<meta name="csrf-token" content="{{ csrf_token() }}">

Expand Down Expand Up @@ -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()
</script>
Expand Down