Skip to content

Commit

Permalink
copy github page layout
Browse files Browse the repository at this point in the history
  • Loading branch information
bodobraegger committed Oct 19, 2023
1 parent 5094e10 commit 37a279f
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
8 changes: 4 additions & 4 deletions src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -123,12 +123,12 @@ function App() {
<div className='App'>
<Router basename="/">
<LinksContext.Provider value={links}>
<PageLayout>
<Header />
<PageLayout sx={{padding: '0'}}>
<PageLayout.Content>
{/* to have a sticky header, it needs to be placed here
in the content */}
<Header />
<main id="main-content">
<main id="main-content" className='p-4'>
<Routes>
<Route path="/search" element={<SearchPage page={searchPage} sections = {sections} />} />
<Route path="/impressum" element={<ImpressumPage />} />
Expand All @@ -141,7 +141,7 @@ function App() {
</PageLayout.Content>
<PageLayout.Pane position={'start'} sticky //resizable
hidden={{narrow: true, regular: true, wide: false}}
// offsetHeader={64}
offsetHeader={48}
>
<SidebarNav startPageMenuName={'start'} variant='full'/>
</PageLayout.Pane>
Expand Down
3 changes: 2 additions & 1 deletion src/components/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,8 @@ const Header = ({ t }: Props) => {
<>
<header
className={cx(
'color-bg-default p-2 z-1 sections position-sticky top-0 z-1',
'color-bg-default p-2 px-4 z-1 sections position-sticky top-0 z-1',
'border-bottom color-border-subtle',
scroll && 'color-shadow-small',
)}
role='banner'
Expand Down
4 changes: 4 additions & 0 deletions src/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@ html {
font-family: sans-serif;
}

.App > div > div {
max-width: unset;
}

.content {
h1, h2, h3, h4, h5, h6 {
scroll-margin-top: 48px;
Expand Down

0 comments on commit 37a279f

Please sign in to comment.