contentdb icon indicating copy to clipboard operation
contentdb copied to clipboard

Open pictures on a separate layer

Open JuanjoSalvador opened this issue 4 years ago • 4 comments

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.

JuanjoSalvador avatar Mar 22 '20 01:03 JuanjoSalvador

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?

rubenwardy avatar Mar 22 '20 02:03 rubenwardy

That's exactly that I want to say :) I'm trying to add this now, with vanilla JS, no plugins and no deps.

JuanjoSalvador avatar Mar 22 '20 09:03 JuanjoSalvador

Steps:

  • Find library or write it yourself
  • Update public/static and templates/packages/view.html to use it

rubenwardy avatar Jul 19 '20 14:07 rubenwardy

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

JuanjoSalvador avatar Jul 22 '20 11:07 JuanjoSalvador