Skip to content

Commit

Permalink
[pages] Add Error, Login Page Expired, and Terms (#34)
Browse files Browse the repository at this point in the history
  • Loading branch information
dschemp committed Mar 19, 2023
1 parent f1df034 commit b622a6d
Show file tree
Hide file tree
Showing 4 changed files with 61 additions and 0 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
18 changes: 18 additions & 0 deletions theme/keywind/login/error.ftl
Original file line number Diff line number Diff line change
@@ -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}</@alert.kw>
<#if !skipLink??>
<#if client?? && client.baseUrl?has_content>
<@link.kw color="secondary" href=client.baseUrl size="small">
${kcSanitize(msg("backToApplication"))?no_esc}
</@link.kw>
</#if>
</#if>
</#if>
</@layout.registrationLayout>
18 changes: 18 additions & 0 deletions theme/keywind/login/login-page-expired.ftl
Original file line number Diff line number Diff line change
@@ -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>
<@button.kw color="secondary" component="a" href=url.loginAction>
${msg("doContinue")}
</@button.kw>
</@buttonGroup.kw>
</#if>
</@layout.registrationLayout>
22 changes: 22 additions & 0 deletions theme/keywind/login/terms.ftl
Original file line number Diff line number Diff line change
@@ -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>
<@button.kw color="secondary" name="cancel" type="submit">
${msg("doDecline")}
</@button.kw>
</@buttonGroup.kw>
</@form.kw>
</#if>
</@layout.registrationLayout>

0 comments on commit b622a6d

Please sign in to comment.