Skip to content

Commit

Permalink
website: smooth scroll
Browse files Browse the repository at this point in the history
  • Loading branch information
brillout committed Oct 7, 2024
1 parent c2ca54f commit 51ed8ef
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
8 changes: 7 additions & 1 deletion docs/pages/index/+Page.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,17 @@
export { Page }

import React from 'react'
import React, { useEffect } from 'react'
import { Header } from './Header'
import { Features } from './Features'
import { Contributors, Sponsors } from '@brillout/docpress'

function Page() {
useEffect(() => {
const cl = document.documentElement.classList
const cls = 'scroll-behavior-smooth'
cl.add(cls)
return () => cl.remove(cls)
})
return (
<>
<Header />
Expand Down
3 changes: 3 additions & 0 deletions docs/pages/index/FeaturesLayout.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
html.scroll-behavior-smooth {
scroll-behavior: smooth;
}
#feature-list h2 {
font-size: 2.2em;
padding-top: 50px;
Expand Down

0 comments on commit 51ed8ef

Please sign in to comment.