Skip to content
This repository has been archived by the owner on May 11, 2024. It is now read-only.

Commit

Permalink
update homepage
Browse files Browse the repository at this point in the history
  • Loading branch information
bakaqc committed Nov 22, 2023
1 parent f19bd56 commit af2c04a
Show file tree
Hide file tree
Showing 10 changed files with 113 additions and 9 deletions.
29 changes: 29 additions & 0 deletions src/main/java/com/bakaqc/flower/controller/AboutController.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
package com.bakaqc.flower.controller;

import com.bakaqc.flower.dao.CategoriesDAO;
import com.bakaqc.flower.model.Categories;
import java.io.*;
import java.util.List;
import javax.servlet.*;
import javax.servlet.http.*;

public class AboutController extends HttpServlet {

@Override
protected void doGet(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
request.setCharacterEncoding("UTF-8");
response.setContentType("text/html; charset=UTF-8");
List<Categories> listCAT = CategoriesDAO.getInstance().selectAll();

request.setAttribute("listCAT", listCAT);

request.getRequestDispatcher("/view/about.jsp").forward(request, response);
}

@Override
protected void doPost(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
}

}
8 changes: 8 additions & 0 deletions src/main/webapp/WEB-INF/web.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@
<servlet-name>ProductDetail</servlet-name>
<servlet-class>com.bakaqc.flower.controller.ProductDetail</servlet-class>
</servlet>
<servlet>
<servlet-name>AboutController</servlet-name>
<servlet-class>com.bakaqc.flower.controller.AboutController</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>HomeController</servlet-name>
<url-pattern>/home</url-pattern>
Expand All @@ -40,6 +44,10 @@
<servlet-name>ProductDetail</servlet-name>
<url-pattern>/detail</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>AboutController</servlet-name>
<url-pattern>/about</url-pattern>
</servlet-mapping>
<session-config>
<session-timeout>
15
Expand Down
Binary file removed src/main/webapp/img/banner.png
Binary file not shown.
Binary file added src/main/webapp/img/banner_about.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 8 additions & 0 deletions src/main/webapp/style/about.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
p {
font-size: 20px;
}

.card-img {
width: 640px;
height: 400px;
}
62 changes: 62 additions & 0 deletions src/main/webapp/view/about.jsp
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@page import="java.util.*"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>

<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">

<title>LovePik</title>

<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.2/css/all.min.css">
<link rel="stylesheet" href="<%=request.getContextPath()%>/style/home.css" />
<link rel="stylesheet" href="<%=request.getContextPath()%>/style/about.css" />

</head>
<body>
<%@include file="common/header.jsp" %>

<section class="py-5 my-5">
<div class="container">
<div class="row py-3">
<div class="col-lg-6 col-md-12 py-1">
<h6 class="display-6 mb-4">
Chào mừng bạn đến với LovePik
</h6>
<p>
Shop hoa ở Bình Định LovePik dịch vụ giao hoa tận nhà nhanh chóng uy tín nhất,
khách hàng đều hài lòng về dịch vụ tại shop. Cam kết giao hoa đúng thời gian
địa điểm và đúng mẫu mã sản phẩm.
</p>
<p>
LovePik hiểu rằng, hoa tươi dù không mang nhiều giá trị về mặt vật chất,
nhưng lại có ý nghĩa rất lớn về mặt tinh thần. Mỗi một bó hoa gửi đi gửi gắm rất nhiều tình cảm,
thông điệp yêu thương mà bạn muốn gửi đến những người thân.
</p>
<p>
Chính vì thế,
LovePik luôn nỗ lực nâng cao chất lượng sản phẩm và dịch vụ để mang đến bạn những
trải nghiệm tuyệt vời nhất khi sử dụng dịch vụ của LovePik.
</p>
</div>
<div class="col-lg-6 col-md-12 py-1">
<img class="card-img" src="./img/banner_about.png">
</div>
</div>
<div class="py-3 text-center justify-content-center position-relative">
<h6 class="display-6 mb-4 mt-4">
Đội ngũ phát triển LovePik
</h6>

<a href="https://github.com/bakaqc/flower/graphs/contributors" target="_blank">
<img src="https://contrib.rocks/image?repo=bakaqc/flower"/>
</a>
</div>
</div>
</section>

</body>
</html>
7 changes: 2 additions & 5 deletions src/main/webapp/view/common/footer.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,10 @@
</ul>
<ul class="nav flex-column">
<li class="fw-bold nav-item text-dark">
<a href="#" class="nav-link text-dark">Content</a>
<a href="#" class="nav-link text-dark">Thông tin</a>
</li>
<li class="nav-item">
<a href="#" class="nav-link text-dark">About</a>
</li>
<li class="nav-item">
<a href="#" class="nav-link text-dark">Blog</a>
<a href="about" class="nav-link text-dark">Giới thiệu</a>
</li>
</ul>
</footer>
Expand Down
2 changes: 1 addition & 1 deletion src/main/webapp/view/home.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.2/css/all.min.css">
<link rel="stylesheet" type="text/css" href="./style/home.css">
<link rel="stylesheet" href="<%=request.getContextPath()%>/style/home.css" />
</head>
<body>
<%@include file="common/header.jsp" %>
Expand Down
2 changes: 1 addition & 1 deletion src/main/webapp/view/product_detail.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.2/css/all.min.css">
<link rel="stylesheet" type="text/css" href="./style/product_detail.css">
<link rel="stylesheet" href="<%=request.getContextPath()%>/style/product_detail.css" />
</head>
<body>
<%@include file="common/header.jsp" %>
Expand Down
4 changes: 2 additions & 2 deletions src/main/webapp/view/viewall.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@

<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.2/css/all.min.css">
<link rel="stylesheet" href="<%=request.getContextPath()%>/style/home.css" />
<link rel="stylesheet" href="<%=request.getContextPath()%>/style/home.css" />
</head>
<body>
<%@include file="common/header.jsp" %>

<div class="container position-relative text-center">

<div class="listp">
<c:forEach items="${listP}" var="p">
<div class="col-sm-3">
Expand Down

0 comments on commit af2c04a

Please sign in to comment.