diff --git a/docs/guide/extending-default-theme.md b/docs/guide/extending-default-theme.md index c745992329d5..b568ca1da555 100644 --- a/docs/guide/extending-default-theme.md +++ b/docs/guide/extending-default-theme.md @@ -160,6 +160,8 @@ export default { Full list of slots available in the default theme layout: - When `layout: 'doc'` (default) is enabled via frontmatter: + - `doc-top` + - `doc-bottom` - `doc-footer-before` - `doc-before` - `doc-after` @@ -178,6 +180,9 @@ Full list of slots available in the default theme layout: - `home-hero-after` - `home-features-before` - `home-features-after` +- When `layout: 'page'` is enabled via frontmatter: + - `page-top` + - `page-bottom` - On not found (404) page: - `not-found` - Always: diff --git a/src/client/theme-default/Layout.vue b/src/client/theme-default/Layout.vue index ba3572c98185..2232e379e227 100644 --- a/src/client/theme-default/Layout.vue +++ b/src/client/theme-default/Layout.vue @@ -54,6 +54,9 @@ provide('hero-image-slot-exists', heroImageSlotExists) + + + @@ -65,6 +68,9 @@ provide('hero-image-slot-exists', heroImageSlotExists) + + + diff --git a/src/client/theme-default/components/VPContent.vue b/src/client/theme-default/components/VPContent.vue index bafb2321a48f..31c3d1cb377c 100644 --- a/src/client/theme-default/components/VPContent.vue +++ b/src/client/theme-default/components/VPContent.vue @@ -21,7 +21,10 @@ const { hasSidebar } = useSidebar() > - + + + + @@ -33,6 +36,9 @@ const { hasSidebar } = useSidebar() + + + diff --git a/src/client/theme-default/components/VPDoc.vue b/src/client/theme-default/components/VPDoc.vue index a352445b9906..7c9109d84806 100644 --- a/src/client/theme-default/components/VPDoc.vue +++ b/src/client/theme-default/components/VPDoc.vue @@ -19,6 +19,7 @@ const pageName = computed(() => class="VPDoc" :class="{ 'has-sidebar': hasSidebar, 'has-aside': hasAside }" > +
@@ -50,6 +51,7 @@ const pageName = computed(() =>
+ @@ -130,7 +132,7 @@ const pageName = computed(() => .aside-container { position: fixed; top: 0; - padding-top: calc(var(--vp-nav-height) + var(--vp-layout-top-height, 0px) + 32px); + padding-top: calc(var(--vp-nav-height) + var(--vp-layout-top-height, 0px) + var(--vp-doc-top-height, 0px) + 32px); width: 224px; height: 100vh; overflow-x: hidden; diff --git a/src/client/theme-default/components/VPPage.vue b/src/client/theme-default/components/VPPage.vue index 015926b7b586..8e735fd02a7e 100644 --- a/src/client/theme-default/components/VPPage.vue +++ b/src/client/theme-default/components/VPPage.vue @@ -1,5 +1,7 @@