Skip to content

Commit

Permalink
Add language links to header.html and cas.css
Browse files Browse the repository at this point in the history
  • Loading branch information
miesgre committed Jan 29, 2024
1 parent 37ddedc commit 0ae2b6b
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 3 deletions.
15 changes: 15 additions & 0 deletions src/main/resources/static/css/cas.css
Original file line number Diff line number Diff line change
Expand Up @@ -733,6 +733,21 @@ nav a {
@media (max-width: 450px) {
.img_logo {width: 37%;padding-bottom: 0px;}
}

.lang-link {
background-color: #343434;
font-size: 0.8rem;
color: white;
text-align: right;
padding-top: 5px;
padding-right: 11px;
padding-left: 5px;
padding-bottom: 5px;
font-weight: bold;
}
.lang-link-current {
color: lightgray
}
/***************************************************************/
/* FOOTER */

Expand Down
15 changes: 12 additions & 3 deletions src/main/resources/templates/fragments/header.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,20 @@
<body>
<div th:fragment="header">
<div class="m1">
<a href="?locale=ca" style="background-color: #3434343;font-size: 0.8rem; color: #ffffff; text-align: right; padding-top: 5px; padding-right: 11px; padding-left: 5px; padding-bottom: 5px;"><b>VA</b> </a>
<a th:with="urlBuilder=${T(org.springframework.web.servlet.support.ServletUriComponentsBuilder).fromCurrentRequest()}"
th:href="${urlBuilder.replaceQueryParam('locale', 'ca').toUriString()}"
th:class="${#locale.toString()}=='ca' ? 'lang-link lang-link-current' : 'lang-link'"
href="#"> VA </a>
|
<a href="?locale=es" style="background-color: #3434343;font-size: 0.8rem; color: #ffffff; text-align: right; padding-top: 5px; padding-right: 11px; padding-left: 5px; padding-bottom: 5px;"><b>ES</b> </a>
<a th:with="urlBuilder=${T(org.springframework.web.servlet.support.ServletUriComponentsBuilder).fromCurrentRequest()}"
th:href="${urlBuilder.replaceQueryParam('locale', 'es').toUriString()}"
th:class="${#locale.toString()}=='es' ? 'lang-link lang-link-current' : 'lang-link'"
href="#"> ES </a>
|
<a href="?locale=en" style="background-color: #3434343;font-size: 0.8rem; color: #ffffff; text-align: right; padding-top: 5px; padding-right: 11px; padding-left: 5px; padding-bottom: 5px;"><b>EN</b> </a>
<a th:with="urlBuilder=${T(org.springframework.web.servlet.support.ServletUriComponentsBuilder).fromCurrentRequest()}"
th:href="${urlBuilder.replaceQueryParam('locale', 'en').toUriString()}"
th:class="${#locale.toString()}=='en' ? 'lang-link lang-link-current' : 'lang-link'"
href="#"> EN </a>
</div>
<div class="nav-container">

Expand Down

0 comments on commit 0ae2b6b

Please sign in to comment.