Change splash screen on login Foreman 1.24

Problem:
Change background splash Login screen

Expected outcome:
Customised splash screen

Foreman and Proxy versions:
1.24

I am trying to create plugin to allow the customisation on the login screen but I can track down the background images I need to set\override. Anyone with any pointers to help me?

I think I can see the render creating the page but I don’t know how it creates the background

/usr/share/foreman/app/helpers

module LoginHelper
def login_props
{
token: form_authenticity_token,
version: SETTINGS[:version].version,
caption: Setting[:login_text],
alerts: flash_inline,
logoSrc: image_path(“login_logo.png”),
}
end

def mount_login
render(‘common/login’, props: login_props)
end
end

Hey, thanks for doing this :slight_smile:
here is the list of props that the react component gets: foreman/LoginPage.js at develop · theforeman/foreman · GitHub

You can pass the backgroundUrl prop from the server with the correct assets path from rails,
or you can also override the css with something like:

$bg-img: image-url('login_bg.svg');
$bg-color: some-color;
$bg-repeat: no-repeat;

#login-page { 
  .login-pf {
    background-image: $bg-img;
    background-color: $bg-color;
    background-repeat: $bg-repeat;
  }
}
2 Likes

Hi,
thanks for the response but I not sure this is available in Foreman 1.24, I can’t see how I can adopt this in 1.24?. Any thoughts
Kevin

Hey @802105576

Just curious as to why you need to have Foreman 1.24?
Is there something preventing you from upgrading?