Skip to content

Commit

Permalink
[Hexlet#153] add foooter fragments
Browse files Browse the repository at this point in the history
  • Loading branch information
amirhraj committed Jul 15, 2023
1 parent 99819c7 commit bd9ba88
Show file tree
Hide file tree
Showing 18 changed files with 249 additions and 120 deletions.
5 changes: 5 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,11 @@
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>nz.net.ultraq.thymeleaf</groupId>
<artifactId>thymeleaf-layout-dialect</artifactId>
<version>3.2.0</version>
</dependency>
<!-- Security -->
<dependency>
<groupId>org.springframework.boot</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import org.springframework.context.annotation.Configuration;
import org.thymeleaf.dialect.springdata.SpringDataDialect;
import org.thymeleaf.extras.springsecurity6.dialect.SpringSecurityDialect;
// import nz.net.ultraq.thymeleaf.LayoutDialect;

@Configuration
public class ThymeleafAutoConfiguration {
Expand All @@ -12,6 +13,10 @@ public class ThymeleafAutoConfiguration {
public SpringDataDialect springDataDialect() {
return new SpringDataDialect();
}
// @Bean
// public LayoutDialect layoutDialect() {
// return new LayoutDialect();
// }

// Make available Thymeleaf Spring Security Dialect on the templates
@Bean
Expand Down
5 changes: 3 additions & 2 deletions src/main/resources/templates/account/acc-info.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<html lang="en" xmlns:th="http://www.thymeleaf.org"
xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
layout:decorate="~{fragments/footer.html}">
<head th:replace="~{fragments/header :: head}"></head>
<body style="padding-top: 4.5rem">
<nav th:replace="~{fragments/panels :: mainNavbarTop}"></nav>
Expand Down Expand Up @@ -54,6 +56,5 @@ <h5 class="card-title mb-1">Workspaces</h5>
</tbody>
</table>
</main>
<footer th:replace="~{fragments/footer :: foot}"></footer>
</body>
</html>
5 changes: 3 additions & 2 deletions src/main/resources/templates/account/pass-update.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<html lang="en" xmlns:th="http://www.thymeleaf.org"
xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
layout:decorate="~{fragments/footer.html}">
<head th:replace="~{fragments/header :: head}"></head>
<body style="padding-top: 4.5rem">
<nav th:replace="~{fragments/panels :: mainNavbarTop}"></nav>
Expand Down Expand Up @@ -37,6 +39,5 @@
</div>
</div>
</main>
<footer th:replace="~{fragments/footer :: foot}"></footer>
</body>
</html>
5 changes: 3 additions & 2 deletions src/main/resources/templates/account/prof-update.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<html lang="en" xmlns:th="http://www.thymeleaf.org"
xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
layout:decorate="~{fragments/footer.html}">
<head th:replace="~{fragments/header :: head}"></head>
<body style="padding-top: 4.5rem">
<nav th:replace="~{fragments/panels :: mainNavbarTop}"></nav>
Expand Down Expand Up @@ -48,6 +50,5 @@
</div>
</div>
</main>
<footer th:replace="~{fragments/footer :: foot}"></footer>
</body>
</html>
6 changes: 4 additions & 2 deletions src/main/resources/templates/account/signup.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<html lang="en" xmlns:th="http://www.thymeleaf.org"
xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
layout:decorate="~{fragments/footer.html}">
<head th:replace="~{fragments/header :: head}"></head>
<body style="padding-top: 4.5rem">
<nav th:replace="~{fragments/panels :: mainNavbarTop}"></nav>
Expand Down Expand Up @@ -84,6 +86,6 @@
</div>
</div>
</main>
<footer th:replace="~{fragments/footer :: foot}"></footer>

</body>
</html>
5 changes: 3 additions & 2 deletions src/main/resources/templates/create-workspace.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<html lang="en" xmlns:th="http://www.thymeleaf.org"
xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
layout:decorate="~{fragments/footer.html}">
<head th:replace="~{fragments/header :: head}"></head>
<body style="padding-top: 4.5rem">
<nav th:replace="~{fragments/panels :: mainNavbarTop}"></nav>
Expand Down Expand Up @@ -35,6 +37,5 @@
</div>
</div>
</main>
<footer th:replace="~{fragments/footer :: foot}"></footer>
</body>
</html>
5 changes: 3 additions & 2 deletions src/main/resources/templates/error-general.html
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<html lang="en" xmlns:th="http://www.thymeleaf.org"
xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
layout:decorate="~{fragments/footer.html}">
<head th:replace="~{fragments/header :: head}"></head>
<body>
<div class="alert alert-danger">
<span>Во время работы произошла ошибка. Попробуйте позже.</span>
</div>
<footer th:replace="~{fragments/footer :: foot}"></footer>
</body>
</html>
188 changes: 96 additions & 92 deletions src/main/resources/templates/fragments/footer.html
Original file line number Diff line number Diff line change
@@ -1,96 +1,100 @@
<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<body>
<footer th:fragment="foot" class="bg-dark text-light fixed-bottom">
<div class="container-xl">
<div class="row justify-content-lg-around">
<div class="col-sm-6 col-md-3 col-lg-auto">
<a class="text-dark px-0 py-0 text-decoration-none " href="https://ru.hexlet.io">
<p class="h3 mb-2 text-light">© Hexlet</p>
</a>
<ul class="nav flex-column">
<li class="nav-item">
<a class="nav-link px-0 py-1 text-light" href="https://sicp.hexlet.io/ru/pages/about">
О проекте
</a>
</li>
<li class="nav-item">
<a class="nav-link px-0 py-1 text-light" href="https://github.com/Hexlet/hexlet-correction"
target="_blank">
Исходный код
</a>
</li>
<li class="nav-item">
<a class="nav-link px-0 py-1 text-light" href="https://t.me/hexletcommunity/12"
target="_blank">
Telegram Hexlet канал Волонтеры
</a>
</li>
</ul>
</div>
<div class="col-sm-6 col-md-3 col-lg-auto">
<p class="h5 mb-3">Помощь</p>
<ul class="nav flex-column">
<li class="nav-item">
<a class="nav-link px-0 py-1 text-light" href="https://ru.hexlet.io/blog">
Блог
</a>
</li>
<li class="nav-item">
<a class="nav-link px-0 py-1 text-light" href="https://ru.hexlet.io/knowledge">
База знаний
</a>
</li>
<li class="nav-item">
<a class="nav-link px-0 py-1 text-light"
href="https://ru.hexlet.io/pages/recommended-books">
Рекомендуемые книги
</a>
</li>
</ul>
</div>
<div class="col-sm-6 col-md-3 col-lg-auto">
<p class="h5 mb-3">Другие open-source проекты</p>
<ul class="nav flex-column">
<li class="nav-item">
<a class="nav-link px-0 py-1 text-light" href="https://github.com/Hexlet/hexlet-cv">
Хекслет-резюме
</a>
</li>
<li class="nav-item">
<a class="nav-link px-0 py-1 text-light" href="https://github.com/Hexlet/hexlet-editor">
Хекслет-редактор
</a>
</li>
<li class="nav-item">
<a class="nav-link px-0 py-1 text-light" href="https://github.com/Hexlet/hexlet-friends">
Друзья Хекслета
</a>
</li>
</ul>
</div>
<div class="col-sm-6 col-md-3 col-lg-auto">
<p class="h5 mb-3">Дополнительно</p>
<ul class="nav flex-column">
<li class="nav-item">
<a class="nav-link px-0 py-1 text-light" href="https://ru.code-basics.com/">
Code Basics
</a>
</li>
<li class="nav-item">
<a class="nav-link px-0 py-1 text-light" href="https://codebattle.hexlet.io/">
Кодбаттл
</a>
</li>
<li class="nav-item">
<a class="nav-link px-0 py-1 text-light" href="https://guides.hexlet.io/">
Гайды Хекслета
</a>
</li>
</ul>
<html lang="en"

xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout" >
<section layout:fragment="foot" class="bg-dark text-light fixed-bottom">
<footer>
<div class="container-xl">
<div class="row justify-content-lg-around">
<div class="col-sm-6 col-md-3 col-lg-auto">
<a class="text-dark px-0 py-0 text-decoration-none " href="https://ru.hexlet.io">
<p class="h3 mb-2 text-light">© Hexlet</p>
</a>
<ul class="nav flex-column">
<li class="nav-item">
<a class="nav-link px-0 py-1 text-light" href="https://sicp.hexlet.io/ru/pages/about">
О проекте
</a>
</li>
<li class="nav-item">
<a class="nav-link px-0 py-1 text-light" href="https://github.com/Hexlet/hexlet-correction"
target="_blank">
Исходный код
</a>
</li>
<li class="nav-item">
<a class="nav-link px-0 py-1 text-light" href="https://t.me/hexletcommunity/12"
target="_blank">
Telegram Hexlet канал Волонтеры
</a>
</li>
</ul>
</div>
<div class="col-sm-6 col-md-3 col-lg-auto">
<p class="h5 mb-3">Помощь</p>
<ul class="nav flex-column">
<li class="nav-item">
<a class="nav-link px-0 py-1 text-light" href="https://ru.hexlet.io/blog">
Блог
</a>
</li>
<li class="nav-item">
<a class="nav-link px-0 py-1 text-light" href="https://ru.hexlet.io/knowledge">
База знаний
</a>
</li>
<li class="nav-item">
<a class="nav-link px-0 py-1 text-light"
href="https://ru.hexlet.io/pages/recommended-books">
Рекомендуемые книги
</a>
</li>
</ul>
</div>
<div class="col-sm-6 col-md-3 col-lg-auto">
<p class="h5 mb-3">Другие open-source проекты</p>
<ul class="nav flex-column">
<li class="nav-item">
<a class="nav-link px-0 py-1 text-light" href="https://github.com/Hexlet/hexlet-cv">
Хекслет-резюме
</a>
</li>
<li class="nav-item">
<a class="nav-link px-0 py-1 text-light" href="https://github.com/Hexlet/hexlet-editor">
Хекслет-редактор
</a>
</li>
<li class="nav-item">
<a class="nav-link px-0 py-1 text-light" href="https://github.com/Hexlet/hexlet-friends">
Друзья Хекслета
</a>
</li>
</ul>
</div>
<div class="col-sm-6 col-md-3 col-lg-auto">
<p class="h5 mb-3">Дополнительно</p>
<ul class="nav flex-column">
<li class="nav-item">
<a class="nav-link px-0 py-1 text-light" href="https://ru.code-basics.com/">
Code Basics
</a>
</li>
<li class="nav-item">
<a class="nav-link px-0 py-1 text-light" href="https://codebattle.hexlet.io/">
Кодбаттл
</a>
</li>
<li class="nav-item">
<a class="nav-link px-0 py-1 text-light" href="https://guides.hexlet.io/">
Гайды Хекслета
</a>
</li>
</ul>
</div>
</div>
</div>
</div>
</footer>
</body>
</footer>

</section>

</html>
Loading

0 comments on commit bd9ba88

Please sign in to comment.