Skip to content

Commit

Permalink
feat: add srcset to landing page png
Browse files Browse the repository at this point in the history
  • Loading branch information
PierreMarcurat committed Dec 18, 2023
1 parent c4eafc5 commit 819e890
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/views/root/_footer.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
.fr-footer__body
.fr-footer__brand.fr-enlarge-link
= link_to t("links.provider.url"), title: t("links.provider.title") do
= image_tag t("links.provider.logo.src"), alt: t("links.provider.logo.alt"), width: t("links.provider.logo.width"), height: t("links.provider.logo.height"), loading: 'lazy'
= image_tag t("links.provider.logo.src"), srcset: { t("links.provider.logo.srcset")[0] => "1x", t("links.provider.logo.srcset")[1] => "2x", t("links.provider.logo.srcset")[2] => "3x", t("links.provider.logo.srcset")[3] => "4x" }, alt: t("links.provider.logo.alt"), width: t("links.provider.logo.width"), height: t("links.provider.logo.height"), loading: 'lazy'
= link_to t("links.footer.dinum.url"), title: t("links.footer.dinum.title"), class: "fr-footer__brand-link" do
= image_tag("footer/logo-dinum.svg", class: "fr-footer__logo logo-beta-gouv-fr", alt: t("links.footer.dinum.alt"))
.fr-footer__content
Expand Down
7 changes: 6 additions & 1 deletion config/custom_locales/links.fr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,12 @@ fr:
links:
provider:
logo:
src: "footer/logo-dmra-horisontal.png"
src: "footer/logo-dmra-horisontal-1-1x.webp"
srcset:
- "footer/logo-dmra-horisontal-1-1x.webp"
- "footer/logo-dmra-horisontal-1-2x.webp"
- "footer/logo-dmra-horisontal-1-3x.webp"
- "footer/logo-dmra-horisontal-1-4x.webp"
alt: "Logo DMRA"
height: 90
width: 240
Expand Down

0 comments on commit 819e890

Please sign in to comment.