Skip to content

Commit

Permalink
refactor: add alternate sources for home page banner image
Browse files Browse the repository at this point in the history
  • Loading branch information
SebastianKohler committed Feb 16, 2024
1 parent fac9033 commit 20c4f8f
Show file tree
Hide file tree
Showing 12 changed files with 15 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/), and this
### Added

- Sitemap path to robots.txt.
- Alternate image sources for the home page banner image.



Expand Down
17 changes: 14 additions & 3 deletions src/assets/config/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -164,11 +164,22 @@ export const config: Config = {
fi: "Zacharias Topeliuksen muotokuva"
},
intrinsicSize: {
height: null,
width: null
height: 1408,
width: 1056
},
orientationPortrait: true,
alternateSources: [],
alternateSources: [
{
srcset: "assets/images/home-page-banner-portrait_396w.avif 396w, assets/images/home-page-banner-portrait_528w.avif 528w, assets/images/home-page-banner-portrait_704w.avif 704w, assets/images/home-page-banner-portrait_900w.avif 900w, assets/images/home-page-banner-portrait.avif 1056w",
sizes: "(max-width: 900px) 100vw, 27.5vw",
type: "image/avif"
},
{
srcset: "assets/images/home-page-banner-portrait_396w.jpg 396w, assets/images/home-page-banner-portrait_528w.jpg 528w, assets/images/home-page-banner-portrait_704w.jpg 704w, assets/images/home-page-banner-portrait_900w.jpg 900w, assets/images/home-page-banner-portrait.jpg 1056w",
sizes: "(max-width: 900px) 100vw, 27.5vw",
type: "image/jpeg"
}
],
URL: "assets/images/home-page-banner-portrait.jpg"
},
portraitOrientationSettings: {
Expand Down
Binary file not shown.
Binary file modified src/assets/images/home-page-banner-portrait.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 20c4f8f

Please sign in to comment.