Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

exclude external footer from layout #30

Merged
merged 4 commits into from
Mar 12, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions src/lib/Layouts.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import React from 'react';
import HealHeader from './HealNav/HealHeader';
import HealFooter from './HealNav/HealFooter';

export default function Layout({
children,
}: {
children: React.ReactNode
}) {
return (
<>
<HealHeader />
{children}
<HealFooter />
</>
);
}
6 changes: 1 addition & 5 deletions src/pages/_document.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
import Document, {
DocumentContext,
DocumentInitialProps,
Html,
Head,
Html,
Main,
NextScript,
} from 'next/document';
import { ColorSchemeScript } from '@mantine/core';
import HealHeader from '@/lib/HealNav/HealHeader';
import HealFooter from '@/lib/HealNav/HealFooter';

class Gen3Document extends Document {
static async getInitialProps(
Expand All @@ -31,12 +29,10 @@ class Gen3Document extends Document {
<Html lang="en">
<Head />
<body className="flex flex-col min-h-screen">
<HealHeader />
<main id="main-content" className="flex-grow">
<Main />
<NextScript />
</main>
<HealFooter />
</body>
</Html>
);
Expand Down
10 changes: 9 additions & 1 deletion src/pages/index.tsx
Original file line number Diff line number Diff line change
@@ -1,2 +1,10 @@
import Layout from '@/lib/Layouts';
import HealLandingPage from './Home';
export default HealLandingPage;

export default function IndexPage() {
return (
<Layout>
<HealLandingPage />
</Layout>
);
}
5 changes: 3 additions & 2 deletions src/pages/newly-available-datasets.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,18 @@ import React from 'react';
import CardedPageContent from '@/lib/NewlyAvailableDatasets/CardedPageContent';
import newDatasetsPageConfig from '../../config/heal/newDatasets.json';
import PageTitle from '@/lib/HealNav/PageTitle';
import Layout from '@/lib/Layouts';

const NewlyAvailableDatasetsPage = () => {
return (
<>
<Layout>
<PageTitle pageName="Newly Available Datasets" />
<div className="flex flex-row justify-items-center">
<div className="sm:prose-base lg:prose-lg xl:prose-xl 2xl:prose-xl mx-20">
<CardedPageContent {...newDatasetsPageConfig} />
</div>
</div>
</>
</Layout>
);
};

Expand Down