Files
sundynix-plant-mp/pages/wiki/index.wxss
T
2026-02-14 15:38:48 +08:00

298 lines
5.8 KiB
Plaintext

/** pages/wiki/index.wxss **/
.wiki-page {
height: 100vh;
display: flex;
flex-direction: column;
background-color: #F4F6F0;
position: relative;
overflow: hidden;
}
.wiki-scroll-area {
flex: 1;
overflow-y: hidden; /* Scroll-view handles overflow */
box-sizing: border-box;
}
/* Scroll-view inner content padding wrapper if needed,
but we can apply padding to children or use a wrapper view inside.
Usually easier to apply padding to the items or a wrapper inside scroll-view. */
.search-section {
padding: 24rpx 40rpx 0;
margin-bottom: 32rpx;
}
.search-box-card {
background: #fff;
border-radius: 40rpx;
padding: 16rpx 20rpx;
box-shadow: 0 8rpx 24rpx rgba(85, 139, 47, 0.08); /* Green-tinted shadow */
}
/* Override TDesign Search */
.search-input-bg {
background: #F4F6F0 !important; /* Light green-grey */
border-radius: 32rpx !important;
height: 80rpx !important;
}
.t-search__input-container {
height: 80rpx !important;
}
/* Category Scroll */
.category-scroll {
display: flex;
white-space: nowrap;
padding-left: 40rpx;
margin-bottom: 40rpx;
height: 88rpx;
width: 100%;
box-sizing: border-box;
}
/* Hide scrollbar for webkit */
.category-scroll::-webkit-scrollbar {
display: none;
}
.category-item {
display: inline-flex;
align-items: center;
justify-content: center;
padding: 0 28rpx;
height: 72rpx;
background: #fff;
border-radius: 36rpx;
margin-right: 16rpx;
font-size: 26rpx;
color: #546E7A;
font-weight: 600;
box-shadow: 0 4rpx 12rpx rgba(0,0,0,0.04);
transition: all 0.2s cubic-bezier(0.25, 0.8, 0.25, 1);
flex-shrink: 0;
border: 2rpx solid transparent; /* Reserve border space */
}
.category-item:active {
transform: scale(0.95);
}
.category-item.active {
background: #558B2F;
color: #fff;
font-weight: 700;
box-shadow: 0 8rpx 20rpx rgba(85, 139, 47, 0.3);
border-color: #558B2F;
}
.wiki-list {
display: flex;
flex-direction: column;
gap: 32rpx;
padding: 0 40rpx;
}
.wiki-card {
background: white;
padding: 32rpx;
border-radius: 48rpx;
display: flex;
align-items: center;
gap: 36rpx;
box-shadow: 0 4rpx 16rpx rgba(0,0,0,0.03);
transition: transform 0.1s;
}
.wiki-card:active {
transform: scale(0.98);
}
.wiki-image {
width: 140rpx; height: 140rpx;
border-radius: 36rpx;
overflow: hidden;
box-shadow: 0 8rpx 20rpx rgba(0,0,0,0.1);
flex-shrink: 0;
background: #f0f0f0;
position: relative;
}
.fav-icon-box {
position: absolute;
top: 10rpx;
right: 10rpx;
width: 56rpx;
height: 56rpx;
background: rgba(255, 255, 255, 0.85);
backdrop-filter: blur(4px);
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
z-index: 5;
box-shadow: 0 4rpx 12rpx rgba(0,0,0,0.1);
}
.fav-icon-box:active {
transform: scale(0.9);
transition: transform 0.1s;
}
.wiki-image image { width: 100%; height: 100%; display: block; }
.wiki-image-placeholder {
width: 100%; height: 100%;
display: flex;
align-items: center;
justify-content: center;
background: #f5f5f5;
}
.wiki-info { flex: 1; min-width: 0; }
.wiki-top { margin-bottom: 12rpx; }
.wiki-name { font-size: 34rpx; font-weight: 700; color: var(--text-main); display: block; margin-bottom: 4rpx; }
.scientific-name { font-size: 24rpx; color: #90A4AE; font-style: italic; font-family: serif; display: block; }
.tags-row {
display: flex;
flex-wrap: wrap;
gap: 8rpx;
}
/* Loading Footer */
.loading-footer {
padding: 40rpx;
display: flex;
justify-content: center;
align-items: center;
}
.no-more-text {
font-size: 24rpx;
color: #CCC;
}
.empty-state {
padding: 80rpx 0;
text-align: center;
color: #999;
font-size: 28rpx;
}
/* Floating Action Button */
.floating-add-btn {
position: fixed;
right: 40rpx;
bottom: 60rpx;
background: #558B2F;
color: white;
padding: 24rpx 40rpx;
border-radius: 60rpx;
display: flex;
align-items: center;
gap: 12rpx;
box-shadow: 0 12rpx 32rpx rgba(85, 139, 47, 0.4);
z-index: 1000;
font-size: 28rpx;
font-weight: 700;
transition: all 0.2s ease;
}
.floating-add-btn:active {
transform: scale(0.92);
box-shadow: 0 4rpx 16rpx rgba(85, 139, 47, 0.2);
}
/* Popup Styles */
.popup-content {
background: white;
border-radius: 48rpx 48rpx 0 0;
padding: 48rpx 40rpx;
padding-bottom: calc(48rpx + env(safe-area-inset-bottom));
}
.popup-header {
text-align: center;
margin-bottom: 16rpx;
}
.popup-title {
font-size: 40rpx;
font-weight: 800;
background: linear-gradient(120deg, #33691E, #689F38);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
display: inline-block;
}
.popup-subtitle {
font-size: 26rpx;
color: #9CA3AF;
text-align: center;
display: block;
margin-bottom: 48rpx;
}
.upload-options-grid {
display: flex;
gap: 32rpx;
justify-content: center;
margin-bottom: 48rpx;
}
.upload-opt-item {
flex: 1;
display: flex;
flex-direction: column;
align-items: center;
gap: 20rpx;
background: #F4F6F0;
border-radius: 32rpx;
padding: 40rpx 24rpx;
transition: all 0.2s;
}
.upload-opt-item:active {
transform: scale(0.96);
background: #F0F7EB;
}
.opt-icon-circle {
width: 112rpx;
height: 112rpx;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
box-shadow: 0 8rpx 24rpx rgba(0,0,0,0.06);
}
.upload-opt-item text {
font-size: 28rpx;
font-weight: 600;
color: #374151;
}
.popup-footer {
display: flex;
justify-content: center;
padding-top: 8rpx;
}
.popup-footer .cancel-btn {
width: 100%;
height: 88rpx;
line-height: 88rpx;
text-align: center;
font-size: 32rpx;
font-weight: 600;
color: #6B7280;
background: #F3F4F6;
border-radius: 44rpx;
border: none;
}
.popup-footer .cancel-btn:active {
background: #E5E7EB;
}