From b622a6dd9f0c74832f51807f51ce09ca3966ea31 Mon Sep 17 00:00:00 2001 From: Daniel Schemp <7892612+dschemp@users.noreply.github.com> Date: Sun, 19 Mar 2023 17:40:00 +0100 Subject: [PATCH] [pages] Add Error, Login Page Expired, and Terms (#34) --- README.md | 3 +++ theme/keywind/login/error.ftl | 18 ++++++++++++++++++ theme/keywind/login/login-page-expired.ftl | 18 ++++++++++++++++++ theme/keywind/login/terms.ftl | 22 ++++++++++++++++++++++ 4 files changed, 61 insertions(+) create mode 100644 theme/keywind/login/error.ftl create mode 100644 theme/keywind/login/login-page-expired.ftl create mode 100644 theme/keywind/login/terms.ftl diff --git a/README.md b/README.md index 8f315c9ea..82bbd8592 100644 --- a/README.md +++ b/README.md @@ -6,11 +6,13 @@ Keywind is a component-based Keycloak Login Theme built with [Tailwind CSS](http ### Styled Pages +- Error - Login - Login Config TOTP - Login IDP Link Confirm - Login OAuth Grant - Login OTP +- Login Page Expired - Login Recovery Authn Code Config - Login Recovery Authn Code Input - Login Reset Password @@ -19,6 +21,7 @@ Keywind is a component-based Keycloak Login Theme built with [Tailwind CSS](http - Logout Confirm - Register - Select Authenticator +- Terms and Conditions - WebAuthn Authenticate - WebAuthn Error - WebAuthn Register diff --git a/theme/keywind/login/error.ftl b/theme/keywind/login/error.ftl new file mode 100644 index 000000000..52af9c1e6 --- /dev/null +++ b/theme/keywind/login/error.ftl @@ -0,0 +1,18 @@ +<#import "template.ftl" as layout> +<#import "components/atoms/alert.ftl" as alert> +<#import "components/atoms/link.ftl" as link> + +<@layout.registrationLayout displayMessage=false; section> + <#if section="header"> + ${kcSanitize(msg("errorTitle"))?no_esc} + <#elseif section="form"> + <@alert.kw color="error">${kcSanitize(message.summary)?no_esc} + <#if !skipLink??> + <#if client?? && client.baseUrl?has_content> + <@link.kw color="secondary" href=client.baseUrl size="small"> + ${kcSanitize(msg("backToApplication"))?no_esc} + + + + + diff --git a/theme/keywind/login/login-page-expired.ftl b/theme/keywind/login/login-page-expired.ftl new file mode 100644 index 000000000..2b6288d94 --- /dev/null +++ b/theme/keywind/login/login-page-expired.ftl @@ -0,0 +1,18 @@ +<#import "template.ftl" as layout> +<#import "components/atoms/button.ftl" as button> +<#import "components/atoms/button-group.ftl" as buttonGroup> + +<@layout.registrationLayout; section> + <#if section="header"> + ${msg("pageExpiredTitle")} + <#elseif section="form"> + <@buttonGroup.kw> + <@button.kw color="primary" component="a" href=url.loginRestartFlowUrl> + ${msg("doTryAgain")} + + <@button.kw color="secondary" component="a" href=url.loginAction> + ${msg("doContinue")} + + + + diff --git a/theme/keywind/login/terms.ftl b/theme/keywind/login/terms.ftl new file mode 100644 index 000000000..23386b8ba --- /dev/null +++ b/theme/keywind/login/terms.ftl @@ -0,0 +1,22 @@ +<#import "template.ftl" as layout> +<#import "components/atoms/button.ftl" as button> +<#import "components/atoms/button-group.ftl" as buttonGroup> +<#import "components/atoms/form.ftl" as form> + +<@layout.registrationLayout displayMessage=false; section> + <#if section="header"> + ${msg("termsTitle")} + <#elseif section="form"> + ${kcSanitize(msg("termsText"))?no_esc} + <@form.kw action=url.loginAction method="post"> + <@buttonGroup.kw> + <@button.kw color="primary" name="accept" type="submit"> + ${msg("doAccept")} + + <@button.kw color="secondary" name="cancel" type="submit"> + ${msg("doDecline")} + + + + +