+
{data.sections.find((val) => val.path === $page.url.pathname)?.title}
@@ -80,10 +79,10 @@
height: 0;
}
- .content :global(.anchor) {
+ .content :global(a.permalink) {
position: absolute;
display: block;
- background: url(../icons/link.svg) 0 50% no-repeat;
+ background: url(/icons/link.svg) 0 50% no-repeat;
background-size: 1em 1em;
width: 1.4em;
height: 1em;
@@ -94,11 +93,11 @@
user-select: none;
}
- .content :global(h2) :global(.anchor) {
- bottom: 4rem;
+ .content :global(h2) :global(.permalink) {
+ bottom: 2rem;
}
- .content :global(h3) :global(.anchor) {
+ .content :global(h3) :global(.permalink) {
bottom: 1rem;
}
@@ -114,11 +113,7 @@
}
.content :global(.anchor:focus),
- .content :global(h2):hover :global(.anchor),
- .content :global(h3):hover :global(.anchor),
- .content :global(h4):hover :global(.anchor),
- .content :global(h5):hover :global(.anchor),
- .content :global(h6):hover :global(.anchor) {
+ .content :global(:where(h2, h3, h4, h5, h6):hover .permalink) {
opacity: 1;
}
}
diff --git a/sites/svelte.dev/src/routes/docs/+page.js b/sites/svelte.dev/src/routes/docs/+page.js
deleted file mode 100644
index dfd22352ff..0000000000
--- a/sites/svelte.dev/src/routes/docs/+page.js
+++ /dev/null
@@ -1,7 +0,0 @@
-import { base } from '$app/paths';
-import { redirect } from '@sveltejs/kit';
-
-/** @type {import('./$types').PageLoad} */
-export async function load() {
- throw redirect(307, `${base}/docs/introduction`);
-}
diff --git a/sites/svelte.dev/src/routes/docs/+page.svelte b/sites/svelte.dev/src/routes/docs/+page.svelte
new file mode 100644
index 0000000000..64d7bb821a
--- /dev/null
+++ b/sites/svelte.dev/src/routes/docs/+page.svelte
@@ -0,0 +1,26 @@
+
diff --git a/sites/svelte.dev/static/icons/link.svg b/sites/svelte.dev/static/icons/link.svg
index 3345bdd0ba..58e745476b 100644
--- a/sites/svelte.dev/static/icons/link.svg
+++ b/sites/svelte.dev/static/icons/link.svg
@@ -1 +1,19 @@
-
\ No newline at end of file
+
+
\ No newline at end of file