Skip to content

Commit

Permalink
fix: footer样式问题
Browse files Browse the repository at this point in the history
  • Loading branch information
GaoNeng-wWw committed Aug 16, 2024
1 parent d2eb39a commit e355be6
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 9 deletions.
15 changes: 8 additions & 7 deletions app/(index)/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { Notifications } from '@mantine/notifications';
import { theme } from '@/theme';
import '@mantine/notifications/styles.css';
import Header from '@/components/Header';
import Footer from '@/components/Footer';

export default function RootLayout({ children }: { children: any }) {
return (
Expand All @@ -20,24 +21,24 @@ export default function RootLayout({ children }: { children: any }) {
/>
<title>苦力怕论坛 | 问卷系统</title>
</head>
<body>
<body style={{
overflow: 'hidden',
}}>
<MantineProvider theme={theme}>
<Notifications position="top-right" />
<AppShell
style={{
scrollSnapType: 'y mandatory',
overflowY: 'scroll',
height: '100vh',
}}
header={{ height: 60 }}
>
<AppShell.Header>
<Header />
</AppShell.Header>

<AppShell.Main>
{children}
{children}
</AppShell.Main>
<AppShell.Footer mah={120}>
<Footer />
</AppShell.Footer>
</AppShell>
</MantineProvider>
</body>
Expand Down
8 changes: 6 additions & 2 deletions app/(index)/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,11 @@ export default function HomePage() {
return (
<>
<div
style={{
scrollSnapType: 'y mandatory',
overflowY: 'scroll',
height: '100vh',
}}
>
<Center
style={{
Expand Down Expand Up @@ -102,8 +107,8 @@ export default function HomePage() {
minHeight: '100vh',
scrollSnapAlign: 'start',
scrollSnapStop: 'always',
paddingTop: 60,
}}
pb={120}
>
<Stack>
<Center>
Expand All @@ -126,7 +131,6 @@ export default function HomePage() {
))}
</SimpleGrid>
</Center>
<Footer />
</Stack>
</Center>
</div>
Expand Down

0 comments on commit e355be6

Please sign in to comment.