Search…

X3 Photo Gallery Support Forums

Search…
 
User avatar
JMM
Experienced
Topic Author
Posts: 154
Joined: 02 Aug 2021, 11:18

Is there a way for us to custom-define text colors used for bg labels with non-panorama popups?

29 Dec 2022, 00:55

Hello again, Karl,

For panorama images, when the titles are clicked on in order to display details, when I use the following code:
Code
<span class="label bg2">© Google</span>
<span class="label bg2">16384*8192 px</span>
<span class="label bg2">8.76 MB</span>
<span class="label bg2">Oct 2021</span>
...the top portion of the overlay looks like this, with dark text on a grey background, which is great, as it is easily readable:
Image

However, when I use similar label bg2 with regular (non-panorama) images, the popups look like this, with white text on a grey-ish background (above the Exif information):
Image

I am completely happy with the overlays that pop up when the title is clicked for panorama images, thank you.  However, am I able to somehow, for the regular (non-panorama) images, have the popups display black (or at least darker) text in those grey label bg2 boxes?

I've figured out that the bg stands for background  :slight_smile:, and that bg and bg1 produce white text on green background similar to mark... bg2 produces white text on light-grey background... bg3 produces white text on slightly-darker-grey background... bg4 and higher look the same as bg1...

Question 1:  Is there a way that users like me can define the label background colors of unused bg labels for non-panorama images; and

Question 2:  Is there a way that we can define text color for labels used for non-panorama images, along the lines of something like:
Code
<span class="label bg3" something here to define the text color>text</span>
I realize that Custom CSS for labels that I define for non-panorama images would apply to panorama images too, if I place that Custom CSS in my sites' Settings, so I would be sure to use that Custom CSS just for the folders for which I wish them to apply.

Day by day, I am discovering how powerful X3 is, thank you.

Regards,
John
Location: Burlington (Toronto-ish), Ontario, Canada
Self-hosted using Abyss Web Server:   AuroraWings.me   |   GalleryWings.com   |   PanAurora-Studio.com   |
Externally-hosted using LiteSpeed/Apache Web Server:   GenealogyWings.com/galleries   |
 
User avatar
mjau-mjau
X3 Wizard
Posts: 13993
Joined: 30 Sep 2006, 03:37

Re: Is there a way for us to custom-define text colors used for bg labels with non-panorama popups?

29 Dec 2022, 05:27

Well, I think it would be pretty simply to define your own label colors. For example add this to Settings > Custom > Custom CSS:
Code
.mylabel1 {
  background-color: #990000;
  color: white; /* text color */
}
Then assign it like this:
Code
<span class="label mylabel1">Oct 2021</span>
Or even just include everything inline:
Code
<span class="label" style="background-color:#990000;color:white">Oct 2021</span>
"Labels" are pretty basic CSS, as it's really just background color, text color, padding and rounded corners. You could create your own in CSS.
 
User avatar
JMM
Experienced
Topic Author
Posts: 154
Joined: 02 Aug 2021, 11:18

Re: Is there a way for us to custom-define text colors used for bg labels with non-panorama popups?

30 Dec 2022, 15:56

I rather like your last suggestion:
<span class="label" style="background-color:#990000;color:white">Oct 2021</span>
I find that this way, my aging brain doesn't need to remember the added Custom CSS that I would've added  :relieved:.

Thanks for your suggestions.
Location: Burlington (Toronto-ish), Ontario, Canada
Self-hosted using Abyss Web Server:   AuroraWings.me   |   GalleryWings.com   |   PanAurora-Studio.com   |
Externally-hosted using LiteSpeed/Apache Web Server:   GenealogyWings.com/galleries   |