Theme composable completed

This commit is contained in:
Bahadır Sofuoğlu
2022-11-02 15:49:48 +03:00
parent 52e57309a0
commit 8ddf9d47bf
5 changed files with 208 additions and 82 deletions

View File

@@ -1,9 +1,18 @@
<template>
<div class="layout-footer">
<img src="assets/layout/images/{{layoutService.config.colorScheme === 'light' ? 'logo-dark' : 'logo-white'}}.svg" alt="Logo" height="20" class="mr-2" />
<img :src="logoUrl()" alt="Logo" height="20" class="mr-2" />
by
<span class="font-medium ml-2">PrimeNG</span>
</div>
</template>
<script setup>
import { useThemeService } from '@/composables/theme';
const { appConfig } = useThemeService();
const logoUrl = () => {
return new URL(`/src/assets/layout/images/${appConfig.darkTheme.value ? 'logo-white' : 'logo-dark'}.svg`, import.meta.url).href;
};
</script>
<style lang="scss" scoped></style>