diff --git a/.idea/modules.xml b/.idea/modules.xml index 4c8e5db150a42b75e3d3808bffaa3e55c7410ee4..d94585859c3223852b8732beb2b979d523467270 100644 --- a/.idea/modules.xml +++ b/.idea/modules.xml @@ -2,6 +2,7 @@ <project version="4"> <component name="ProjectModuleManager"> <modules> + <module fileurl="file://$PROJECT_DIR$/.idea/modules/demo.main.iml" filepath="$PROJECT_DIR$/.idea/modules/demo.main.iml" /> <module fileurl="file://$PROJECT_DIR$/.idea/secondhand disposal.iml" filepath="$PROJECT_DIR$/.idea/secondhand disposal.iml" /> </modules> </component> diff --git a/.idea/modules/demo.main.iml b/.idea/modules/demo.main.iml new file mode 100644 index 0000000000000000000000000000000000000000..27062ab640b2d312fd19fc8d06c0370d0c731e03 --- /dev/null +++ b/.idea/modules/demo.main.iml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<module version="4"> + <component name="NewModuleRootManager"> + <content url="file://$MODULE_DIR$/../../second-hand-disposal-dev/build/generated/sources/annotationProcessor/java/main"> + <sourceFolder url="file://$MODULE_DIR$/../../second-hand-disposal-dev/build/generated/sources/annotationProcessor/java/main" isTestSource="false" generated="true" /> + </content> + </component> +</module> \ No newline at end of file diff --git a/.idea/workspace.xml b/.idea/workspace.xml index 44c6f88859ad2d822f73ddf1e80025d16e2fd14a..a10fa50e550b06d08cd390df37fb0d340d03b191 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -4,68 +4,16 @@ <option name="autoReloadType" value="SELECTIVE" /> </component> <component name="ChangeListManager"> - <list default="true" id="3dcf2182-6fdd-4b94-b51f-5c03ef064a21" name="变更" comment=""> - <change afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" /> - <change afterPath="$PROJECT_DIR$/.vscode/settings.json" afterDir="false" /> - <change afterPath="$PROJECT_DIR$/out/production/exercise/second-hand-disposal/.gitattributes" afterDir="false" /> - <change afterPath="$PROJECT_DIR$/out/production/exercise/second-hand-disposal/.gitignore" afterDir="false" /> - <change afterPath="$PROJECT_DIR$/out/production/exercise/second-hand-disposal/build.gradle" afterDir="false" /> - <change afterPath="$PROJECT_DIR$/out/production/exercise/second-hand-disposal/gradle/wrapper/gradle-wrapper.jar" afterDir="false" /> - <change afterPath="$PROJECT_DIR$/out/production/exercise/second-hand-disposal/gradle/wrapper/gradle-wrapper.properties" afterDir="false" /> - <change afterPath="$PROJECT_DIR$/out/production/exercise/second-hand-disposal/gradlew" afterDir="false" /> - <change afterPath="$PROJECT_DIR$/out/production/exercise/second-hand-disposal/gradlew.bat" afterDir="false" /> - <change afterPath="$PROJECT_DIR$/out/production/exercise/second-hand-disposal/second-hand-disposal/README.md" afterDir="false" /> - <change afterPath="$PROJECT_DIR$/out/production/exercise/second-hand-disposal/settings.gradle" afterDir="false" /> - <change afterPath="$PROJECT_DIR$/out/production/exercise/second-hand-disposal/src/main/resources/application.properties" afterDir="false" /> - <change afterPath="$PROJECT_DIR$/out/production/exercise/second-hand-disposal/src/main/resources/static/css/bootstrap - Copy.css" afterDir="false" /> - <change afterPath="$PROJECT_DIR$/out/production/exercise/second-hand-disposal/src/main/resources/static/css/bootstrap.min - Copy.css" afterDir="false" /> - <change afterPath="$PROJECT_DIR$/out/production/exercise/second-hand-disposal/src/main/resources/static/lib/bootstrap.js" afterDir="false" /> - <change afterPath="$PROJECT_DIR$/out/production/exercise/second-hand-disposal/src/main/resources/static/lib/jquery.js" afterDir="false" /> - <change afterPath="$PROJECT_DIR$/out/production/exercise/second-hand-disposal/src/main/resources/templates/css/bootstrap - Copy.css" afterDir="false" /> - <change afterPath="$PROJECT_DIR$/out/production/exercise/second-hand-disposal/src/main/resources/templates/css/bootstrap.min - Copy.css" afterDir="false" /> - <change afterPath="$PROJECT_DIR$/out/production/exercise/second-hand-disposal/src/main/resources/templates/css/grouplist.css" afterDir="false" /> - <change afterPath="$PROJECT_DIR$/out/production/exercise/second-hand-disposal/src/main/resources/templates/css/index.css" afterDir="false" /> - <change afterPath="$PROJECT_DIR$/out/production/exercise/second-hand-disposal/src/main/resources/templates/css/reset.css" afterDir="false" /> - <change afterPath="$PROJECT_DIR$/out/production/exercise/second-hand-disposal/src/main/resources/templates/css/style.css" afterDir="false" /> - <change afterPath="$PROJECT_DIR$/out/production/exercise/second-hand-disposal/src/main/resources/templates/lib/bootstrap.js" afterDir="false" /> - <change afterPath="$PROJECT_DIR$/out/production/exercise/second-hand-disposal/src/main/resources/templates/lib/grouplist.js" afterDir="false" /> - <change afterPath="$PROJECT_DIR$/out/production/exercise/second-hand-disposal/src/main/resources/templates/lib/jquery.js" afterDir="false" /> - <change afterPath="$PROJECT_DIR$/out/production/exercise/second-hand-disposal/src/main/resources/templates/page" afterDir="false" /> - <change afterPath="$PROJECT_DIR$/src/second-hand-disposal/.gitattributes" afterDir="false" /> - <change afterPath="$PROJECT_DIR$/src/second-hand-disposal/.gitignore" afterDir="false" /> - <change afterPath="$PROJECT_DIR$/src/second-hand-disposal/build.gradle" afterDir="false" /> - <change afterPath="$PROJECT_DIR$/src/second-hand-disposal/gradle/wrapper/gradle-wrapper.jar" afterDir="false" /> - <change afterPath="$PROJECT_DIR$/src/second-hand-disposal/gradle/wrapper/gradle-wrapper.properties" afterDir="false" /> - <change afterPath="$PROJECT_DIR$/src/second-hand-disposal/gradlew" afterDir="false" /> - <change afterPath="$PROJECT_DIR$/src/second-hand-disposal/gradlew.bat" afterDir="false" /> - <change afterPath="$PROJECT_DIR$/src/second-hand-disposal/settings.gradle" afterDir="false" /> - <change afterPath="$PROJECT_DIR$/src/second-hand-disposal/src/main/java/uk/ac/cf/spring/demo/DemoApplication.java" afterDir="false" /> - <change afterPath="$PROJECT_DIR$/src/second-hand-disposal/src/main/java/uk/ac/cf/spring/demo/takeaway/index/ExchangeController.java" afterDir="false" /> - <change afterPath="$PROJECT_DIR$/src/second-hand-disposal/src/main/java/uk/ac/cf/spring/demo/takeaway/index/ExchangeItem.java" afterDir="false" /> - <change afterPath="$PROJECT_DIR$/src/second-hand-disposal/src/main/java/uk/ac/cf/spring/demo/takeaway/index/ExchangeService.java" afterDir="false" /> - <change afterPath="$PROJECT_DIR$/src/second-hand-disposal/src/main/java/uk/ac/cf/spring/demo/takeaway/index/IndexController.java" afterDir="false" /> - <change afterPath="$PROJECT_DIR$/src/second-hand-disposal/src/main/resources/application.properties" afterDir="false" /> - <change afterPath="$PROJECT_DIR$/src/second-hand-disposal/src/main/resources/static/css/bootstrap - Copy.css" afterDir="false" /> - <change afterPath="$PROJECT_DIR$/src/second-hand-disposal/src/main/resources/static/css/bootstrap.min - Copy.css" afterDir="false" /> - <change afterPath="$PROJECT_DIR$/src/second-hand-disposal/src/main/resources/static/lib/bootstrap.js" afterDir="false" /> - <change afterPath="$PROJECT_DIR$/src/second-hand-disposal/src/main/resources/static/lib/jquery.js" afterDir="false" /> - <change afterPath="$PROJECT_DIR$/src/second-hand-disposal/src/main/resources/templates/css/bootstrap - Copy.css" afterDir="false" /> - <change afterPath="$PROJECT_DIR$/src/second-hand-disposal/src/main/resources/templates/css/bootstrap.min - Copy.css" afterDir="false" /> - <change afterPath="$PROJECT_DIR$/src/second-hand-disposal/src/main/resources/templates/css/index.css" afterDir="false" /> - <change afterPath="$PROJECT_DIR$/src/second-hand-disposal/src/main/resources/templates/css/reset.css" afterDir="false" /> - <change afterPath="$PROJECT_DIR$/src/second-hand-disposal/src/main/resources/templates/css/style.css" afterDir="false" /> - <change afterPath="$PROJECT_DIR$/src/second-hand-disposal/src/main/resources/templates/lib/bootstrap.js" afterDir="false" /> - <change afterPath="$PROJECT_DIR$/src/second-hand-disposal/src/main/resources/templates/lib/jquery.js" afterDir="false" /> - <change afterPath="$PROJECT_DIR$/src/second-hand-disposal/src/main/resources/templates/page/groupList.html" afterDir="false" /> - <change afterPath="$PROJECT_DIR$/src/second-hand-disposal/src/main/resources/templates/page/index.html" afterDir="false" /> - <change afterPath="$PROJECT_DIR$/src/second-hand-disposal/src/main/resources/templates/page/itemDetail.html" afterDir="false" /> - <change afterPath="$PROJECT_DIR$/src/second-hand-disposal/src/main/resources/templates/page/itemForm.html" afterDir="false" /> - <change afterPath="$PROJECT_DIR$/src/second-hand-disposal/src/main/resources/templates/page/itemList.html" afterDir="false" /> - <change afterPath="$PROJECT_DIR$/src/second-hand-disposal/src/main/resources/templates/page/login.html" afterDir="false" /> - <change afterPath="$PROJECT_DIR$/src/second-hand-disposal/src/main/resources/templates/page/logo.jpg" afterDir="false" /> - <change afterPath="$PROJECT_DIR$/src/second-hand-disposal/src/main/resources/templates/page/personalInformation.html" afterDir="false" /> - <change afterPath="$PROJECT_DIR$/src/second-hand-disposal/src/main/resources/templates/page/register.html" afterDir="false" /> - <change afterPath="$PROJECT_DIR$/src/second-hand-disposal/src/test/java/uk/ac/cf/spring/demo/DemoApplicationTests.java" afterDir="false" /> + <list default="true" id="3dcf2182-6fdd-4b94-b51f-5c03ef064a21" name="变更" comment="change"> + <change afterPath="$PROJECT_DIR$/.idea/modules/demo.main.iml" afterDir="false" /> + <change afterPath="$PROJECT_DIR$/src/second-hand-disposal/src/main/resources/templates/css/grouplist.css" afterDir="false" /> + <change beforePath="$PROJECT_DIR$/.idea/modules.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/modules.xml" afterDir="false" /> + <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" /> + <change beforePath="$PROJECT_DIR$/out/production/exercise/second-hand-disposal/src/main/resources/templates/page" beforeDir="false" afterPath="$PROJECT_DIR$/out/production/exercise/second-hand-disposal/src/main/resources/templates/page" afterDir="false" /> + <change beforePath="$PROJECT_DIR$/src/second-hand-disposal/src/main/resources/templates/css/style.css" beforeDir="false" afterPath="$PROJECT_DIR$/src/second-hand-disposal/src/main/resources/templates/css/style.css" afterDir="false" /> + <change beforePath="$PROJECT_DIR$/src/second-hand-disposal/src/main/resources/templates/page/groupList.html" beforeDir="false" afterPath="$PROJECT_DIR$/src/second-hand-disposal/src/main/resources/templates/page/groupList.html" afterDir="false" /> + <change beforePath="$PROJECT_DIR$/src/second-hand-disposal/src/main/resources/templates/page/login.html" beforeDir="false" afterPath="$PROJECT_DIR$/src/second-hand-disposal/src/main/resources/templates/page/login.html" afterDir="false" /> + <change beforePath="$PROJECT_DIR$/src/second-hand-disposal/src/main/resources/templates/page/register.html" beforeDir="false" afterPath="$PROJECT_DIR$/src/second-hand-disposal/src/main/resources/templates/page/register.html" afterDir="false" /> </list> <option name="SHOW_DIALOG" value="false" /> <option name="HIGHLIGHT_CONFLICTS" value="true" /> @@ -90,13 +38,14 @@ <option name="showLibraryContents" value="true" /> <option name="showScratchesAndConsoles" value="false" /> </component> - <component name="PropertiesComponent">{ - "keyToString": { - "RunOnceActivity.OpenProjectViewOnStart": "true", - "RunOnceActivity.ShowReadmeOnStart": "true", - "settings.editor.selected.configurable": "preferences.pluginManager" + <component name="PropertiesComponent"><![CDATA[{ + "keyToString": { + "RunOnceActivity.OpenProjectViewOnStart": "true", + "RunOnceActivity.ShowReadmeOnStart": "true", + "SHARE_PROJECT_CONFIGURATION_FILES": "true", + "settings.editor.selected.configurable": "preferences.pluginManager" } -}</component> +}]]></component> <component name="RecentsManager"> <key name="MoveFile.RECENT_KEYS"> <recent name="C:\Users\朱毅博\Desktop\exercise\src\second-hand-disposal\src\main\resources\templates\css" /> @@ -127,6 +76,18 @@ <option name="presentableId" value="Default" /> <updated>1730196990991</updated> </task> + <task id="LOCAL-00001" summary="change"> + <created>1730374628686</created> + <option name="number" value="00001" /> + <option name="presentableId" value="LOCAL-00001" /> + <option name="project" value="LOCAL" /> + <updated>1730374628686</updated> + </task> + <option name="localTasksCounter" value="2" /> <servers /> </component> + <component name="VcsManagerConfiguration"> + <MESSAGE value="change" /> + <option name="LAST_COMMIT_MESSAGE" value="change" /> + </component> </project> \ No newline at end of file diff --git a/src/second-hand-disposal/src/main/resources/templates/css/grouplist.css b/src/second-hand-disposal/src/main/resources/templates/css/grouplist.css new file mode 100644 index 0000000000000000000000000000000000000000..fb782e11ad3f79c6eefbe2383880c3a868edb57a --- /dev/null +++ b/src/second-hand-disposal/src/main/resources/templates/css/grouplist.css @@ -0,0 +1,110 @@ +/* 全局样式 */ +body { + font-family: Arial, sans-serif; + background-color: #f5f5f5; + color: #333; + margin: 0; + padding: 0; + animation: fadeIn 1s ease-in-out; +} +h2{ + text-align: center; +} + +/* 淡入效果 */ +@keyframes fadeIn { + from { + opacity: 0; + } + + to { + opacity: 1; + } +} + +/* 页眉样式 */ +header { + background-color: #4CAF50; + padding: 15px; + text-align: center; +} + +header img { + width: 50px; + vertical-align: middle; +} + +header ul { + list-style-type: none; + padding: 0; + margin: 10px 0 0; + text-align: center; +} + +header ul li { + display: inline; + margin: 0 10px; +} + +header ul li a { + color: white; + text-decoration: none; + font-weight: bold; + transition: transform 0.3s, color 0.3s; +} + +header ul li a:hover { + transform: scale(1.1); + color: #FFD700; +} + +/* 表格样式 */ +table { + width: 80%; + margin: 20px auto; + border-collapse: collapse; + background-color: #fff; + box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); + transition: transform 0.3s ease; +} + +table:hover { + transform: scale(1.02); +} + +table, +th, +td { + border: 1px solid #ddd; +} + +th, +td { + padding: 12px; + text-align: center; +} + +th { + background-color: #4CAF50; + color: white; +} + +/* 表格行的悬停效果 */ +tr { + transition: background-color 0.3s ease; +} + +tr:hover { + background-color: #f1f1f1; +} + +a { + color: #4CAF50; + text-decoration: none; + transition: color 0.3s, transform 0.2s; +} + +a:hover { + color: #FF6347; + transform: scale(1.1); +} \ No newline at end of file diff --git a/src/second-hand-disposal/src/main/resources/templates/css/style.css b/src/second-hand-disposal/src/main/resources/templates/css/style.css index 2c058cc9c27f36e6d2dab6e9ea37d3183f63af8b..f0da8e4acdd203cd86153a841f8135278d1a214e 100644 --- a/src/second-hand-disposal/src/main/resources/templates/css/style.css +++ b/src/second-hand-disposal/src/main/resources/templates/css/style.css @@ -30,7 +30,7 @@ h2{ } .input-box{ position: relative; - width: 220px; + width: 165px; margin: 30px 0; border-bottom: 2px solid #fff; } diff --git a/src/second-hand-disposal/src/main/resources/templates/page/groupList.html b/src/second-hand-disposal/src/main/resources/templates/page/groupList.html index 3aed9ee1c9987070b2ce790ef0982cfd880dd917..4d7e62b052cf0bae8d463dd20b229a2ebd143917 100644 --- a/src/second-hand-disposal/src/main/resources/templates/page/groupList.html +++ b/src/second-hand-disposal/src/main/resources/templates/page/groupList.html @@ -3,8 +3,46 @@ <head> <meta charset="UTF-8"> <title>Title</title> + <link rel="stylesheet" href="../css/grouplist.css"> </head> <body> - <div>groupList</div> +<header class="safe"> + <div> + <img src="logo.jpg" alt="Logo"> + </div> + <div class="l"> + <ul> + <li><a href="index.html">Index</a></li> + <li><a href="groupList.html">GroupList</a></li> + <li><a href="itemForm.html">ShelfItem</a></li> + <li><a href="personalInformation.html">PersonalInformation</a></li> + </ul> + + </div> +</header> +<h2>GroupList</h2> +<table> + <thead> + <tr> + <th>ID</th> + <th>Name</th> + <th>Description</th> + <th>Join</th> + </tr> + <tr> + <th>0</th> + <th>British</th> + <th>xx</th> + <th><a href="itemList.html">enter</a></th> + </tr> + <tr> + <th>1</th> + <th>America</th> + <th>xx</th> + <th><a href="itemList.html">enter</a></th> + </tr> + </thead> +</table> </body> +<script src="../lib/grouplist.js"></script> </html> \ No newline at end of file diff --git a/src/second-hand-disposal/src/main/resources/templates/page/login.html b/src/second-hand-disposal/src/main/resources/templates/page/login.html index 11216d94041c497e7066bc936d30176a6a37c659..c5079d6d1f969d471425f8d7b99f15b46d95c98d 100644 --- a/src/second-hand-disposal/src/main/resources/templates/page/login.html +++ b/src/second-hand-disposal/src/main/resources/templates/page/login.html @@ -3,27 +3,38 @@ <head> <meta charset="UTF-8"> <title>Title</title> - <link rel="stylesheet" href="../static/css/style.css"> + <link rel="stylesheet" href="../css/style.css"> </head> <body> <div class="blob"></div> <div class="wrapper"> - <form action=""> + <form action="groupList.html" onsubmit="return validateForm"> <h2>Homepage</h2> <div class="input-box"> - <input type="email" required> + <input type="email" id="email" required> <label >Email</label> </div> <div class="input-box"> - <input type="password" required> + <input type="password" id="password" required> <label >Password</label> </div> - - <button type="submit">log in</button> + <button type="submit">Log in</button> <div class="register-link"> <p>Don't have account?<a href="register.html">Resgiter</a></p> </div> </form> </div> +<script> + function validateForm() { + const email = document.getElementById('email').value; + const password = document.getElementById('password').value; + + if (!email || !password) { + alert('Please enter both email and password.'); + return false; + } + return true; + } +</script> </body> </html> \ No newline at end of file diff --git a/src/second-hand-disposal/src/main/resources/templates/page/register.html b/src/second-hand-disposal/src/main/resources/templates/page/register.html index a4364bcb7d54c72d1fec220cd00eba68d8ec476d..564125ea4eb291cd043cd1f54539cad25c82e7b8 100644 --- a/src/second-hand-disposal/src/main/resources/templates/page/register.html +++ b/src/second-hand-disposal/src/main/resources/templates/page/register.html @@ -3,26 +3,32 @@ <head> <meta charset="UTF-8"> <title>Title</title> - <link rel="stylesheet" href="../static/css/style.css"> + <link rel="stylesheet" href="../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> +<div class="blob"></div> +<div class="wrapper"> + <form action="groupList.html" onsubmit="return validateForm()"> + <h2>Register</h2> + <div class="input-box"> + <input type="email" required> + <label >Email</label> + </div> + <div class="input-box"> + <input type="password" required> + <label >Password</label> + </div> + <div class="input-box"> + <input type="password" required> + <label >Again</label> + </div> + <button type="submit">success</button> + </form> + <script> + function validateForm(){ + + } + </script> + </div> </body> </html> \ No newline at end of file