Skip to content
Snippets Groups Projects
Commit 383ee380 authored by Haoyu Sun's avatar Haoyu Sun
Browse files

Update 49 files

- /.idea/.gitignore
- /.idea/compiler.xml
- /.idea/gradle.xml
- /.idea/jarRepositories.xml
- /.idea/misc.xml
- /.idea/modules.xml
- /.idea/secondhand disposal.iml
- /.idea/vcs.xml
- /second-hand-disposal-dev/gradle/wrapper/gradle-wrapper.jar
- /second-hand-disposal-dev/gradle/wrapper/gradle-wrapper.properties
- /second-hand-disposal-dev/src/main/resources/static/css/bootstrap - Copy.css
- /second-hand-disposal-dev/src/main/resources/static/css/bootstrap.min - Copy.css
- /second-hand-disposal-dev/src/main/resources/static/css/index.css
- /second-hand-disposal-dev/src/main/resources/static/css/itemList.css
- /second-hand-disposal-dev/src/main/resources/static/css/itemform.css
- /second-hand-disposal-dev/src/main/resources/static/css/reset.css
- /second-hand-disposal-dev/src/main/resources/static/css/style.css
- /second-hand-disposal-dev/src/main/resources/static/images/index-image-1.jpg
- /second-hand-disposal-dev/src/main/resources/static/images/index-image-2.jpg
- /second-hand-disposal-dev/src/main/resources/static/images/logo.jpg
- /second-hand-disposal-dev/src/main/resources/static/images/photo.jpg
- /second-hand-disposal-dev/src/main/resources/static/images/secondhandad.webp
- /second-hand-disposal-dev/src/main/resources/static/lib/bootstrap.js
- /second-hand-disposal-dev/src/main/resources/static/lib/jquery.js
- /second-hand-disposal-dev/src/main/resources/templates/css/bootstrap - Copy.css
- /second-hand-disposal-dev/src/main/resources/templates/css/bootstrap.min - Copy.css
- /second-hand-disposal-dev/src/main/resources/templates/lib/bootstrap.js
- /second-hand-disposal-dev/src/main/resources/templates/lib/jquery.js
- /second-hand-disposal-dev/src/main/resources/templates/page/groupList.html
- /second-hand-disposal-dev/src/main/resources/templates/page/index.html
- /second-hand-disposal-dev/src/main/resources/templates/page/itemDetail.html
- /second-hand-disposal-dev/src/main/resources/templates/page/itemForm.html
- /second-hand-disposal-dev/src/main/resources/templates/page/itemList.html
- /second-hand-disposal-dev/src/main/resources/templates/page/personalInformation.html
- /second-hand-disposal-dev/src/main/resources/static/login.html
- /second-hand-disposal-dev/src/main/resources/static/register.html
- /second-hand-disposal-dev/src/main/resources/application.properties
- /second-hand-disposal-dev/src/test/java/uk/ac/cf/spring/demo/DemoApplicationTests.java
- /second-hand-disposal-dev/src/main/java/uk/ac/cf/spring/demo/takeaway/index/ExchangeController.java
- /second-hand-disposal-dev/src/main/java/uk/ac/cf/spring/demo/takeaway/index/ExchangeItem.java
- /second-hand-disposal-dev/src/main/java/uk/ac/cf/spring/demo/takeaway/index/ExchangeService.java
- /second-hand-disposal-dev/src/main/java/uk/ac/cf/spring/demo/takeaway/index/IndexController.java
- /second-hand-disposal-dev/src/main/java/uk/ac/cf/spring/demo/DemoApplication.java
- /second-hand-disposal-dev/.gitattributes
- /second-hand-disposal-dev/.gitignore
- /second-hand-disposal-dev/build.gradle
- /second-hand-disposal-dev/gradlew
- /second-hand-disposal-dev/gradlew.bat
- /second-hand-disposal-dev/settings.gradle
parent a8318830
No related branches found
No related tags found
No related merge requests found
Showing
with 0 additions and 27452 deletions
package uk.ac.cf.spring.demo.takeaway.index;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.servlet.ModelAndView;
import java.util.List;
@Controller
public class IndexController {
@GetMapping("/index")
public ModelAndView getIndex() {
ModelAndView modelAndView = new ModelAndView("/page/index");
return modelAndView;
}
@GetMapping("/groupList")
public ModelAndView getGroupList() {
ModelAndView modelAndView = new ModelAndView("/page/groupList");
return modelAndView;
}
@GetMapping("/itemForm")
public ModelAndView getitemForm() {
ModelAndView modelAndView = new ModelAndView("/page/itemForm");
return modelAndView;
}
// @GetMapping("/itemList")
// public ModelAndView getitemList() {
// ModelAndView modelAndView = new ModelAndView("/page/itemList");
// return modelAndView;
// }
@GetMapping("/itemList")
public ModelAndView getitemList() {
ModelAndView modelAndView = new ModelAndView("/page/itemList");
// Retrieve existing exchange items and add to the model
List<ExchangeItem> exchangeItems = ExchangeService.getInstance().getExchangeItems();
modelAndView.addObject("exchangeItems", exchangeItems);
return modelAndView;
}
@GetMapping("/personalInformation")
public ModelAndView personalInformation() {
ModelAndView modelAndView = new ModelAndView("/page/personalInformation");
return modelAndView;
}
}
spring.application.name=demo
header{
height: 50px;
}
header div:nth-of-type(1){
float: left;
margin-right: 40px;
margin-top: 13px;
}
header div:nth-of-type(2) ul li{
float: left;
font-size: 16px;
padding:37px 24px 37px ;
}
header div:nth-of-type(3){
float: right;
}
body, html {
height: 100%;
margin: 0;
font-family: Arial, sans-serif; /* set fonts */
}
.header {
display: flex;
justify-content: space-between;
align-items: center;
padding: 10px 20px;
background-color: #98F5FF;
position: fixed;
width: 100%;
top: 0;
z-index: 1000; /* place header on top */
}
.logo-section img {
height: 50px; /* Logo height */
}
.nav ul {
list-style: none; /* cancel default list style */
padding: 0; /* cancel default padding */
margin: 0; /* cancel default margin */
}
.nav li {
display: inline; /* make list arranged in horizontal pattern */
margin: 0 15px; /* add left and right spacing */
}
.nav a {
text-decoration: none; /* remove underline */
color: #333; /* link color */
}
main {
padding-top: 100px; /* reserve space for fixed header */
}
.content h1 {
text-align: center; /* Center the heading */
}
.content p {
text-align: left; /* Left-align the paragraph */
padding: 20px; /* Inner padding for the paragraph */
}
/*.description-image {*/
/* max-width: 100%; !* 使图片自适应宽度 *!*/
/* height: auto; !* 保持比例 *!*/
/*}*/
.image-container {
display: flex; /* Use flexbox for layout */
justify-content: space-between; /* Space images apart */
padding: 20px; /* Optional padding around the container */
}
.image-container img {
max-width: 45%; /* Set a max width for images */
height: auto; /* Maintain aspect ratio */
}
.community {
margin-top: 100px;
}
table {
margin-top: 100px; /* Moves the table down by 100 pixels */
}
.user-info {
margin-top: 100px; /* Moves the table down by 100 pixels */
}
.user-info h1,
.user-info h2 {
margin-top: 100px; /* 为每个标题添加上间距 */
}
.user-info p,
.user-info ul {
margin: 10px 0; /* 为段落和列表项设置上下间距 */
}
/* Center main content and make it occupy most of the screen width */
.main-content {
max-width: 80%;
margin: 20px auto;
text-align: center;
}
.item-table {
width: 100%;
border-collapse: collapse;
margin: 20px 0;
font-size: 1em;
font-family: Arial, sans-serif;
}
.item-table th,
.item-table td {
padding: 12px 15px;
border: 1px solid #ddd;
text-align: left;
}
.item-table thead tr {
background-color: #f2f2f2;
font-weight: bold;
}
.item-table tbody tr:nth-child(even) {
background-color: #f9f9f9;
}
/* Style the buttons */
.button {
display: inline-block;
padding: 10px 15px;
color: #ffffff;
background-color: #4CAF50;
text-decoration: none;
border-radius: 5px;
font-size: 0.9em;
transition: background-color 0.3s;
}
.button:hover {
background-color: #45a049;
}
/* Center the add-item button */
.add-item-button {
margin-top: 20px;
text-align: center;
}
/* itemform.css */
body {
display: flex;
justify-content: center; /* 水平居中 */
align-items: center; /* 垂直居中 */
min-height: 100vh; /* 页面高度充满视口 */
margin: 0;
font-family: Arial, sans-serif;
background-color: #f4f4f4; /* 背景色,让表单更突出 */
}
.exchangeform {
width: 500px; /* 增加表单宽度 */
padding: 30px; /* 增加内边距 */
border: 1px solid #ddd;
border-radius: 8px;
background-color: #ffffff;
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}
.mb-3 {
margin-bottom: 20px; /* 增加表单项之间的间距 */
}
.form-label {
font-size: 16px; /* 增大标签字体 */
font-weight: bold;
}
.form-control, .form-check-input {
padding: 10px;
font-size: 16px; /* 增大输入框的字体 */
border-radius: 4px;
border: 1px solid #ccc;
}
.btn {
width: 100%; /* 提交按钮宽度为100%,让其占满行 */
padding: 12px;
font-size: 18px;
font-weight: bold;
background-color: #007bff;
color: #ffffff;
border: none;
border-radius: 4px;
cursor: pointer;
transition: background-color 0.3s ease;
}
.btn:hover {
background-color: #0056b3; /* 按钮悬停效果 */
}
.form-control {
padding: 10px;
font-size: 16px;
border-radius: 4px;
border: 1px solid #ccc;
width: 100%; /* 默认占满容器宽度 */
}
/* itemform.css */
#description {
width: 100%; /* 占满容器的宽度 */
max-width: 800px; /* 控制最大宽度 */
height: 120px; /* 固定高度 */
resize: none; /* 禁用调整大小 */
padding: 10px;
font-size: 16px;
border-radius: 4px;
border: 1px solid #ccc;
box-sizing: border-box; /* 确保宽度包括内边距 */
}
/* 固定在左侧的广告栏 */
.side-ad {
position: fixed;
top: 0;
left: 0;
width: 200px; /* 广告栏宽度 */
height: 100vh; /* 高度占满整个视口 */
background-color: #f7f7f7; /* 背景色,可以调整 */
display: flex;
align-items: center;
justify-content: center;
box-shadow: 2px 0 5px rgba(0, 0, 0, 0.1);
padding: 10px;
z-index: 10; /* 保证广告栏在最前方 */
}
.ad-image {
max-width: 100%; /* 图片宽度自适应容器 */
height: auto;
}
/* 清空默认值 */
/* 块级元素除了div以外都会有默认值 内联元素除了img input textarea select之外都没有 */
* {
margin: 0;
padding: 0;
line-height: 1;
}
/* 去掉超链接的下划线 */
a {
text-decoration: none;
}
/* li去掉列表符号 */
li {
list-style: none;
}
/* 插入的图片 */
img {
/* 清除图片向下撑大的3px */
vertical-align: middle;
/* 超链接出来的图片都会存在边框 */
border: none;
}
/* 万能清除法 高度塌陷 */
.clearfix:after {
content: "";
display: block;
clear: both;
height: 0;
overflow: hidden;
visibility: hidden;
}
/* 左浮动 */
.l {
float: left;
}
/* 右浮动 */
.r {
float: right;
}
/* 安全区 */
.safe {
width: 1170px;
margin: 0 auto;
}
\ No newline at end of file
*{
margin: 0;
padding: 0;
box-sizing: border-box;
}
body{
display: flex;
justify-content: center;
align-items: center;
min-height: 100vh;
background: #1f1f47;
overflow: hidden;
}
.wrapper{
position: relative;
width: 400px;
height: 450px;
background: rgba(255, 255, 255, 0.15);
box-shadow: 0 8px 32px rgba(31, 38, 135, 0.37);
border: 1px solid rgba(255, 255, 255, 0.18);
border-radius: 20px;
display: flex;
justify-content: center;
align-items: center;
}
h2{
color: #666;
text-align: center;
font-size: 2em;
}
.input-box{
position: relative;
width: 220px;
margin: 30px 0;
border-bottom: 2px solid #fff;
}
.input-box label{
position: absolute;
top: -100%;
left: 5px;
transform: translateY();
font-size: 1em;
pointer-events: none;
color: #fff;
}
button{
width: 100%;
height: 45px;
background: #fa709a;
border: none;
outline: none;
border-radius: 40px;
cursor: pointer;
font-size: 1em;
color: #fff;
font-weight: 400;
}
.register-link{
text-align: center;
color: #fff;
}
.register-link a{
color: #fff;
}
\ No newline at end of file
second-hand-disposal-dev/src/main/resources/static/images/index-image-1.jpg

