Display: Add link to top bar logo + load logo svg first

pull/5639/head
Angel Fernando Quiroz Campos 1 year ago
parent 76ce2f8a9c
commit a185b2085b
No known key found for this signature in database
GPG Key ID: B284841AE3E562CD
  1. 9
      assets/css/scss/atoms/_platform_logo.scss
  2. 1
      assets/css/scss/index.scss
  3. 21
      assets/vue/components/layout/PlatformLogo.vue

@ -0,0 +1,9 @@
.platform-logo {
a {
@apply block;
}
img, picture {
@apply h-10 max-h-10 w-auto block;
}
}

@ -29,6 +29,7 @@
@import "atoms/messages"; @import "atoms/messages";
@import "atoms/overlay"; @import "atoms/overlay";
@import "atoms/password"; @import "atoms/password";
@import "atoms/platform_logo";
@import "atoms/progressbar"; @import "atoms/progressbar";
@import "atoms/radio"; @import "atoms/radio";
@import "atoms/skeleton"; @import "atoms/skeleton";

@ -1,6 +1,7 @@
<script setup> <script setup>
import { usePlatformConfig } from "../../store/platformConfig" import { usePlatformConfig } from "../../store/platformConfig"
import { useVisualTheme } from "../../composables/theme" import { useVisualTheme } from "../../composables/theme"
import BaseAppLink from "../basecomponents/BaseAppLink.vue"
const platformConfigStore = usePlatformConfig() const platformConfigStore = usePlatformConfig()
const { getThemeAssetUrl } = useVisualTheme() const { getThemeAssetUrl } = useVisualTheme()
@ -9,9 +10,19 @@ const siteName = platformConfigStore.getSetting("platform.site_name")
</script> </script>
<template> <template>
<img <div class="platform-logo">
:alt="siteName" <BaseAppLink :to="{ name: 'Index' }">
:title="siteName" <picture>
:src="getThemeAssetUrl('images/header-logo.png')" <source
/> :srcset="getThemeAssetUrl('images/header-logo.svg')"
type="image/svg+xml"
/>
<img
:alt="siteName"
:title="siteName"
:src="getThemeAssetUrl('images/header-logo.png')"
/>
</picture>
</BaseAppLink>
</div>
</template> </template>

Loading…
Cancel
Save