Skip to content

Commit

Permalink
Fixed images aspect ratio. (#8)
Browse files Browse the repository at this point in the history
  • Loading branch information
Kuinox committed Sep 28, 2023
1 parent 6bce25c commit 503ed09
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
6 changes: 4 additions & 2 deletions src/app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ export default function RootLayout({
src="generated/Logo-Short.svg"
className="top-bar-logo"
alt="logo"
fill={true}
height={50}
width={55}
/>
</Link>
<div className="links">
Expand All @@ -40,7 +41,8 @@ export default function RootLayout({
src="generated/github-logo.svg"
className="topbar-icon"
alt="GitHub Logo"
fill={true}
height={28}
width={28}
/>
</a>
</div>
Expand Down
9 changes: 5 additions & 4 deletions src/components/BackgroundLogo.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* eslint-disable @next/next/no-img-element */
import React from "react";
import "./BackgroundLogo.css";
import Image from "next/image";

export default function BackgroundLogo(
props: {
Expand All @@ -11,12 +11,13 @@ export default function BackgroundLogo(
const { logoUrl, sizeOverride, ...restProps } = props;
return (
<div {...restProps} className="background-logo-container">
<Image
<img
className="background-logo"
src={logoUrl}
alt="Background decoration."
height={sizeOverride ?? 0}
width={0}
style={{
height: sizeOverride,
}}
/>
</div>
);
Expand Down

0 comments on commit 503ed09

Please sign in to comment.