Skip to content

Commit 9d5d9ce

Browse files
committed
fix: misc fixes
- make images inside not-content elements not affected by markup styling - show project dropdown only on project pages
1 parent 6a7a698 commit 9d5d9ce

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

src/components/overrides/PageFrame.astro

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,11 @@ const { hasSidebar } = Astro.locals.starlightRoute;
1212
<nav class="sidebar print:hidden" aria-label={Astro.locals.t("sidebarNav.accessibleLabel")}>
1313
<MobileMenuToggle />
1414
<div id="starlight__sidebar" class="sidebar-pane">
15-
<div class="dropdown-wrapper">
16-
<TopicsDropdown />
17-
</div>
15+
{Astro.locals.starlightSidebarTopics.isPageWithTopic && (
16+
<div class="dropdown-wrapper">
17+
<TopicsDropdown />
18+
</div>
19+
)}
1820
<div class="sidebar-content sl-flex">
1921
<slot name="sidebar" />
2022
</div>

src/styles/custom.css

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@
1818
}
1919

2020
/* make images in markup wide and centered */
21-
.sl-markdown-content img {
21+
.sl-markdown-content img:not(:where(.not-content *)) {
2222
margin: 0 auto;
2323
}
24-
.sl-markdown-content img:not([alt="Diagram"]) {
24+
.sl-markdown-content img:not(:where(.not-content *)):not([alt="Diagram"]) {
2525
width: 100%;
2626
}
2727
.sl-markdown-content .img-inline img {

0 commit comments

Comments
 (0)