contentdb
contentdb copied to clipboard
Open pictures on a separate layer
Problem
Everytime I want to see or inspect a screenshot on the ContentDB, it redirects to the picture's static URL, forcing me to exit the main site.
Solutions
A great and simple solution would be opening the pictures on a new tab (adding the target="_blank"
attribute), but much better would be using an upper layer for pictures. Not complicated to implement.
You could just middle click or right click new tab? I don't like messing with browser links in this way!
My preferred solution to _blank would be implementing a JavaScript image modal gallery thing like you see in many websites. Is this what you meant by layer?
That's exactly that I want to say :) I'm trying to add this now, with vanilla JS, no plugins and no deps.
Steps:
- Find library or write it yourself
- Update public/static and templates/packages/view.html to use it
I forgot to update this, my apologies. I made this CodePen as example of what I have, and how it can be implemented.
https://codepen.io/JuanjoSalvador/pen/dyYyyov