Skip to content

Comments

fix: adjust sponsors for mobile view#51

Open
azdanov wants to merge 6 commits intoCachyOS:developfrom
azdanov:mobile-sponsors
Open

fix: adjust sponsors for mobile view#51
azdanov wants to merge 6 commits intoCachyOS:developfrom
azdanov:mobile-sponsors

Conversation

@azdanov
Copy link
Member

@azdanov azdanov commented Feb 21, 2026

Fixes issue with logo overflowing the bounding box.

@azdanov
Copy link
Member Author

azdanov commented Feb 21, 2026

image image

@azdanov
Copy link
Member Author

azdanov commented Feb 21, 2026

I'm updating the logos also as part of this PR to use svg for crisp images

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request refactors the Sponsors component to fix logo overflow issues on mobile devices. The changes replace PNG sponsor logos with SVG versions and modernize the layout implementation using CSS Grid for better responsive behavior.

Changes:

  • Replaced PNG logo files with SVG versions for CDN77 and Cloudflare (Framework already had SVG)
  • Refactored component from repetitive HTML blocks to a data-driven array-based approach
  • Changed layout from flexbox to CSS Grid with responsive columns (1 col mobile, 2 col tablet, 3 col desktop)

Reviewed changes

Copilot reviewed 1 out of 5 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/components/widgets/Sponsors.astro Refactored to use data array and CSS Grid layout; replaced PNG imports with SVG; simplified image properties
src/assets/images/cf_logo.svg Added Cloudflare logo as SVG
src/assets/images/cdn77_logo.svg Added CDN77 logo as SVG
src/assets/images/CF_logo_stacked_whitetype.png Removed PNG version of Cloudflare logo
src/assets/images/CDN77_Horizontal_logo-negative.png Removed PNG version of CDN77 logo
Comments suppressed due to low confidence (1)

src/components/widgets/Sponsors.astro:35

  • Consider adding an explicit height attribute alongside width to prevent Cumulative Layout Shift (CLS) issues. While SVG images with viewBox attributes maintain aspect ratio when only width is specified, providing both dimensions helps the browser reserve the correct space before the image loads. Based on the viewBox values in the SVG files, appropriate heights would be: framework logo (~40px for 230px width), cdn77 logo (~67px), and Cloudflare logo (~76px).
                width={230}

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

loading="lazy"
decoding="async"
width={230}
layout="constrained"
Copy link

Copilot AI Feb 21, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The layout prop is not a valid property for the Image component from 'astro:assets' in Astro 5.x. This prop is only supported by the Picture component. Remove the layout="constrained" line. If you need to control the image sizing behavior, consider using the inferSize prop (which automatically infers dimensions from the source image) or explicitly provide both width and height attributes.

Suggested change
layout="constrained"
inferSize

Copilot uses AI. Check for mistakes.
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant