bsc

Comprehensive codebase and coursework for the 4-year B.Sc. Computer Science Honours degree (WBSU)

git clone https://github.com/notamitgamer/bsc.git
· rebuilt hourlyOpen on GitHub
commit 83f2d8f153e4b5ac096619738d1844522acfe5b0
parent 0aba8dd0b1adf5b0efb3be3af7843d66fac77367
Author: Amit Dutta <mail@amit.is-a.dev>
Date:   Sat, 26 Sep 2026 18:10:12 +0530

Merge pull request #138 from notamitgamer/fix/footer-real-bottom-of-homepage

Fix footer landing mid-page on homepage instead of at the bottom
Diffstat:
Adocs/.vitepress/theme/components/HomeFooterGate.vue | 16++++++++++++++++
Mdocs/.vitepress/theme/index.ts | 8+++-----
2 files changed, 19 insertions(+), 5 deletions(-)

diff --git a/docs/.vitepress/theme/components/HomeFooterGate.vue b/docs/.vitepress/theme/components/HomeFooterGate.vue @@ -0,0 +1,16 @@ +<script setup> +import { useData } from 'vitepress' +import DocFooterExtra from './DocFooterExtra.vue' + +// 'layout-bottom' fires on every page type, after everything (including the +// home page's markdown body below the features array — see VPHome.vue, +// which puts <Content /> after 'home-features-after' with no slot below it). +// Doc pages already get the footer correctly via 'doc-after', so only +// render it here when this page is actually using the home layout — +// otherwise doc pages would get it twice. +const { frontmatter } = useData() +</script> + +<template> + <DocFooterExtra v-if="frontmatter.layout === 'home'" /> +</template> diff --git a/docs/.vitepress/theme/index.ts b/docs/.vitepress/theme/index.ts @@ -10,6 +10,7 @@ import Breadcrumbs from './components/Breadcrumbs.vue' import Labels from './components/Labels.vue' import SidebarTags from './components/SidebarTags.vue' import DocFooterExtra from './components/DocFooterExtra.vue' +import HomeFooterGate from './components/HomeFooterGate.vue' import './style.css' export default { @@ -19,7 +20,8 @@ export default { return h(DefaultTheme.Layout, null, { 'layout-bottom': () => h(Fragment, [ h(Banner), - h(ExternalLinkWarning) + h(ExternalLinkWarning), + h(HomeFooterGate) ]), 'doc-before': () => h('div', { class: 'bsc-doc-toolbar' }, [ h(Breadcrumbs), @@ -32,10 +34,6 @@ export default { 'doc-after': () => h(Fragment, [ h(DocFooterExtra) ]), - // The homepage uses `layout: home`, which does not render 'doc-after' - // at all — that slot only exists in VitePress's 'doc' layout. Hook the - // home layout's own slot so the footer shows there too. - 'home-features-after': () => h(DocFooterExtra), 'sidebar-nav-after': () => h(SidebarTags), 'nav-bar-content-after': () => h(SponsorButton) })