diff --git a/src/html/components/_head.astro b/src/html/components/_head.astro index 5a71c4fe6..82d24075e 100644 --- a/src/html/components/_head.astro +++ b/src/html/components/_head.astro @@ -1,6 +1,5 @@ --- const { title, path, isRtl } = Astro.props -const distPath = (path != undefined) ? path : '../../../dist' const cssPath = isRtl ? '.rtl' : '' --- @@ -29,4 +28,4 @@ const cssPath = isRtl ? '.rtl' : '' - + diff --git a/src/html/components/_scripts.astro b/src/html/components/_scripts.astro index 775345d82..53ff4da43 100644 --- a/src/html/components/_scripts.astro +++ b/src/html/components/_scripts.astro @@ -1,7 +1,6 @@ --- const { path } = Astro.props -const distPath = (path != undefined) ? path : '../../../dist' -const adminlteJsUrl = distPath + '/js/adminlte.js' +const adminlteJsUrl = path + '/js/adminlte.js' --- diff --git a/src/html/components/dashboard/_sidenav.astro b/src/html/components/dashboard/_sidenav.astro index e897415fd..21ff2d382 100644 --- a/src/html/components/dashboard/_sidenav.astro +++ b/src/html/components/dashboard/_sidenav.astro @@ -1,13 +1,14 @@ --- +import { convertPathToHtml } from '../../../utils/index.js'; const { path, mainPage, page } = Astro.props -const distPath = (path != undefined) ? path : '../../../dist' -const htmlPath = (path != undefined) ? '.' : '..' +const htmlPath = convertPathToHtml(path) --- +