// ${realm.displayName!"E-Cosplay"}
++ <#nested "header"> +
++ * ${msg("requiredFields")} +
+ #if> + + +diff --git a/docker-compose.yml b/docker-compose.yml index 8744e35..51d720c 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -35,15 +35,17 @@ services: KEYCLOAK_ADMIN_PASSWORD: admin ports: - "9450:8080" + volumes: + - ./themes/ecosplay:/opt/keycloak/themes/ecosplay:ro depends_on: postgres: condition: service_healthy networks: - keycloak-net - keycloak-smtp-init: + keycloak-init: image: quay.io/keycloak/keycloak:26.0 - container_name: ecosplay-auth-smtp-init + container_name: ecosplay-auth-init depends_on: keycloak: condition: service_started @@ -57,6 +59,7 @@ services: SMTP_FROM_DISPLAY_NAME: E-Cosplay SMTP_USER: AKIAWTT2T22CWBRBBDYN SMTP_PASSWORD: BBdgb6KxRQ8mNcpWFJsZCJxbSGNdgLhKFiITMErfBlQP + LOGIN_THEME: ecosplay entrypoint: ["/bin/bash", "-c"] command: - | @@ -69,7 +72,7 @@ services: echo "Waiting for Keycloak to be ready..." sleep 5 done - echo "Keycloak ready, configuring SMTP on master realm..." + echo "Keycloak ready, configuring master realm (SMTP + theme)..." /opt/keycloak/bin/kcadm.sh update realms/master \ -s "smtpServer.host=$$SMTP_HOST" \ -s "smtpServer.port=$$SMTP_PORT" \ @@ -79,8 +82,9 @@ services: -s "smtpServer.starttls=true" \ -s "smtpServer.ssl=false" \ -s "smtpServer.user=$$SMTP_USER" \ - -s "smtpServer.password=$$SMTP_PASSWORD" - echo "SMTP configuration applied to master realm." + -s "smtpServer.password=$$SMTP_PASSWORD" \ + -s "loginTheme=$$LOGIN_THEME" + echo "Master realm configured." networks: - keycloak-net restart: "no" diff --git a/themes/ecosplay/login/login.ftl b/themes/ecosplay/login/login.ftl new file mode 100644 index 0000000..3060d88 --- /dev/null +++ b/themes/ecosplay/login/login.ftl @@ -0,0 +1,95 @@ +<#import "template.ftl" as layout> +<@layout.registrationLayout displayMessage=!messagesPerField.existsError('username','password') displayInfo=realm.password && realm.registrationAllowed && !registrationDisabled??; section> + <#if section = "header"> + ${msg("loginAccountTitle")} + <#elseif section = "form"> + <#if realm.password> +
+ #if> + + <#elseif section = "info"> + <#if realm.password && realm.registrationAllowed && !registrationDisabled??> ++ ${msg("noAccount")} + + ${msg("doRegister")} + +
+ #if> + + <#elseif section = "socialProviders"> + <#if realm.password && social?? && social.providers?? && social.providers?has_content> +// ${msg("identity-provider-login-label")}
+// ${realm.displayName!"E-Cosplay"}
++ * ${msg("requiredFields")} +
+ #if> + + +