Question on OPACUserCSS
Hello, we are struggling with a background image for the OPAC pages. The description of the parameter OPACUserCSS says " Include the following CSS on all pages in the OPAC". However, the style declaration body { background-image: url(path/to/our/image.jpg); background-repeat: no-repeat; background-size: cover } only results in the image being displayed on the OPAC start page, not on all the others. What's more, clicking on the "Start" link to return to the start page also shows the page without the background image. So, obviously, it makes a difference if the start page is reached via https://our.opac.url or https://our.opac.url/cgi-bin/koha/opac-main.pl (of course, these are only symbolic URLs that won't lead anywhere) How can we make the body style declaration visible on all OPAC pages? Thanks! Regards, Anke -- Anke Bruns M.A. (LIS) Arbeitsgruppe "Anwendungs- und Informationssysteme" E-Mail: anke.bruns@gwdg.de --------------------------------------- Gesellschaft für wissenschaftliche Datenverarbeitung mbH Göttingen (GWDG) Burckhardtweg 4, 37077 Göttingen, URL: https://gwdg.de Support: Tel.: +49 551 39-30000, URL: https://gwdg.de/support Sekretariat: Tel.: +49 551 39-30001, E-Mail: gwdg@gwdg.de Geschäftsführer: Prof. Dr. Ramin Yahyapour Aufsichtsratsvorsitzender: Prof. Dr. Norbert Lossau Sitz der Gesellschaft: Göttingen Registergericht: Göttingen, Handelsregister-Nr. B 598 --------------------------------------- Zertifiziert nach ISO 9001 ---------------------------------------
Hi Bruns, The CSS you added should work on all OPAC pages and does for me. I am testing with the following: body { background-image: url( https://github.com/bywatersolutions/web-assets/blob/master/sites/Koha-logo.p... ); background-repeat: no-repeat; background-size: cover; } What Koha version are you using? Have you made sure there is no subsequent CSS, either in OPACUserCSS or coming from elsewhere, that could be overriding this? On Thu, Oct 27, 2022 at 8:26 AM Bruns, Anke <Anke.Bruns@gwdg.de> wrote:
Hello,
we are struggling with a background image for the OPAC pages.
The description of the parameter OPACUserCSS says " Include the following CSS on all pages in the OPAC". However, the style declaration
body { background-image: url(path/to/our/image.jpg); background-repeat: no-repeat; background-size: cover }
only results in the image being displayed on the OPAC start page, not on all the others. What's more, clicking on the "Start" link to return to the start page also shows the page without the background image.
So, obviously, it makes a difference if the start page is reached via
https://our.opac.url or https://our.opac.url/cgi-bin/koha/opac-main.pl (of course, these are only symbolic URLs that won't lead anywhere)
How can we make the body style declaration visible on all OPAC pages?
Thanks!
Regards, Anke
-- Anke Bruns M.A. (LIS) Arbeitsgruppe "Anwendungs- und Informationssysteme" E-Mail: anke.bruns@gwdg.de --------------------------------------- Gesellschaft für wissenschaftliche Datenverarbeitung mbH Göttingen (GWDG) Burckhardtweg 4, 37077 Göttingen, URL: https://gwdg.de
Support: Tel.: +49 551 39-30000, URL: https://gwdg.de/support Sekretariat: Tel.: +49 551 39-30001, E-Mail: gwdg@gwdg.de
Geschäftsführer: Prof. Dr. Ramin Yahyapour Aufsichtsratsvorsitzender: Prof. Dr. Norbert Lossau Sitz der Gesellschaft: Göttingen Registergericht: Göttingen, Handelsregister-Nr. B 598 --------------------------------------- Zertifiziert nach ISO 9001 ---------------------------------------
_______________________________________________
Koha mailing list http://koha-community.org Koha@lists.katipo.co.nz Unsubscribe: https://lists.katipo.co.nz/mailman/listinfo/koha
-- Lucas Gass Web Developer
Hi Lucas, thanks for the quick answer! We are on Koha 22.05, and as far as I'm aware there is no subsequent css, at least none defined by us in OPACUserCSS (or elsewhere). Regards, Anke
-----Ursprüngliche Nachricht----- Von: Lucas Gass <lucas@bywatersolutions.com> Gesendet: Donnerstag, 27. Oktober 2022 16:45 An: Bruns, Anke <Anke.Bruns@gwdg.de> Cc: Koha <koha@lists.katipo.co.nz> Betreff: Re: [Koha] Question on OPACUserCSS
Hi Bruns,
The CSS you added should work on all OPAC pages and does for me. I am testing with the following:
body { background-image: url(https://github.com/bywatersolutions/web- assets/blob/master/sites/Koha-logo.png?raw=true); background-repeat: no-repeat; background-size: cover; }
What Koha version are you using?
Have you made sure there is no subsequent CSS, either in OPACUserCSS or coming from elsewhere, that could be overriding this?
On Thu, Oct 27, 2022 at 8:26 AM Bruns, Anke <Anke.Bruns@gwdg.de <mailto:Anke.Bruns@gwdg.de> > wrote:
Hello,
we are struggling with a background image for the OPAC pages.
The description of the parameter OPACUserCSS says " Include the following CSS on all pages in the OPAC". However, the style declaration
body { background-image: url(path/to/our/image.jpg); background-repeat: no-repeat; background-size: cover }
only results in the image being displayed on the OPAC start page, not on all the others. What's more, clicking on the "Start" link to return to the start page also shows the page without the background image.
So, obviously, it makes a difference if the start page is reached via
https://our.opac.url or https://our.opac.url/cgi-bin/koha/opac-main.pl (of course, these are only symbolic URLs that won't lead anywhere)
How can we make the body style declaration visible on all OPAC pages?
Thanks!
Regards, Anke
-- Anke Bruns M.A. (LIS) Arbeitsgruppe "Anwendungs- und Informationssysteme" E-Mail: anke.bruns@gwdg.de <mailto:anke.bruns@gwdg.de> --------------------------------------- Gesellschaft für wissenschaftliche Datenverarbeitung mbH Göttingen (GWDG) Burckhardtweg 4, 37077 Göttingen, URL: https://gwdg.de
Support: Tel.: +49 551 39-30000, URL: https://gwdg.de/support Sekretariat: Tel.: +49 551 39-30001, E-Mail: gwdg@gwdg.de <mailto:gwdg@gwdg.de>
Geschäftsführer: Prof. Dr. Ramin Yahyapour Aufsichtsratsvorsitzender: Prof. Dr. Norbert Lossau Sitz der Gesellschaft: Göttingen Registergericht: Göttingen, Handelsregister-Nr. B 598 --------------------------------------- Zertifiziert nach ISO 9001 ---------------------------------------
_______________________________________________
Koha mailing list http://koha-community.org Koha@lists.katipo.co.nz <mailto:Koha@lists.katipo.co.nz> Unsubscribe: https://lists.katipo.co.nz/mailman/listinfo/koha
--
Lucas Gass Web Developer <https://ci3.googleusercontent.com/mail- sig/AIorK4wLTGMfXvr_9IEGIssemQRuiAxgVIEXZ- npLP_qbxtDNVEu2vvp8TxQeS9Q9pUbuORo-u5iQ_w>
There are many elements with their own backgrounds that are obscuring the <body> background. Try setting them to transparent to let the <body> background show through. Something like this. body { background-image: url( https://github.com/bywatersolutions/web-assets/blob/master/sites/Koha-logo.p... ); background-repeat: no-repeat; background-size: cover; } body * { background-color: rgba(0,0,0,0) !important; } On 10/27/2022 10:53 AM, Bruns, Anke wrote:
Hi Lucas,
thanks for the quick answer!
We are on Koha 22.05, and as far as I'm aware there is no subsequent css, at least none defined by us in OPACUserCSS (or elsewhere).
Regards, Anke
-----Ursprüngliche Nachricht----- Von: Lucas Gass <lucas@bywatersolutions.com> Gesendet: Donnerstag, 27. Oktober 2022 16:45 An: Bruns, Anke <Anke.Bruns@gwdg.de> Cc: Koha <koha@lists.katipo.co.nz> Betreff: Re: [Koha] Question on OPACUserCSS
Hi Bruns,
The CSS you added should work on all OPAC pages and does for me. I am testing with the following:
body { background-image: url(https://github.com/bywatersolutions/web- assets/blob/master/sites/Koha-logo.png?raw=true); background-repeat: no-repeat; background-size: cover; }
What Koha version are you using?
Have you made sure there is no subsequent CSS, either in OPACUserCSS or coming from elsewhere, that could be overriding this?
On Thu, Oct 27, 2022 at 8:26 AM Bruns, Anke <Anke.Bruns@gwdg.de <mailto:Anke.Bruns@gwdg.de> > wrote:
Hello,
we are struggling with a background image for the OPAC pages.
The description of the parameter OPACUserCSS says " Include the following CSS on all pages in the OPAC". However, the style declaration
body { background-image: url(path/to/our/image.jpg); background-repeat: no-repeat; background-size: cover }
only results in the image being displayed on the OPAC start page, not on all the others. What's more, clicking on the "Start" link to return to the start page also shows the page without the background image.
So, obviously, it makes a difference if the start page is reached via
https://our.opac.url or https://our.opac.url/cgi-bin/koha/opac-main.pl (of course, these are only symbolic URLs that won't lead anywhere)
How can we make the body style declaration visible on all OPAC pages?
Thanks!
Regards, Anke
-- Anke Bruns M.A. (LIS) Arbeitsgruppe "Anwendungs- und Informationssysteme" E-Mail: anke.bruns@gwdg.de <mailto:anke.bruns@gwdg.de> --------------------------------------- Gesellschaft für wissenschaftliche Datenverarbeitung mbH Göttingen (GWDG) Burckhardtweg 4, 37077 Göttingen, URL: https://gwdg.de
Support: Tel.: +49 551 39-30000, URL: https://gwdg.de/support Sekretariat: Tel.: +49 551 39-30001, E-Mail: gwdg@gwdg.de <mailto:gwdg@gwdg.de>
Geschäftsführer: Prof. Dr. Ramin Yahyapour Aufsichtsratsvorsitzender: Prof. Dr. Norbert Lossau Sitz der Gesellschaft: Göttingen Registergericht: Göttingen, Handelsregister-Nr. B 598 --------------------------------------- Zertifiziert nach ISO 9001 ---------------------------------------
_______________________________________________
Koha mailing list http://koha-community.org Koha@lists.katipo.co.nz <mailto:Koha@lists.katipo.co.nz> Unsubscribe: https://lists.katipo.co.nz/mailman/listinfo/koha
--
Lucas Gass Web Developer <https://ci3.googleusercontent.com/mail- sig/AIorK4wLTGMfXvr_9IEGIssemQRuiAxgVIEXZ- npLP_qbxtDNVEu2vvp8TxQeS9Q9pUbuORo-u5iQ_w>
_______________________________________________
Koha mailing list http://koha-community.org Koha@lists.katipo.co.nz Unsubscribe: https://lists.katipo.co.nz/mailman/listinfo/koha
-- Andy Boze, Associate Librarian University of Notre Dame 271H Hesburgh Library (574) 631-8708
Hi! On Thu, Oct 27, 2022 at 02:25:48PM +0000, Bruns, Anke wrote:
we are struggling with a background image for the OPAC pages.
The description of the parameter OPACUserCSS says " Include the following CSS on all pages in the OPAC". However, the style declaration
body { background-image: url(path/to/our/image.jpg);
seems like you're using a relative path to the image
So, obviously, it makes a difference if the start page is reached via
https://our.opac.url or https://our.opac.url/cgi-bin/koha/opac-main.pl
and here you are using different base paths, so maybe the image is just not found in one case or the other? Have you checked the Network Tools in your Browser? There you should see if the background image cannot be loaded (404) Greetings, domm -- #!/usr/bin/perl https://domm.plix.at for(ref bless{},just'another'perl'hacker){s-:+-$"-g&&print$_.$/}
Hi and thanks, Lucas, Andy and Thomas (Lucas, Bruns is my last name btw. 😉 ), Now I tried: - using a URL instead of the relative path from /usr/share/koha/opac/htdocs (Thomas) - Adding the body * element recommended by Andy. And different combinations of both. Result stays the same. Lucas, I'll send you the URL off-list. Kind regards, Anke
-----Ursprüngliche Nachricht----- Von: Koha <koha-bounces@lists.katipo.co.nz> Im Auftrag von Thomas Klausner Gesendet: Freitag, 28. Oktober 2022 00:47 An: koha@lists.katipo.co.nz Betreff: Re: [Koha] Question on OPACUserCSS
Hi!
On Thu, Oct 27, 2022 at 02:25:48PM +0000, Bruns, Anke wrote:
we are struggling with a background image for the OPAC pages.
The description of the parameter OPACUserCSS says " Include the following CSS on all pages in the OPAC". However, the style declaration
body { background-image: url(path/to/our/image.jpg);
seems like you're using a relative path to the image
So, obviously, it makes a difference if the start page is reached via
https://our.opac.url or https://our.opac.url/cgi-bin/koha/opac-main.pl
and here you are using different base paths, so maybe the image is just not found in one case or the other? Have you checked the Network Tools in your Browser? There you should see if the background image cannot be loaded (404)
Greetings, domm
-- #!/usr/bin/perl https://domm.plix.at for(ref bless{},just'another'perl'hacker){s-:+-$"-g&&print$_.$/} _______________________________________________
Koha mailing list http://koha-community.org Koha@lists.katipo.co.nz Unsubscribe: https://lists.katipo.co.nz/mailman/listinfo/koha
participants (4)
-
Andy Boze -
Bruns, Anke -
Lucas Gass -
Thomas Klausner