Page 1 of 1

Background image on all page AppGini 5.81

Posted: 2019-10-31 20:35
by Moh Youba
Hello

Is is a way to add background image on all page?

Thank you.

Re: Background image on all page AppGini 5.81

Posted: 2019-11-08 16:26
by onoehring
Hi,

define some CSS that does that:
Like this:

Code: Select all

<style>
	body {
	background: url("yourimage.jpg") no-repeat fixed center center / cover;
	}
</style>
(works also from your hooks/footer-extras.php file)

Olaf

Re: Background image on all page AppGini 5.81

Posted: 2019-11-08 19:19
by Moh Youba
Hi Olaf

Thank you for sharing.

Best regards

Re: Background image on all page AppGini 5.81

Posted: 2020-02-20 08:32
by dannybridi
Hi Olaf,

I added the following to footer-extras.php file:

Code: Select all

<?php
$script_name = basename($_SERVER['PHP_SELF']);
if($script_name == 'index.php' && isset($_GET['signIn'])){
	?>
	<style>
		body{
			background: url("hooks/logo.jpg") no-repeat fixed center center;
			background-size: 60%
		}
	</style>
	<?php
}
?>
As a result, I see the background image only on the login page. What should I do to see the image on all pages?

Thanks

Re: Background image on all page AppGini 5.81

Posted: 2020-02-20 09:58
by onoehring
Hi,

just add only the CSS - not "full" php script:

Code: Select all

<style>
		body{
			background: url("hooks/logo.jpg") no-repeat fixed center center;
			background-size: 60%
		}
	</style>
this should probably work.
Olaf

Re: Background image on all page AppGini 5.81

Posted: 2020-02-20 10:17
by dannybridi
Yes, that works!

Thanks!!