From 27c260063fc075a7cb046cd9f20eab313f40cd3c Mon Sep 17 00:00:00 2001 From: Filippo Ledda Date: Tue, 23 May 2023 18:16:12 +0200 Subject: [PATCH] #727 providers login icons --- applications/accounts/disable-theme-cache.cli | 5 + applications/accounts/docker-compose.yaml | 8 +- applications/accounts/plugins/.gitignore | 1 + applications/accounts/standalone.xml | 600 ------------------ .../accounts/themes/custom/login/login.ftl | 15 +- .../custom/login/resources/css/login.css | 14 +- .../custom/login/resources/img/orcid.svg | 17 + .../themes/custom/login/theme.properties | 22 +- 8 files changed, 72 insertions(+), 610 deletions(-) create mode 100644 applications/accounts/disable-theme-cache.cli create mode 100644 applications/accounts/plugins/.gitignore delete mode 100644 applications/accounts/standalone.xml create mode 100644 applications/accounts/themes/custom/login/resources/img/orcid.svg diff --git a/applications/accounts/disable-theme-cache.cli b/applications/accounts/disable-theme-cache.cli new file mode 100644 index 00000000..4eca62b3 --- /dev/null +++ b/applications/accounts/disable-theme-cache.cli @@ -0,0 +1,5 @@ +embed-server --std-out=echo --server-config=standalone-ha.xml +/subsystem=keycloak-server/theme=defaults/:write-attribute(name=cacheThemes,value=false) +/subsystem=keycloak-server/theme=defaults/:write-attribute(name=cacheTemplates,value=false) +/subsystem=keycloak-server/theme=defaults/:write-attribute(name=staticMaxAge,value=-1) +stop-embedded-server \ No newline at end of file diff --git a/applications/accounts/docker-compose.yaml b/applications/accounts/docker-compose.yaml index 3ca0a1ba..fd2f076d 100644 --- a/applications/accounts/docker-compose.yaml +++ b/applications/accounts/docker-compose.yaml @@ -27,11 +27,11 @@ services: - type: bind source: ./themes/custom target: /opt/jboss/keycloak/themes/custom - # disable cache - type: bind - source: ./standalone.xml - target: /opt/jboss/keycloak/standalone/configuration/standalone.xml - + source: ./plugins + target: /opt/jboss/keycloak/standalone/deployments + # disable cache + - ./disable-theme-cache.cli:/opt/jboss/startup-scripts/disable-theme-cache.cli # - type: bind # source: ./keycloak # target: /opt/jboss/keycloak/themes/keycloak diff --git a/applications/accounts/plugins/.gitignore b/applications/accounts/plugins/.gitignore new file mode 100644 index 00000000..23b0f421 --- /dev/null +++ b/applications/accounts/plugins/.gitignore @@ -0,0 +1 @@ +*.deployed \ No newline at end of file diff --git a/applications/accounts/standalone.xml b/applications/accounts/standalone.xml deleted file mode 100644 index f57c28da..00000000 --- a/applications/accounts/standalone.xml +++ /dev/null @@ -1,600 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - jdbc:h2:mem:test;DB_CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=FALSE - h2 - - sa - sa - - - - jdbc:h2:${jboss.server.data.dir}/keycloak;AUTO_SERVER=TRUE - h2 - - sa - sa - - - 100 - - - - - org.h2.jdbcx.JdbcDataSource - - - - - - - - - false - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - auth - - classpath:${jboss.home.dir}/providers/* - - master - 900 - - -1 - false - false - ${jboss.home.dir}/themes - - - - - - - - - - - - - jpa - - - basic - - - - - - - - - - - - - - - - - - - default - - - - - - - - ${keycloak.jta.lookup.provider:jboss} - - - - - - - - - - - ${keycloak.x509cert.lookup.provider:default} - - - - default - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/applications/accounts/themes/custom/login/login.ftl b/applications/accounts/themes/custom/login/login.ftl index c4f5c145..15b9b76f 100644 --- a/applications/accounts/themes/custom/login/login.ftl +++ b/applications/accounts/themes/custom/login/login.ftl @@ -12,16 +12,25 @@
class="${properties.kcContentWrapperClass!}"> <#if realm.password && social.providers??> +
-
+
or
-
or
+
class="${properties.kcFormSocialAccountContentClass!} ${properties.kcFormSocialAccountClass!}"> <#if realm.password> diff --git a/applications/accounts/themes/custom/login/resources/css/login.css b/applications/accounts/themes/custom/login/resources/css/login.css index 17c0a4dd..b753e8b1 100644 --- a/applications/accounts/themes/custom/login/resources/css/login.css +++ b/applications/accounts/themes/custom/login/resources/css/login.css @@ -741,7 +741,7 @@ a.zocial { .login-pf-page .login-pf-social-link a:hover { - background: rgba(0, 188, 212, .1) !important; + background: rgba(255, 255, 255, 0.35); } .login-pf-page.login-pf-page-accounts { @@ -822,3 +822,15 @@ form#kc-select-back-form div.login-pf-social-section { .login-pf-page .separator:not(:empty)::after { margin-left: .25em; } + +.orcid-icon { + width: 20px; + height: 20px; + margin-right: 5px; + background-image: url(../img/orcid.svg); +} + +.fa { + font-size: 20px; + margin-right: 5px; +} diff --git a/applications/accounts/themes/custom/login/resources/img/orcid.svg b/applications/accounts/themes/custom/login/resources/img/orcid.svg new file mode 100644 index 00000000..2bddf44f --- /dev/null +++ b/applications/accounts/themes/custom/login/resources/img/orcid.svg @@ -0,0 +1,17 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/applications/accounts/themes/custom/login/theme.properties b/applications/accounts/themes/custom/login/theme.properties index 40b04d36..95c02888 100644 --- a/applications/accounts/themes/custom/login/theme.properties +++ b/applications/accounts/themes/custom/login/theme.properties @@ -3,7 +3,8 @@ import=common/keycloak locales=ca,cs,de,en,es,fr,it,ja,lt,nl,no,pl,pt-BR,ru,sk,sv,tr,zh-CN styles=css/login.css -stylesCommon=node_modules/patternfly/dist/css/patternfly.min.css node_modules/patternfly/dist/css/patternfly-additions.min.css lib/zocial/zocial.css +stylesCommon=web_modules/@patternfly/react-core/dist/styles/base.css web_modules/@patternfly/react-core/dist/styles/app.css node_modules/patternfly/dist/css/patternfly.min.css node_modules/patternfly/dist/css/patternfly-additions.min.css lib/pficon/pficon.css + meta=viewport==width=device-width,initial-scale=1 @@ -94,4 +95,21 @@ kcAuthenticatorWebAuthnPasswordlessClass=fa fa-key list-view-pf-icon-lg kcSelectOTPListClass=card-pf card-pf-view card-pf-view-select card-pf-view-single-select kcSelectOTPListItemClass=card-pf-body card-pf-top-element kcAuthenticatorOtpCircleClass=fa fa-mobile card-pf-icon-circle -kcSelectOTPItemHeadingClass=card-pf-title text-center \ No newline at end of file +kcSelectOTPItemHeadingClass=card-pf-title text-center + + +kcLogoIdP-facebook=fa fa-facebook +kcLogoIdP-google=fa fa-google +kcLogoIdP-github=fa fa-github +kcLogoIdP-linkedin=fa fa-linkedin +kcLogoIdP-instagram=fa fa-instagram +## windows instead of microsoft - not included in PF4 +kcLogoIdP-microsoft=fa fa-windows +kcLogoIdP-bitbucket=fa fa-bitbucket +kcLogoIdP-gitlab=fa fa-gitlab +kcLogoIdP-paypal=fa fa-paypal +kcLogoIdP-stackoverflow=fa fa-stack-overflow +kcLogoIdP-twitter=fa fa-twitter +kcLogoIdP-openshift-v4=pf-icon pf-icon-openshift +kcLogoIdP-openshift-v3=pf-icon pf-icon-openshift +kcLogoIdP-orcid=orcid-icon \ No newline at end of file