Skip to content

armgit / core

Public Imported from GitHub
0

100% open-source IoT Platform - Integrate your devices, add intelligence, build custom apps

Made theme configurable with CSS variables Email template will need to be done in the file self

Michael Rademaker1e968c163e91
diff --git a/ui/keycloak/themes/openremote/account/account.ftl b/ui/keycloak/themes/openremote/account/account.ftl
index fc7826e32..d482f17ba 100644
--- a/ui/keycloak/themes/openremote/account/account.ftl
+++ b/ui/keycloak/themes/openremote/account/account.ftl
@@ -42,12 +42,12 @@
<div class="col s12 center-align">
<button type="submit"
- class="btn waves-effect waves-light green darken-1"
+ class="btn waves-effect waves-light"
name="submitAction" value="Save">${msg("doSave")}
<i class="material-icons right">send</i>
</button>
<button type="submit"
- class="btn waves-effect waves-light green darken-1"
+ class="btn waves-effect waves-light"
name="submitAction" value="Cancel" formnovalidate>${msg("doCancel")}
<i class="material-icons right">cancel</i>
</button>
diff --git a/ui/keycloak/themes/openremote/account/applications.ftl b/ui/keycloak/themes/openremote/account/applications.ftl
index dd67a9d96..5a5bf2ab6 100644
--- a/ui/keycloak/themes/openremote/account/applications.ftl
+++ b/ui/keycloak/themes/openremote/account/applications.ftl
@@ -82,7 +82,7 @@
<td>
<#if (application.client.consentRequired && application.claimsGranted?has_content) || application.additionalGrants?has_content>
- <button type="submit" class="btn waves-effect waves-light green darken-1" id='revoke-${application.client.clientId}' name="clientId" value="${application.client.id}">${msg("revoke")}</button>
+ <button type="submit" class="btn waves-effect waves-light" id='revoke-${application.client.clientId}' name="clientId" value="${application.client.id}">${msg("revoke")}</button>
</#if>
</td>
</tr>
diff --git a/ui/keycloak/themes/openremote/account/password.ftl b/ui/keycloak/themes/openremote/account/password.ftl
index 66dc0b4ed..44209b191 100644
--- a/ui/keycloak/themes/openremote/account/password.ftl
+++ b/ui/keycloak/themes/openremote/account/password.ftl
@@ -35,7 +35,7 @@
</div>
<div class="col s12 center-align">
- <button class="btn waves-effect waves-light green darken-1" type="submit" name="login"
+ <button class="btn waves-effect waves-light" type="submit" name="login"
value="Save">${msg("doSave")}
<i class="material-icons right">send</i>
</button>
diff --git a/ui/keycloak/themes/openremote/account/resources/css/styles.css b/ui/keycloak/themes/openremote/account/resources/css/styles.css
index a54dc7058..3d4ed3035 100644
--- a/ui/keycloak/themes/openremote/account/resources/css/styles.css
+++ b/ui/keycloak/themes/openremote/account/resources/css/styles.css
@@ -1,7 +1,15 @@
+:root {
+ --app-primary-color: #43A047;
+ --app-secondary-color: #C1D72E;
+ --app-background-color: #FFFFFF;
+ --input-background-color: #FFFFFF;
+}
+
html, body {
margin: 0;
padding: 0;
height: 100vh;
+ background-color: var(--app-background-color);
}
#outer-wrapper {
@@ -99,4 +107,28 @@ header, main, footer {
header, main, footer {
padding-left: 0;
}
+}
+
+.input-field >label {
+ color: var(--app-primary-color);
+}
+
+.input-field > input {
+ background-color: var(--input-background-color) !important;
+ border-bottom: 1px solid var(--app-primary-color) !important;
+ -webkit-box-shadow: 0 1px 0 0 var(--app-primary-color) !important;
+ box-shadow: 0 1px 0 0 var(--app-primary-color) !important;
+}
+
+.btn {
+ background-color: var(--app-primary-color) !important;
+}
+
+[type="checkbox"]:checked + span:not(.lever):before {
+ border-right: 2px solid var(--app-primary-color) !important;
+ border-bottom: 2px solid var(--app-primary-color) !important;
+}
+
+a.top-nav.sidenav-trigger {
+ color: var(--app-primary-color) !important;
}
\ No newline at end of file
diff --git a/ui/keycloak/themes/openremote/account/template.ftl b/ui/keycloak/themes/openremote/account/template.ftl
index d3657f0c9..2877bd5fb 100644
--- a/ui/keycloak/themes/openremote/account/template.ftl
+++ b/ui/keycloak/themes/openremote/account/template.ftl
@@ -39,12 +39,7 @@
<li class="<#if active=='social'>active</#if>"><a href="${url.socialUrl}">${msg("federatedIdentity")}</a></li>
</#if>
<li class="<#if active=='sessions'>active</#if>"><a href="${url.sessionsUrl}">${msg("sessions")}</a></li>
- <li class="<#if active=='applications'>active</#if>"><a
- href="${url.applicationsUrl}">${msg("applications")}</a></li>
- <#if features.log>
- <li class="<#if active=='log'>active</#if>"><a href="${url.logUrl}">${msg("log")}</a></li></#if>
</ul>
- <a href="#" data-target="menu" class="top-nav sidenav-trigger full hide-on-large-only green-text darken-3"><i class="material-icons">menu</i></a>
</header>
<main>
diff --git a/ui/keycloak/themes/openremote/account/totp.ftl b/ui/keycloak/themes/openremote/account/totp.ftl
index 141d4b69c..0a127acf9 100644
--- a/ui/keycloak/themes/openremote/account/totp.ftl
+++ b/ui/keycloak/themes/openremote/account/totp.ftl
@@ -54,12 +54,12 @@
<div class="col s12 center-align">
<button type="submit"
- class="btn waves-effect waves-light green darken-1"
+ class="btn waves-effect waves-light"
name="submitAction" value="Save">${msg("doSave")}
<i class="material-icons right">send</i>
</button>
<button type="submit"
- class="btn waves-effect waves-light green darken-1"
+ class="btn waves-effect waves-light"
name="submitAction" value="Cancel" formnovalidate>${msg("doCancel")}
<i class="material-icons right">cancel</i>
</button>
diff --git a/ui/keycloak/themes/openremote/login/login-reset-password.ftl b/ui/keycloak/themes/openremote/login/login-reset-password.ftl
index 46d3325e3..1acb56784 100644
--- a/ui/keycloak/themes/openremote/login/login-reset-password.ftl
+++ b/ui/keycloak/themes/openremote/login/login-reset-password.ftl
@@ -8,13 +8,13 @@
<form id="kc-reset-password-form" action="${url.loginAction}" method="post">
<div class="row">
<div class="input-field col s12">
- <input type="text" id="username" name="username" autofocus/>
+ <input type="text" id="username" name="username" autofocus required class="validate"/>
<label for="username" class="${properties.kcLabelClass!}"><#if !realm.loginWithEmailAllowed>${msg("username")}<#elseif !realm.registrationEmailAsUsername>${msg("usernameOrEmail")}<#else>${msg("email")}</#if></label>
</div>
</div>
<div class="col s12 center-align">
- <button class="btn waves-effect waves-light green darken-1" type="submit" name="login">${msg("doSubmit")}
+ <button class="btn waves-effect waves-light" type="submit" name="login">${msg("doSubmit")}
<i class="material-icons right">send</i>
</button>
</div>
diff --git a/ui/keycloak/themes/openremote/login/login.ftl b/ui/keycloak/themes/openremote/login/login.ftl
index 02f99410c..7c6f1a563 100644
--- a/ui/keycloak/themes/openremote/login/login.ftl
+++ b/ui/keycloak/themes/openremote/login/login.ftl
@@ -23,7 +23,7 @@
autocapitalize="off"
required
class="validate"
- name="username" value="${(login.username!'')}" type="text" autofocus/>
+ name="username" value="${(login.username!'')}" type="text"/>
</#if>
<label for="username"><#if !realm.registrationEmailAsUsername>${msg("usernameOrEmail")}<#else>${msg("email")}</#if></label>
</div>
@@ -51,7 +51,7 @@
</div>
<div class="col s12 center-align">
- <button class="btn waves-effect waves-light green darken-1" type="submit" name="login">${msg("doLogIn")}
+ <button class="btn waves-effect waves-light" type="submit" name="login">${msg("doLogIn")}
<i class="material-icons right">send</i>
</button>
</div>
diff --git a/ui/keycloak/themes/openremote/login/messages/messages_en.properties b/ui/keycloak/themes/openremote/login/messages/messages_en.properties
new file mode 100644
index 000000000..ae20cb3bf
--- /dev/null
+++ b/ui/keycloak/themes/openremote/login/messages/messages_en.properties
@@ -0,0 +1,3 @@
+backToLogin=Back to login
+applicationName=OpenRemote
+logoUrl=https://openremote.io
\ No newline at end of file
diff --git a/ui/keycloak/themes/openremote/login/register.ftl b/ui/keycloak/themes/openremote/login/register.ftl
index b22e59cfc..7ca478a36 100644
--- a/ui/keycloak/themes/openremote/login/register.ftl
+++ b/ui/keycloak/themes/openremote/login/register.ftl
@@ -59,7 +59,7 @@
</div>
<div class="col s12 center-align">
- <button class="btn waves-effect waves-light green darken-1" type="submit" name="register">${msg("doRegister")}
+ <button class="btn waves-effect waves-light" type="submit" name="register">${msg("doRegister")}
<i class="material-icons right">send</i>
</button>
</div>
diff --git a/ui/keycloak/themes/openremote/login/resources/css/styles.css b/ui/keycloak/themes/openremote/login/resources/css/styles.css
index 153ad8b88..f12eea345 100644
--- a/ui/keycloak/themes/openremote/login/resources/css/styles.css
+++ b/ui/keycloak/themes/openremote/login/resources/css/styles.css
@@ -1,7 +1,15 @@
+:root {
+ --app-primary-color: #43A047;
+ --app-secondary-color: #C1D72E;
+ --app-background-color: #FFFFFF;
+ --input-background-color: #FFFFFF;
+}
+
html, body {
margin: 0;
padding: 0;
height: 100vh;
+ background-color: var(--app-background-color);
}
#outer-wrapper {
@@ -87,4 +95,24 @@ i.material-icons {
/* Support for IE. */
font-feature-settings: 'liga';
+}
+
+.input-field >label {
+ color: var(--app-primary-color);
+}
+
+.input-field > input {
+ background-color: var(--input-background-color) !important;
+ border-bottom: 1px solid var(--app-primary-color) !important;
+ -webkit-box-shadow: 0 1px 0 0 var(--app-primary-color) !important;
+ box-shadow: 0 1px 0 0 var(--app-primary-color) !important;
+}
+
+.btn {
+ background-color: var(--app-primary-color) !important;
+}
+
+[type="checkbox"]:checked + span:not(.lever):before {
+ border-right: 2px solid var(--app-primary-color) !important;
+ border-bottom: 2px solid var(--app-primary-color) !important;
}
\ No newline at end of file
diff --git a/ui/keycloak/themes/openremote/login/template.ftl b/ui/keycloak/themes/openremote/login/template.ftl
index a7167e31e..1cf7a9039 100644
--- a/ui/keycloak/themes/openremote/login/template.ftl
+++ b/ui/keycloak/themes/openremote/login/template.ftl
@@ -2,7 +2,7 @@
<!DOCTYPE html>
<html>
<head>
- <title>OpenRemote Login</title>
+ <title>${msg("applicationName")}</title>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
@@ -42,7 +42,7 @@
</a>
<div class="left-align">
<h5 id="header"><#nested "header"></h5><br>
- <p id="sub-header">OpenRemote Login</p>
+ <p id="sub-header">${msg("applicationName")}</p>
</div>
</div>
</div>