primevue-mirror/pages/landing/Intro.vue

30 lines
892 B
Vue
Raw Normal View History

2022-12-27 08:12:25 +00:00
<template>
<div class="landing-intro">
<AppNews v-if="$appState.newsActive" />
<HeaderSection @theme-toggle="onThemeToggle" />
<HeroSection />
</div>
</template>
<script>
import AppNews from '@/layouts/AppNews';
2022-12-27 10:37:27 +00:00
import HeaderSection from './HeaderSection';
import HeroSection from './HeroSection';
2022-12-27 08:12:25 +00:00
export default {
methods: {
onThemeToggle() {
const newTheme = this.$appState.darkTheme ? 'lara-light-blue' : 'lara-dark-blue';
const newTableTheme = this.$appState.darkTheme ? this.tableTheme.replace('dark', 'light') : this.tableTheme.replace('light', 'dark');
EventBus.emit('theme-change', { theme: newTheme, dark: !this.$appState.darkTheme });
this.replaceTableTheme(newTableTheme);
}
},
components: {
HeaderSection,
HeroSection,
AppNews
}
};
</script>