2025-09-12 19:20:30 +02:00
|
|
|
<script lang="ts">
|
|
|
|
|
import { RiInformationLine, RiMenu3Line, RiShieldLine } from "svelte-remixicon";
|
|
|
|
|
|
|
|
|
|
let { children, title, left, right } = $props();
|
2025-10-21 12:07:49 +02:00
|
|
|
|
|
|
|
|
let mobiLeftActive = $state(false);
|
|
|
|
|
let mobiRightActive = $state(false);
|
2025-09-12 19:20:30 +02:00
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<!-- svelte-ignore a11y_click_events_have_key_events -->
|
|
|
|
|
<!-- svelte-ignore a11y_no_static_element_interactions -->
|
|
|
|
|
<div class="layout">
|
|
|
|
|
<div class="layout-title">{title}</div>
|
2025-10-21 12:07:49 +02:00
|
|
|
<div class="layout-left" class:active={mobiLeftActive}>{@render left()}</div>
|
2025-09-12 19:20:30 +02:00
|
|
|
<div class="layout-content">{@render children()}</div>
|
2025-10-21 12:07:49 +02:00
|
|
|
<div class="layout-right" class:active={mobiRightActive}>{@render right()}</div>
|
2025-09-12 19:20:30 +02:00
|
|
|
|
2025-10-21 12:07:49 +02:00
|
|
|
<div class="layout-licon" onclick={() => {mobiLeftActive = !mobiLeftActive;}}><RiMenu3Line /></div>
|
|
|
|
|
<div class="layout-ricon" onclick={() => {mobiRightActive = !mobiRightActive;}}><RiInformationLine /></div>
|
2025-09-12 19:20:30 +02:00
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<style>
|
|
|
|
|
|
|
|
|
|
.layout {
|
|
|
|
|
display: grid;
|
|
|
|
|
grid-template-columns: 300px auto 300px;
|
|
|
|
|
grid-template-rows: 2em auto;
|
|
|
|
|
grid-template-areas:
|
|
|
|
|
". title ."
|
|
|
|
|
"left center right";
|
|
|
|
|
margin: 1em 2em;
|
2025-10-21 12:07:49 +02:00
|
|
|
position: relative;
|
2025-09-12 19:20:30 +02:00
|
|
|
}
|
|
|
|
|
|
2025-10-21 12:07:49 +02:00
|
|
|
.layout-left { grid-area: left; padding-right: 1em; }
|
|
|
|
|
.layout-right { grid-area: right; padding-left: 1em; }
|
2025-09-12 19:20:30 +02:00
|
|
|
.layout-content { grid-area: center; }
|
|
|
|
|
.layout-title { grid-area: title; text-align: center; font-size: 1.4em; }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@media (min-width: 800px) {
|
2025-10-21 12:07:49 +02:00
|
|
|
.layout {
|
|
|
|
|
grid-template-columns: 180px auto 180px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.layout-licon, .layout-ricon { display: none; }
|
|
|
|
|
|
|
|
|
|
}
|
2025-10-22 15:09:10 +02:00
|
|
|
@media (min-width: 800px) and (max-width: 959px) {
|
2025-10-21 12:07:49 +02:00
|
|
|
.layout-left, .layout-right {
|
|
|
|
|
font-size: smaller;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2025-10-22 15:09:10 +02:00
|
|
|
@media (min-width: 960px) {
|
2025-09-12 19:20:30 +02:00
|
|
|
.layout {
|
|
|
|
|
grid-template-columns: 240px auto 240px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.layout-licon, .layout-ricon { display: none; }
|
|
|
|
|
}
|
|
|
|
|
|
2025-10-22 15:09:10 +02:00
|
|
|
@media (min-width: 1080px) {
|
2025-09-12 19:20:30 +02:00
|
|
|
.layout {
|
|
|
|
|
grid-template-columns: 270px auto 270px;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2025-10-22 15:09:10 +02:00
|
|
|
@media (min-width: 1200px) {
|
2025-09-12 19:20:30 +02:00
|
|
|
.layout {
|
|
|
|
|
grid-template-columns: 300px auto 300px;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@media (min-width: 1280px) {
|
|
|
|
|
.layout {
|
|
|
|
|
grid-template-columns: 330px auto 330px;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@media (max-width: 799px) {
|
|
|
|
|
.layout {
|
|
|
|
|
grid-template-areas:
|
|
|
|
|
"licon title ricon"
|
|
|
|
|
"center center center";
|
|
|
|
|
|
|
|
|
|
grid-template-columns: 2em auto 2em;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.layout-left, .layout-right { display: none; }
|
2025-10-21 12:07:49 +02:00
|
|
|
|
|
|
|
|
.layout-left.active, .layout-right.active {
|
|
|
|
|
display: block;
|
|
|
|
|
position: absolute;
|
|
|
|
|
top: 2.5em;
|
|
|
|
|
width: 80%;
|
|
|
|
|
min-height: calc(100vh - 6em);
|
|
|
|
|
background-color: var(--canvas);
|
|
|
|
|
z-index: 10;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.layout-left.active {
|
|
|
|
|
left: 0;
|
|
|
|
|
}
|
|
|
|
|
.layout-right.active {
|
|
|
|
|
right: 0;
|
|
|
|
|
}
|
|
|
|
|
|
2025-09-12 19:20:30 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</style>
|