Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
fix: sticky footer
  • Loading branch information
Wellitsabhi committed Jun 12, 2024
commit 42efc73927df0a81538ee85889d55cce98f2103d
18 changes: 18 additions & 0 deletions components/Containers/Footer/index.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -47,3 +47,21 @@
}
}
}

.mobileFooter {
display: none;
}

.desktopFooter {
display: block;
}

@media (max-width: 640px) {
.mobileFooter {
display: block;
}

.desktopFooter {
display: none;
}
}
9 changes: 8 additions & 1 deletion layouts/About.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ import WithNavBar from '@/components/withNavBar';
import WithSidebar from '@/components/withSidebar';
import ArticleLayout from '@/layouts/Article';

import styles from '/components/Containers/Footer/index.module.css';

const AboutLayout: FC<PropsWithChildren> = ({ children }) => (
<>
<WithNavBar />
Expand All @@ -18,11 +20,16 @@ const AboutLayout: FC<PropsWithChildren> = ({ children }) => (
<main>{children}</main>

<WithMetaBar />
<div className={styles.mobileFooter}>
<WithFooter />
</div>
</div>

<WithBreadcrumbs navKeys={['about', 'getInvolved']} />
</ArticleLayout>
<WithFooter />
<div className={styles.desktopFooter}>
<WithFooter />
</div>
</>
);

Expand Down
8 changes: 7 additions & 1 deletion layouts/Learn.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import WithProgressionSidebar from '@/components/withProgressionSidebar';
import WithSidebarCrossLinks from '@/components/withSidebarCrossLinks';
import ArticleLayout from '@/layouts/Article';

import styles from '/components/Containers/Footer/index.module.css';
const LearnLayout: FC<PropsWithChildren> = ({ children }) => (
<>
<WithNavBar />
Expand All @@ -23,11 +24,16 @@ const LearnLayout: FC<PropsWithChildren> = ({ children }) => (
</main>

<WithMetaBar />
<div className={styles.mobileFooter}>
<WithFooter />
</div>
</div>

<WithBreadcrumbs navKeys={['learn']} />
</ArticleLayout>
<WithFooter />
<div className={styles.desktopFooter}>
<WithFooter />
</div>
</>
);

Expand Down