226 KiB

second-hand-disposal-dev/src/main/resources/static/images/index-image-2.jpg

258 KiB

second-hand-disposal-dev/src/main/resources/static/images/logo.jpg

230 KiB

second-hand-disposal-dev/src/main/resources/static/images/photo.jpg

12.2 KiB

second-hand-disposal-dev/src/main/resources/static/images/secondhandad.webp

326 KiB

This diff is collapsed.
This diff is collapsed.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
<link rel="stylesheet" href="../static/css/style.css">
</head>
<body>
<div class="blob"></div>
<div class="wrapper">
<form action="">
<h2>Homepage</h2>
<div class="input-box">
<input type="email" required>
<label for="">登录邮箱</label>
</div>
<div class="input-box">
<input type="password" required>
<label for="">输入密码</label>
</div>
<button type="submit">log in</button>
<div class="register-link">
<p>还没有账号?<a href="register.html">点击注册</a></p>
</div>
</form>
</div>
</body>
</html>
\ No newline at end of file
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
<link rel="stylesheet" href="../static/css/style.css">
</head>
<body>
<div class="blob"></div>
<div class="wrapper">
<form action="">
<h2>Register</h2>
<div class="input-box">
<input type="email" required>
<label for="">登录邮箱</label>
</div>
<div class="input-box">
<input type="password" required>
<label for="">输入密码</label>
</div>
<div class="input-box">
<input type="password" required>
<label for="">确认密码</label>
</div>
</form>
</body>
</html>
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment