Skip to content

Commit 9994f12

Browse files
committed
hardcode lootie animation for now and polish furst light theme
Signed-off-by: Andre Nogueira <andre.nogueira@mollie.com>
1 parent 2456a44 commit 9994f12

8 files changed

Lines changed: 3643 additions & 11 deletions

File tree

.keycloakify/realm-kc-26.json

Lines changed: 2481 additions & 0 deletions
Large diffs are not rendered by default.

README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,18 @@
55
</p>
66
<img src="./public/Tailcloakify-login-page.png" alt="keycloak theme config" width="1905">
77

8-
Tailcloakify is a [Keycloak](https://github.com/keycloak/keycloak) Theme that is based on
9-
[Keycloakify](https://github.com/keycloakify/keycloakify), layered with [TailwindCSS](https://github.com/tailwindlabs/tailwindcss) and inspired by [Keywind](https://github.com/lukin/keywind)
8+
Tailcloakify is a [Keycloak](https://github.com/keycloak/keycloak) Theme that is based on
9+
[Keycloakify](https://github.com/keycloakify/keycloakify), layered with [TailwindCSS](https://github.com/tailwindlabs/tailwindcss) and inspired by [Keywind](https://github.com/lukin/keywind)
1010
UI design approach.
1111

1212
# How to Use
1313

1414
1. Place the provided JAR file in the <keycloak-home>/providers/ directory or use the example Dockerfile from this repository to add the provided JAR file into your Docker Image.
1515
2. Set environment variables or localization messages to customize the theme with the out of the box configuration functionalities.
1616
3. Restart your Keycloak server or deploy your builded docker image to your server.
17-
4. Log in to the Keycloak Admin Console.
18-
Go to Realm Settings > Themes.
19-
Select the Tailcloakify login theme from the dropdown.
17+
4. Log in to the Keycloak Admin Console.
18+
Go to Realm Settings > Themes.
19+
Select the Tailcloakify login theme from the dropdown.
2020
Save your settings.
2121

2222
# Supported Pages
@@ -69,7 +69,7 @@ If you want to customize this theme, by extending it with your own files to be l
6969
2. [Create your own Login Theme](https://www.keycloak.org/docs/latest/server_development/#creating-a-theme)
7070
3. Specify parent theme in [theme properties](https://www.keycloak.org/docs/latest/server_development/#theme-properties) and add additional files to be loaded in the header
7171

72-
```
72+
```properties
7373
parent=tailcloakify
7474
scripts=first-script.js second-script.js
7575
styles=custom-styles.css
@@ -108,7 +108,7 @@ Or you can preview the pages using the storybook:
108108

109109
## Building the theme
110110

111-
You need to have [Maven](https://maven.apache.org/) installed to build the theme (Maven >= 3.1.1, Java >= 7).
111+
You need to have [Maven](https://maven.apache.org/) installed to build the theme (Maven >= 3.1.1, Java >= 7).
112112
The `mvn` command must be in the $PATH.
113113

114114
- On macOS: `brew install maven`
@@ -119,7 +119,7 @@ The `mvn` command must be in the $PATH.
119119
npm run build-keycloak-theme
120120
```
121121

122-
Note that by default Keycloakify generates multiple `.jar` files for different versions of Keycloak.
122+
Note that by default Keycloakify generates multiple `.jar` files for different versions of Keycloak.
123123

124124
## GitHub Actions
125125

package-lock.json

Lines changed: 20 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
"dependencies": {
2020
"autoprefixer": "^10.4.19",
2121
"keycloakify": "^11.8.30",
22+
"lottie-react": "^2.4.1",
2223
"postcss": "^8.4.39",
2324
"react": "^18.2.0",
2425
"react-dom": "^18.2.0",
@@ -54,4 +55,4 @@
5455
"overrides": {
5556
"storybook": "$storybook"
5657
}
57-
}
58+
}

src/login/Template.tsx

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,11 @@ import { useInitialize } from "keycloakify/login/Template.useInitialize";
88
import type { I18n } from "./i18n";
99
import type { KcContext } from "./KcContext";
1010
import useSetCookieConsent from "./useSetCookieConsent.tsx";
11+
// import logo from "./assets/logo.svg";
12+
import icon from "./assets/favicon.svg";
13+
14+
import Lottie from "lottie-react";
15+
import animationData from "./assets/logo.json"; // path to your Lottie JSON file
1116

1217
export default function Template(props: TemplateProps<KcContext, I18n>) {
1318
const {
@@ -39,7 +44,7 @@ export default function Template(props: TemplateProps<KcContext, I18n>) {
3944
// Load Favicon
4045
useEffect(() => {
4146
const url: string | undefined =
42-
(advancedMsgStr("faviconUrl") !== "faviconUrl" ? advancedMsgStr("faviconUrl") : null) || kcContext.properties.TAILCLOAKIFY_FAVICON_URL;
47+
(advancedMsgStr("faviconUrl") !== "faviconUrl" ? advancedMsgStr("faviconUrl") : null) || kcContext.properties.TAILCLOAKIFY_FAVICON_URL || icon
4348

4449
if (url) {
4550
let link = document.querySelector("link[rel~='icon']") as HTMLLinkElement | null;
@@ -165,9 +170,19 @@ export default function Template(props: TemplateProps<KcContext, I18n>) {
165170
<img
166171
alt={"Logo"}
167172
src={backgroundLogoUrl || kcContext.properties["TAILCLOAKIFY_BACKGROUND_LOGO_URL"]}
173+
// className={"size-36 mx-auto mb-4 opacity-20 max-w-none fixed top-0 left-0 right-0 bottom-0 min-h-full min-w-full object-cover"}
168174
className={"fixed z-10 top-4 left-8"}
169175
/>
170176
)}
177+
178+
{animationData && (
179+
< Lottie
180+
animationData={animationData}
181+
loop
182+
className="size-24 sm:size-36 opacity-80 mx-auto"
183+
/>
184+
)}
185+
171186
{(backgroundVideoUrl || kcContext.properties["TAILCLOAKIFY_BACKGROUND_VIDEO_URL"]) && (
172187
<video
173188
autoPlay={true}

src/login/assets/favicon.svg

Lines changed: 136 additions & 0 deletions
Loading

0 commit comments

Comments
 (0)