You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
758 lines
13 KiB
758 lines
13 KiB
.forum-page {
|
|
min-height: 100vh;
|
|
background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
|
|
position: relative;
|
|
font-family: '思源宋体 Light' !important;
|
|
}
|
|
|
|
/* 顶部栏 */
|
|
.header {
|
|
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
|
padding: 40rpx 30rpx;
|
|
border-radius: 0 0 40rpx 40rpx;
|
|
box-shadow: 0 10rpx 40rpx rgba(102, 126, 234, 0.15);
|
|
margin-bottom: 30rpx;
|
|
}
|
|
|
|
.header-content {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 30rpx;
|
|
}
|
|
|
|
.header-main {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 10rpx;
|
|
}
|
|
|
|
.title-text {
|
|
font-size: 44rpx;
|
|
font-weight: 800;
|
|
color: white;
|
|
letter-spacing: -0.5rpx;
|
|
}
|
|
|
|
.title-sub {
|
|
font-size: 26rpx;
|
|
color: rgba(255, 255, 255, 0.9);
|
|
font-weight: 400;
|
|
}
|
|
|
|
/* 搜索框 */
|
|
.search-section {
|
|
padding: 0 30rpx 25rpx;
|
|
}
|
|
|
|
.search-box {
|
|
display: flex;
|
|
align-items: center;
|
|
background: white;
|
|
border-radius: 50rpx;
|
|
padding: 0 30rpx;
|
|
height: 88rpx;
|
|
box-shadow: 0 15rpx 50rpx rgba(0, 0, 0, 0.05);
|
|
border: 2rpx solid #e2e8f0;
|
|
transition: all 0.3s ease;
|
|
}
|
|
|
|
.search-box:focus-within {
|
|
border-color: #667eea;
|
|
box-shadow: 0 15rpx 50rpx rgba(102, 126, 234, 0.15);
|
|
}
|
|
|
|
.search-icon {
|
|
width: 36rpx;
|
|
height: 36rpx;
|
|
margin-right: 20rpx;
|
|
}
|
|
|
|
.search-input {
|
|
flex: 1;
|
|
font-size: 30rpx;
|
|
height: 88rpx;
|
|
line-height: 88rpx;
|
|
color: #1e293b;
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
.search-clear {
|
|
width: 44rpx;
|
|
height: 44rpx;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
background: #f1f5f9;
|
|
border-radius: 50%;
|
|
}
|
|
|
|
.clear-text {
|
|
font-size: 32rpx;
|
|
color: #94a3b8;
|
|
line-height: 1;
|
|
}
|
|
|
|
/* 搜索加载提示 */
|
|
.search-loading {
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
justify-content: center;
|
|
padding: 100rpx 30rpx;
|
|
text-align: center;
|
|
}
|
|
|
|
.search-spinner {
|
|
width: 60rpx;
|
|
height: 60rpx;
|
|
border: 4rpx solid rgba(102, 126, 234, 0.1);
|
|
border-top-color: #667eea;
|
|
border-radius: 50%;
|
|
animation: spin 1s linear infinite;
|
|
margin-bottom: 30rpx;
|
|
}
|
|
|
|
.search-loading-text {
|
|
font-size: 30rpx;
|
|
color: #64748b;
|
|
font-weight: 500;
|
|
}
|
|
|
|
/* 帖子列表区域 */
|
|
.post-list-section {
|
|
height: calc(100vh - 320rpx);
|
|
padding: 0 20rpx;
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
/* 空状态 */
|
|
.empty-state {
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
justify-content: center;
|
|
padding: 150rpx 30rpx;
|
|
text-align: center;
|
|
}
|
|
|
|
|
|
.empty-text {
|
|
font-size: 32rpx;
|
|
color: #94a3b8;
|
|
margin-bottom: 50rpx;
|
|
line-height: 1.5;
|
|
max-width: 400rpx;
|
|
}
|
|
|
|
.empty-btn {
|
|
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
|
color: white;
|
|
font-size: 30rpx;
|
|
font-weight: 600;
|
|
padding: 24rpx 60rpx;
|
|
border-radius: 50rpx;
|
|
box-shadow: 0 10rpx 30rpx rgba(102, 126, 234, 0.3);
|
|
border: none;
|
|
margin: 0;
|
|
}
|
|
|
|
.empty-btn::after {
|
|
border: none;
|
|
}
|
|
|
|
/* 帖子卡片 */
|
|
.post-list {
|
|
padding: 10rpx;
|
|
}
|
|
|
|
.post-card {
|
|
background: white;
|
|
border-radius: 24rpx;
|
|
margin-bottom: 25rpx;
|
|
box-shadow: 0 10rpx 40rpx rgba(0, 0, 0, 0.04);
|
|
border: 1rpx solid #f1f5f9;
|
|
position: relative;
|
|
overflow: hidden;
|
|
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
|
|
}
|
|
|
|
.post-card:active {
|
|
transform: translateY(-4rpx);
|
|
box-shadow: 0 20rpx 60rpx rgba(0, 0, 0, 0.1);
|
|
}
|
|
|
|
/* 帖子内容 */
|
|
.post-content {
|
|
padding: 20rpx;
|
|
}
|
|
|
|
.post-type {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
border-bottom: 1rpx solid #f1f5f9;
|
|
padding-bottom: 20rpx;
|
|
}
|
|
|
|
/* 帖子标题 */
|
|
.post-title-wrapper {
|
|
margin: 20rpx 0;
|
|
}
|
|
|
|
.post-title {
|
|
font-size: 34rpx;
|
|
font-weight: 700;
|
|
color: #1e293b;
|
|
line-height: 1.4;
|
|
display: -webkit-box;
|
|
-webkit-line-clamp: 2;
|
|
-webkit-box-orient: vertical;
|
|
overflow: hidden;
|
|
}
|
|
|
|
/* 帖子摘要 */
|
|
.post-summary {
|
|
font-size: 28rpx;
|
|
color: #64748b;
|
|
line-height: 1.6;
|
|
margin-bottom: 25rpx;
|
|
display: -webkit-box;
|
|
-webkit-line-clamp: 3;
|
|
-webkit-box-orient: vertical;
|
|
overflow: hidden;
|
|
}
|
|
|
|
/* 图片区域 */
|
|
.post-images {
|
|
margin-bottom: 25rpx;
|
|
}
|
|
|
|
.images-grid {
|
|
width: 100%;
|
|
display: grid;
|
|
grid-template-columns: repeat(3,1fr);
|
|
position: relative;
|
|
}
|
|
|
|
.post-image {
|
|
width: 180rpx;
|
|
height: 180rpx;
|
|
border-radius: 16rpx;
|
|
flex-shrink: 0;
|
|
object-fit: cover;
|
|
}
|
|
|
|
|
|
|
|
/* 帖子底部信息 */
|
|
.post-footer {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: flex-end;
|
|
padding-top: 25rpx;
|
|
border-top: 1rpx solid #f1f5f9;
|
|
}
|
|
|
|
/* 用户信息 */
|
|
.user-info {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 15rpx;
|
|
}
|
|
|
|
.user-avatar {
|
|
width: 64rpx;
|
|
height: 64rpx;
|
|
border-radius: 50%;
|
|
border: 2rpx solid white;
|
|
box-shadow: 0 6rpx 20rpx rgba(0, 0, 0, 0.08);
|
|
}
|
|
|
|
.username {
|
|
font-size: 28rpx;
|
|
font-weight: 600;
|
|
color: #334155;
|
|
}
|
|
|
|
/* 元信息 */
|
|
.post-meta {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 25rpx;
|
|
}
|
|
|
|
.meta-item {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 8rpx;
|
|
}
|
|
|
|
.meta-icon {
|
|
width: 28rpx;
|
|
height: 28rpx;
|
|
opacity: 0.5;
|
|
}
|
|
|
|
.meta-count {
|
|
font-size: 26rpx;
|
|
font-weight: 600;
|
|
color: #64748b;
|
|
}
|
|
|
|
.post-time {
|
|
font-size: 24rpx;
|
|
color: #94a3b8;
|
|
font-weight: 500;
|
|
}
|
|
|
|
/* 加载更多 */
|
|
.load-more {
|
|
padding: 50rpx 0;
|
|
text-align: center;
|
|
}
|
|
|
|
.loading-spinner {
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
gap: 20rpx;
|
|
}
|
|
|
|
.spinner {
|
|
width: 40rpx;
|
|
height: 40rpx;
|
|
border: 4rpx solid rgba(102, 126, 234, 0.1);
|
|
border-top-color: #667eea;
|
|
border-radius: 50%;
|
|
animation: spin 1s linear infinite;
|
|
}
|
|
|
|
@keyframes spin {
|
|
0% { transform: rotate(0deg); }
|
|
100% { transform: rotate(360deg); }
|
|
}
|
|
|
|
.loading-text {
|
|
font-size: 28rpx;
|
|
color: #94a3b8;
|
|
font-weight: 500;
|
|
}
|
|
|
|
/* 没有更多了 */
|
|
.no-more {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
gap: 30rpx;
|
|
padding: 50rpx 0;
|
|
}
|
|
|
|
.no-more-line {
|
|
flex: 1;
|
|
height: 1rpx;
|
|
background: linear-gradient(90deg, transparent, #e2e8f0, transparent);
|
|
}
|
|
|
|
.no-more-text {
|
|
font-size: 26rpx;
|
|
color: #cbd5e1;
|
|
font-weight: 500;
|
|
padding: 0 20rpx;
|
|
}
|
|
|
|
/* 固定发布按钮(左下角) */
|
|
.floating-create-btn {
|
|
position: fixed;
|
|
left: 40rpx;
|
|
bottom: 40rpx;
|
|
width: 100rpx;
|
|
height: 100rpx;
|
|
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
|
border-radius: 50%;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
box-shadow: 0 15rpx 50rpx rgba(102, 126, 234, 0.4);
|
|
z-index: 100;
|
|
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
|
|
}
|
|
|
|
.floating-create-btn:active {
|
|
transform: scale(0.95);
|
|
box-shadow: 0 10rpx 30rpx rgba(102, 126, 234, 0.3);
|
|
}
|
|
|
|
.create-icon {
|
|
width: 44rpx;
|
|
height: 44rpx;
|
|
}
|
|
|
|
/* 返回顶部按钮 - 修复图标显示 */
|
|
.back-to-top-btn {
|
|
position: fixed;
|
|
right: 40rpx;
|
|
bottom: 40rpx;
|
|
width: 100rpx;
|
|
height: 100rpx;
|
|
background: white;
|
|
border-radius: 50%;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
box-shadow: 0 10rpx 40rpx rgba(0, 0, 0, 0.1);
|
|
z-index: 100;
|
|
opacity: 0;
|
|
transform: translateY(50rpx) scale(0.8);
|
|
transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
|
|
pointer-events: none;
|
|
}
|
|
|
|
.back-to-top-btn.show {
|
|
opacity: 1;
|
|
transform: translateY(0) scale(1);
|
|
pointer-events: auto;
|
|
}
|
|
|
|
.back-to-top-btn:active {
|
|
transform: translateY(2rpx) scale(0.98);
|
|
background: #f8fafc;
|
|
transition: transform 0.1s ease;
|
|
}
|
|
|
|
.back-top-icon {
|
|
font-size: 40rpx;
|
|
color: #667eea;
|
|
font-weight: bold;
|
|
transition: all 0.3s ease;
|
|
}
|
|
|
|
.back-to-top-btn:active .back-top-icon {
|
|
transform: translateY(-2rpx);
|
|
}
|
|
|
|
/* 发布模态框 */
|
|
.post-modal-overlay {
|
|
position: fixed;
|
|
top: 0;
|
|
left: 0;
|
|
right: 0;
|
|
bottom: 0;
|
|
background: rgba(0, 0, 0, 0.5);
|
|
backdrop-filter: blur(10rpx);
|
|
display: flex;
|
|
align-items: flex-end;
|
|
justify-content: center;
|
|
z-index: 1000;
|
|
animation: fadeIn 0.3s ease;
|
|
}
|
|
|
|
.post-modal-content {
|
|
background: white;
|
|
width: 100%;
|
|
border-radius: 40rpx 40rpx 0 0;
|
|
max-height: 85vh;
|
|
overflow-y: auto;
|
|
animation: slideUp 0.3s ease;
|
|
}
|
|
|
|
.modal-header {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
padding: 40rpx 30rpx 30rpx;
|
|
border-bottom: 1rpx solid #f1f5f9;
|
|
}
|
|
|
|
.modal-title {
|
|
font-size: 38rpx;
|
|
font-weight: 700;
|
|
color: #1e293b;
|
|
}
|
|
|
|
.modal-close {
|
|
width: 50rpx;
|
|
height: 50rpx;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
background: #f1f5f9;
|
|
border-radius: 50%;
|
|
}
|
|
|
|
.close-icon {
|
|
font-size: 36rpx;
|
|
color: #64748b;
|
|
line-height: 1;
|
|
}
|
|
|
|
.modal-body {
|
|
padding: 30rpx;
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
.form-field {
|
|
margin-bottom: 40rpx;
|
|
}
|
|
|
|
.field-header {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
margin-bottom: 16rpx;
|
|
}
|
|
|
|
.field-label {
|
|
font-size: 30rpx;
|
|
font-weight: 600;
|
|
color: #1e293b;
|
|
}
|
|
|
|
.field-counter, .field-hint {
|
|
font-size: 26rpx;
|
|
color: #94a3b8;
|
|
}
|
|
|
|
.title-input {
|
|
font-family: '思源宋体 Light' !important;
|
|
background: #f8fafc;
|
|
border-radius: 16rpx;
|
|
font-size: 30rpx;
|
|
width: 100%;
|
|
height: 80rpx;
|
|
line-height: 80rpx;
|
|
padding: 0 20rpx;
|
|
box-sizing: border-box;
|
|
transition: all 0.3s ease;
|
|
border: 2rpx solid transparent;
|
|
}
|
|
|
|
.title-input:focus {
|
|
border-color: #667eea;
|
|
background: white;
|
|
box-shadow: 0 0 0 4rpx rgba(102, 126, 234, 0.1);
|
|
outline: none;
|
|
}
|
|
|
|
.content-input {
|
|
background: #f8fafc;
|
|
border-radius: 16rpx;
|
|
font-size: 30rpx;
|
|
min-height: 200rpx;
|
|
line-height: 1.6;
|
|
padding: 20rpx;
|
|
box-sizing: border-box;
|
|
width: 100%;
|
|
transition: all 0.3s ease;
|
|
border: 2rpx solid transparent;
|
|
}
|
|
|
|
.content-input:focus {
|
|
border-color: #667eea;
|
|
background: white;
|
|
box-shadow: 0 0 0 4rpx rgba(102, 126, 234, 0.1);
|
|
outline: none;
|
|
}
|
|
|
|
.image-upload-area {
|
|
margin-top: 10rpx;
|
|
}
|
|
|
|
.uploaded-images {
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
gap: 20rpx;
|
|
margin-bottom: 20rpx;
|
|
}
|
|
|
|
.image-item {
|
|
position: relative;
|
|
width: 180rpx;
|
|
height: 180rpx;
|
|
}
|
|
|
|
.preview-image {
|
|
width: 100%;
|
|
height: 100%;
|
|
border-radius: 16rpx;
|
|
object-fit: cover;
|
|
}
|
|
|
|
.image-remove {
|
|
position: absolute;
|
|
top: -12rpx;
|
|
right: -12rpx;
|
|
width: 44rpx;
|
|
height: 44rpx;
|
|
background: #ef4444;
|
|
border-radius: 50%;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
box-shadow: 0 6rpx 20rpx rgba(239, 68, 68, 0.3);
|
|
}
|
|
|
|
.remove-icon {
|
|
font-size: 28rpx;
|
|
color: white;
|
|
line-height: 1;
|
|
font-weight: bold;
|
|
}
|
|
|
|
.upload-btn {
|
|
width: 180rpx;
|
|
height: 180rpx;
|
|
border: 2rpx dashed #cbd5e1;
|
|
border-radius: 16rpx;
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
justify-content: center;
|
|
background: #f8fafc;
|
|
transition: all 0.3s ease;
|
|
gap: 15rpx;
|
|
}
|
|
|
|
.upload-btn:active {
|
|
border-color: #667eea;
|
|
background: rgba(102, 126, 234, 0.05);
|
|
}
|
|
|
|
.camera-icon {
|
|
width: 48rpx;
|
|
height: 48rpx;
|
|
filter: brightness(0);
|
|
}
|
|
|
|
.upload-text {
|
|
font-size: 26rpx;
|
|
color: #64748b;
|
|
font-weight: 500;
|
|
}
|
|
|
|
.modal-footer {
|
|
display: flex;
|
|
gap: 20rpx;
|
|
padding: 30rpx;
|
|
background: #f8fafc;
|
|
border-top: 1rpx solid #f1f5f9;
|
|
}
|
|
|
|
.cancel-btn, .submit-btn {
|
|
flex: 1;
|
|
border-radius: 16rpx;
|
|
font-size: 32rpx;
|
|
font-weight: 600;
|
|
border: none;
|
|
margin: 0;
|
|
transition: all 0.3s ease;
|
|
}
|
|
|
|
.cancel-btn::after, .submit-btn::after {
|
|
border: none;
|
|
}
|
|
|
|
.cancel-btn {
|
|
background: white;
|
|
color: #64748b;
|
|
border: 1rpx solid #e2e8f0;
|
|
}
|
|
|
|
.cancel-btn:active {
|
|
background: #f8fafc;
|
|
}
|
|
|
|
.submit-btn {
|
|
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
|
color: white;
|
|
box-shadow: 0 10rpx 30rpx rgba(102, 126, 234, 0.3);
|
|
}
|
|
|
|
.submit-btn:active:not([disabled]) {
|
|
transform: translateY(-2rpx);
|
|
box-shadow: 0 15rpx 40rpx rgba(102, 126, 234, 0.4);
|
|
}
|
|
|
|
.submit-btn[disabled] {
|
|
background: #cbd5e1;
|
|
box-shadow: none;
|
|
color: #94a3b8;
|
|
}
|
|
|
|
/* 首次加载遮罩 */
|
|
.loading-overlay {
|
|
position: fixed;
|
|
top: 0;
|
|
left: 0;
|
|
right: 0;
|
|
bottom: 0;
|
|
background: rgba(255, 255, 255, 0.9);
|
|
backdrop-filter: blur(10rpx);
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
z-index: 999;
|
|
}
|
|
|
|
.loading-content {
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
gap: 30rpx;
|
|
}
|
|
|
|
.spinner-large {
|
|
width: 80rpx;
|
|
height: 80rpx;
|
|
border: 6rpx solid rgba(102, 126, 234, 0.1);
|
|
border-top-color: #667eea;
|
|
border-radius: 50%;
|
|
animation: spin 1s linear infinite;
|
|
}
|
|
|
|
.loading-tip {
|
|
font-size: 32rpx;
|
|
color: #64748b;
|
|
font-weight: 500;
|
|
}
|
|
|
|
/* 动画 */
|
|
@keyframes fadeIn {
|
|
from { opacity: 0; }
|
|
to { opacity: 1; }
|
|
}
|
|
|
|
@keyframes slideUp {
|
|
from { transform: translateY(100%); }
|
|
to { transform: translateY(0); }
|
|
}
|
|
|
|
/* 添加返回顶部按钮的呼吸动画 */
|
|
@keyframes breathe {
|
|
0%, 100% {
|
|
box-shadow: 0 10rpx 40rpx rgba(0, 0, 0, 0.1);
|
|
}
|
|
50% {
|
|
box-shadow: 0 10rpx 40rpx rgba(102, 126, 234, 0.3);
|
|
}
|
|
}
|
|
|
|
.back-to-top-btn.show {
|
|
animation: breathe 3s ease-in-out infinite;
|
|
}
|
|
|
|
/* 响应式调整 */
|
|
@media (min-width: 768px) {
|
|
.post-card {
|
|
max-width: 600rpx;
|
|
margin-left: auto;
|
|
margin-right: auto;
|
|
}
|
|
|
|
.floating-create-btn {
|
|
left: calc(50% - 250rpx);
|
|
}
|
|
|
|
.back-to-top-btn {
|
|
right: calc(50% - 250rpx);
|
|
}
|
|
}
|