From 76e5b678a04e5ce9bdb7ac77696ffd00373e95ca Mon Sep 17 00:00:00 2001 From: choijaeho Date: Mon, 1 Aug 2022 00:21:56 +0900 Subject: [PATCH 1/7] =?UTF-8?q?test=20:=20tymeleaf=20layout=20=EC=A0=81?= =?UTF-8?q?=EC=9A=A9=20test?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build.gradle | 2 + .../common/config/WebConfig.java | 2 + .../resources/templates/fragments/config.html | 17 + .../resources/templates/fragments/footer.html | 12 + .../templates/fragments/logoutModal.html | 21 + .../resources/templates/fragments/nav.html | 196 ++++ .../templates/fragments/sidebar.html | 106 +++ src/main/resources/templates/index.html | 870 +++++++++--------- .../templates/layouts/default_layout.html | 57 ++ src/main/resources/templates/test.html | 10 + 10 files changed, 858 insertions(+), 435 deletions(-) create mode 100644 src/main/resources/templates/fragments/config.html create mode 100644 src/main/resources/templates/fragments/footer.html create mode 100644 src/main/resources/templates/fragments/logoutModal.html create mode 100644 src/main/resources/templates/fragments/nav.html create mode 100644 src/main/resources/templates/fragments/sidebar.html create mode 100644 src/main/resources/templates/layouts/default_layout.html create mode 100644 src/main/resources/templates/test.html diff --git a/build.gradle b/build.gradle index b23fe1c..00ed167 100644 --- a/build.gradle +++ b/build.gradle @@ -22,7 +22,9 @@ dependencies { implementation 'org.springframework.boot:spring-boot-starter-data-jpa' implementation 'org.springframework.boot:spring-boot-starter-security' implementation 'org.springframework.boot:spring-boot-starter-oauth2-client' + // thymeleaf implementation 'org.springframework.boot:spring-boot-starter-thymeleaf' + implementation 'nz.net.ultraq.thymeleaf:thymeleaf-layout-dialect' implementation 'org.springframework.boot:spring-boot-starter-validation' implementation 'org.springframework.boot:spring-boot-starter-web' implementation 'org.springframework.boot:spring-boot-starter-mail' diff --git a/src/main/java/gubun/financialledger/common/config/WebConfig.java b/src/main/java/gubun/financialledger/common/config/WebConfig.java index e4e1471..a36b7da 100644 --- a/src/main/java/gubun/financialledger/common/config/WebConfig.java +++ b/src/main/java/gubun/financialledger/common/config/WebConfig.java @@ -16,6 +16,8 @@ public void addViewControllers(ViewControllerRegistry registry) { registry.addViewController("/menu/3").setViewName("index"); registry.addViewController("/menu/4").setViewName("index"); + registry.addViewController("/test").setViewName("test"); + //security registry.addViewController("/login").setViewName("login"); registry.addViewController("/register").setViewName("register"); diff --git a/src/main/resources/templates/fragments/config.html b/src/main/resources/templates/fragments/config.html new file mode 100644 index 0000000..0b0b40b --- /dev/null +++ b/src/main/resources/templates/fragments/config.html @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/resources/templates/fragments/footer.html b/src/main/resources/templates/fragments/footer.html new file mode 100644 index 0000000..1066f5b --- /dev/null +++ b/src/main/resources/templates/fragments/footer.html @@ -0,0 +1,12 @@ + + +
+
+
+ +
+
+
+ \ No newline at end of file diff --git a/src/main/resources/templates/fragments/logoutModal.html b/src/main/resources/templates/fragments/logoutModal.html new file mode 100644 index 0000000..69bd09f --- /dev/null +++ b/src/main/resources/templates/fragments/logoutModal.html @@ -0,0 +1,21 @@ + + + + \ No newline at end of file diff --git a/src/main/resources/templates/fragments/nav.html b/src/main/resources/templates/fragments/nav.html new file mode 100644 index 0000000..034e0f3 --- /dev/null +++ b/src/main/resources/templates/fragments/nav.html @@ -0,0 +1,196 @@ + +
+ + + +
+ \ No newline at end of file diff --git a/src/main/resources/templates/fragments/sidebar.html b/src/main/resources/templates/fragments/sidebar.html new file mode 100644 index 0000000..41b9503 --- /dev/null +++ b/src/main/resources/templates/fragments/sidebar.html @@ -0,0 +1,106 @@ + + +
+ + + +
+ diff --git a/src/main/resources/templates/index.html b/src/main/resources/templates/index.html index b14e2cb..0c4f747 100644 --- a/src/main/resources/templates/index.html +++ b/src/main/resources/templates/index.html @@ -1,8 +1,8 @@ @@ -27,511 +27,511 @@ - -
- - - + + + + - -
- -
+ +
+ + + - - -
- - - - - - -
- -
-

가계부

- 보고서 출력 -
- -
- -
-
-
- + +
+ + + + + + +
+ +
+

가계부

+ 보고서 출력 +
+ +
+ +
+
+
+
+
+
+ 이번달 수입
+
$40,000
+
+
+
- -
-
-
-
-
-
- 이번달 지출
-
$215,000
-
-
- -
+
+ +
+
+
+
+
+
+ 이번달 지출
+
$215,000
+
+
+
- -
-
-
-
-
-
예산 +
+ +
+
+
+
+
+
예산 +
+
+
+
50%
-
-
-
50%
-
-
-
-
-
+
+
+
-
- -
+
+
+
- -
-
-
-
-
-
- 하루일기
-
1
-
-
- -
+
+ +
+
+
+
+
+
+ 하루일기
+
1
+
+
+
- -
- -
-
- -
+ +
+ +
+
+ +
-
지출 요약
- - -
-
- -
+ +
+
+ +
-
수입 요약
-
- - -
-
-
-
- + + +
+
+ +
+
+ +
+
- -
- - - - - + + + + + - -