Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pages] Add Error, Login Page Expired, and Terms #34

Merged
merged 5 commits into from
Mar 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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>