Start work on dark-mode, fix heading scroll position

This commit is contained in:
Riyyi
2025-03-31 15:02:51 +02:00
parent c26c74a2fb
commit 86e08604dd
18 changed files with 243 additions and 53 deletions
+12 -3
View File
@@ -15,8 +15,19 @@
<style scoped>
/* Target element in child components with :deep */
/* Select any <h> */
:deep(:is(h1, h2, h3, h4, h5, h6):has(span)) {
position: relative;
}
/* Select any <span> inside a <h> */
:deep(:is(h1, h2, h3, h4, h5, h6) span) {
position: absolute;
top: -65px;
}
/* Select any <a> inside a <h> */
:deep(:is(h1, h2, h3, h4, h5, h6) > a) {
:deep(:is(h1, h2, h3, h4, h5, h6) a) {
color: inherit;
text-decoration: none;
}
@@ -50,8 +61,6 @@
<script setup lang="ts">
const { params } = useRoute();
console.log(params);
const { data: article } = await useAsyncData(
`article-${params.slug}`,
() => queryCollection("content").path("/articles/" + params.slug).first()