Skip to content

Commit

Permalink
feat: add login template, remove flex-grow-1 and upd java's docker ve…
Browse files Browse the repository at this point in the history
…rsion

Magical div comes from apereo's thymeleaf templates !
  • Loading branch information
f-necas committed Apr 9, 2024
1 parent dd767bd commit 9601d4a
Show file tree
Hide file tree
Showing 4 changed files with 55 additions and 7 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM jetty:9.4-jre11
FROM jetty:9.4-jre17

LABEL "Organization"="geOrchestra"
LABEL "Description"="CAS server webapp"
Expand Down
47 changes: 47 additions & 0 deletions src/main/resources/templates/georchestra/login/casLoginView.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
<!DOCTYPE html>
<html xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout" layout:decorate="~{layout}">

<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge"/>
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"/>

<title th:text="#{cas.login.pagetitle}">CAS Login View</title>
<link href="../../static/css/cas.css" rel="stylesheet" th:remove="tag"/>

</head>

<body class="login mdc-typography">
<div layout:fragment="content" class="d-flex justify-content-center">
<div class="d-flex justify-content-center flex-md-row flex-column mdc-card mdc-card-content card"
th:with="loginFormEnabled=${#strings.defaultString(#themes.code('cas.login-form.enabled'), 'true') == 'true'},
loginFormViewable=${@casThymeleafLoginFormDirector.isLoginFormViewable(#vars)}">
<section id="loginForm"
th:if="${loginFormViewable and loginFormEnabled}"
class="login-section login-form card-body">
<div th:replace="fragments/loginform :: loginform">
<a href="../fragments/loginform.html">Login Form goes here</a>
</div>
</section>
<span th:if="${#bools.isFalse(delegatedAuthenticationDynamicProviderSelection) && #bools.isFalse(delegatedAuthenticationDisabled)}">
<section id="loginProviders" class="login-section login-providers card-body"
th:if="${delegatedAuthenticationProviderConfigurations} OR ${wsfedUrls}">
<div th:replace="fragments/loginProviders :: loginProviders">
<a href="fragments/loginProviders.html">loginProviders</a>
</div>
</section>
</span>
<section id="acceptto" class="login-section login-qr d-xs-none d-md-block" th:if="${accepttoApplicationId}">
<div th:replace="fragments/accepttoQRCode :: accepttoQRCode">
<a href="fragments/accepttoQRCode.html">accepttoQRCode</a>
</div>
</section>
<section id="qrlogin" class="login-section login-qr d-xs-none d-md-block card-body" th:if="${qrAuthenticationEnabled}">
<div th:replace="fragments/qrAuthentication :: qrAuthentication">
<a href="fragments/qrAuthentication.html">qrAuthentication</a>
</div>
</section>
</div>
</div>
</body>

</html>
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!DOCTYPE html>
<html xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout" layout:decorate="~{georchestra/layout}">
<html xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout" layout:decorate="~{layout}">

<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge"/>
Expand All @@ -12,18 +12,19 @@
<body>
<main role="main" class="container mt-3 mb-3">
<div layout:fragment="content">
<div class="w-50 m-auto mdc-card card p-4">
<div class="card-body">
<div class="w-100 m-auto mdc-card card p-4">
<div id="logoutBody" class="card-body">
<h2 class="banner-heading">
<i class="mdi mdi-logout fas fa-sign-out-alt"></i>
<span th:utext="#{screen.logout.header}">Log Out Successful</span>
</h2>

<p class="banner-message" th:utext="#{screen.logout.success}">You have successfully logged out of the Central Authentication
Service. You may <a href="/?login">log in</a> again.</p>
<p id="logoutMessage" class="banner-message" th:utext="#{screen.logout.success}">You have successfully logged out of the Central Authentication
Service. You may <a href="login">log in</a> again.</p>
<p class="banner-message" th:utext="#{screen.logout.security}">For security reasons, exit your web browser.</p>
</div>
</div>
</div>
</main>
</body>
</html>
</html>

0 comments on commit 9601d4a

Please sign in to comment.