Add a logo to login page without plugin

Hi,

I was wondering if it’s possible to add a logo on top of Kirby’s login page? I found this in the documentation but it seems to require some plugin:

Is there a blueprint I can just add the logo to?

Thanks,

The alternative would be to add a logo via a Panel stylesheet, see panel | Kirby CMS

For example:

.k-installation-view form::before {
  content: url(http://placehold.it/350x150);
}

Or maybe inject via custom Panel JavaScript.

I’ve tried the following but no images are appearing.

I’ve added this in my config.php

'panel' => [
        'css' => 'assets/css/custom-panel.css'
    ],

And this in my custom-panel.css

.k-installation-view form::before {
  content: url("../assets/images/logo-black.png");
}

Is there something i’m missing?

The path is wrong

  content: url("../images/logo-black.png");

Nothing still. Just to be sure we’re talking about the same thing. I’ll attach a screenshot of where I want the logo to be displayed.

Please check your browser dev tools (network tab) if the path to the logo is wrong or if you can see it in the inspector.

My logo is located in /assets/images/logo-black.png
I don’t see the logo anywhere in the inspector.

I’ll attach a screenshot of the inspector.

must be .k-login-view, so you probably need both installation view and login view

Yup so we got it. For those who might need it, the CSS is:

/* Add your own custom css here */
.k-login-view form::before {
  content: url('../images/logo-black.png');
}

Thanks!

1 Like