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

Fix loading images messing up anchors on the supported robot page #2018

Closed
wants to merge 1 commit into from

Conversation

CSNWEB
Copy link

@CSNWEB CSNWEB commented Feb 28, 2024

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • Docs
  • Refactor/Code Cleanup

Description

As discussed on Telegram I tried to fix the issue of anchors pointing to the wrong place on the supported robots page. I am relatively confident, that this fixes the issue, since in different browsers (Safari, Chrome, Firefox) and on throttled internet speeds it prevents the text from reflowing when the images are loaded. However reproducing the original bug of jumping to the wrong place proved to be difficult. I could somewhat consistently trigger it using an simulated iOS device after erasing all caches on it. I tried it several times with these changes and the issue did not occur, so I would say I am 90% certain that it works.

I did not want to globally overwrite the image styling, so I added a class to all images on the page. The width must be explicitly specified or it doesn't work, thus I set it to 100%. The aspect ratio of the images does not seem to be exactly 4 in all cases, but it seems like its close enough, otherwise it would need to be set for every image individually.

@Hypfer
Copy link
Owner

Hypfer commented May 24, 2024

Sorry for leaving this PR in limbo for this long.

I just tried the following

/docs/_pages/general/img/robots$ find -iname *.jpg -exec convert {} -gravity center -crop 4:1 +repage {} \;

with the result unfortunately being not ideal
image

However, I also saw that WebStorm can do this
image

so I think that would be the way to go.
Thanks though for looking into it! Much appreciated

@Hypfer Hypfer closed this May 24, 2024
@CSNWEB
Copy link
Author

CSNWEB commented May 24, 2024

Ha I almost forgot this was here. No problem, thanks for fixing this!

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.

2 participants