Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 10 additions & 8 deletions site/src/components/head/Head.astro
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,16 @@ const ScssProd = import.meta.env.PROD ? await import('@components/head/ScssProd.

<script is:inline src={getVersionedDocsPath('assets/js/color-modes.js')}></script>

{import.meta.env.PROD && ScssProd && (
<Stylesheet direction={direction} layout={layout} />
<ScssProd.default />
)}

{!import.meta.env.PROD && Scss && (
<Scss.default />
)}
{
import.meta.env.PROD && ScssProd && (
<>
<Stylesheet direction={direction} layout={layout} />
<ScssProd.default />
</>
)
}

{!import.meta.env.PROD && Scss && <Scss.default />}

<Favicons />
<Social description={description} layout={layout} thumbnail={thumbnail} title={title} />
Expand Down
26 changes: 11 additions & 15 deletions site/src/components/shortcodes/Code.astro
Original file line number Diff line number Diff line change
Expand Up @@ -137,21 +137,17 @@ if (filePath && fileMatch && codeToDisplay) {

<div class:list={[{ 'bd-code-snippet': !nestedInExample }, containerClass]}>
{
nestedInExample
? (<></>)
: Astro.slots.has('pre')
? (
<slot name="pre" />
)
: (
<div class="bd-clipboard">
<button type="button" class="btn-clipboard">
<svg class="bi" role="img" aria-label="Copy">
<use xlink:href="#clipboard" />
</svg>
</button>
</div>
)
nestedInExample ? null : Astro.slots.has('pre') ? (
<slot name="pre" />
) : (
<div class="bd-clipboard">
<button type="button" class="btn-clipboard">
<svg class="bi" role="img" aria-label="Copy">
<use xlink:href="#clipboard" />
</svg>
</button>
</div>
)
}
<div class="highlight">
{
Expand Down
45 changes: 24 additions & 21 deletions site/src/layouts/DocsLayout.astro
Original file line number Diff line number Diff line change
Expand Up @@ -80,30 +80,33 @@ if (frontmatter.toc) {
</div>
</div>


<div class="bd-toc mt-3 mb-5 my-lg-0 mb-lg-5 px-sm-1 text-body-secondary">
{
frontmatter.toc && headings && (
<button
class="btn btn-link p-md-0 mb-2 mb-md-0 text-decoration-none bd-toc-toggle d-md-none"
type="button"
data-bs-toggle="collapse"
data-bs-target="#tocContents"
aria-expanded="false"
aria-controls="tocContents"
>
On this page
<svg class="bi d-md-none ms-2" aria-hidden="true">
<use xlink:href="#chevron-expand" />
</svg>
</button>
<strong class="d-none d-md-block h6 my-2 ms-3" id="docs-tocs">On this page</strong>
<hr class="d-none d-md-block my-2 ms-3" />
<div class="collapse bd-toc-collapse" id="tocContents">
<nav id="TableOfContents" aria-labelledby="docs-tocs">
<TableOfContents headings={headings} />
</nav>
</div>
<>
<button
class="btn btn-link p-md-0 mb-2 mb-md-0 text-decoration-none bd-toc-toggle d-md-none"
type="button"
data-bs-toggle="collapse"
data-bs-target="#tocContents"
aria-expanded="false"
aria-controls="tocContents"
>
On this page
<svg class="bi d-md-none ms-2" aria-hidden="true">
<use xlink:href="#chevron-expand" />
</svg>
</button>
<strong class="d-none d-md-block h6 my-2 ms-3" id="docs-tocs">
On this page
</strong>
<hr class="d-none d-md-block my-2 ms-3" />
<div class="collapse bd-toc-collapse" id="tocContents">
<nav id="TableOfContents" aria-labelledby="docs-tocs">
<TableOfContents headings={headings} />
</nav>
</div>
</>
)
}
<Ads />
Expand Down
Loading