Skip to content

Commit 09593e7

Browse files
committed
refactor: Touch up lang fallback message & style
1 parent 5b602a8 commit 09593e7

2 files changed

Lines changed: 18 additions & 13 deletions

File tree

src/components/edit-button/index.js

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -11,20 +11,23 @@ export default function EditThisPage({ isFallback }) {
1111
const editUrl = `https://github.com/preactjs/preact-www/tree/master/content/${lang}${path}`;
1212
return (
1313
<div class={style.wrapper}>
14-
<a
15-
class={style.edit}
16-
href={editUrl}
17-
target="_blank"
18-
rel="noopener noreferrer"
19-
>
20-
{!isFallback ? 'Edit this Page' : 'Add translation'}
21-
</a>
22-
23-
{isFallback && (
14+
{!isFallback ? (
15+
<a
16+
class={style.edit}
17+
href={editUrl}
18+
target="_blank"
19+
rel="noopener noreferrer"
20+
>
21+
Edit this Page
22+
</a>
23+
) : (
2424
<div class={style.fallback}>
2525
<div class={style.fallbackInner}>
2626
Could not find a translation for this page. You can help us out by{' '}
27-
<a href={editUrl}>adding one here</a>.
27+
<a href={editUrl} target="_blank" rel="noopener noreferrer">
28+
adding one here
29+
</a>
30+
.
2831
</div>
2932
</div>
3033
)}

src/components/edit-button/style.module.css

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
}
3939

4040
.fallback {
41-
padding-top: 4rem;
41+
padding-top: 2rem;
4242
}
4343

4444
.fallbackInner {
@@ -47,7 +47,9 @@
4747
color: #444;
4848

4949
a {
50-
color: var(--color-link);
50+
font-weight: bold;
51+
color: var(--color-brand);
52+
5153
text-decoration-skip-ink: auto;
5254
text-decoration: underline;
5355
text-decoration-color: var(--color-table-border);

0 commit comments

Comments
 (0)