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
Logo on login page
Logo on login page
- Attachments
-
- Maintenance login screen on phone.jpg (38.23 KiB) Viewed 8481 times
-
- Maintenance login screen on desktop.jpg (42.08 KiB) Viewed 8481 times
Re: Logo on login page
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.
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
Would need a few adjustments to meet your specific style.
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
}
?>
$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.
Re: Logo on login page
Thank you saymaad !