Skip to content
Open
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
14 changes: 8 additions & 6 deletions src/components/Banner/index.astro
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,14 @@ const { Content } = await entry.render();
const { link, title } = entry.data;
---

<div class="banner bg-accent-color text-accent-type-color" style={{ display: 'none' }} data-title={title}>
<a class="banner-content" href={link} target="_blank">
<Content />
</a>
<button id="hideBanner" aria-label="Hide banner"><Icon kind="close" /></button>
</div>
<header>
<div class="banner bg-accent-color text-accent-type-color" style={{ display: 'none' }} data-title={title}>
<a class="banner-content" href={link} target="_blank">
<Content />
</a>
<button id="hideBanner" aria-label="Hide banner"><Icon kind="close" /></button>
</div>
</header>

<script>
const banner = document.querySelector('.banner');
Expand Down
2 changes: 1 addition & 1 deletion src/components/CodeContainer/index.astro
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<code
class={`relative inline-block w-full bg-bg-gray-40 rounded-[1.25rem] p-sm my-md text-body-mono [&>pre]:text-wrap break-all code-box ${Astro.props.class}`}
class={`relative inline-block w-full rounded-[1.25rem] p-sm my-md text-body-mono [&>pre]:text-wrap break-all code-box ${Astro.props.class}`}
>
<slot />
</code>
12 changes: 11 additions & 1 deletion styles/global.scss
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,6 @@ section,
}

.astro-code,
.code-box,
.reference-item pre {
background-color: var(--bg-gray-40) !important;
padding: var(--spacing-sm);
Expand All @@ -279,6 +278,17 @@ section,
}
}

.code-box {
background-color: #fff !important;
padding: var(--spacing-sm);
max-width: 100%;
overflow-x: auto;
border-radius: 20px;
@media (max-width: $breakpoint-tablet) {
border-radius: 10px;
}
}

.reference-item pre code {
background-color: transparent;
}
Expand Down