diff --git a/.playwright-mcp/keycloak-login-nested.png b/.playwright-mcp/keycloak-login-nested.png new file mode 100644 index 0000000..0774276 Binary files /dev/null and b/.playwright-mcp/keycloak-login-nested.png differ diff --git a/keycloak-theme/team-planner/login/login.ftl b/keycloak-theme/team-planner/login/login.ftl index b51f463..8fef6fd 100644 --- a/keycloak-theme/team-planner/login/login.ftl +++ b/keycloak-theme/team-planner/login/login.ftl @@ -1,78 +1,35 @@ <#import "template.ftl" as layout> -<@layout.registrationLayout displayMessage=!messagesPerField.existsError('username','password') displayInfo=realm.password && realm.registrationAllowed && !registrationDisabled??; section> - <#if section = "header"> - <#elseif section = "form"> -
-
-
-

Team Planner

-

Приложение для управления бэклогом идей команды

-
- <#if realm.password> -
-
- - - <#if messagesPerField.existsError('username','password')> - - ${kcSanitize(messagesPerField.getFirstError('username','password'))?no_esc} - - -
+<@layout.registrationLayout displayMessage=!messagesPerField.existsError('username','password'); section> + <#if section = "form"> + +
+ + +
-
- - -
+
+ + +
-
- <#if realm.rememberMe && !usernameHidden??> -
- checked> - -
- - <#if realm.resetPasswordAllowed> - ${msg("doForgotPassword")} - -
- -
- value="${auth.selectedCredential}"/> - -
-
+
+ <#if realm.rememberMe && !usernameHidden??> +
+ checked> + +
+ <#else> +
+ <#if realm.resetPasswordAllowed> + ${msg("doForgotPassword")} + +
-
-

- Для получения доступа обратитесь к Николаю Вигдорову -

-
-
-
- <#elseif section = "info"> - <#elseif section = "socialProviders"> - <#if realm.password && social.providers??> -
-

Или войти через

- -
- + value="${auth.selectedCredential}"/> + + diff --git a/keycloak-theme/team-planner/login/resources/css/login.css b/keycloak-theme/team-planner/login/resources/css/login.css index b353fc4..8cd1a37 100644 --- a/keycloak-theme/team-planner/login/resources/css/login.css +++ b/keycloak-theme/team-planner/login/resources/css/login.css @@ -1,372 +1,10 @@ /* Team Planner - Keycloak Login Theme */ -/* Полное переопределение стилей Keycloak/PatternFly */ +/* Основные стили в template.ftl, здесь дополнительные переопределения */ -:root { - --primary-color: #1976d2; - --primary-hover: #1565c0; - --text-primary: rgba(0, 0, 0, 0.87); - --text-secondary: rgba(0, 0, 0, 0.6); - --background: #f5f5f5; - --surface: #ffffff; - --error: #d32f2f; - --border-radius: 4px; - --shadow: 0px 3px 3px -2px rgba(0,0,0,0.2), 0px 3px 4px 0px rgba(0,0,0,0.14), 0px 1px 8px 0px rgba(0,0,0,0.12); -} - -/* =========================================== - ПОЛНЫЙ СБРОС ФОНА KEYCLOAK - =========================================== */ - -html, body { - background: var(--background) !important; - background-image: none !important; - min-height: 100vh; - margin: 0; - padding: 0; -} - -body { - font-family: "Roboto", "Helvetica", "Arial", sans-serif !important; - display: flex !important; - align-items: center !important; - justify-content: center !important; -} - -/* Убираем ВСЕ фоны PatternFly */ -.login-pf, -.login-pf body, -.login-pf-page, +/* Убираем возможные остатки PatternFly стилей */ .pf-c-background-image, -.pf-c-login, -.pf-c-login__container, -[class*="pf-c-background"], -[class*="login-pf"] { - background: var(--background) !important; - background-image: none !important; - background-color: var(--background) !important; -} - -/* Убираем SVG фон */ -.pf-c-background-image::before, -.pf-c-background-image::after, -.login-pf-page::before, -.login-pf-page::after { - display: none !important; - content: none !important; - background: none !important; -} - -/* =========================================== - СКРЫВАЕМ СТАНДАРТНЫЙ HEADER KEYCLOAK - =========================================== */ - -#kc-header, -#kc-header-wrapper, .pf-c-login__header, -.login-pf-page-header, -.pf-c-brand, -header[class*="pf-"], -.kc-logo-text { - display: none !important; -} - -/* =========================================== - ОСНОВНОЙ КОНТЕЙНЕР - =========================================== */ - -.pf-c-login__main, -#kc-content, -#kc-content-wrapper, -.card-pf, -#kc-form-wrapper { - background: var(--surface) !important; - border-radius: var(--border-radius) !important; - box-shadow: var(--shadow) !important; - padding: 48px !important; - width: 100% !important; - max-width: 400px !important; - margin: 20px auto !important; - border: none !important; -} - -.pf-c-login { - display: flex !important; - align-items: center !important; - justify-content: center !important; - min-height: 100vh !important; - padding: 20px !important; -} - -.pf-c-login__container { - max-width: 400px !important; - width: 100% !important; -} - -/* =========================================== - ЗАГОЛОВОК ФОРМЫ - =========================================== */ - -#kc-page-title, -.pf-c-login__main-header, -.pf-c-title { - font-size: 1.75rem !important; - font-weight: 700 !important; - color: var(--text-primary) !important; - text-align: center !important; - margin: 0 0 8px 0 !important; - padding: 0 !important; -} - -/* =========================================== - ФОРМА ЛОГИНА - =========================================== */ - -.pf-c-login__main-body, -.pf-c-form { - padding: 0 !important; -} - -/* Группы полей */ -.form-group, -.pf-c-form__group { - margin-bottom: 24px !important; -} - -/* Лейблы */ -label, -.pf-c-form__label, -.pf-c-form__label-text, -.control-label { - display: block !important; - font-size: 0.875rem !important; - font-weight: 500 !important; - color: var(--text-primary) !important; - margin-bottom: 8px !important; - padding: 0 !important; -} - -/* Инпуты */ -input[type="text"], -input[type="password"], -input[type="email"], -.form-control, -.pf-c-form-control { - width: 100% !important; - padding: 16.5px 14px !important; - font-size: 1rem !important; - font-family: inherit !important; - color: var(--text-primary) !important; - background-color: var(--surface) !important; - border: 1px solid rgba(0, 0, 0, 0.23) !important; - border-radius: var(--border-radius) !important; - outline: none !important; - box-shadow: none !important; - transition: border-color 0.2s ease !important; - box-sizing: border-box !important; -} - -input[type="text"]:hover, -input[type="password"]:hover, -input[type="email"]:hover, -.form-control:hover, -.pf-c-form-control:hover { - border-color: var(--text-primary) !important; -} - -input[type="text"]:focus, -input[type="password"]:focus, -input[type="email"]:focus, -.form-control:focus, -.pf-c-form-control:focus { - border-color: var(--primary-color) !important; - border-width: 2px !important; - padding: 15.5px 13px !important; -} - -/* =========================================== - КНОПКА ВХОДА - =========================================== */ - -#kc-login, -.btn-primary, -.pf-c-button.pf-m-primary, -input[type="submit"], -button[type="submit"] { - width: 100% !important; - padding: 12px 24px !important; - font-size: 0.9375rem !important; - font-weight: 500 !important; - font-family: inherit !important; - text-transform: uppercase !important; - letter-spacing: 0.02857em !important; - color: #ffffff !important; - background-color: var(--primary-color) !important; - border: none !important; - border-radius: var(--border-radius) !important; - cursor: pointer !important; - transition: background-color 0.2s ease, box-shadow 0.2s ease !important; - box-shadow: 0px 3px 1px -2px rgba(0,0,0,0.2), 0px 2px 2px 0px rgba(0,0,0,0.14), 0px 1px 5px 0px rgba(0,0,0,0.12) !important; - margin-top: 16px !important; -} - -#kc-login:hover, -.btn-primary:hover, -.pf-c-button.pf-m-primary:hover, -input[type="submit"]:hover, -button[type="submit"]:hover { - background-color: var(--primary-hover) !important; - box-shadow: 0px 2px 4px -1px rgba(0,0,0,0.2), 0px 4px 5px 0px rgba(0,0,0,0.14), 0px 1px 10px 0px rgba(0,0,0,0.12) !important; -} - -/* =========================================== - ССЫЛКИ - =========================================== */ - -a, -.pf-c-button.pf-m-link { - color: var(--primary-color) !important; - text-decoration: none !important; - font-size: 0.875rem !important; - background: none !important; - border: none !important; - padding: 0 !important; -} - -a:hover, -.pf-c-button.pf-m-link:hover { - text-decoration: underline !important; -} - -/* =========================================== - ЧЕКБОКС "ЗАПОМНИТЬ МЕНЯ" - =========================================== */ - -.checkbox, -.pf-c-check { - display: flex !important; - align-items: center !important; - gap: 8px !important; -} - -.checkbox input[type="checkbox"], -.pf-c-check__input { - width: 18px !important; - height: 18px !important; - accent-color: var(--primary-color) !important; - cursor: pointer !important; -} - -.checkbox label, -.pf-c-check__label { - margin: 0 !important; - font-size: 0.875rem !important; - color: var(--text-secondary) !important; - cursor: pointer !important; -} - -/* =========================================== - СООБЩЕНИЯ ОБ ОШИБКАХ - =========================================== */ - -.alert, -.alert-error, -.pf-c-alert, -.pf-c-alert.pf-m-danger, -.kc-feedback-text { - background-color: #fdeded !important; - color: var(--error) !important; - border: 1px solid #f5c6cb !important; - border-radius: var(--border-radius) !important; - padding: 12px 16px !important; - margin-bottom: 24px !important; - font-size: 0.875rem !important; -} - -.pf-c-alert__icon { - display: none !important; -} - -/* =========================================== - СОЦИАЛЬНЫЕ ПРОВАЙДЕРЫ - =========================================== */ - -#kc-social-providers, -.pf-c-login__main-footer-band { - margin-top: 24px !important; - padding-top: 24px !important; - border-top: 1px solid rgba(0, 0, 0, 0.12) !important; -} - -#kc-social-providers h4, -.pf-c-login__main-footer-band-item { - font-size: 0.875rem !important; - color: var(--text-secondary) !important; - text-align: center !important; - margin-bottom: 16px !important; -} - -.pf-c-login__main-footer-links-item a, -#kc-social-providers a { - display: flex !important; - align-items: center !important; - justify-content: center !important; - gap: 8px !important; - width: 100% !important; - padding: 10px 16px !important; - margin-bottom: 8px !important; - font-size: 0.875rem !important; - color: var(--text-primary) !important; - background-color: var(--surface) !important; - border: 1px solid rgba(0, 0, 0, 0.23) !important; - border-radius: var(--border-radius) !important; - text-decoration: none !important; -} - -.pf-c-login__main-footer-links-item a:hover, -#kc-social-providers a:hover { - background-color: rgba(0, 0, 0, 0.04) !important; - text-decoration: none !important; -} - -/* =========================================== - FOOTER - =========================================== */ - -.pf-c-login__main-footer, -.pf-c-login__footer, -#kc-info-wrapper, -#kc-form-options { - margin-top: 16px !important; - text-align: center !important; -} - -/* =========================================== - АДАПТИВНОСТЬ - =========================================== */ - -@media (max-width: 480px) { - .pf-c-login__main, - #kc-form-wrapper, - .card-pf { - margin: 10px !important; - padding: 32px 24px !important; - } -} - -/* =========================================== - СКРЫВАЕМ ЛИШНИЕ ЭЛЕМЕНТЫ - =========================================== */ - -.pf-c-login__main-header-desc, -#kc-attempted-username, -.pf-c-alert__action, -.pf-c-login__footer-list, -.login-pf-page .login-pf-page-header { - display: none !important; -} - -/* Скрываем иконку показа пароля если мешает */ -.pf-c-button.pf-m-control { - background: transparent !important; - border: none !important; +#kc-header, +#kc-header-wrapper { + display: none !important; } diff --git a/keycloak-theme/team-planner/login/template.ftl b/keycloak-theme/team-planner/login/template.ftl new file mode 100644 index 0000000..1cda0f8 --- /dev/null +++ b/keycloak-theme/team-planner/login/template.ftl @@ -0,0 +1,231 @@ +<#macro registrationLayout bodyClass="" displayInfo=false displayMessage=true displayRequiredFields=false> + + + + + + + ${msg("loginTitle",(realm.displayName!''))} + + <#if properties.stylesCommon?has_content> + <#list properties.stylesCommon?split(' ') as style> + + + + <#if properties.styles?has_content> + <#list properties.styles?split(' ') as style> + + + + + + +
+
+

Team Planner

+

Приложение для управления бэклогом идей команды

+
+ + <#if displayMessage && message?has_content && (message.type != 'warning' || !isAppInitiatedAction??)> +
+ ${kcSanitize(message.summary)?no_esc} +
+ + + <#nested "form"> + + <#if realm.password && social.providers??> +
+

Или войти через

+ <#list social.providers as p> + + +
+ + + +
+ + + diff --git a/keycloak-theme/team-planner/login/theme.properties b/keycloak-theme/team-planner/login/theme.properties index e523564..3424f32 100644 --- a/keycloak-theme/team-planner/login/theme.properties +++ b/keycloak-theme/team-planner/login/theme.properties @@ -1,5 +1,6 @@ # Team Planner Keycloak Theme -parent=keycloak -import=common/keycloak +parent=base styles=css/login.css + +locales=en,ru