-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
create shop page and update some function in HomeController
- Loading branch information
1 parent
7a15613
commit b5600b9
Showing
9 changed files
with
59 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
src/main/java/org/ecommerce/spring/boot/vegetable/project/controller/ShopController.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package org.ecommerce.spring.boot.vegetable.project.controller; | ||
|
||
import org.springframework.stereotype.Controller; | ||
import org.springframework.web.bind.annotation.GetMapping; | ||
import org.springframework.web.bind.annotation.RequestMapping; | ||
|
||
@Controller | ||
@RequestMapping("/shop") | ||
public class ShopController { | ||
|
||
@GetMapping | ||
public String shop() { | ||
return "shop"; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,3 +22,4 @@ spring: | |
auth: true | ||
starttls: | ||
enable: true | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,8 @@ | ||
<!DOCTYPE html> | ||
<html lang="en" xmlns:th="http://www.thymeleaf.org" | ||
<html th:lang="en" xmlns:th="http://www.thymeleaf.org" | ||
xmlns:sec="http://www.thymeleaf.org/thymeleaf-extras-springsecurity6"> | ||
<head th:fragment="boots_trap"> | ||
<meta content="text/html; charset=utf-8" /> | ||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/font/bootstrap-icons.min.css"> | ||
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" | ||
rel="stylesheet" | ||
|
@@ -69,12 +70,12 @@ | |
<ul class="nav col-6 "> | ||
<li class="nav-item col-2"> | ||
<a class="nav-link header-menu-item-btn" | ||
aria-current="page" href="#"> | ||
aria-current="page" th:href="@{/}" > | ||
HOME | ||
</a> | ||
</li> | ||
<li class="nav-item col-2"> | ||
<a class="nav-link header-menu-item-btn" href="#">SHOP</a> | ||
<a class="nav-link header-menu-item-btn" th:href="@{/shop}">SHOP</a> | ||
|
||
</li> | ||
<li class="nav-item col-2 header-menu-page-wrapper"> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
<!DOCTYPE html> | ||
<html lang="en" xmlns:th="http://www.thymeleaf.org"> | ||
<html th:lang="en" xmlns:th="http://www.thymeleaf.org"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | ||
<title>Home</title> | ||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/font/bootstrap-icons.min.css"> | ||
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" | ||
|
@@ -146,7 +146,7 @@ <h2 class="banner-text-title">Vegetable <br>100% Organic</h2> | |
<img th:src="@{'/getBlogImage/' + ${blog.id}}" class="blog-item-image gt-5"> | ||
<div class="createDate mt-3 mb-3"> | ||
<i class="bi bi-calendar createDate-icon"></i> | ||
<h5 th:text="${#dates.format(blog.getCreateDate(), 'MM-d, yyyy')}" class="createDate-time"></h5> | ||
<h5 th:text="${#dates.format(blog.getCreateDate(), 'MMMM dd, yyyy')}" class="createDate-time"></h5> | ||
</div> | ||
<a th:text="${blog.getTitle()}" class="blog-item-title mb-3" href="#" th:title="${blog.getTitle()}"></a> | ||
<p class="blog-item-content mb-3" th:text="${blog.getContent()}"></p> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<!DOCTYPE html> | ||
<html lang="en" xmlns:th="http://www.thymeleaf.org"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<title>Shop</title> | ||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/font/bootstrap-icons.min.css"> | ||
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" | ||
rel="stylesheet" | ||
integrity="sha384-T3c6CoIi6uLrA9TneNEoa7RxnatzjcDSCmG1MXxSR1GAsXEV/Dwwykc2MPK8M2HN" crossorigin="anonymous"> | ||
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js" | ||
integrity="sha384-C6RzsynM9kWDrMNeT87bh95OGNyZPhcTNXj1NW7RuBCsyN/o0jlpcV8Qyq46cDfL" | ||
crossorigin="anonymous"></script> | ||
<link rel="stylesheet" th:href="@{/css/header.css}"> | ||
</head> | ||
<body> | ||
<div th:replace="/fragments/fragments :: header"></div> | ||
</body> | ||
</html> |