From faa65c4abfade8b61605226a9ca91d8de50cb0d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20OUDOT?= Date: Tue, 28 Jan 2020 15:14:24 +0100 Subject: [PATCH 1/4] Options to add a custom CSS file (#2076) --- lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Main/Run.pm | 2 ++ lemonldap-ng-portal/site/templates/bootstrap/header.tpl | 3 +++ 2 files changed, 5 insertions(+) diff --git a/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Main/Run.pm b/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Main/Run.pm index 0e3ce26c3..541292d7f 100644 --- a/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Main/Run.pm +++ b/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Main/Run.pm @@ -757,6 +757,7 @@ sub cookie { $h{max_age} //= $self->conf->{cookieExpiration} if ( $self->conf->{cookieExpiration} ); $h{SameSite} ||= $self->conf->{sameSite}; + foreach (qw(domain path expires max_age HttpOnly SameSite)) { my $f = $_; $f =~ s/_/-/g; @@ -981,6 +982,7 @@ sub tplParams { PORTAL_URL => $self->conf->{portal}, SKIN_PATH => $portalPath . "skins", SKIN_BG => $self->conf->{portalSkinBackground}, + CUSTOM_CSS => $self->conf->{portalCustomCss}, ( $self->customParameters ? ( %{ $self->customParameters } ) : () ), %templateParams ); diff --git a/lemonldap-ng-portal/site/templates/bootstrap/header.tpl b/lemonldap-ng-portal/site/templates/bootstrap/header.tpl index 922372ef3..0fc5618a4 100644 --- a/lemonldap-ng-portal/site/templates/bootstrap/header.tpl +++ b/lemonldap-ng-portal/site/templates/bootstrap/header.tpl @@ -27,6 +27,9 @@ /css/styles.css" /> + + " /> +