55 lines
2.2 KiB
Vue
55 lines
2.2 KiB
Vue
<script setup>
|
|
import { ref , onMounted } from 'vue'
|
|
import SidebarToolLinkComponent from './SidebarToolLinkComponent.vue';
|
|
import SidebarMenuElementComponent from './SidebarMenuElementComponent.vue';
|
|
import logoDark from '@assets/logo_biale.svg';
|
|
import logoWhite from '@assets/logo_czarne.svg';
|
|
|
|
const logoR11 = ref( logoDark );
|
|
|
|
function isDarkModeSet(){
|
|
return window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches;
|
|
}
|
|
|
|
onMounted( () => {
|
|
changeLogoForTheme();
|
|
} )
|
|
|
|
function changeLogoForTheme(){
|
|
if (isDarkModeSet()) {
|
|
logoR11.value = logoDark;
|
|
} else{
|
|
logoR11.value = logoWhite;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
</script>
|
|
|
|
<template>
|
|
<aside class="relative top-0 left-0 z-40 w-1/12 h-screen transition-transform -translate-x-full sm:translate-x-0" >
|
|
<div class="h-full px-3 py-4 overflow-y-auto bg-gray-100 dark:bg-gray-800">
|
|
<a href="https://release11.com/">
|
|
<img :src="logoR11" class="w-72 h-16 p-2 dark:bg-gray-800"/>
|
|
</a>
|
|
<ul class="space-y-2 font-medium">
|
|
<sidebar-menu-element-component category-name="XML">
|
|
<li><SidebarToolLinkComponent path-to="/xml/xslt" element-content="XSLT" /></li>
|
|
<li><SidebarToolLinkComponent path-to="/xml/xpath" element-content="XPath" /></li>
|
|
<li><SidebarToolLinkComponent path-to="/xml/xsd" element-content="XSD" /></li>
|
|
<li><SidebarToolLinkComponent path-to="/xml/xquery" element-content="XQuery" /></li>
|
|
</sidebar-menu-element-component>
|
|
|
|
<sidebar-menu-element-component category-name="Formatter">
|
|
<li><SidebarToolLinkComponent path-to="/format/XML" element-content="XML Formatter" /></li>
|
|
<li><SidebarToolLinkComponent path-to="/format/HTML" element-content="HTML Formatter" /></li>
|
|
<li><SidebarToolLinkComponent path-to="/format/JSON" element-content="JSON Formatter" /></li>
|
|
</sidebar-menu-element-component>
|
|
|
|
<li><SidebarToolLinkComponent class="text-left" path-to="/rest/mock" element-content="REST Mock" /></li>
|
|
|
|
</ul>
|
|
</div>
|
|
</aside>
|
|
</template> |