nakama/frontend/src/components/PostCard.css

235 lines
3.6 KiB
CSS
Raw Normal View History

2025-11-03 20:35:01 +00:00
.post-card {
animation: fadeIn 0.3s ease-out;
}
.post-header {
display: flex;
justify-content: space-between;
align-items: flex-start;
margin-bottom: 12px;
}
.post-author {
display: flex;
gap: 12px;
cursor: pointer;
user-select: none;
}
.author-avatar {
width: 44px;
height: 44px;
border-radius: 50%;
object-fit: cover;
}
.author-info {
display: flex;
flex-direction: column;
gap: 2px;
}
.author-name {
font-size: 15px;
font-weight: 600;
color: var(--text-primary);
}
.post-date {
font-size: 13px;
color: var(--text-secondary);
}
.menu-btn {
width: 32px;
height: 32px;
border-radius: 50%;
background: transparent;
2025-11-03 20:54:59 +00:00
color: var(--text-primary);
2025-11-03 20:35:01 +00:00
display: flex;
align-items: center;
justify-content: center;
}
2025-11-03 20:54:59 +00:00
.menu-btn svg {
stroke: currentColor;
}
2025-11-03 20:35:01 +00:00
.menu-btn:active {
background: var(--bg-primary);
}
.post-content {
font-size: 15px;
line-height: 1.5;
color: var(--text-primary);
margin-bottom: 12px;
white-space: pre-wrap;
word-wrap: break-word;
}
2025-11-03 22:17:25 +00:00
.post-images {
2025-11-03 20:35:01 +00:00
margin: 0 -16px 12px;
width: calc(100% + 32px);
2025-11-03 22:17:25 +00:00
}
.image-carousel {
position: relative;
width: 100%;
2025-11-03 20:35:01 +00:00
max-height: 400px;
overflow: hidden;
}
2025-11-03 22:17:25 +00:00
.image-carousel img {
2025-11-03 20:35:01 +00:00
width: 100%;
height: 100%;
2025-11-03 22:17:25 +00:00
max-height: 400px;
2025-11-03 20:35:01 +00:00
object-fit: cover;
display: block;
}
2025-11-03 22:17:25 +00:00
.carousel-btn {
position: absolute;
top: 50%;
transform: translateY(-50%);
width: 36px;
height: 36px;
border-radius: 50%;
2025-11-04 21:51:05 +00:00
background: rgba(0, 0, 0, 0.3);
2025-11-03 22:17:25 +00:00
color: white;
display: flex;
2025-11-04 21:51:05 +00:00
opacity: 0.7;
z-index: 10;
2025-11-03 22:17:25 +00:00
align-items: center;
justify-content: center;
border: none;
cursor: pointer;
backdrop-filter: blur(5px);
z-index: 10;
}
.carousel-btn svg {
stroke: white;
}
.carousel-btn.prev {
2025-11-04 21:51:05 +00:00
left: 0;
width: 33.33%;
height: 100%;
border-radius: 0;
background: transparent;
justify-content: flex-start;
padding-left: 12px;
2025-11-03 22:17:25 +00:00
}
.carousel-btn.next {
2025-11-04 21:51:05 +00:00
right: 0;
width: 33.33%;
height: 100%;
border-radius: 0;
background: transparent;
justify-content: flex-end;
padding-right: 12px;
}
.carousel-btn.prev svg,
.carousel-btn.next svg {
position: relative;
z-index: 2;
background: rgba(0, 0, 0, 0.3);
border-radius: 50%;
padding: 6px;
opacity: 0.7;
transition: opacity 0.2s, background 0.2s;
}
.carousel-btn.prev:hover svg,
.carousel-btn.next:hover svg,
.carousel-btn.prev:active svg,
.carousel-btn.next:active svg {
opacity: 1;
background: rgba(0, 0, 0, 0.5);
2025-11-03 22:17:25 +00:00
}
.carousel-dots {
position: absolute;
bottom: 12px;
left: 50%;
transform: translateX(-50%);
display: flex;
gap: 6px;
z-index: 10;
}
.dot {
width: 8px;
height: 8px;
border-radius: 50%;
background: rgba(255, 255, 255, 0.5);
cursor: pointer;
transition: all 0.2s;
}
.dot.active {
background: white;
width: 20px;
border-radius: 4px;
}
2025-11-03 20:35:01 +00:00
.post-tags {
display: flex;
gap: 8px;
flex-wrap: wrap;
margin-bottom: 12px;
}
.post-tag {
padding: 4px 12px;
border-radius: 12px;
font-size: 12px;
font-weight: 600;
color: white;
}
.nsfw-badge {
padding: 4px 12px;
border-radius: 12px;
font-size: 12px;
font-weight: 600;
background: #FF3B30;
color: white;
}
.post-actions {
display: flex;
gap: 16px;
padding-top: 12px;
border-top: 1px solid var(--divider-color);
}
.action-btn {
display: flex;
align-items: center;
gap: 6px;
2025-11-03 20:54:59 +00:00
padding: 8px 16px;
2025-11-03 20:35:01 +00:00
border-radius: 20px;
background: transparent;
2025-11-03 20:54:59 +00:00
color: var(--text-primary);
2025-11-03 20:35:01 +00:00
font-size: 14px;
font-weight: 500;
transition: all 0.2s;
}
.action-btn:active {
background: var(--bg-primary);
}
.action-btn.active {
color: var(--text-primary);
}
.action-btn span {
min-width: 20px;
}