Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[#153] add footer (internationalized) #161

Draft
wants to merge 43 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 5 commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
21cba49
add footer
Jul 1, 2023
af37166
fix 'Not Found' error when adding user to wks
Jul 2, 2023
c1d9992
add tool versions for asdf
fey Jul 3, 2023
f479d43
fix widget script
fey Jul 3, 2023
087ca3d
Merge pull request #164 from fey/fix-widget-form
fey Jul 3, 2023
a5132e3
Merge pull request #163 from RedGradient/fix-redirect-after-adding-user
Malcom1986 Jul 4, 2023
f48ef44
add dockerfile
Jun 21, 2023
e583e35
fix
Jun 22, 2023
b152990
fix dockerfile
Jun 22, 2023
a9d323e
add cors configuration
Jul 4, 2023
ab8374a
fix typo path in script
Jul 4, 2023
b59b9ad
Merge pull request #169 from Hexlet/cors-1
fey Jul 4, 2023
9f65100
add Thymeleaf Layout dialect dependency
Jul 4, 2023
3a29ccf
rename: header.html -> head.html
Jul 4, 2023
c15f424
make templating with layouts
Jul 4, 2023
37ffe12
rename: head.html -> header.html
Jul 4, 2023
793e90b
Create requirements.yml
Salivya Jul 6, 2023
4205518
Update requirements.yml
Salivya Jul 6, 2023
1ef4a32
Update requirements.yml по комментариям пользователя fey
Salivya Jul 11, 2023
c861461
Merge pull request #171 from Salivya/Salivya-patch-1
fey Jul 11, 2023
c5c91a4
Update widget code
fey Jul 12, 2023
5574b45
remove requirements.yml to docs
AavadaKedavra Jul 14, 2023
60670c3
Issue179 - Удаление пользователя из воркспейса
AlekseyNechunaev Jul 15, 2023
ced7e2a
Issue179 - Убрал обращение к репозиторию из контроллера
AlekseyNechunaev Jul 16, 2023
814efa2
Issue165 - Убрал лишнее
AlekseyNechunaev Jul 16, 2023
359dee0
Merge pull request #182 from AavadaKedavra/444_add_test_cases
fey Jul 17, 2023
1cb4813
Issue179 - Правки по ревью, переместил кнопку удаления в таблицу
AlekseyNechunaev Jul 19, 2023
e494cea
Issue179 - Правки по ревью, изменил стиль кнопки удаления, добавил мо…
AlekseyNechunaev Jul 19, 2023
a76e651
move out styles from html to separate css file
Jul 19, 2023
d8960f3
[#181] fix workspace cards height
asenka0301 Jul 20, 2023
c0a4737
Merge pull request #183 from AlekseyNechunaev/feature/nechunaev/Issue179
Malcom1986 Jul 20, 2023
c71929b
use bootstrap classes instead of custom css properties
Jul 20, 2023
585f48f
Merge pull request #186 from asenka0301/frontend/fix-workspace-cards-…
fey Jul 20, 2023
b5e0b63
make templating with layouts
Jul 20, 2023
11fc6d7
add footer
Jul 1, 2023
3f07e5b
add Thymeleaf Layout dialect dependency
Jul 4, 2023
09c8c0d
rename: header.html -> head.html
Jul 4, 2023
0c5ef95
make templating with layouts
Jul 4, 2023
45ac594
rename: head.html -> header.html
Jul 4, 2023
57951cf
move out styles from html to separate css file
Jul 19, 2023
70ceb12
use bootstrap classes instead of custom css properties
Jul 20, 2023
668d6d7
make templating with layouts
Jul 20, 2023
e930cdb
Merge remote-tracking branch 'origin/add-footer' into add-footer
Jul 20, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,11 @@
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-thymeleaf</artifactId>
</dependency>
<dependency>
<groupId>nz.net.ultraq.thymeleaf</groupId>
<artifactId>thymeleaf-layout-dialect</artifactId>
<version>3.2.1</version>
</dependency>
<!-- WebJars -->
<dependency>
<groupId>org.webjars</groupId>
Expand Down
17 changes: 17 additions & 0 deletions src/main/resources/messages_en.properties
Original file line number Diff line number Diff line change
Expand Up @@ -79,3 +79,20 @@ text.add-user-to-wks=Adding a user to a workspace
text.hint-choose-a-user=Choose a user from the list
text.wks-delete-confirm=Are you sure you want to delete this workspace?
btn.add-to-wks=Add to workspace

# footer
about=About
source-code=Source Code
telegram=Telegram Hexlet (Volunteers)
help=Help
blog=Blog
knowledge-base=Knowledge Base
recommended-books=Recommended Books
other-opensource-projects=Other open-source projects
hexlet.cv=Hexlet CV
hexlet.editor=Hexlet Editor
hexlet.friends=Hexlet Friends
miscellaneous=Miscellaneous
code-basics=Code Basics
codebattle=Codebattle
hexlet.guides=Hexlet Guides
17 changes: 17 additions & 0 deletions src/main/resources/messages_ru.properties
Original file line number Diff line number Diff line change
Expand Up @@ -75,3 +75,20 @@ text.created-info=Создан пользователем {0} {1} в {2}
text.add-user-to-wks=Добавить пользователя в пространство
text.hint-choose-a-user=Выберите пользователя из списка
text.wks-delete-confirm=Удалить пространство?

# footer
about=О проекте
source-code=Исходный Код
telegram=Telegram Hexlet (Волонтеры)
help=Help
blog=Блог
knowledge-base=База Знаний
recommended-books=Рекомендованные Книги
other-opensource-projects=Другие open-source проекты
hexlet.cv=Hexlet-резюме
hexlet.editor=Хекслет-редактор
hexlet.friends=Друзья Хекслета
miscellaneous=Дополнительно
code-basics=Code Basics
codebattle=Кодбаттл
hexlet.guides=Гайды Хекслета
1 change: 1 addition & 0 deletions src/main/resources/templates/account/acc-info.html
Original file line number Diff line number Diff line change
Expand Up @@ -54,5 +54,6 @@ <h5 class="card-title mb-1" th:text="#{acc-info.card-title.workspaces}"></h5>
</tbody>
</table>
</main>
<footer th:replace="~{fragments/footer :: mainFooter}"></footer>
</body>
</html>
1 change: 1 addition & 0 deletions src/main/resources/templates/account/pass-update.html
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,6 @@
</div>
</div>
</main>
<footer th:replace="~{fragments/footer :: mainFooter}"></footer>
</body>
</html>
1 change: 1 addition & 0 deletions src/main/resources/templates/account/prof-update.html
Original file line number Diff line number Diff line change
Expand Up @@ -48,5 +48,6 @@
</div>
</div>
</main>
<footer th:replace="~{fragments/footer :: mainFooter}"></footer>
</body>
</html>
2 changes: 1 addition & 1 deletion src/main/resources/templates/account/signup.html
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,6 @@
</div>
</div>
</main>

<footer th:replace="~{fragments/footer :: mainFooter}"></footer>
</body>
</html>
13 changes: 13 additions & 0 deletions src/main/resources/templates/application.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!doctype html>
<html lang="en"
xmlns:th="http://www.thymeleaf.org"
xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout">
<head th:replace="~{fragments/header :: head}"></head>
<body>
<nav th:replace="~{fragments/panels :: mainNavbarTop}"></nav>

<main layout:fragment="content"></main>

<footer th:replace="~{fragments/footer :: mainFooter}"></footer>
</body>
</html>
73 changes: 37 additions & 36 deletions src/main/resources/templates/create-workspace.html
Original file line number Diff line number Diff line change
@@ -1,39 +1,40 @@
<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head th:replace="~{fragments/header :: head}"></head>
<body style="padding-top: 4.5rem">
<nav th:replace="~{fragments/panels :: mainNavbarTop}"></nav>
<main class="container">
<div class="row">
<div class="col">
<form method="post" th:action="@{/workspace}" th:object="${createWorkspace}">
<div class="form-floating mb-3">
<input class="form-control" id="inputWksUrl" placeholder="p"
th:classappend="${!#fields.hasErrors('url') && formModified ? 'is-valid' : ''}"
th:errorclass="is-invalid" th:field="*{url}"
type="url">
<label for="inputWksUrl" th:text="#{wks.placeholder.url}"></label>
<div class="invalid-feedback" th:each="err : ${#fields.errors('url')}" th:text="${err}"></div>
</div>
<div class="form-floating mb-3">
<input class="form-control" id="inputWksName" placeholder="p"
th:classappend="${!#fields.hasErrors('name') && formModified ? 'is-valid' : ''}"
th:errorclass="is-invalid" th:field="*{name}"
type="text">
<label for="inputWksName" th:text="#{wks.placeholder.name}"></label>
<div class="invalid-feedback" th:each="err : ${#fields.errors('name')}" th:text="${err}"></div>
</div>
<div class="form-floating mb-3">
<textarea class="form-control" id="inWksDesc" placeholder="p" style="height: 100px"
th:errorclass="is-invalid" th:field="*{description}"></textarea>
<label for="inWksDesc" th:text="#{wks.placeholder.descr}"></label>
<div class="invalid-feedback" th:each="err : ${#fields.errors('description')}"
th:text="${err}"></div>
</div>
<button class="btn btn-primary" type="submit" th:text="#{btn.create}"></button>
</form>
<html lang="en"
xmlns:th="http://www.thymeleaf.org"
xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
layout:decorate="application.html">

<main layout:fragment="content" class="container">
<div class="row">
<div class="col">
<form method="post" th:action="@{/workspace}" th:object="${createWorkspace}">
<div class="form-floating mb-3">
<input class="form-control" id="inputWksUrl" placeholder="p"
th:classappend="${!#fields.hasErrors('url') && formModified ? 'is-valid' : ''}"
th:errorclass="is-invalid" th:field="*{url}"
type="url">
<label for="inputWksUrl" th:text="#{wks.placeholder.url}"></label>
<div class="invalid-feedback" th:each="err : ${#fields.errors('url')}" th:text="${err}"></div>
</div>
<div class="form-floating mb-3">
<input class="form-control" id="inputWksName" placeholder="p"
th:classappend="${!#fields.hasErrors('name') && formModified ? 'is-valid' : ''}"
th:errorclass="is-invalid" th:field="*{name}"
type="text">
<label for="inputWksName" th:text="#{wks.placeholder.name}"></label>
<div class="invalid-feedback" th:each="err : ${#fields.errors('name')}" th:text="${err}"></div>
</div>
<div class="form-floating mb-3">
<textarea class="form-control" id="inWksDesc" placeholder="p" style="height: 100px"
th:errorclass="is-invalid" th:field="*{description}"></textarea>
<label for="inWksDesc" th:text="#{wks.placeholder.descr}"></label>
<div class="invalid-feedback" th:each="err : ${#fields.errors('description')}"
th:text="${err}"></div>
</div>
<button class="btn btn-primary" type="submit" th:text="#{btn.create}"></button>
</form>
</div>
</div>
</div>
</main>
</body>
</main>

</html>
8 changes: 5 additions & 3 deletions src/main/resources/templates/error-general.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head th:replace="~{fragments/header :: head}"></head>
<body>
<div class="alert alert-danger">
<span th:text="#{alert.general-error}"></span>
</div>
<main>
<div class="alert alert-danger">
<span th:text="#{alert.general-error}"></span>
</div>
</main>
</body>
</html>
92 changes: 92 additions & 0 deletions src/main/resources/templates/fragments/footer.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<body>
<footer class="d-flex p-3 bg-dark text-light" th:fragment="mainFooter">
<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" th:text="#{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"
th:text="#{source-code}"></a>
</li>
<li class="nav-item">
<a class="nav-link px-0 py-1 text-light" href="https://t.me/hexletcommunity/12"
target="_blank"
th:text="#{telegram}"></a>
</li>
</ul>
</div>
<div class="col-sm-6 col-md-3 col-lg-auto">
<p class="h5 mb-3" th:text="#{help}"></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"
th:text="#{blog}"></a>
</li>
<li class="nav-item">
<a class="nav-link px-0 py-1 text-light"
href="https://ru.hexlet.io/knowledge"
th:text="#{knowledge-base}"></a>
</li>
<li class="nav-item">
<a class="nav-link px-0 py-1 text-light"
href="https://ru.hexlet.io/pages/recommended-books"
th:text="#{recommended-books}"></a>
</li>
</ul>
</div>
<div class="col-sm-6 col-md-3 col-lg-auto">
<p class="h5 mb-3" th:text="#{other-opensource-projects}"></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"
th:text="#{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"
th:text="#{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"
th:text="#{hexlet.friends}"></a>
</li>
</ul>
</div>
<div class="col-sm-6 col-md-3 col-lg-auto">
<p class="h5 mb-3" th:text="#{miscellaneous}"></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/"
th:text="#{code-basics}"></a>
</li>
<li class="nav-item">
<a class="nav-link px-0 py-1 text-light"
href="https://codebattle.hexlet.io/"
th:text="#{codebattle}"></a>
</li>
<li class="nav-item">
<a class="nav-link px-0 py-1 text-light"
href="https://guides.hexlet.io/"
th:text="#{hexlet.editor}"></a>
</li>
</ul>
</div>
</div>
</div>
</footer>
</body>
</html>
12 changes: 12 additions & 0 deletions src/main/resources/templates/fragments/header.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,18 @@
<script th:src="@{/webjars/bootstrap/js/bootstrap.bundle.min.js}" type="text/javascript"></script>
<!-- Language switcher-->
<script th:src="@{/fragments/lang-switcher.js}" type="text/javascript"></script>
<style>
body {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Для чего используется этот стиль?
Мы не используем кастомные стили - обходимся тем, что дает нам Bootstrap
Плюс в таком виде добавляется пустое пространство над хедером.

padding-top: 4.5rem;
min-height: 100vh;
display: flex;
flex-direction: column;
}

main {
flex: 1;
}
</style>
</head>
<body>
</body>
Expand Down
Loading