From 21cba494b9f5aa2e840c55656b5cef5155b27cfd Mon Sep 17 00:00:00 2001 From: redgradient Date: Sat, 1 Jul 2023 18:47:38 +0400 Subject: [PATCH 01/35] add footer --- src/main/resources/messages_en.properties | 17 ++++ src/main/resources/messages_ru.properties | 17 ++++ .../resources/templates/account/acc-info.html | 1 + .../templates/account/pass-update.html | 1 + .../templates/account/prof-update.html | 1 + .../resources/templates/account/signup.html | 2 +- .../resources/templates/create-workspace.html | 1 + .../resources/templates/error-general.html | 9 +- .../resources/templates/fragments/footer.html | 92 +++++++++++++++++ .../resources/templates/fragments/header.html | 11 +++ src/main/resources/templates/index.html | 94 +----------------- src/main/resources/templates/login.html | 2 +- .../templates/workspace/wks-info.html | 99 ++++++++++--------- .../templates/workspace/wks-settings.html | 1 + .../templates/workspace/wks-typos.html | 1 + .../templates/workspace/wks-update.html | 1 + .../templates/workspace/wks-users.html | 1 + src/main/resources/templates/workspaces.html | 1 + 18 files changed, 206 insertions(+), 146 deletions(-) create mode 100644 src/main/resources/templates/fragments/footer.html diff --git a/src/main/resources/messages_en.properties b/src/main/resources/messages_en.properties index 94c21b8e..ad2c1161 100644 --- a/src/main/resources/messages_en.properties +++ b/src/main/resources/messages_en.properties @@ -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 diff --git a/src/main/resources/messages_ru.properties b/src/main/resources/messages_ru.properties index c8138891..513b2219 100644 --- a/src/main/resources/messages_ru.properties +++ b/src/main/resources/messages_ru.properties @@ -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=Гайды Хекслета diff --git a/src/main/resources/templates/account/acc-info.html b/src/main/resources/templates/account/acc-info.html index f6c0a46b..f10fb35b 100644 --- a/src/main/resources/templates/account/acc-info.html +++ b/src/main/resources/templates/account/acc-info.html @@ -54,5 +54,6 @@
+ diff --git a/src/main/resources/templates/account/pass-update.html b/src/main/resources/templates/account/pass-update.html index 00009fd4..a2f78b7e 100644 --- a/src/main/resources/templates/account/pass-update.html +++ b/src/main/resources/templates/account/pass-update.html @@ -37,5 +37,6 @@ + diff --git a/src/main/resources/templates/account/prof-update.html b/src/main/resources/templates/account/prof-update.html index 8d0bc6e2..332495e8 100644 --- a/src/main/resources/templates/account/prof-update.html +++ b/src/main/resources/templates/account/prof-update.html @@ -48,5 +48,6 @@ + diff --git a/src/main/resources/templates/account/signup.html b/src/main/resources/templates/account/signup.html index 8bd17431..356ddd4f 100644 --- a/src/main/resources/templates/account/signup.html +++ b/src/main/resources/templates/account/signup.html @@ -84,6 +84,6 @@ - + diff --git a/src/main/resources/templates/create-workspace.html b/src/main/resources/templates/create-workspace.html index 88c0a31f..8c4417e3 100644 --- a/src/main/resources/templates/create-workspace.html +++ b/src/main/resources/templates/create-workspace.html @@ -35,5 +35,6 @@ + diff --git a/src/main/resources/templates/error-general.html b/src/main/resources/templates/error-general.html index 9fbfdc1c..ebc3da85 100644 --- a/src/main/resources/templates/error-general.html +++ b/src/main/resources/templates/error-general.html @@ -2,8 +2,11 @@ -
- -
+
+
+ +
+
+ diff --git a/src/main/resources/templates/fragments/footer.html b/src/main/resources/templates/fragments/footer.html new file mode 100644 index 00000000..2fd9e661 --- /dev/null +++ b/src/main/resources/templates/fragments/footer.html @@ -0,0 +1,92 @@ + + + + + + diff --git a/src/main/resources/templates/fragments/header.html b/src/main/resources/templates/fragments/header.html index 2d4c2f1c..88ec2546 100644 --- a/src/main/resources/templates/fragments/header.html +++ b/src/main/resources/templates/fragments/header.html @@ -13,6 +13,17 @@ + diff --git a/src/main/resources/templates/index.html b/src/main/resources/templates/index.html index 9e4b8376..61ce3206 100644 --- a/src/main/resources/templates/index.html +++ b/src/main/resources/templates/index.html @@ -6,7 +6,7 @@ -
+

Hexlet Typo Reporter

Сервис для отправки сообщений об ошибках в тексте на Вашем сайте

@@ -27,98 +27,8 @@

Hexlet Typo Reporter

