Support community for TTG plugins and products.
NOTICE
The Turning Gate's Community has moved to a new home, at https://discourse.theturninggate.net.
This forum is now closed, and exists here as a read-only archive.
You are not logged in.
Pages: 1
I am aware that, at present, Backlight does not support directly text formatting of text in image captions.
But, is it possible using CSS?
Presently I use Lightrooms metadata panel (TITLE and CAPTION) to get information concerning images in a website I am developing. For testing purposes, I only have one image using this type of caption:
http://pideja.ca/duceppe_scenographies/ … single.php
As you can see, the formating is kinda dry. I'm looking to get bold text and, possibly change the typeface.
Can this be done?
Offline
yes, it's always been possible with custom css
see: http://ttg-tips-and-tricks.barbeephoto. … ight-site/
scroll down to the last tip on that page
Rod
Just a user with way too much time on his hands.
www.rodbarbee.com
ttg-tips.com, Backlight 2/3 test site
Offline
Thanks for reminding me, Rod.
Since Backlight only offers one CSS option or file, can I combine CSS instructions for different areas of the site in one CSS file? How to be sure that a specific instruction will apply to it's designated area. I created "contact.css" to have a particular design to the contact form. But, if I want to create CSS for the large image caption, can I add it to the "contact.css" file ?
Last edited by pideja (2017-02-15 06:27:45)
Offline
But, if I want to create CSS for the large image caption, can I add it to the "contact.css" file ?
Sure. I keep all my css in one file. That makes more sense than each page template needing it's own css file.
Rod
Just a user with way too much time on his hands.
www.rodbarbee.com
ttg-tips.com, Backlight 2/3 test site
Offline
Following up on the previous post, here is the content of the "contact.css" :
@media only screen and (min-width: 768px) {
.contact-form {
margin: 0 auto !important;
width: 50%;
}
.contact-form input {
max-width: 100% !important;
}
.single_image figcaption {
font-size: 1.00em;
font-family: 'Helvetica Neue', helvetica neue, 'sans serif';
src: url (pideja.ca/duceppe_scenographies/backlight/custom/css/HelveticaNeue.ttf);
text-align: center;
color: #000000;
}
Not too sure about how to implement the chosen typeface (Helvetica Neue), so I put the typeface file within the custom folder and indicated the path in the css file at the "src" line.
It doesn't work so I must be doing something wrong.
Offline
you should probably use the @font-face rule to bring in the font. That way it's available for any class or text element.
https://www.w3schools.com/cssref/css3_p … e_rule.asp
then add the font-family to classes, etc.
Your url is wrong too. Yours is a relative url. But it should be either
http://pideja.ca/duceppe_scenographies/backlight/custom/css/HelveticaNeue.ttf
or
/pideja.ca/duceppe_scenographies/backlight/custom/css/HelveticaNeue.ttf
Rod
Just a user with way too much time on his hands.
www.rodbarbee.com
ttg-tips.com, Backlight 2/3 test site
Offline
Thanks, Rod it works fine.
Now the other issue might be tricky: the text is about credits for the designers of each play illustrated by the photo. I would like the designer names to be in bold.
This text comes from Lightroom/library module/metadata/image caption just under "title".
Can the CSS modify the text style? Lightroom is no text editor but is there a way to modifythe text style within LR?
Offline
it will have to be done with css.
https://www.w3schools.com/cssref/pr_font_weight.asp
and if it needs to only be one line, you can use a child pseudo selector.
:first-child for the first line and :nth-child(2) for the second line.
Rod
Just a user with way too much time on his hands.
www.rodbarbee.com
ttg-tips.com, Backlight 2/3 test site
Offline
Thanks for the tip. Trying to figure out how to implement it.
In the meantime, since I built this site over an existing structure, I'm wondering if I have "junk" files/folders...what do you think?
Last edited by pideja (2017-02-15 22:02:23)
Offline
If you're not using any of your pre-Backlight site, then yes, get rid of the old stuff.
Is yous index.php file from Backlight or CE4?
This might help: http://ttg-tips-and-tricks.barbeephoto. … backlight/
On implementing custom CSS: http://backlight.theturninggate.net/doc … tylesheets
Rod
Just a user with way too much time on his hands.
www.rodbarbee.com
ttg-tips.com, Backlight 2/3 test site
Offline
I "cleaned out" the site of all unnecessary files and folders...
Site seems to display correctly.
Still trying to set styling of the title and caption of the large image. By the way, are the elements "SAISONS" , "2016-2017", "Les Héros" what is called breadcrumbs? I'm not too sure about how to style these with CSS? I guess in the same way as the image caption.
Offline
galleries.php is not part of Backlight and can be deleted.
By the way, are the elements "SAISONS" , "2016-2017", "Les Héros" what is called breadcrumbs? I'm not too sure about how to style these with CSS?
yes, those are breadcrumbs. If you need to style them outside the hyperlink settings in Backlight, the selectors are:
ul.breadcrumbs li a and .ul.breadcrumbs li a:hover for the links
and
.ul.breadcrumbs li for the text
more here: http://community.theturninggate.net/vie … 349#p44349
Rod
Just a user with way too much time on his hands.
www.rodbarbee.com
ttg-tips.com, Backlight 2/3 test site
Offline
I now can control somewhat the breadcrumbs look. As for the image captions, still can't modify the type using the child pseudo selector.
:first-child for the first item ("mise en scène", "décor", "costumes"... and :nth-child(2) for the second item (names of designers).
The file is now named "duceppe.css":
@media only screen and (min-width: 768px) {
.contact-form {
margin: 0 auto !important;
width: 50%;
}
.contact-form input {
max-width: 100% !important;
}
ul.breadcrumbs a {
color: #001DCA;
font-weight: bold;
font-size: 1.20em;
}
ul.breadcrumbs li a:hover {
color: red;
}
.single_image figcaption {
text-align: center;
font-size: 1.00em;
@font-face {
font-family: Helvetica Neue,'sans serif';
src: url (http://pideja.ca/duceppe_scenographies/backlight/custom/css/HelveticaNeue.ttf);
color: #000000;
:first-child {
font-weight: normal;
}
:nth-child(2) {
font-weight: bold;
}
It's probably a syntax error, but I can't see it for now.
Offline
I'm sorry, for some reason I thought you meant the thumbnail metadata.
You won't be able to use bold type in just part of the large image caption, it's all on one line and you can't add html to the Lightroom metadata. Nor can you do any text formatting in Lightroom.
So I don't see an easy way to do what you want for the large image caption. However, you may be able to use LUA coding to add "<strong>" before a variable and "</strong>" after that same variable. (The <strong> html tag makes text bold)
See: http://backlight.theturninggate.net/doc … ata_tokens
Someone else would have to guide you through that though; I don't have the time or inclination to go down that rabbit hole
As to the @font-face rule, that should be by itself. And put it at the top of your custom css stylesheet (make sure that there is no space between url and the parentheses).
https://www.w3schools.com/cssref/css3_p … e_rule.asp
@font-face {
font-family: 'Helvetica Neue';
src: url(http://pideja.ca/duceppe_scenographies/backlight/custom/css/HelveticaNeue.ttf);
}
Then later, insert the font-family in the specific selector:
.single_image figcaption {
font-family: 'Helvetica Neue', 'san serif';
font-size: 1em;
text-align: center;
color: #000000;
}
Rod
Just a user with way too much time on his hands.
www.rodbarbee.com
ttg-tips.com, Backlight 2/3 test site
Offline
Thanks again for having some time for me, Rod.
I'll try to figure it out or accept the result as it is.
Offline
As is my wont, I went down that rabbit hole anyway. I was able to use LUA coding to insert <strong> before my caption and </strong> after my caption.
The problem is that any html in that field won't work anyway, the actual text <strong>...</strong> shows up. I even tried swapping out < and > for < and >. No go.
So it looks like there is no way of formatting only part of the text. It's all or nothing.
But I learned a little about using LUA coding with the metadata tokes. So there's that
Rod
Just a user with way too much time on his hands.
www.rodbarbee.com
ttg-tips.com, Backlight 2/3 test site
Offline
Pages: 1