修改个人中心、发布种子、兴趣小组
Change-Id: I73caa8ef511ad9ae12a0cc49fc0edb5ccb0b2a74
diff --git a/src/pages/Forum/posts-detail/PostDetailPage.css b/src/pages/Forum/posts-detail/PostDetailPage.css
index c47601e..65584af 100644
--- a/src/pages/Forum/posts-detail/PostDetailPage.css
+++ b/src/pages/Forum/posts-detail/PostDetailPage.css
@@ -12,6 +12,9 @@
max-width: 960px;
margin: 0 auto;
padding: 24px 32px;
+ /* 卡片居中 */
+ margin: 0 auto;
+ margin-top: 40px;
}
.post-detail h1 {
@@ -47,7 +50,7 @@
display: flex;
gap: 16px;
margin-bottom: 24px;
- margin-left: 710px;
+ justify-content: flex-end; /*靠右对齐*/
}
.icon-btn {
@@ -154,6 +157,7 @@
}
.comment-options button {
+ justify-content: flex-end; /*靠右对齐*/
padding: 6px 14px;
background-color: #BA929A;
color: #fff;
@@ -161,7 +165,6 @@
border-radius: 6px;
font-size: 14px;
cursor: pointer;
- transition: background-color 0.2s ease;
}
.comment-options button:hover {
diff --git a/src/pages/Forum/posts-detail/PostDetailPage.jsx b/src/pages/Forum/posts-detail/PostDetailPage.jsx
index a272fb8..01e1648 100644
--- a/src/pages/Forum/posts-detail/PostDetailPage.jsx
+++ b/src/pages/Forum/posts-detail/PostDetailPage.jsx
@@ -4,6 +4,7 @@
import { getPostDetail, getPostComments, likePost, unlikePost, addCommentToPost, collectPost } from './api'; // 引入你的 API 函数
import './PostDetailPage.css';
import { useUser } from '../../../context/UserContext'; // 注意路径
+import Header from '../../../components/Header';
const PostDetailPage = () => {
const { postId } = useParams(); // 获取帖子ID
@@ -149,6 +150,7 @@
return (
<div className="post-detail-page">
+ <Header />
{loading ? (
<p>加载中...</p>
) : errorMsg ? (
diff --git a/src/pages/Forum/posts-main/ForumPage.css b/src/pages/Forum/posts-main/ForumPage.css
index aa0a5c3..db3a654 100644
--- a/src/pages/Forum/posts-main/ForumPage.css
+++ b/src/pages/Forum/posts-main/ForumPage.css
@@ -1,6 +1,6 @@
.forum-page {
color: #fff;
- background-color: #4A3B34;
+ background-color: #5F4437;
min-height: 100vh;
font-family: Arial, sans-serif;
}
@@ -17,7 +17,7 @@
.post-card {
text-decoration: none; /* 移除链接的下划线 */
- background-color: #4A3B34;
+ background-color: #5F4437;
padding: 15px;
border-radius: 10px;
position: relative;
diff --git a/src/pages/Forum/posts-main/ForumPage.jsx b/src/pages/Forum/posts-main/ForumPage.jsx
index bf2aa63..577d336 100644
--- a/src/pages/Forum/posts-main/ForumPage.jsx
+++ b/src/pages/Forum/posts-main/ForumPage.jsx
@@ -18,8 +18,7 @@
<Header />
<div className="toolbar">
<CreatePostButton />
- <SearchBar onSearch={handleSearch} />
-
+ <SearchBar onSearch={handleSearch} />
</div>
<PostList search={searchQuery} />
</div>
diff --git a/src/pages/Forum/posts-main/components/PostList.css b/src/pages/Forum/posts-main/components/PostList.css
index 59533ff..ee4d951 100644
--- a/src/pages/Forum/posts-main/components/PostList.css
+++ b/src/pages/Forum/posts-main/components/PostList.css
@@ -5,6 +5,9 @@
padding: 30px;
}
+.post-actions {
+ justify-content: flex-end; /*靠右对齐*/
+}
.post-card {
background-color: #e9ded2;
border: 1px solid #000000;