Skip to content

Commit 382b2db

Browse files
committed
chore: improve layouts
1 parent 945896a commit 382b2db

21 files changed

+301
-299
lines changed

.changeset/beige-boats-argue.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"r.obin.ch": patch
3+
---
4+
5+
Improve layouts

src/components/Details.astro

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ const { defaultOpen = false } = Astro.props;
88
99
---
1010

11-
<details class="details" open={defaultOpen} data-default-open={defaultOpen}>
11+
<details open={defaultOpen} data-default-open={defaultOpen}>
1212
<summary><slot name="title" /></summary>
1313
<div class="content">
1414
<slot />
@@ -42,13 +42,17 @@ const { defaultOpen = false } = Astro.props;
4242
padding: 1rem;
4343
}
4444

45+
:global(article) details {
46+
margin: 0;
47+
}
48+
4549
.content {
4650
padding: 0 1ch;
4751
}
4852
</style>
4953

5054
<script>
51-
const details = document.querySelectorAll('.details') as NodeListOf<HTMLDetailsElement>;
55+
const details = document.querySelectorAll('details') as NodeListOf<HTMLDetailsElement>;
5256
const matchQuery = window.matchMedia('(max-width: 1280px)');
5357

5458
matchQuery.addEventListener('change', () => {

src/content.config.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ const pagesCollection = defineCollection({
8181
z.object({
8282
path: z.string(),
8383
title: z.string(),
84+
template: z.enum(["article", "article-with-aside"]).optional().default("article"),
8485
})
8586
),
8687
});

src/content/pages/de/about-me.mdx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
---
22
path: ueber-mich
33
title: Über mich
4-
layout: ../../../layouts/pages/Page.astro
54
---
65

76
Schön, dich hier zu treffen! Mein Name ist Robin.

src/content/pages/de/data-protection.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
path: datenschutz
33
title: Datenschutzerklärung
4-
layout: ../../../layouts/pages/PageWithAside.astro
4+
template: article-with-aside
55
---
66

77
Diese Datenschutzerklärung erläutert, wie diese private Webseite mit Ihren Daten umgeht.

src/content/pages/de/imprint.mdx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
---
22
path: impressum
33
title: Impressum
4-
layout: ../../../layouts/pages/Page.astro
54
---
65

76
Unterhalb sind die Angaben zur Identität des Eigentümers dieser privaten Webseite zu finden.

src/content/pages/de/website.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
path: webseite
33
title: Webseite
4-
layout: ../../../layouts/pages/PageWithAside.astro
4+
template: article-with-aside
55
---
66

77
import CodeLicense from "../../../../LICENSE?raw";

src/content/pages/en/about-me.mdx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
---
22
path: about-me
33
title: About me
4-
layout: ../../../layouts/pages/Page.astro
54
---
65

76
Great to meet you here! I'm Robin.

src/content/pages/en/data-protection.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
path: data-protection
33
title: Data protection
4-
layout: ../../../layouts/pages/PageWithAside.astro
4+
template: article-with-aside
55
---
66

77
This privacy policy explains how this private website handles your data.

src/content/pages/en/imprint.mdx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
---
22
path: imprint
33
title: Imprint
4-
layout: ../../../layouts/pages/Page.astro
54
---
65

76
The identity of the owner of this personal website is stated below.

0 commit comments

Comments
 (0)