2025-12-30 19:03:57 +00:00
|
|
|
<script lang="ts">
|
|
|
|
|
let {
|
|
|
|
|
useContentWidth,
|
|
|
|
|
}: {
|
|
|
|
|
useContentWidth?: boolean;
|
|
|
|
|
} = $props();
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
{#if useContentWidth}
|
|
|
|
|
<div class="main-content content-width">
|
|
|
|
|
<slot />
|
|
|
|
|
</div>
|
|
|
|
|
{:else}
|
|
|
|
|
<div class="main-content page-width">
|
|
|
|
|
<slot />
|
|
|
|
|
</div>
|
|
|
|
|
{/if}
|
2025-04-18 11:30:21 +02:00
|
|
|
|
|
|
|
|
<style>
|
2025-12-20 14:07:00 +00:00
|
|
|
.main-content {
|
2025-09-17 15:55:13 +01:00
|
|
|
width: 100%;
|
2025-12-20 14:07:00 +00:00
|
|
|
box-sizing: border-box;
|
2025-09-17 15:55:13 +01:00
|
|
|
margin: 0 auto;
|
2025-07-14 12:12:30 +02:00
|
|
|
padding: 0 24px;
|
2025-04-18 11:30:21 +02:00
|
|
|
}
|
2025-09-17 15:55:13 +01:00
|
|
|
|
2025-12-30 19:03:57 +00:00
|
|
|
.content-width {
|
|
|
|
|
max-width: var(--content-width);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.page-width {
|
|
|
|
|
max-width: var(--page-width);
|
|
|
|
|
}
|
|
|
|
|
|
2025-09-17 15:55:13 +01:00
|
|
|
@media screen and (max-width: 800px) {
|
2025-12-20 14:07:00 +00:00
|
|
|
.main-content {
|
2025-09-17 15:55:13 +01:00
|
|
|
padding: 0 8px;
|
|
|
|
|
}
|
|
|
|
|
}
|
2025-04-18 11:30:21 +02:00
|
|
|
</style>
|