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

feat(theme): Added two slots for content #2139

Merged
merged 5 commits into from
Mar 27, 2023
Merged

feat(theme): Added two slots for content #2139

merged 5 commits into from
Mar 27, 2023

Conversation

JohnCampionJr
Copy link
Contributor

Allows for some extra theming abilities, such as a wide header for a page.

Hope you will consider this super simple PR. These two slots will allow for some extra customization across the theme regardless of the content type.

Allows for some extra theming abilities, such as a wide header for a page.
@JohnCampionJr JohnCampionJr changed the title Added two slots for content feat (theme): Added two slots for content Mar 25, 2023
@JohnCampionJr JohnCampionJr changed the title feat (theme): Added two slots for content feat(theme): Added two slots for content Mar 25, 2023
Moved the slots into the page and docs components
Copy link
Member

@brc-dd brc-dd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please update the docs too (docs/guide/extending-default-theme.md)

Allow pushing the aside down to make room for the content-before if needed
@brc-dd
Copy link
Member

brc-dd commented Mar 27, 2023

Code looks fine to me, but do you have any other suggestions for slot name? content-before/after seems like it's wrapping the content (<Content /> -- the markdown content).

Maybe container-before/after? (Sounds a bit vague though.)

@JohnCampionJr
Copy link
Contributor Author

JohnCampionJr commented Mar 27, 2023

Code looks fine to me, but do you have any other suggestions for slot name? content-before/after seems like it's wrapping the content (<Content /> -- the markdown content).

Maybe container-before/after? (Sounds a bit vague though.)

Good point on the naming; cotainer-top/bottom?

Could make two separate ones page-top/bottom and doc-top/bottom, would be a little more descriptive...

@brc-dd
Copy link
Member

brc-dd commented Mar 27, 2023

Could make two separate ones page-top/bottom and doc-top/bottom, would be a little more descriptive...

Yeah let's do that 👍

@@ -65,6 +68,9 @@ provide('hero-image-slot-exists', heroImageSlotExists)
<template #doc-footer-before><slot name="doc-footer-before" /></template>
<template #doc-before><slot name="doc-before" /></template>
<template #doc-after><slot name="doc-after" /></template>
<template #doc-top><slot name="doc-top" /></template>
<template #doc-bottom><slot name="doc-bottom" /></template>

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change

@brc-dd brc-dd merged commit 53d0099 into vuejs:main Mar 27, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 4, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants