Skip to content
Merged
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
15 changes: 8 additions & 7 deletions site/src/layouts/DocsLayout.astro
Original file line number Diff line number Diff line change
Expand Up @@ -78,12 +78,12 @@ if (frontmatter.toc) {
<div class="bd-subtitle">
{frontmatter.description && <Fragment set:html={processMarkdownToHtml(frontmatter.description)} />}
</div>
<Ads />
</div>

{
frontmatter.toc && headings && (
<div class="bd-toc mt-3 mb-5 my-lg-0 mb-lg-5 px-sm-1 text-body-secondary">

<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"
Expand All @@ -104,9 +104,10 @@ if (frontmatter.toc) {
<TableOfContents headings={headings} />
</nav>
</div>
</div>
)
}
)
}
<Ads />
</div>

<div class="bd-content ps-lg-2">
{
Expand Down
30 changes: 27 additions & 3 deletions site/src/scss/_ads.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,9 @@

#carbonads {
position: static;
display: block;
max-width: 400px;
padding: 15px 15px 15px 160px;
margin: 2rem 0;
margin: 1rem 0;
overflow: hidden;
@include font-size(.8125rem);
line-height: 1.4;
Expand All @@ -31,8 +30,33 @@
margin-left: -145px;
}

@container (max-width: 240px) {
#carbonads {
padding-left: 15px;
}

.carbon-img {
display: block;
float: none;
margin-left: 0;
}

.carbon-wrap {
display: flex;
flex-direction: column;
gap: .5rem;
}

.carbon-img > img {
width: 100%;
max-width: 100% !important;
height: auto;
@include border-radius(var(--bs-border-radius-sm));
}
}

.carbon-poweredby {
display: block;
margin-top: .75rem;
color: var(--bs-body-color) !important;
color: var(--bs-fg-3) !important;
}
2 changes: 2 additions & 0 deletions site/src/scss/_masthead.scss
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,9 @@
}

#carbonads { // stylelint-disable-line selector-max-id
max-width: 400px;
margin-inline: auto;
margin-block: 2rem;
}

@include media-breakpoint-up(md) {
Expand Down
3 changes: 3 additions & 0 deletions site/src/scss/_toc.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
// stylelint-disable selector-max-type, selector-no-qualifying-type

.bd-toc {
font-size: .875rem;
container-type: inline-size;

@include media-breakpoint-up(lg) {
position: sticky;
top: 5rem;
Expand Down
Loading