mirror of
https://github.com/linux-odyssey/linux-odyssey.git
synced 2026-11-08 11:30:12 +08:00
fix: scroll bug
modify contact layout
This commit is contained in:
1 parent
bef134871d
commit
f9decee80b
1 file changed
+15
-9
@@ -20,12 +20,15 @@ const handleSignIn = async () => {
|
|||||||
const scrollToSection = (sectionId) => {
|
const scrollToSection = (sectionId) => {
|
||||||
const section = document.getElementById(sectionId)
|
const section = document.getElementById(sectionId)
|
||||||
if (section) {
|
if (section) {
|
||||||
console.log(sectionId)
|
const container = document.querySelector('.overflow-y-auto') // Replace '.overflow-y-auto' with the appropriate class or selector for your container
|
||||||
window.scrollTo({
|
if (container) {
|
||||||
top: section.offsetTop,
|
container.scrollTo({
|
||||||
|
top: section.offsetTop - container.offsetTop,
|
||||||
|
behavior: 'smooth', // Add smooth scrolling behavior if desired
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
<div class="w-screen h-screen bg-scroll bg-bg">
|
<div class="w-screen h-screen bg-scroll bg-bg">
|
||||||
@@ -292,24 +295,27 @@ const scrollToSection = (sectionId) => {
|
|||||||
<button title="facebookUrl" :href="facebookUrl" class="h-10 w-10">
|
<button title="facebookUrl" :href="facebookUrl" class="h-10 w-10">
|
||||||
<font-awesome-icon
|
<font-awesome-icon
|
||||||
:icon="['fab', 'facebook']"
|
:icon="['fab', 'facebook']"
|
||||||
class="text-text-primary h-full w-full"
|
class="text-text-primary h-full w-full delay-130 hover:-translate-y-1 hover:scale-150"
|
||||||
/>
|
/>
|
||||||
</button>
|
</button>
|
||||||
<button title="GitHubUrl" :href="GitHubUrl" class="h-10 w-10">
|
<button title="GitHubUrl" :href="GitHubUrl" class="h-10 w-10">
|
||||||
<font-awesome-icon
|
<font-awesome-icon
|
||||||
:icon="['fab', 'github']"
|
:icon="['fab', 'github']"
|
||||||
class="text-text-primary h-full w-full"
|
class="text-text-primary h-full w-full delay-130 hover:-translate-y-1 hover:scale-150"
|
||||||
/>
|
/>
|
||||||
</button>
|
</button>
|
||||||
<div title="EmailAddress" class="h-10 w-10">
|
<div title="EmailAddress" class="h-10 w-10">
|
||||||
<font-awesome-icon
|
<font-awesome-icon
|
||||||
:icon="['fas', 'envelope']"
|
:icon="['fas', 'envelope']"
|
||||||
class="text-text-primary h-full w-full"
|
class="text-text-primary h-full w-full delay-130 hover:-translate-y-1 hover:scale-150"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<h1>facebook 粉絲專頁: Linux Odyssey</h1>
|
<h1 class="font-semibold">Facebook</h1>
|
||||||
<h1>Github: linux-odyssey/linux-odyssey</h1>
|
<h1 class="font-semibold">GitHub</h1>
|
||||||
<h1>email: team@linuxodyssey.xyz</h1>
|
<h1 class="font-semibold">Email</h1>
|
||||||
|
<h1>Linux Odyssey</h1>
|
||||||
|
<h1>linux-odyssey/linux-odyssey</h1>
|
||||||
|
<h1>team@linuxodyssey.xyz</h1>
|
||||||
</section>
|
</section>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in new issue
Block a user