-
Notifications
You must be signed in to change notification settings - Fork 0
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
Opening images in a new window when clicked on #7
Comments
There are three options:
My recommendation would be the latter. The next question is, do you need it to be JS-disabled safe. The chances are, your site is already JS dependent. Using JS makes the HTML simpler but is only used to copy the selected post to the panel. |
JS dependent option is fine. How would you recommend incorporating the solution? Presently, the following markdown for adding images ![image-title](https://path.to/image.png){:class="github"} generates <img src="https://path.to/image.png" alt="image-title" class="github" /> Style is defined in a file - github-styles.css Example from this post |
What I am suggesting is having some JS at startup that instruments either all images or just those with a specific js- class (e.g. js-openable). Clicking on the selected images would have the following result.
I will have a go at preparing a Gist to demonstrate the idea. |
JSBin and Plnkr could not handle the embedded images, which are on the large side. So, I have created a samplers folder in my Netlify account an uploaded it here. |
In the example, a border can be added to the pop-up image using the following css. |
When a picture on a page is clicked on, have it to open in a new window.
The text was updated successfully, but these errors were encountered: