Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
kaarmu committed Sep 16, 2024
1 parent 53e1774 commit c17f61c
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions src/routes/+page.svelte
Original file line number Diff line number Diff line change
@@ -1,11 +1,31 @@
<script>
import { onMount } from 'svelte';
import Nav from "./Nav.svelte";
import Theme from "./Theme.svelte"
import Section from "./Section.svelte";
import Contact from "./Contact.svelte";
import ProgramTable from "./ProgramTable.svelte";
import ProgramTableEntry from "./ProgramTableEntry.svelte";
import Speaker from "./Speaker.svelte";
onMount(() => {
// Check if there is a hash in the URL
if (window.location.hash) {
const element = document.querySelector(window.location.hash);
if (element) {
const offset = 50; // Adjust this offset as needed
const elementPosition = element.getBoundingClientRect().top + window.pageYOffset;
// Scroll to the adjusted position with optional smooth scrolling
window.scrollTo({
top: elementPosition - offset,
behavior: 'smooth' // Optional: change to 'auto' for instant scroll
});
}
}
});
</script>

<div class="min-h-full">
Expand Down

0 comments on commit c17f61c

Please sign in to comment.