Skip to content

Commit 074792a

Browse files
committed
only hide GitHub icon in Header on mobile, show Discord icon in Footer on all screens
1 parent 7f7167b commit 074792a

File tree

3 files changed

+14
-10
lines changed

3 files changed

+14
-10
lines changed

www/components/Footer.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ export default function Footer(props: JSX.HTMLAttributes<HTMLElement>) {
2626
<span>© {new Date().getFullYear()} the Fresh authors</span>
2727
</div>
2828

29-
<div class="sm:hidden">
29+
<div class="text-foreground-secondary [&_li]:hover:text-green-600 hover:text-green-600 [&_ul]:space-x-5 [&_.github]:hidden">
3030
<SocialIcons />
3131
</div>
3232

www/components/Header.tsx

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ export default function Header(props: { title: string; active: string }) {
1010
return (
1111
<header
1212
class={[
13-
"mx-auto flex gap-3 items-center",
13+
"mx-auto flex gap-1 sm:gap-3 items-center",
1414
isHome ? "justify-end h-20 max-w-screen-xl" : "justify-between",
1515
isDocs
1616
? "h-20 max-w-screen-2xl w-full sticky top-0 bg-background-primary/75 z-50 backdrop-blur-sm"
@@ -20,13 +20,13 @@ export default function Header(props: { title: string; active: string }) {
2020
f-client-nav={false}
2121
>
2222
{!isHome && (
23-
<div class="p-4 flex items-center">
23+
<div class="p-2 md:p-4 flex items-center">
2424
<Logo />
2525
</div>
2626
)}
2727
<div class="flex justify-end">
2828
<NavigationBar class="" active={props.active} />
29-
<div class="hidden sm:flex">
29+
<div class="flex [&_.github]:hidden [&_.github]:sm:flex [&_ul]:space-x-2 [&_ul]:sm:space-x-4 [&_li:hover]:text-green-600">
3030
<SocialIcons />
3131
</div>
3232
<div class="flex px-3 sm:px-6 fill-foreground-primary hover:fill-fresh [&_*]:transition ">
@@ -39,7 +39,11 @@ export default function Header(props: { title: string; active: string }) {
3939

4040
export function Logo() {
4141
return (
42-
<a href="/" class="flex mr-3 items-center shrink-0" aria-label="Top Page">
42+
<a
43+
href="/"
44+
class="flex sm:mr-3 items-center shrink-0"
45+
aria-label="Top Page"
46+
>
4347
<img
4448
src="/logo.svg"
4549
alt="Fresh logo"

www/components/SocialIcons.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,20 @@ import * as Icons from "./Icons.tsx";
22

33
export default function SocialIcons() {
44
return (
5-
<ul class="flex items-center align-center space-x-5 md:mx-8">
6-
<li class="flex">
5+
<ul class="flex items-center align-center">
6+
<li class="flex github">
77
<a
88
href="https://github.com/denoland/fresh"
9-
class="hover:text-green-600 inline-block transition"
9+
class="inline-block transition"
1010
aria-label="GitHub"
1111
>
1212
<Icons.GitHub />
1313
</a>
1414
</li>
15-
<li class="flex">
15+
<li class="flex discord">
1616
<a
1717
href="https://discord.com/invite/deno"
18-
class="hover:text-green-600 inline-block transition"
18+
class="inline-block transition"
1919
aria-label="Discord"
2020
>
2121
<Icons.Discord />

0 commit comments

Comments
 (0)