Skip to content

Commit

Permalink
[Hexlet#153] add layout fragments
Browse files Browse the repository at this point in the history
  • Loading branch information
amirhraj committed Jul 15, 2023
1 parent bd9ba88 commit 97873b7
Show file tree
Hide file tree
Showing 16 changed files with 119 additions and 118 deletions.
3 changes: 1 addition & 2 deletions src/main/resources/templates/account/acc-info.html
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
<!DOCTYPE html>
<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>
layout:decorate="~{fragments/layout.html}">
<body style="padding-top: 4.5rem">
<nav th:replace="~{fragments/panels :: mainNavbarTop}"></nav>
<main class="container" th:object="${accInfo}">
Expand Down
3 changes: 1 addition & 2 deletions src/main/resources/templates/account/pass-update.html
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
<!DOCTYPE html>
<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>
layout:decorate="~{fragments/layout.html}">
<body style="padding-top: 4.5rem">
<nav th:replace="~{fragments/panels :: mainNavbarTop}"></nav>
<main class="container">
Expand Down
3 changes: 1 addition & 2 deletions src/main/resources/templates/account/prof-update.html
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
<!DOCTYPE html>
<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>
layout:decorate="~{fragments/layout.html}">
<body style="padding-top: 4.5rem">
<nav th:replace="~{fragments/panels :: mainNavbarTop}"></nav>
<main class="container">
Expand Down
3 changes: 1 addition & 2 deletions src/main/resources/templates/account/signup.html
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
<!DOCTYPE html>
<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>
layout:decorate="~{fragments/layout.html}">
<body style="padding-top: 4.5rem">
<nav th:replace="~{fragments/panels :: mainNavbarTop}"></nav>
<main class="container">
Expand Down
3 changes: 1 addition & 2 deletions src/main/resources/templates/create-workspace.html
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
<!DOCTYPE html>
<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>
layout:decorate="~{fragments/layout.html}">
<body style="padding-top: 4.5rem">
<nav th:replace="~{fragments/panels :: mainNavbarTop}"></nav>
<main class="container">
Expand Down
3 changes: 1 addition & 2 deletions src/main/resources/templates/error-general.html
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
<!DOCTYPE html>
<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>
layout:decorate="~{fragments/layout.html}">
<body>
<div class="alert alert-danger">
<span>Во время работы произошла ошибка. Попробуйте позже.</span>
Expand Down
191 changes: 103 additions & 88 deletions src/main/resources/templates/fragments/layout.html
Original file line number Diff line number Diff line change
@@ -1,96 +1,111 @@
<!DOCTYPE html>
<html lang="en"

xmlns:th="http://www.thymeleaf.org"
xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout" >
<section layout: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>
<head>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta content="width=device-width, initial-scale=1" name="viewport">

<title>Hexlet Typo Reporter</title>

<!-- Bootstrap CSS -->
<link rel="stylesheet" th:href="@{/webjars/bootstrap/css/bootstrap.min.css}" type="text/css" />
<!-- Bootstrap Bundle with Popper -->
<script th:src="@{/webjars/bootstrap/js/bootstrap.bundle.min.js}" type="text/javascript"></script>
</head>
<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>

</section>
</html>
1 change: 0 additions & 1 deletion src/main/resources/templates/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ <h1 class="display-1">Hexlet Typo Reporter</h1>
</main>
</div>
</div>
<!-- <footer th:replace="~{fragments/footer :: foot}"></footer> -->
<footer th:fragment="foot" class="d-flex p-3 bg-dark border text-light">
<div class="container-xl">
<div class="row justify-content-lg-around">
Expand Down
4 changes: 1 addition & 3 deletions src/main/resources/templates/login.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@
<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>
layout:decorate="~{fragments/layout.html}">
<body style="padding-top: 4.5rem">
<nav th:replace="~{fragments/panels :: mainNavbarTop}"></nav>
<main class="container">
Expand Down
3 changes: 1 addition & 2 deletions src/main/resources/templates/widget/report-typo-error.html
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
<!DOCTYPE html>
<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>
layout:decorate="~{fragments/layout.html}">
<body>
<div class="alert alert-danger">
<span>Во время отправки произошла ошибка. Попробуйте позже.</span>
Expand Down
4 changes: 2 additions & 2 deletions src/main/resources/templates/workspace/wks-info.html
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<!DOCTYPE html>
<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>
layout:decorate="~{fragments/layout.html}">

<body style="padding-top: 4.5rem">
<nav th:replace="~{fragments/panels :: mainNavbarTop}"></nav>
<main class="container-fluid">
Expand Down
3 changes: 1 addition & 2 deletions src/main/resources/templates/workspace/wks-settings.html
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
<!DOCTYPE html>
<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>
layout:decorate="~{fragments/layout.html}">
<body style="padding-top: 4.5rem">
<nav th:replace="~{fragments/panels :: mainNavbarTop}"></nav>
<main class="container-fluid">
Expand Down
4 changes: 2 additions & 2 deletions src/main/resources/templates/workspace/wks-typos.html
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org" xmlns:sd="http://www.w3.org/1999/xhtml"
xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
layout:decorate="~{fragments/footer.html}">
<head th:replace="~{fragments/header :: head}"></head>
layout:decorate="~{fragments/layout.html}">

<body style="padding-top: 4.5rem">
<nav th:replace="~{fragments/panels :: mainNavbarTop}"></nav>
<main class="container-fluid">
Expand Down
3 changes: 1 addition & 2 deletions src/main/resources/templates/workspace/wks-update.html
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
<!DOCTYPE html>
<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>
layout:decorate="~{fragments/layout.html}">
<body style="padding-top: 4.5rem">
<nav th:replace="~{fragments/panels :: mainNavbarTop}"></nav>
<main class="container-fluid">
Expand Down
3 changes: 1 addition & 2 deletions src/main/resources/templates/workspace/wks-users.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@
<html lang="en" xmlns:sd="http://www.w3.org/1999/xhtml"
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>
layout:decorate="~{fragments/layout.html}">
<body style="padding-top: 4.5rem">
<nav th:replace="~{fragments/panels :: mainNavbarTop}"></nav>
<main class="container-fluid">
Expand Down
3 changes: 1 addition & 2 deletions src/main/resources/templates/workspaces.html
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
<!DOCTYPE html>
<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>
layout:decorate="~{fragments/layout.html}">
<body style="padding-top: 4.5rem">
<nav th:replace="~{fragments/panels :: mainNavbarTop}"></nav>
<main class="container">
Expand Down

0 comments on commit 97873b7

Please sign in to comment.