Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Small improvements #7

Merged
merged 4 commits into from
Sep 18, 2024
Merged
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
2 changes: 1 addition & 1 deletion src/components/CarbonAds/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export default function CarbonAds({ code, placement }: Props) {
const s = document.createElement('script');
s.async = true;
s.id = '_carbonads_js';
s.src = `//cdn.carbonads.com/carbon.js?serve=${code}&placement=${placement}`;
s.src = `https://cdn.carbonads.com/carbon.js?serve=${code}&placement=${placement}`;
ref.current.appendChild(s);
}
}, []);
Expand Down
2 changes: 2 additions & 0 deletions src/components/sections/Hero/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ export default function Hero() {
className={styles.sectionTopImg}
src="/assets/img/sdk-man-small-pattern.svg"
alt="SDKMAN! logo"
width={250}
height={145}
/>

<h1 className={styles.sectionTopTitle}>
Expand Down
1 change: 1 addition & 0 deletions src/components/sections/Hero/styles.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@

&Img {
width: 250px;
height: auto;
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ export default function OCButton() {
alt="Donate"
width={240}
height={35}
loading="lazy"
/>
</Link>
);
Expand Down
4 changes: 3 additions & 1 deletion src/components/ui/AvatarImage/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ export default function AvatarImage({ className, src, alt }: Props) {
return <span className={clsx(styles.avatarImage, className)}>{name}</span>;
}

return <img className={className} src={src} alt={`${alt} avatar`} />;
return (
<img className={className} src={src} alt={`${alt} avatar`} loading="lazy" />
);
}

function generateAvatar(value: string) {
Expand Down
5 changes: 4 additions & 1 deletion src/pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@ import PageCarbonAds from '@site/src/components/sections/PageCarbonAds';

export default function WelcomePage() {
return (
<Layout title="Home">
<Layout
title="Home"
description="SDKMAN! is a tool for managing parallel versions of multiple Software Development Kits on most Unix based systems."
>
<PageCarbonAds />
<Hero />

Expand Down