Skip to content

Commit 7f78669

Browse files
committed
Revert accidental changes
This reverts commit a8a846e.
1 parent 62309be commit 7f78669

File tree

4 files changed

+8
-28
lines changed

4 files changed

+8
-28
lines changed

src/components/Banner/index.astro

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

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>
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>
1614

1715
<script>
1816
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 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 bg-bg-gray-40 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>

src/layouts/ExampleLayout.astro

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -59,14 +59,6 @@ const remixHistoryHasCodeLinks = example.data.remix?.some(
5959
(item) => Array.isArray(item.code) && item.code.length > 0
6060
);
6161
62-
const { showBanner, englishUrl } = checkTranslationBanner(
63-
'examples',
64-
example.id,
65-
currentLocale,
66-
Astro.url.pathname,
67-
Astro.url.origin
68-
);
69-
7062
<Head
7163
title={example.data.title}
7264
locale={currentLocale}

styles/global.scss

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

263263
.astro-code,
264+
.code-box,
264265
.reference-item pre {
265266
background-color: var(--bg-gray-40) !important;
266267
padding: var(--spacing-sm);
@@ -278,17 +279,6 @@ section,
278279
}
279280
}
280281

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-
292282
.reference-item pre code {
293283
background-color: transparent;
294284
}

0 commit comments

Comments
 (0)