337 lines
5.2 KiB
Plaintext
337 lines
5.2 KiB
Plaintext
/** pages/community/create/index.wxss **/
|
|
page {
|
|
height: 100%;
|
|
background: #fff;
|
|
}
|
|
|
|
.create-post-page {
|
|
height: 100vh;
|
|
display: flex;
|
|
flex-direction: column;
|
|
background: #fff;
|
|
}
|
|
|
|
/* Content Area */
|
|
.create-content {
|
|
flex: 1;
|
|
padding: 0 32rpx;
|
|
padding-top: calc(env(safe-area-inset-top) + 100rpx);
|
|
overflow-y: auto;
|
|
-webkit-overflow-scrolling: touch;
|
|
}
|
|
|
|
.create-content::-webkit-scrollbar {
|
|
display: none;
|
|
}
|
|
|
|
/* Action Row */
|
|
.action-row {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
padding: 24rpx 0;
|
|
margin-bottom: 32rpx;
|
|
}
|
|
|
|
/* Cancel Button */
|
|
.cancel-btn {
|
|
font-size: 30rpx;
|
|
color: #666;
|
|
padding: 12rpx 0;
|
|
}
|
|
|
|
.cancel-btn:active {
|
|
opacity: 0.6;
|
|
}
|
|
|
|
/* Publish Button */
|
|
.publish-btn {
|
|
font-size: 28rpx;
|
|
color: #999;
|
|
background: #f0f0f0;
|
|
padding: 16rpx 40rpx;
|
|
border-radius: 32rpx;
|
|
transition: all 0.2s;
|
|
}
|
|
|
|
.publish-btn.active {
|
|
color: #fff;
|
|
background: linear-gradient(135deg, #689F38, #558B2F);
|
|
box-shadow: 0 8rpx 24rpx rgba(85, 139, 47, 0.3);
|
|
}
|
|
|
|
.publish-btn.active:active {
|
|
transform: scale(0.95);
|
|
}
|
|
|
|
/* Textarea */
|
|
.post-textarea {
|
|
width: 100%;
|
|
min-height: 200rpx;
|
|
font-size: 32rpx;
|
|
line-height: 1.7;
|
|
color: #333;
|
|
padding: 32rpx 0;
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
.textarea-placeholder {
|
|
color: #bbb;
|
|
}
|
|
|
|
/* Character Counter */
|
|
.char-counter {
|
|
text-align: right;
|
|
font-size: 24rpx;
|
|
margin-bottom: 24rpx;
|
|
}
|
|
|
|
.char-counter text {
|
|
color: #999;
|
|
}
|
|
|
|
.char-counter .warning {
|
|
color: #FF9800;
|
|
}
|
|
|
|
.char-counter .total {
|
|
color: #ccc;
|
|
}
|
|
|
|
/* Image Section */
|
|
.image-section {
|
|
margin-bottom: 32rpx;
|
|
}
|
|
|
|
/* Image Preview Grid */
|
|
.image-preview-grid {
|
|
display: grid;
|
|
grid-template-columns: repeat(3, 1fr);
|
|
gap: 12rpx;
|
|
}
|
|
|
|
.preview-item {
|
|
position: relative;
|
|
aspect-ratio: 1;
|
|
border-radius: 12rpx;
|
|
overflow: hidden;
|
|
background: #f5f5f5;
|
|
}
|
|
|
|
.remove-btn {
|
|
position: absolute;
|
|
top: 8rpx;
|
|
right: 8rpx;
|
|
width: 44rpx;
|
|
height: 44rpx;
|
|
background: rgba(0, 0, 0, 0.5);
|
|
border-radius: 50%;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
z-index: 10;
|
|
}
|
|
|
|
.remove-btn:active {
|
|
background: rgba(0, 0, 0, 0.7);
|
|
}
|
|
|
|
.image-index {
|
|
position: absolute;
|
|
bottom: 8rpx;
|
|
left: 8rpx;
|
|
width: 36rpx;
|
|
height: 36rpx;
|
|
background: rgba(0, 0, 0, 0.5);
|
|
border-radius: 8rpx;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
font-size: 22rpx;
|
|
color: #fff;
|
|
}
|
|
|
|
.add-image-btn {
|
|
aspect-ratio: 1;
|
|
border: 2rpx dashed #ddd;
|
|
border-radius: 12rpx;
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
justify-content: center;
|
|
gap: 8rpx;
|
|
background: #fafafa;
|
|
}
|
|
|
|
.add-image-btn:active {
|
|
background: #f0f0f0;
|
|
}
|
|
|
|
.add-count {
|
|
font-size: 22rpx;
|
|
color: #999;
|
|
}
|
|
|
|
/* Add First Image */
|
|
.add-first-image {
|
|
margin: 32rpx 0;
|
|
}
|
|
|
|
.image-upload-box {
|
|
padding: 64rpx 48rpx;
|
|
border: 2rpx dashed #C8E6C9;
|
|
border-radius: 24rpx;
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
background: linear-gradient(180deg, #F8FCF8, #fff);
|
|
}
|
|
|
|
.image-upload-box:active {
|
|
background: #F0F7F0;
|
|
}
|
|
|
|
.upload-icon {
|
|
width: 120rpx;
|
|
height: 120rpx;
|
|
background: #E8F5E9;
|
|
border-radius: 50%;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
margin-bottom: 24rpx;
|
|
}
|
|
|
|
.upload-text {
|
|
font-size: 32rpx;
|
|
color: #558B2F;
|
|
font-weight: 600;
|
|
margin-bottom: 8rpx;
|
|
}
|
|
|
|
.upload-hint {
|
|
font-size: 26rpx;
|
|
color: #90A4AE;
|
|
}
|
|
|
|
/* Location Section */
|
|
.location-section {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
padding: 28rpx 0;
|
|
border-top: 2rpx solid #f5f5f5;
|
|
border-bottom: 2rpx solid #f5f5f5;
|
|
}
|
|
|
|
.location-left {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 16rpx;
|
|
}
|
|
|
|
.location-text {
|
|
font-size: 28rpx;
|
|
color: #666;
|
|
}
|
|
|
|
/* Topic Section */
|
|
.topic-section {
|
|
padding: 28rpx 0;
|
|
}
|
|
|
|
.section-title {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 12rpx;
|
|
margin-bottom: 20rpx;
|
|
font-size: 28rpx;
|
|
color: #333;
|
|
font-weight: 500;
|
|
}
|
|
|
|
.topic-list {
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
gap: 16rpx;
|
|
}
|
|
|
|
.topic-tag {
|
|
padding: 12rpx 24rpx;
|
|
background: #f5f5f5;
|
|
border-radius: 32rpx;
|
|
font-size: 26rpx;
|
|
color: #666;
|
|
transition: all 0.2s;
|
|
}
|
|
|
|
.topic-tag.selected {
|
|
background: #E8F5E9;
|
|
color: #558B2F;
|
|
font-weight: 500;
|
|
}
|
|
|
|
.topic-tag:active {
|
|
transform: scale(0.95);
|
|
}
|
|
|
|
/* Bottom Toolbar */
|
|
.create-toolbar {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
padding: 16rpx 32rpx;
|
|
padding-bottom: calc(16rpx + env(safe-area-inset-bottom));
|
|
border-top: 2rpx solid #f5f5f5;
|
|
background: #fff;
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.toolbar-left {
|
|
display: flex;
|
|
gap: 24rpx;
|
|
}
|
|
|
|
.toolbar-btn {
|
|
width: 72rpx;
|
|
height: 72rpx;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
border-radius: 50%;
|
|
}
|
|
|
|
.toolbar-btn:active {
|
|
background: #f5f5f5;
|
|
}
|
|
|
|
.toolbar-right {
|
|
display: flex;
|
|
align-items: center;
|
|
}
|
|
|
|
.draft-hint {
|
|
font-size: 24rpx;
|
|
color: #999;
|
|
}
|
|
/* Title Input */
|
|
.title-section {
|
|
padding: 16rpx 0;
|
|
border-bottom: 2rpx solid #f5f5f5;
|
|
margin-bottom: 16rpx;
|
|
}
|
|
|
|
.post-title-input {
|
|
font-size: 36rpx;
|
|
font-weight: 700;
|
|
color: #333;
|
|
width: 100%;
|
|
height: 64rpx; /* Height for single line */
|
|
min-height: 64rpx;
|
|
}
|
|
|
|
.title-placeholder {
|
|
color: #bbb;
|
|
font-weight: 400;
|
|
}
|