Logo on login page

If you're a new user of AppGini, feel free to ask general usage questions, or look for answers here.
Post Reply
dlee
Veteran Member
Posts: 168
Joined: 2020-04-14 00:21
Location: South Carolina, USA
Contact:

Logo on login page

Post by dlee » 2025-02-10 21:10

I have added a logo to my app's login screen by editing the login.php file. I have attached a screen capture of the login page in a desktop browser and a screen capture on the same page on my phone. How can I fix the logo on the phone? I would like to move it below the login section and perhaps a smaller size.
Thanks,
TD
Attachments
Maintenance login screen on phone.jpg
Maintenance login screen on phone.jpg (38.23 KiB) Viewed 8481 times
Maintenance login screen on desktop.jpg
Maintenance login screen on desktop.jpg (42.08 KiB) Viewed 8481 times

saymaad
AppGini Super Hero
AppGini Super Hero
Posts: 56
Joined: 2024-06-03 16:17

Re: Logo on login page

Post by saymaad » 2025-02-11 07:35

I would recommend not to edit login.php, instead use "hooks/footer-extras.php" to add custom logo, styles, divs etc. to you login page.

Code: Select all

<?php
	// The following code will only execute on signin page
	$script_name = basename($_SERVER['PHP_SELF']);
	if ($script_name == 'index.php' && (isset($_GET['signIn']) || isset($_GET['loginFailed']))) {
?>
	<div id="hookInfo">
		<img src="./resources/images/yourLogo.png" class="img-fluid" alt="Logo">
	</div>
	<script>
		$j(function(){
			$j('#hookInfo').appendTo('#login_splash');
		})
	</script>
<?php
	}
?>
You can add CSS to #hookInfo like "width:70%; height:70%; max-width:240px; max-height:240px" as per your preference. As the hookInfo is appended to the #login_splash (which is on the left of the login box), it would appear on top of the login box on mobile devices. You can instead use $j('#hookInfo').after('.panel-success'); if you specifically want the image to be under the login box.

Would need a few adjustments to meet your specific style.

dlee
Veteran Member
Posts: 168
Joined: 2020-04-14 00:21
Location: South Carolina, USA
Contact:

Re: Logo on login page

Post by dlee » 2025-02-12 06:44

Thank you saymaad !

Post Reply