-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Add an 'X' button to the rescaled image link for easier navigation #12812
Comments
Can you edit the question to include a minimal reproducible example? It seems I have lots of images in my project but none of them are by themselves clickable, so I want to know exactly how you include such an image. |
Hello @electric-coder, |
@lSabrinel I understand the problem you describe now. I haven't searched previous Sphinx issues for a solution, nor SO's |
Have you tried https://sphinxcontrib-images.readthedocs.io/en/latest/? |
Hello @electric-coder indeed there is a solution, and the key is to use the sphinxcontrib-images extension and the Thumbnail directive. |
Observation:
A rescaled image in a Sphinx project links to the full-size image, which is useful, but returning to the previous page is a bit inconvenient.
Improvement:
I suggest adding a small 'X' button to close the image and return to the page.
Workaround:
For now, I am working on overriding the CSS to create the button.
Behavior:
I apologize that I can't show you the real project I am working on, but this is a sample project.
The image behavior is the same.
When you click on the image, it directs you to the link shown below.
2024-08-23-10-35-20.mp4
Code:
.. image:: ../../source/_static/images/car1.jpg :scale: 80%
The text was updated successfully, but these errors were encountered: