| 1 | <#import "footer.ftl" as loginFooter> |
| 2 | <#macro registrationLayout bodyClass="" displayInfo=false displayMessage=true displayRequiredFields=false> |
| 3 | <!DOCTYPE html> |
| 4 | <html class="${properties.kcHtmlClass!}" lang="${lang}"<#if realm.internationalizationEnabled> dir="${(locale.rtl)?then('rtl','ltr')}"</#if>> |
| 5 | |
| 6 | <head> |
| 7 | <meta charset="utf-8"> |
| 8 | <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> |
| 9 | <meta name="viewport" content="width=device-width, initial-scale=1.0"> |
| 10 | |
| 11 | <#if properties.meta?has_content> |
| 12 | <#list properties.meta?split(' ') as meta> |
| 13 | <meta name="${meta?split('==')[0]}" content="${meta?split('==')[1]}"/> |
| 14 | </#list> |
| 15 | </#if> |
| 16 | <title>sso (snow sign on)</title> |
| 17 | <link rel="icon" href="${url.resourcesPath}/img/favicon.ico" /> |
| 18 | <#if properties.stylesCommon?has_content> |
| 19 | <#list properties.stylesCommon?split(' ') as style> |
| 20 | <link href="${url.resourcesCommonPath}/${style}" rel="stylesheet" /> |
| 21 | </#list> |
| 22 | </#if> |
| 23 | <#if properties.styles?has_content> |
| 24 | <#list properties.styles?split(' ') as style> |
| 25 | <link href="${url.resourcesPath}/${style}" rel="stylesheet" /> |
| 26 | </#list> |
| 27 | </#if> |
| 28 | <#if properties.scripts?has_content> |
| 29 | <#list properties.scripts?split(' ') as script> |
| 30 | <script src="${url.resourcesPath}/${script}" type="text/javascript"></script> |
| 31 | </#list> |
| 32 | </#if> |
| 33 | <script type="importmap"> |
| 34 | { |
| 35 | "imports": { |
| 36 | "rfc4648": "${url.resourcesCommonPath}/vendor/rfc4648/rfc4648.js" |
| 37 | } |
| 38 | } |
| 39 | </script> |
| 40 | <script src="${url.resourcesPath}/js/menu-button-links.js" type="module"></script> |
| 41 | <#if scripts??> |
| 42 | <#list scripts as script> |
| 43 | <script src="${script}" type="text/javascript"></script> |
| 44 | </#list> |
| 45 | </#if> |
| 46 | <script type="module"> |
| 47 | import { startSessionPolling } from "${url.resourcesPath}/js/authChecker.js"; |
| 48 | |
| 49 | startSessionPolling( |
| 50 | "${url.ssoLoginInOtherTabsUrl?no_esc}" |
| 51 | ); |
| 52 | </script> |
| 53 | <script type="module"> |
| 54 | document.addEventListener("click", (event) => { |
| 55 | const link = event.target.closest("a[data-once-link]"); |
| 56 | |
| 57 | if (!link) { |
| 58 | return; |
| 59 | } |
| 60 | |
| 61 | if (link.getAttribute("aria-disabled") === "true") { |
| 62 | event.preventDefault(); |
| 63 | return; |
| 64 | } |
| 65 | |
| 66 | const { disabledClass } = link.dataset; |
| 67 | |
| 68 | if (disabledClass) { |
| 69 | link.classList.add(...disabledClass.trim().split(/\s+/)); |
| 70 | } |
| 71 | |
| 72 | link.setAttribute("role", "link"); |
| 73 | link.setAttribute("aria-disabled", "true"); |
| 74 | }); |
| 75 | </script> |
| 76 | <#if authenticationSession??> |
| 77 | <script type="module"> |
| 78 | import { checkAuthSession } from "${url.resourcesPath}/js/authChecker.js"; |
| 79 | |
| 80 | checkAuthSession( |
| 81 | "${authenticationSession.authSessionIdHash}" |
| 82 | ); |
| 83 | </script> |
| 84 | </#if> |
| 85 | </head> |
| 86 | |
| 87 | <body class="${properties.kcBodyClass!}" data-page-id="login-${pageId}"> |
| 88 | <div class="${properties.kcLoginClass!}"> |
| 89 | <div id="kc-header" class="${properties.kcHeaderClass!}"> |
| 90 | <div id="kc-header-wrapper" |
| 91 | class="${properties.kcHeaderWrapperClass!}">${kcSanitize(msg("loginTitleHtml",(realm.displayNameHtml!'')))?no_esc}</div> |
| 92 | </div> |
| 93 | <div class="${properties.kcFormCardClass!}"> |
| 94 | <header class="${properties.kcFormHeaderClass!}"> |
| 95 | <#if realm.internationalizationEnabled && locale.supported?size gt 1> |
| 96 | <div class="${properties.kcLocaleMainClass!}" id="kc-locale"> |
| 97 | <div id="kc-locale-wrapper" class="${properties.kcLocaleWrapperClass!}"> |
| 98 | <div id="kc-locale-dropdown" class="menu-button-links ${properties.kcLocaleDropDownClass!}"> |
| 99 | <button tabindex="1" id="kc-current-locale-link" aria-label="${msg("languages")}" aria-haspopup="true" aria-expanded="false" aria-controls="language-switch1">${locale.current}</button> |
| 100 | <ul role="menu" tabindex="-1" aria-labelledby="kc-current-locale-link" aria-activedescendant="" id="language-switch1" class="${properties.kcLocaleListClass!}"> |
| 101 | <#assign i = 1> |
| 102 | <#list locale.supported as l> |
| 103 | <li class="${properties.kcLocaleListItemClass!}" role="none"> |
| 104 | <a role="menuitem" id="language-${i}" class="${properties.kcLocaleItemClass!}" href="${l.url}">${l.label}</a> |
| 105 | </li> |
| 106 | <#assign i++> |
| 107 | </#list> |
| 108 | </ul> |
| 109 | </div> |
| 110 | </div> |
| 111 | </div> |
| 112 | </#if> |
| 113 | <#if !(auth?has_content && auth.showUsername() && !auth.showResetCredentials())> |
| 114 | <#if displayRequiredFields> |
| 115 | <div class="${properties.kcContentWrapperClass!}"> |
| 116 | <div class="${properties.kcLabelWrapperClass!} subtitle"> |
| 117 | <span class="subtitle"><span class="required">*</span> ${msg("requiredFields")}</span> |
| 118 | </div> |
| 119 | <div class="col-md-10"> |
| 120 | <h1 id="kc-page-title"><#nested "header"></h1> |
| 121 | </div> |
| 122 | </div> |
| 123 | <#else> |
| 124 | <h1 id="kc-page-title"><#nested "header"></h1> |
| 125 | </#if> |
| 126 | <#else> |
| 127 | <#if displayRequiredFields> |
| 128 | <div class="${properties.kcContentWrapperClass!}"> |
| 129 | <div class="${properties.kcLabelWrapperClass!} subtitle"> |
| 130 | <span class="subtitle"><span class="required">*</span> ${msg("requiredFields")}</span> |
| 131 | </div> |
| 132 | <div class="col-md-10"> |
| 133 | <#nested "show-username"> |
| 134 | <div id="kc-username" class="${properties.kcFormGroupClass!}"> |
| 135 | <label id="kc-attempted-username">${auth.attemptedUsername}</label> |
| 136 | <a id="reset-login" href="${url.loginRestartFlowUrl}" aria-label="${msg("restartLoginTooltip")}"> |
| 137 | <div class="kc-login-tooltip"> |
| 138 | <i class="${properties.kcResetFlowIcon!}"></i> |
| 139 | <span class="kc-tooltip-text">${msg("restartLoginTooltip")}</span> |
| 140 | </div> |
| 141 | </a> |
| 142 | </div> |
| 143 | </div> |
| 144 | </div> |
| 145 | <#else> |
| 146 | <#nested "show-username"> |
| 147 | <div id="kc-username" class="${properties.kcFormGroupClass!}"> |
| 148 | <label id="kc-attempted-username">${auth.attemptedUsername}</label> |
| 149 | <a id="reset-login" href="${url.loginRestartFlowUrl}" aria-label="${msg("restartLoginTooltip")}"> |
| 150 | <div class="kc-login-tooltip"> |
| 151 | <i class="${properties.kcResetFlowIcon!}"></i> |
| 152 | <span class="kc-tooltip-text">${msg("restartLoginTooltip")}</span> |
| 153 | </div> |
| 154 | </a> |
| 155 | </div> |
| 156 | </#if> |
| 157 | </#if> |
| 158 | </header> |
| 159 | <div id="kc-content"> |
| 160 | <div id="kc-content-wrapper"> |
| 161 | |
| 162 | <#-- App-initiated actions should not see warning messages about the need to complete the action --> |
| 163 | <#-- during login. --> |
| 164 | <#if displayMessage && message?has_content && (message.type != 'warning' || !isAppInitiatedAction??)> |
| 165 | <div class="alert-${message.type} ${properties.kcAlertClass!} pf-m-<#if message.type = 'error'>danger<#else>${message.type}</#if>"> |
| 166 | <div class="pf-c-alert__icon"> |
| 167 | <#if message.type = 'success'><span class="${properties.kcFeedbackSuccessIcon!}"></span></#if> |
| 168 | <#if message.type = 'warning'><span class="${properties.kcFeedbackWarningIcon!}"></span></#if> |
| 169 | <#if message.type = 'error'><span class="${properties.kcFeedbackErrorIcon!}"></span></#if> |
| 170 | <#if message.type = 'info'><span class="${properties.kcFeedbackInfoIcon!}"></span></#if> |
| 171 | </div> |
| 172 | <span class="${properties.kcAlertTitleClass!}">${kcSanitize(message.summary)?no_esc}</span> |
| 173 | </div> |
| 174 | </#if> |
| 175 | |
| 176 | <#nested "form"> |
| 177 | |
| 178 | <#if auth?has_content && auth.showTryAnotherWayLink()> |
| 179 | <form id="kc-select-try-another-way-form" action="${url.loginAction}" method="post"> |
| 180 | <div class="${properties.kcFormGroupClass!}"> |
| 181 | <input type="hidden" name="tryAnotherWay" value="on"/> |
| 182 | <a href="#" id="try-another-way" |
| 183 | onclick="document.forms['kc-select-try-another-way-form'].requestSubmit();return false;">${msg("doTryAnotherWay")}</a> |
| 184 | </div> |
| 185 | </form> |
| 186 | </#if> |
| 187 | |
| 188 | <#nested "socialProviders"> |
| 189 | |
| 190 | <#if displayInfo> |
| 191 | <div id="kc-info" class="${properties.kcSignUpClass!}"> |
| 192 | <div id="kc-info-wrapper" class="${properties.kcInfoAreaWrapperClass!}"> |
| 193 | <#nested "info"> |
| 194 | </div> |
| 195 | </div> |
| 196 | </#if> |
| 197 | </div> |
| 198 | </div> |
| 199 | |
| 200 | |
| 201 | <@loginFooter.content/> |
| 202 | </div> |
| 203 | </div> |
| 204 | <div id='credit'> |
| 205 | <a rel="noopener noreferrer" target="_blank" href="https://www.pixiv.net/en/artworks/109102745">art by 紺屋</a> |
| 206 | </div> |
| 207 | </body> |
| 208 | </html> |
| 209 | </#macro> |