Removed code duplication and get baseURL from nuxt runtime

This commit is contained in:
Cagatay Civici 2022-12-27 23:54:26 +03:00
parent 0c840beded
commit 06df25c7cc
34 changed files with 215 additions and 244 deletions

View file

@ -1,7 +1,7 @@
<template>
<section :ref="containerRef" :class="['landing-header pad-section', { 'landing-header-active': menuActive }]">
<span>
<img :src="baseUrl + 'demo/images/primevue-logo-' + `${$appState.darkTheme ? 'light' : 'dark'}` + '.svg'" alt="primevue logo" class="landing-header-logo" />
<img :src="$config.public.contextPath + 'demo/images/primevue-logo-' + `${$appState.darkTheme ? 'light' : 'dark'}` + '.svg'" alt="primevue logo" class="landing-header-logo" />
</span>
<div class="flex align-items-center">
@ -54,8 +54,7 @@ export default {
emits: ['theme-toggle'],
data() {
return {
menuActive: false,
baseUrl: process.dev ? '/' : '/primevue-nuxt/'
menuActive: false
};
},
scrollListener: null,