Topic: Background on BLock Page
Is there a way to build a total background for a block page, or set background attributes like colour?
I have an image I'd like to have in the background.
User Forum, Bug Reports, Questions and Discussions on researchcatalogue.net
You are not logged in. Please login or register.
Research Catalogue Forum → Questions on Using the RC → Background on BLock Page
Is there a way to build a total background for a block page, or set background attributes like colour?
I have an image I'd like to have in the background.
Dear Flick,
Thanks for your question.
Yes, you can set the background color of a block page in "edit page" (pen icon) -> "style" -> "background"
There is no option for using an image as background in the block exposition.
Best!
A small addition:
If you really need a background image, there is a way to still have it, but you will have to use a little bit of CSS, since it is not available as a setting (yet).
You can find the box for CSS ("raw CSS") in the same dialog as page style settings. Here's an example background image CSS:
#container-weave, #container-editor {
background-image: url("https://images.unsplash.com/photo-1515387784663-e2e29a23f69e?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=987&q=80");
background-repeat: repeat;
}
The background image is using a link to an image somewhere on the internet, however you could even use a local data-uri (especially if the image is small, like a repeating texture), see info here:
https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/Data_URIs
If you want the background image to behave in another way, please find more info here:
https://developer.mozilla.org/en-US/docs/Web/CSS/background
Thanks for the suggestions, I will look into this CSS option.
HMMM ... I don't know enough about CSS to know how to replace your CSS with my own image. I tried replacing an image URL in there several ways but I don't know which parts of your code are from the images host requirements vs the RC requirements.
I also have to host the image elsewhere in this mode - I can't figure out how to have the image appear using an upload to RC itself.
Aha - I figured it out. Just had to trial and error.
I uploaded an image and embedded it on a page no one can see, then used that image location url as a link.
Hi Flick: I would not recommend re(using) RC image links (or any media links used in the RC for that matter). All RC media links have a timeout after which point they are gone (after exactly 24 hours*).
This is why I used the somewhat quirky solution with the image URI in my example. A URI cannot expire, since it is the data itself and you can put it directly in the raw CSS. There are online tools to help you create the data URI: for example https://ezgif.com/image-to-datauri.
Another alternative is to host the image somewhere, and use the external URL. The problem with that is that it is often very hard to say if a image hosting platform will still be around in a x years time.
* You can recognize the timeout on a link because of the extra parameters in the url: https://media.researchcatalogue.net/rc/cache/54/55/44/b4/545544b4fc9cc19a9c334f05e19de6a0.png?t=be334fce97e076546ef41e4ff64b7546&e=1649236800
The e=1649236800 is seconds since Jan 01 1970. (UTC), which in this case resolves to tomorrow (https://www.unixtimestamp.com/).
Research Catalogue Forum → Questions on Using the RC → Background on BLock Page
Powered by PunBB, supported by Informer Technologies, Inc.