Skip to content

Commit a8a846e

Browse files
committed
check
1 parent 874d129 commit a8a846e

File tree

3 files changed

+20
-8
lines changed

3 files changed

+20
-8
lines changed

src/components/Banner/index.astro

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,14 @@ const { Content } = await entry.render();
55
const { link, title } = entry.data;
66
---
77

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

1517
<script>
1618
const banner = document.querySelector('.banner');
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<code
2-
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}`}
2+
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}`}
33
>
44
<slot />
55
</code>

styles/global.scss

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,6 @@ section,
261261
}
262262

263263
.astro-code,
264-
.code-box,
265264
.reference-item pre {
266265
background-color: var(--bg-gray-40) !important;
267266
padding: var(--spacing-sm);
@@ -279,6 +278,17 @@ section,
279278
}
280279
}
281280

281+
.code-box {
282+
background-color: #fff !important;
283+
padding: var(--spacing-sm);
284+
max-width: 100%;
285+
overflow-x: auto;
286+
border-radius: 20px;
287+
@media (max-width: $breakpoint-tablet) {
288+
border-radius: 10px;
289+
}
290+
}
291+
282292
.reference-item pre code {
283293
background-color: transparent;
284294
}

0 commit comments

Comments
 (0)