+ - diff --git a/src/main/resources/templates/login.html b/src/main/resources/templates/login.html index c99d477e..d006af5a 100644 --- a/src/main/resources/templates/login.html +++ b/src/main/resources/templates/login.html @@ -29,6 +29,6 @@ - + diff --git a/src/main/resources/templates/workspace/wks-info.html b/src/main/resources/templates/workspace/wks-info.html index 6077b57b..d449122a 100644 --- a/src/main/resources/templates/workspace/wks-info.html +++ b/src/main/resources/templates/workspace/wks-info.html @@ -3,59 +3,60 @@ -
-
-
-
-
-
-

-
-
-
-
-
-
-
-

-

-
- - -
-
- -
+ + diff --git a/src/main/resources/templates/workspace/wks-settings.html b/src/main/resources/templates/workspace/wks-settings.html index 16bbeec2..0a5e767b 100644 --- a/src/main/resources/templates/workspace/wks-settings.html +++ b/src/main/resources/templates/workspace/wks-settings.html @@ -43,5 +43,6 @@ + diff --git a/src/main/resources/templates/workspace/wks-typos.html b/src/main/resources/templates/workspace/wks-typos.html index 91bf0711..92fcd797 100644 --- a/src/main/resources/templates/workspace/wks-typos.html +++ b/src/main/resources/templates/workspace/wks-typos.html @@ -168,5 +168,6 @@ + diff --git a/src/main/resources/templates/workspace/wks-update.html b/src/main/resources/templates/workspace/wks-update.html index b7bf1f6c..601fcc01 100644 --- a/src/main/resources/templates/workspace/wks-update.html +++ b/src/main/resources/templates/workspace/wks-update.html @@ -59,5 +59,6 @@ + diff --git a/src/main/resources/templates/workspace/wks-users.html b/src/main/resources/templates/workspace/wks-users.html index a606c50a..3984b04b 100644 --- a/src/main/resources/templates/workspace/wks-users.html +++ b/src/main/resources/templates/workspace/wks-users.html @@ -135,5 +135,6 @@ + diff --git a/src/main/resources/templates/workspaces.html b/src/main/resources/templates/workspaces.html index 944d1cea..537b6389 100644 --- a/src/main/resources/templates/workspaces.html +++ b/src/main/resources/templates/workspaces.html @@ -18,5 +18,6 @@
+ From af37166be10d9655dc5719e6c2385dc3ce7a1862 Mon Sep 17 00:00:00 2001 From: redgradient Date: Sun, 2 Jul 2023 14:27:51 +0400 Subject: [PATCH 02/35] fix 'Not Found' error when adding user to wks --- .../java/io/hexlet/typoreporter/web/WorkspaceController.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/io/hexlet/typoreporter/web/WorkspaceController.java b/src/main/java/io/hexlet/typoreporter/web/WorkspaceController.java index a91419a2..0d2f5b1c 100644 --- a/src/main/java/io/hexlet/typoreporter/web/WorkspaceController.java +++ b/src/main/java/io/hexlet/typoreporter/web/WorkspaceController.java @@ -266,13 +266,13 @@ public String getWorkspaceUsersPage(Model model, public String addUser(@RequestParam String email, @PathVariable String wksName) { try { workspaceRoleService.addAccountToWorkspace(wksName, email); - return "redirect:/workspace/{wksName}/users/"; + return "redirect:/workspace/{wksName}/users"; } catch (WorkspaceNotFoundException e) { log.error("Workspace with name {} not found", wksName); return "redirect:/workspaces"; } catch (AccountNotFoundException e) { log.error("Account with email {} not found", email); - return "redirect:/workspace/{wksName}/users/"; + return "redirect:/workspace/{wksName}/users"; } } From c1d9992ad823bd254e8b1aaf91fe9e40e50d110a Mon Sep 17 00:00:00 2001 From: feycot Date: Mon, 3 Jul 2023 19:38:31 +0500 Subject: [PATCH 03/35] add tool versions for asdf --- .tool-versions | 1 + 1 file changed, 1 insertion(+) create mode 100644 .tool-versions diff --git a/.tool-versions b/.tool-versions new file mode 100644 index 00000000..d4e98287 --- /dev/null +++ b/.tool-versions @@ -0,0 +1 @@ +java openjdk-19.0.2 From f479d433b6a1e102405e2a1a5d1ff54ac4ffb301 Mon Sep 17 00:00:00 2001 From: feycot Date: Mon, 3 Jul 2023 19:49:07 +0500 Subject: [PATCH 04/35] fix widget script --- .../resources/templates/workspace/wks-settings.html | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/main/resources/templates/workspace/wks-settings.html b/src/main/resources/templates/workspace/wks-settings.html index 16bbeec2..ab8ba8b0 100644 --- a/src/main/resources/templates/workspace/wks-settings.html +++ b/src/main/resources/templates/workspace/wks-settings.html @@ -32,12 +32,16 @@

-

+                    
+                        
+<script src="https://cdn.jsdelivr.net/gh/hexlet/hexlet-correction@main/src/widget/index.js"></script>
+
 <script>
-    handleTypoReporter({ authorizationToken: [[${wksBasicToken}]],
-    workSpaceUrl: [[${rootUrl}]], workSpaceId: [[${wksId}]]})
+    handleTypoReporter({ authorizationToken: '[[${wksBasicToken}]]',
+    workSpaceUrl: '[[${rootUrl}]]', workSpaceId: '[[${wksId}]]'})
 </script>
-    
+
+
From f48ef444600139005306fd11bbab1abccedee0fc Mon Sep 17 00:00:00 2001 From: Maksim Litvinov Date: Wed, 21 Jun 2023 17:44:10 +0300 Subject: [PATCH 05/35] add dockerfile --- Dockerfile | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 00000000..a96541f4 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,7 @@ +FROM maven:3.9.2-eclipse-temurin-20 + +COPY . . + +RUN ./mvnw clean package -Dmaven.test.skip=true + +CMD java -Xmx256m -jar target/typoreporter-*.jar --spring.profiles.active=default,prod --server.port=$PORT From e583e35451212a2a11f57374fc5cab501189826a Mon Sep 17 00:00:00 2001 From: Maksim Litvinov Date: Thu, 22 Jun 2023 10:50:06 +0300 Subject: [PATCH 06/35] fix --- Dockerfile | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index a96541f4..0a7ff17e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,6 +2,4 @@ FROM maven:3.9.2-eclipse-temurin-20 COPY . . -RUN ./mvnw clean package -Dmaven.test.skip=true - -CMD java -Xmx256m -jar target/typoreporter-*.jar --spring.profiles.active=default,prod --server.port=$PORT +CMD mvn spring-boot:run -Dspring-boot.run.arguments="--spring.profiles.active=prod,--server.port=$PORT" From b152990ddeaed186e66b14a701829c8f064f670c Mon Sep 17 00:00:00 2001 From: Maksim Litvinov Date: Thu, 22 Jun 2023 11:30:23 +0300 Subject: [PATCH 07/35] fix dockerfile --- Dockerfile | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 0a7ff17e..ad73c17c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,20 @@ -FROM maven:3.9.2-eclipse-temurin-20 +FROM maven:3.9.2-eclipse-temurin-20 AS build + + +# CMD mvn spring-boot:run -Dspring-boot.run.arguments="--spring.profiles.active=prod,--server.port=$PORT" + + +# +# Build stage +# COPY . . +RUN mvn clean package -DskipTests + +# +# Package stage +# +# FROM openjdk:20-jdk-slim +# COPY --from=build ./target/typoreporter-*.jar typoreporter.jar -CMD mvn spring-boot:run -Dspring-boot.run.arguments="--spring.profiles.active=prod,--server.port=$PORT" +CMD java -Xmx256m -jar target/typoreporter-*.jar --spring.profiles.active=default,prod --server.port=$PORT From a9d323eda2de311fb7550223dad9f08d2a515047 Mon Sep 17 00:00:00 2001 From: Maksim Litvinov Date: Tue, 4 Jul 2023 17:28:05 +0300 Subject: [PATCH 08/35] add cors configuration --- .../typoreporter/config/SecurityConfig.java | 17 +++++++++++++++++ .../hexlet/typoreporter/web/WorkspaceApi.java | 5 ----- 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/src/main/java/io/hexlet/typoreporter/config/SecurityConfig.java b/src/main/java/io/hexlet/typoreporter/config/SecurityConfig.java index 306d13c4..e2978738 100644 --- a/src/main/java/io/hexlet/typoreporter/config/SecurityConfig.java +++ b/src/main/java/io/hexlet/typoreporter/config/SecurityConfig.java @@ -19,6 +19,10 @@ import org.springframework.security.web.context.RequestAttributeSecurityContextRepository; import org.springframework.security.web.context.SecurityContextRepository; import org.springframework.security.web.util.matcher.AntPathRequestMatcher; +import org.springframework.web.cors.CorsConfiguration; +import org.springframework.web.cors.CorsConfigurationSource; +import org.springframework.web.cors.UrlBasedCorsConfigurationSource; +import java.util.List; import static org.springframework.http.HttpMethod.GET; import static org.springframework.http.HttpMethod.POST; @@ -99,4 +103,17 @@ public SecurityFilterChain filterChain(HttpSecurity http, public AccessDeniedHandler accessDeniedHandler() { return new CustomAccessDeniedHandler(); } + + @Bean + CorsConfigurationSource corsConfigurationSource() { + CorsConfiguration configuration = new CorsConfiguration(); + // TODO: allow sending a request only from the pages specified in the Workspace settings + configuration.addAllowedOriginPattern("*"); + configuration.addAllowedHeader("*"); + configuration.setAllowCredentials(true); + configuration.setAllowedMethods(List.of("POST", "GET")); + UrlBasedCorsConfigurationSource source = new UrlBasedCorsConfigurationSource(); + source.registerCorsConfiguration("/**", configuration); + return source; + } } diff --git a/src/main/java/io/hexlet/typoreporter/web/WorkspaceApi.java b/src/main/java/io/hexlet/typoreporter/web/WorkspaceApi.java index 42894ed5..6826e87b 100644 --- a/src/main/java/io/hexlet/typoreporter/web/WorkspaceApi.java +++ b/src/main/java/io/hexlet/typoreporter/web/WorkspaceApi.java @@ -26,11 +26,6 @@ public class WorkspaceApi { private final TypoService service; @PostMapping("/{id}/typos") - // TODO: allow sending a request only from the pages specified in the Workspace settings - @CrossOrigin( - originPatterns = {"*"}, - allowCredentials = "true" - ) public ResponseEntity addTypoReport(@PathVariable long id, Authentication authentication, @Valid @RequestBody TypoReport typoReport, From ab8374abe7978350d5c5fb96bb6e5f7ee90ad69f Mon Sep 17 00:00:00 2001 From: Maksim Litvinov Date: Tue, 4 Jul 2023 17:31:09 +0300 Subject: [PATCH 09/35] fix typo path in script --- src/widget/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/widget/index.js b/src/widget/index.js index 48b3e097..78d90fe1 100644 --- a/src/widget/index.js +++ b/src/widget/index.js @@ -221,7 +221,7 @@ const handleTypoReporter = (options) => { data.reporterName = name.value === '' ? 'Anonymous' : name.value; data.reporterComment = commentField.value; try { - await fetch(`${workSpaceUrl}/${workSpaceId}/typos`, { + await fetch(`${workSpaceUrl}/api/workspaces/${workSpaceId}/typos`, { method: 'POST', headers: { 'Content-Type': 'application/json', From 9f651000a8e4e6cecf614d11c6ad51148b3d9794 Mon Sep 17 00:00:00 2001 From: redgradient Date: Tue, 4 Jul 2023 22:54:03 +0400 Subject: [PATCH 10/35] add Thymeleaf Layout dialect dependency --- pom.xml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pom.xml b/pom.xml index 08b1e839..a965c1da 100644 --- a/pom.xml +++ b/pom.xml @@ -65,6 +65,11 @@ org.springframework.boot spring-boot-starter-thymeleaf + + nz.net.ultraq.thymeleaf + thymeleaf-layout-dialect + 3.2.1 + org.webjars From 3a29ccf3a5f3340ff860b39a51d67d4a67a6ef58 Mon Sep 17 00:00:00 2001 From: redgradient Date: Tue, 4 Jul 2023 22:56:47 +0400 Subject: [PATCH 11/35] rename: header.html -> head.html --- src/main/resources/templates/application.html | 13 +++++++++++++ src/main/resources/templates/error-general.html | 3 +-- .../templates/fragments/{header.html => head.html} | 1 + src/main/resources/templates/index.html | 2 +- .../templates/widget/report-typo-error.html | 2 +- .../templates/widget/report-typo-success.html | 2 +- src/main/resources/templates/widget/typo-form.html | 2 +- 7 files changed, 19 insertions(+), 6 deletions(-) create mode 100644 src/main/resources/templates/application.html rename src/main/resources/templates/fragments/{header.html => head.html} (96%) diff --git a/src/main/resources/templates/application.html b/src/main/resources/templates/application.html new file mode 100644 index 00000000..40f7126e --- /dev/null +++ b/src/main/resources/templates/application.html @@ -0,0 +1,13 @@ + + + + + + +
+ +
+ + diff --git a/src/main/resources/templates/error-general.html b/src/main/resources/templates/error-general.html index ebc3da85..07f05f1d 100644 --- a/src/main/resources/templates/error-general.html +++ b/src/main/resources/templates/error-general.html @@ -1,12 +1,11 @@ - +
-
diff --git a/src/main/resources/templates/fragments/header.html b/src/main/resources/templates/fragments/head.html similarity index 96% rename from src/main/resources/templates/fragments/header.html rename to src/main/resources/templates/fragments/head.html index 88ec2546..12f9aa11 100644 --- a/src/main/resources/templates/fragments/header.html +++ b/src/main/resources/templates/fragments/head.html @@ -15,6 +15,7 @@ + From d8960f342a7a7ede9a8aca75e6b84f63d01daf92 Mon Sep 17 00:00:00 2001 From: Nastya Date: Thu, 20 Jul 2023 12:59:43 +0300 Subject: [PATCH 25/35] [#181] fix workspace cards height --- src/main/resources/templates/workspaces.html | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/resources/templates/workspaces.html b/src/main/resources/templates/workspaces.html index 944d1cea..30b0c3c4 100644 --- a/src/main/resources/templates/workspaces.html +++ b/src/main/resources/templates/workspaces.html @@ -6,10 +6,12 @@
-
+

+
+
-
+ + diff --git a/src/main/resources/templates/workspace/wks-update.html b/src/main/resources/templates/workspace/wks-update.html index 601fcc01..b1ca35f8 100644 --- a/src/main/resources/templates/workspace/wks-update.html +++ b/src/main/resources/templates/workspace/wks-update.html @@ -1,64 +1,64 @@ - - - - -
-
-
-
-
-
-

-
-
-
-
-
- -
- - -
-
-
- - -
-
- - -
+ + +
+
+
+
+
+
+

-
-
    -
  • - [[*{key.toString()}]][[*{value}]] -
  • -
  • - TOTAL -
  • -
+
+
+
+
+ +
+ + +
+
+
+ + +
+
+ + +
+
+
+
    +
  • + [[*{key.toString()}]][[*{value}]] +
  • +
  • + TOTAL +
  • +
+
-
-
-
- +
+ diff --git a/src/main/resources/templates/workspace/wks-users.html b/src/main/resources/templates/workspace/wks-users.html index 3984b04b..1e188644 100644 --- a/src/main/resources/templates/workspace/wks-users.html +++ b/src/main/resources/templates/workspace/wks-users.html @@ -1,140 +1,141 @@ - - - - -
- - -
-
- + + From 11fc6d7945f2773b9848508c819b7791e6e94bd1 Mon Sep 17 00:00:00 2001 From: redgradient Date: Sat, 1 Jul 2023 18:47:38 +0400 Subject: [PATCH 28/35] add footer --- src/main/resources/messages_en.properties | 17 ++++ src/main/resources/messages_ru.properties | 17 ++++ .../resources/templates/account/acc-info.html | 1 + .../templates/account/pass-update.html | 1 + .../templates/account/prof-update.html | 1 + .../resources/templates/account/signup.html | 2 +- .../resources/templates/create-workspace.html | 1 + .../resources/templates/error-general.html | 9 +- .../resources/templates/fragments/footer.html | 92 +++++++++++++++++ .../resources/templates/fragments/header.html | 11 +++ src/main/resources/templates/index.html | 94 +----------------- src/main/resources/templates/login.html | 2 +- .../templates/workspace/wks-info.html | 99 ++++++++++--------- .../templates/workspace/wks-settings.html | 1 + .../templates/workspace/wks-typos.html | 1 + .../templates/workspace/wks-update.html | 1 + .../templates/workspace/wks-users.html | 1 + src/main/resources/templates/workspaces.html | 1 + 18 files changed, 206 insertions(+), 146 deletions(-) create mode 100644 src/main/resources/templates/fragments/footer.html diff --git a/src/main/resources/messages_en.properties b/src/main/resources/messages_en.properties index 700f0bed..d723dd3c 100644 --- a/src/main/resources/messages_en.properties +++ b/src/main/resources/messages_en.properties @@ -81,3 +81,20 @@ 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 btn.delete-from-wks=Delete from 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 diff --git a/src/main/resources/messages_ru.properties b/src/main/resources/messages_ru.properties index 49b4e5ee..ef97c02a 100644 --- a/src/main/resources/messages_ru.properties +++ b/src/main/resources/messages_ru.properties @@ -77,3 +77,20 @@ text.add-user-to-wks=Добавить пользователя в простра text.confirm-delete-user-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=Гайды Хекслета diff --git a/src/main/resources/templates/account/acc-info.html b/src/main/resources/templates/account/acc-info.html index f6c0a46b..f10fb35b 100644 --- a/src/main/resources/templates/account/acc-info.html +++ b/src/main/resources/templates/account/acc-info.html @@ -54,5 +54,6 @@
+
diff --git a/src/main/resources/templates/account/pass-update.html b/src/main/resources/templates/account/pass-update.html index 00009fd4..a2f78b7e 100644 --- a/src/main/resources/templates/account/pass-update.html +++ b/src/main/resources/templates/account/pass-update.html @@ -37,5 +37,6 @@ +
diff --git a/src/main/resources/templates/account/prof-update.html b/src/main/resources/templates/account/prof-update.html index 8d0bc6e2..332495e8 100644 --- a/src/main/resources/templates/account/prof-update.html +++ b/src/main/resources/templates/account/prof-update.html @@ -48,5 +48,6 @@ +
diff --git a/src/main/resources/templates/account/signup.html b/src/main/resources/templates/account/signup.html index 8bd17431..356ddd4f 100644 --- a/src/main/resources/templates/account/signup.html +++ b/src/main/resources/templates/account/signup.html @@ -84,6 +84,6 @@ - +
diff --git a/src/main/resources/templates/create-workspace.html b/src/main/resources/templates/create-workspace.html index 88c0a31f..8c4417e3 100644 --- a/src/main/resources/templates/create-workspace.html +++ b/src/main/resources/templates/create-workspace.html @@ -35,5 +35,6 @@ +
diff --git a/src/main/resources/templates/error-general.html b/src/main/resources/templates/error-general.html index 9fbfdc1c..ebc3da85 100644 --- a/src/main/resources/templates/error-general.html +++ b/src/main/resources/templates/error-general.html @@ -2,8 +2,11 @@ -
- -
+
+
+ +
+
+
diff --git a/src/main/resources/templates/fragments/footer.html b/src/main/resources/templates/fragments/footer.html new file mode 100644 index 00000000..2fd9e661 --- /dev/null +++ b/src/main/resources/templates/fragments/footer.html @@ -0,0 +1,92 @@ + + + +
+
+
+
+ +

© Hexlet

+
+ +
+
+

+ +
+
+

+ +
+
+

+ +
+
+
+
+ + diff --git a/src/main/resources/templates/fragments/header.html b/src/main/resources/templates/fragments/header.html index 2d4c2f1c..88ec2546 100644 --- a/src/main/resources/templates/fragments/header.html +++ b/src/main/resources/templates/fragments/header.html @@ -13,6 +13,17 @@ + diff --git a/src/main/resources/templates/index.html b/src/main/resources/templates/index.html index 9e4b8376..61ce3206 100644 --- a/src/main/resources/templates/index.html +++ b/src/main/resources/templates/index.html @@ -6,7 +6,7 @@ -
+

Hexlet Typo Reporter

Сервис для отправки сообщений об ошибках в тексте на Вашем сайте

@@ -27,98 +27,8 @@

Hexlet Typo Reporter

+
- diff --git a/src/main/resources/templates/login.html b/src/main/resources/templates/login.html index c99d477e..d006af5a 100644 --- a/src/main/resources/templates/login.html +++ b/src/main/resources/templates/login.html @@ -29,6 +29,6 @@ - +
diff --git a/src/main/resources/templates/workspace/wks-info.html b/src/main/resources/templates/workspace/wks-info.html index 6077b57b..d449122a 100644 --- a/src/main/resources/templates/workspace/wks-info.html +++ b/src/main/resources/templates/workspace/wks-info.html @@ -3,59 +3,60 @@ -
-
-
-
-
-
-

-
-
-
-
-
-
-
-

-

-
- - -
-
- -
+ +
diff --git a/src/main/resources/templates/workspace/wks-settings.html b/src/main/resources/templates/workspace/wks-settings.html index ab8ba8b0..1be81db9 100644 --- a/src/main/resources/templates/workspace/wks-settings.html +++ b/src/main/resources/templates/workspace/wks-settings.html @@ -47,5 +47,6 @@ +
diff --git a/src/main/resources/templates/workspace/wks-typos.html b/src/main/resources/templates/workspace/wks-typos.html index 91bf0711..92fcd797 100644 --- a/src/main/resources/templates/workspace/wks-typos.html +++ b/src/main/resources/templates/workspace/wks-typos.html @@ -168,5 +168,6 @@ +
diff --git a/src/main/resources/templates/workspace/wks-update.html b/src/main/resources/templates/workspace/wks-update.html index b7bf1f6c..601fcc01 100644 --- a/src/main/resources/templates/workspace/wks-update.html +++ b/src/main/resources/templates/workspace/wks-update.html @@ -59,5 +59,6 @@ +
diff --git a/src/main/resources/templates/workspace/wks-users.html b/src/main/resources/templates/workspace/wks-users.html index 7351f137..bd1750be 100644 --- a/src/main/resources/templates/workspace/wks-users.html +++ b/src/main/resources/templates/workspace/wks-users.html @@ -149,5 +149,6 @@ +
diff --git a/src/main/resources/templates/workspaces.html b/src/main/resources/templates/workspaces.html index 30b0c3c4..59ed7078 100644 --- a/src/main/resources/templates/workspaces.html +++ b/src/main/resources/templates/workspaces.html @@ -20,5 +20,6 @@
+
From 3f07e5bf5a53f404ea2c35da2e6f8f2d601a6d36 Mon Sep 17 00:00:00 2001 From: redgradient Date: Tue, 4 Jul 2023 22:54:03 +0400 Subject: [PATCH 29/35] add Thymeleaf Layout dialect dependency --- pom.xml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pom.xml b/pom.xml index 08b1e839..a965c1da 100644 --- a/pom.xml +++ b/pom.xml @@ -65,6 +65,11 @@ org.springframework.boot spring-boot-starter-thymeleaf
+ + nz.net.ultraq.thymeleaf + thymeleaf-layout-dialect + 3.2.1 + org.webjars From 09c8c0d55a469112a904170862320374721d8b91 Mon Sep 17 00:00:00 2001 From: redgradient Date: Tue, 4 Jul 2023 22:56:47 +0400 Subject: [PATCH 30/35] rename: header.html -> head.html --- src/main/resources/templates/application.html | 13 +++++++++++++ src/main/resources/templates/error-general.html | 3 +-- .../templates/fragments/{header.html => head.html} | 1 + src/main/resources/templates/index.html | 2 +- .../templates/widget/report-typo-error.html | 2 +- .../templates/widget/report-typo-success.html | 2 +- src/main/resources/templates/widget/typo-form.html | 2 +- 7 files changed, 19 insertions(+), 6 deletions(-) create mode 100644 src/main/resources/templates/application.html rename src/main/resources/templates/fragments/{header.html => head.html} (96%) diff --git a/src/main/resources/templates/application.html b/src/main/resources/templates/application.html new file mode 100644 index 00000000..40f7126e --- /dev/null +++ b/src/main/resources/templates/application.html @@ -0,0 +1,13 @@ + + + + + + +
+ +
+ + diff --git a/src/main/resources/templates/error-general.html b/src/main/resources/templates/error-general.html index ebc3da85..07f05f1d 100644 --- a/src/main/resources/templates/error-general.html +++ b/src/main/resources/templates/error-general.html @@ -1,12 +1,11 @@ - +
-
diff --git a/src/main/resources/templates/fragments/header.html b/src/main/resources/templates/fragments/head.html similarity index 96% rename from src/main/resources/templates/fragments/header.html rename to src/main/resources/templates/fragments/head.html index 88ec2546..12f9aa11 100644 --- a/src/main/resources/templates/fragments/header.html +++ b/src/main/resources/templates/fragments/head.html @@ -15,6 +15,7 @@ + From 70ceb12392d92e1f5e5231454cf0b716996a4496 Mon Sep 17 00:00:00 2001 From: redgradient Date: Thu, 20 Jul 2023 21:20:00 +0400 Subject: [PATCH 34/35] use bootstrap classes instead of custom css properties --- src/main/resources/static/css/styles.css | 10 +- src/main/resources/templates/application.html | 4 +- .../resources/templates/create-workspace.html | 2 +- .../resources/templates/fragments/panels.html | 144 +++++++++--------- src/main/resources/templates/login.html | 2 +- 5 files changed, 78 insertions(+), 84 deletions(-) diff --git a/src/main/resources/static/css/styles.css b/src/main/resources/static/css/styles.css index 62fba1fa..a8d4cd4d 100644 --- a/src/main/resources/static/css/styles.css +++ b/src/main/resources/static/css/styles.css @@ -1,10 +1,4 @@ -.super-container { - padding-top: 4.5rem; - min-height: 100vh; - display: flex; - flex-direction: column; -} - -main { +.main-content { flex: 1; + padding-top: 2rem; } diff --git a/src/main/resources/templates/application.html b/src/main/resources/templates/application.html index 7da7cec8..ecec40e8 100644 --- a/src/main/resources/templates/application.html +++ b/src/main/resources/templates/application.html @@ -4,10 +4,10 @@ xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"> -
+
-
+
diff --git a/src/main/resources/templates/create-workspace.html b/src/main/resources/templates/create-workspace.html index bd364cef..11d8e06f 100644 --- a/src/main/resources/templates/create-workspace.html +++ b/src/main/resources/templates/create-workspace.html @@ -4,7 +4,7 @@ xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout" layout:decorate="application.html"> -
+
diff --git a/src/main/resources/templates/fragments/panels.html b/src/main/resources/templates/fragments/panels.html index b5085e4b..4114c02d 100644 --- a/src/main/resources/templates/fragments/panels.html +++ b/src/main/resources/templates/fragments/panels.html @@ -3,82 +3,82 @@ xmlns:sec="http://www.thymeleaf.org/extras/spring-security"> -
+ + +
    +
  • +
+
+
+ + + + + Integration
-
- - -
    -
  • -
-
-
- - - - - Integration -
-
+ diff --git a/src/main/resources/templates/login.html b/src/main/resources/templates/login.html index db6e6d22..562222fd 100644 --- a/src/main/resources/templates/login.html +++ b/src/main/resources/templates/login.html @@ -4,7 +4,7 @@ xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout" layout:decorate="application.html"> -
+
From 668d6d78a7f9b0c6b5f0f421fc177d6bfc1d3ff7 Mon Sep 17 00:00:00 2001 From: redgradient Date: Thu, 20 Jul 2023 22:38:19 +0400 Subject: [PATCH 35/35] make templating with layouts --- .../resources/templates/account/acc-info.html | 108 +++--- .../templates/account/pass-update.html | 78 ++--- .../templates/account/prof-update.html | 100 +++--- .../resources/templates/account/signup.html | 145 ++++---- .../templates/workspace/wks-info.html | 14 +- .../templates/workspace/wks-settings.html | 72 ++-- .../templates/workspace/wks-typos.html | 316 +++++++++--------- .../templates/workspace/wks-update.html | 116 +++---- .../templates/workspace/wks-users.html | 287 ++++++++-------- 9 files changed, 619 insertions(+), 617 deletions(-) diff --git a/src/main/resources/templates/account/acc-info.html b/src/main/resources/templates/account/acc-info.html index f10fb35b..05b08b62 100644 --- a/src/main/resources/templates/account/acc-info.html +++ b/src/main/resources/templates/account/acc-info.html @@ -1,59 +1,59 @@ - - - - -
-
-
-
-
-
-
+ + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- +
+
+
+ +
-
-
- - - - - - - - - - - - - - - - - - - -
-
-
- +
+ + + + + + + + + + + + + + + + + + + +
+
+ diff --git a/src/main/resources/templates/account/pass-update.html b/src/main/resources/templates/account/pass-update.html index a2f78b7e..6a86bcab 100644 --- a/src/main/resources/templates/account/pass-update.html +++ b/src/main/resources/templates/account/pass-update.html @@ -1,42 +1,42 @@ - - - - -
-
-
-
-
- - -
-
-
- - -
-
-
- - -
-
-
-
-
- - -
+ + +
+
+
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+
+
+ + +
+
-
-
-
- +
+ diff --git a/src/main/resources/templates/account/prof-update.html b/src/main/resources/templates/account/prof-update.html index 332495e8..bf3bd47e 100644 --- a/src/main/resources/templates/account/prof-update.html +++ b/src/main/resources/templates/account/prof-update.html @@ -1,53 +1,53 @@ - - - - -
-
-
-
-
- - -
-
-
- - -
-
-
- - -
-
-
- - -
-
-
- - -
-
- - -
+ + +
+
+
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+ + +
+
-
-
-
- +
+ diff --git a/src/main/resources/templates/account/signup.html b/src/main/resources/templates/account/signup.html index 356ddd4f..311a1513 100644 --- a/src/main/resources/templates/account/signup.html +++ b/src/main/resources/templates/account/signup.html @@ -1,89 +1,88 @@ - - - - -
-
-
-
-
- - -
-

+ + +
+
+
+ +
+ + +
+

+
-
-
- - -
-

+
+ + +
+

+
-
-
- - -
-

+
+ + +
+

+
-
-
- - -
-

+
+ + +
+

+
-
-
- - -
-

+
+ + +
+

+
-
-
- - -
-

+
+ + +
+

+
-
-
- - -
-

+
+ + +
+

+
-
- - + + +
-
-
-
- +
+ diff --git a/src/main/resources/templates/workspace/wks-info.html b/src/main/resources/templates/workspace/wks-info.html index d449122a..73a71afb 100644 --- a/src/main/resources/templates/workspace/wks-info.html +++ b/src/main/resources/templates/workspace/wks-info.html @@ -1,9 +1,10 @@ - - - - -
+ + +
@@ -57,6 +58,5 @@
-
- + diff --git a/src/main/resources/templates/workspace/wks-settings.html b/src/main/resources/templates/workspace/wks-settings.html index 1be81db9..fd2b037e 100644 --- a/src/main/resources/templates/workspace/wks-settings.html +++ b/src/main/resources/templates/workspace/wks-settings.html @@ -1,38 +1,39 @@ - - - - -
-
-
-
-
-
-

-
-
-
-
-
- -
+ + +
+
+
+
+
+
+

-
-
-
-

:

-

: Authorization: Basic [[${wksBasicToken}]]

+
+
+
+
+ +
+
-
-
-
-

-
+                
+
+

:

+

: Authorization: Basic [[${wksBasicToken}]]

+
+
+
+
+

+
                         
 <script src="https://cdn.jsdelivr.net/gh/hexlet/hexlet-correction@main/src/widget/index.js"></script>
 
@@ -42,11 +43,10 @@
 </script>
                         
                     
+
-
-
-
- +
+ diff --git a/src/main/resources/templates/workspace/wks-typos.html b/src/main/resources/templates/workspace/wks-typos.html index 92fcd797..c7be9e24 100644 --- a/src/main/resources/templates/workspace/wks-typos.html +++ b/src/main/resources/templates/workspace/wks-typos.html @@ -1,173 +1,175 @@ - - - - -
-
- -
-
- -
- -
-

-
- -
- -
-
- -
+ + diff --git a/src/main/resources/templates/workspace/wks-update.html b/src/main/resources/templates/workspace/wks-update.html index 601fcc01..b1ca35f8 100644 --- a/src/main/resources/templates/workspace/wks-update.html +++ b/src/main/resources/templates/workspace/wks-update.html @@ -1,64 +1,64 @@ - - - - -
-
-
-
-
-
-

-
-
-
-
-
- -
- - -
-
-
- - -
-
- - -
+ + +
+
+
+
+
+
+

-
-
    -
  • - [[*{key.toString()}]][[*{value}]] -
  • -
  • - TOTAL -
  • -
+
+
+
+
+ +
+ + +
+
+
+ + +
+
+ + +
+
+
+
    +
  • + [[*{key.toString()}]][[*{value}]] +
  • +
  • + TOTAL +
  • +
+
-
-
-
- +
+ diff --git a/src/main/resources/templates/workspace/wks-users.html b/src/main/resources/templates/workspace/wks-users.html index bd1750be..773fb1e7 100644 --- a/src/main/resources/templates/workspace/wks-users.html +++ b/src/main/resources/templates/workspace/wks-users.html @@ -1,154 +1,155 @@ - - - - -
-
- -
-
- -
- -
-

-
- -
-

-
-
- - - -
- -
-
- -
- -
- -
- - + +