added sidebar to pc version again
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<link rel="icon" href="https://raw.githubusercontent.com/MaukiNet/.github/main/assets/4542221e59746b200f7d3d2c96cf9210.png">
|
||||
<link rel="icon" href="https://www.hwg-wadern.de/fileadmin/hwg/lay/favicons/favicon-96x96.png">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
@@ -20,7 +20,7 @@ export default {
|
||||
<div class="md:flex md:justify-between">
|
||||
<div class="mb-6 md:mb-0">
|
||||
<a href="https://coasterdb.miaurizius.de" class="flex items-center">
|
||||
<img src="https://raw.githubusercontent.com/MaukiNet/.github/main/assets/4542221e59746b200f7d3d2c96cf9210.png" class="mr-3 h-8 rounded-full" alt="Mauki Logo" />
|
||||
<img src="https://www.hwg-wadern.de/fileadmin/hwg/lay/favicons/favicon-96x96.png" class="mr-3 h-8 rounded-full" alt="Mauki Logo" />
|
||||
<span class="self-center text-2xl font-semibold whitespace-nowrap dark:text-white">CoasterDB</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
@@ -14,7 +14,7 @@ export default {
|
||||
<nav class="bg-white border-gray-200 px-4 lg:px-6 py-2.5 dark:bg-gray-800">
|
||||
<div class="flex flex-wrap justify-between items-center mx-auto max-w-screen-xl">
|
||||
<a href="/" class="flex items-center">
|
||||
<img src="https://raw.githubusercontent.com/MaukiNet/.github/main/assets/4542221e59746b200f7d3d2c96cf9210.png" class="mr-3 h-6 sm:h-9 rounded-full" alt="MaukiLogo" />
|
||||
<img src="https://www.hwg-wadern.de/fileadmin/hwg/lay/favicons/favicon-96x96.png" class="mr-3 h-6 sm:h-9 rounded-full" alt="MaukiLogo" />
|
||||
<span class="self-center text-xl font-semibold whitespace-nowrap dark:text-white">CoasterDB</span>
|
||||
</a>
|
||||
<div class="flex items-center lg:order-2">
|
||||
|
||||
@@ -25,7 +25,7 @@ export default {
|
||||
</button>
|
||||
<a href="/" class="flex items-center justify-between mr-4">
|
||||
<img
|
||||
src="https://raw.githubusercontent.com/MaukiNet/.github/main/assets/4542221e59746b200f7d3d2c96cf9210.png"
|
||||
src="https://www.hwg-wadern.de/fileadmin/hwg/lay/favicons/favicon-96x96.png"
|
||||
class="mr-3 h-8 rounded-full"
|
||||
alt="CoasterDB Logo"
|
||||
/>
|
||||
|
||||
@@ -5,6 +5,16 @@ export default {
|
||||
|
||||
},
|
||||
mounted() {
|
||||
// Initialen Zustand setzen basierend auf sessionStorage
|
||||
const savedState = sessionStorage.getItem('sidebarState');
|
||||
if (savedState) {
|
||||
const sidebar = document.getElementById('drawer-navigation');
|
||||
if (sidebar) {
|
||||
sidebar.classList.toggle('-translate-x-full', savedState === 'closed');
|
||||
sidebar.classList.toggle('translate-x-0', savedState === 'open');
|
||||
}
|
||||
}
|
||||
|
||||
function processAjaxData(urlPath:string) {
|
||||
window.history.pushState({"html":null,"pageTitle":document.title},"", urlPath);
|
||||
}
|
||||
@@ -76,7 +86,7 @@ export default {
|
||||
|
||||
<template>
|
||||
<aside
|
||||
class="hidden fixed top-0 left-0 z-40 w-64 h-screen pt-14 transition-transform duration-200 ease-in-out bg-white border-r border-gray-200 md:translate-x-0 dark:bg-gray-800 dark:border-gray-700"
|
||||
class="fixed top-0 left-0 z-40 w-64 h-screen pt-14 transition-transform duration-200 ease-in-out bg-white border-r border-gray-200 md:translate-x-0 dark:bg-gray-800 dark:border-gray-700"
|
||||
aria-label="Sidenav"
|
||||
id="drawer-navigation"
|
||||
>
|
||||
|
||||
@@ -12,13 +12,16 @@ export default {
|
||||
sidebarOpen: false
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
// Zustand beim Laden wiederherstellen
|
||||
const savedState = sessionStorage.getItem('sidebarState');
|
||||
this.sidebarOpen = savedState ? savedState === 'open' : false;
|
||||
},
|
||||
methods: {
|
||||
toggleSidebar() {
|
||||
this.sidebarOpen = !this.sidebarOpen;
|
||||
const sidebar = document.getElementById('drawer-navigation');
|
||||
if (sidebar) {
|
||||
sidebar.classList.toggle('-translate-x-full', !this.sidebarOpen);
|
||||
}
|
||||
// Zustand speichern
|
||||
sessionStorage.setItem('sidebarState', this.sidebarOpen ? 'open' : 'closed');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user