Skip to content

Commit 4e9dc37

Browse files
committed
[Docs Site] Adjust feedback prompt on pages with no ToC
1 parent 2c751e9 commit 4e9dc37

File tree

1 file changed

+19
-1
lines changed

1 file changed

+19
-1
lines changed

src/components/overrides/MarkdownContent.astro

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,29 @@ const { tableOfContents } = Astro.props.entry.data;
4343
<ImageZoom />
4444
<div class="sl-markdown-content">
4545
<slot />
46-
<div class="!mt-[1.5em] block min-[1152px]:hidden">
46+
<div class="feedback-prompt-content">
4747
<FeedbackPrompt />
4848
</div>
4949
</div>
5050
<style>
51+
html {
52+
.feedback-prompt-content {
53+
margin-top: 1.5em !important;
54+
55+
@media (min-width: 1152px) {
56+
& {
57+
display: none;
58+
}
59+
}
60+
}
61+
62+
&:not([data-has-toc]) {
63+
.feedback-prompt-content {
64+
display: block;
65+
}
66+
}
67+
}
68+
5169
/* Custom styles for heading anchor links. */
5270
.sl-markdown-content :global(.heading-wrapper) {
5371
--icon-size: 0.75em;

0 commit comments

Comments
 (0)