1725 功能大改
This commit is contained in:
1 parent
fa52190830
commit
f73bf33bce
10 files changed
+1743
-10
No files matched your search
@@ -0,0 +1,345 @@
|
||||
/* ============================================================
|
||||
Shortcodes 样式 - 实况照片、语音、音乐卡片
|
||||
移植自 Hugo-Theme-Amigo
|
||||
============================================================ */
|
||||
|
||||
/* ---- Live Photo ---- */
|
||||
.live-photo {
|
||||
--border-radius: 4px;
|
||||
--live-photo-aspect: 4 / 5;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
border-radius: var(--border-radius);
|
||||
width: 100%;
|
||||
max-width: min(360px, 100%);
|
||||
margin: 12px auto;
|
||||
aspect-ratio: var(--live-photo-aspect);
|
||||
background: #f5f5f5;
|
||||
container-type: inline-size;
|
||||
}
|
||||
|
||||
.live-photo .live-photo-video {
|
||||
position: absolute;
|
||||
display: block;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
object-fit: cover;
|
||||
inset: 0;
|
||||
opacity: 0;
|
||||
transition: opacity 0.2s ease;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.live-photo .live-photo-poster {
|
||||
position: absolute;
|
||||
inset: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
object-fit: cover;
|
||||
opacity: 1;
|
||||
transition: opacity 0.25s ease;
|
||||
z-index: 0;
|
||||
}
|
||||
|
||||
.live-photo.is-playing .live-photo-video {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.live-photo.is-playing .live-photo-poster {
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
.live-photo .live-photo-controls-group {
|
||||
position: absolute;
|
||||
left: 10px;
|
||||
top: 10px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
z-index: 2;
|
||||
}
|
||||
|
||||
.live-photo .live-photo-control-btn {
|
||||
border: none;
|
||||
padding: 4px 8px;
|
||||
border-radius: var(--border-radius);
|
||||
height: 24px;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
background-color: transparent;
|
||||
color: #606060;
|
||||
cursor: pointer;
|
||||
user-select: none;
|
||||
border: 1px solid rgba(255, 255, 255, 0.7);
|
||||
text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
|
||||
backdrop-filter: blur(10px);
|
||||
-webkit-backdrop-filter: blur(10px);
|
||||
transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
|
||||
}
|
||||
|
||||
.live-photo .live-photo-control-btn:hover {
|
||||
transform: translateY(-1px);
|
||||
box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
.live-photo .live-photo-toggle-btn {
|
||||
background-color: rgba(44, 44, 46, 0.62);
|
||||
border-color: rgba(255, 255, 255, 0.22);
|
||||
color: rgb(205 205 205 / 92%);
|
||||
}
|
||||
|
||||
.live-photo .live-photo-toggle-btn:hover {
|
||||
background-color: rgba(44, 44, 46, 0.72);
|
||||
}
|
||||
|
||||
.live-photo .live-photo-mute-btn {
|
||||
background-color: rgba(44, 44, 46, 0.35);
|
||||
border-color: rgba(255, 255, 255, 0.18);
|
||||
color: rgb(205 205 205 / 92%);
|
||||
}
|
||||
|
||||
.live-photo .live-photo-mute-btn:hover {
|
||||
background-color: rgba(44, 44, 46, 0.42);
|
||||
}
|
||||
|
||||
.live-photo-mute-btn .live-photo-mute-icon {
|
||||
display: block;
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
font-size: 15px;
|
||||
line-height: 19px;
|
||||
color: rgb(205 205 205 / 92%);
|
||||
}
|
||||
|
||||
.live-photo-mute-btn[data-muted="true"] .icon-unmuted {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.live-photo-mute-btn[data-muted="false"] .icon-muted {
|
||||
display: none;
|
||||
}
|
||||
|
||||
/* ---- Voice Bubble ---- */
|
||||
.amigo-voice-bubble {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 12px;
|
||||
padding: 12px 16px;
|
||||
background: linear-gradient(135deg, #95ec69 0%, #7dd652 100%);
|
||||
border-radius: 16px;
|
||||
cursor: pointer;
|
||||
position: relative;
|
||||
max-width: 200px;
|
||||
transition: transform 0.2s ease, box-shadow 0.2s ease;
|
||||
}
|
||||
|
||||
.amigo-voice-bubble:hover {
|
||||
transform: translateY(-2px);
|
||||
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
|
||||
}
|
||||
|
||||
.amigo-voice-bubble:active {
|
||||
transform: translateY(0);
|
||||
}
|
||||
|
||||
.amigo-voice-icon {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 2px;
|
||||
height: 20px;
|
||||
}
|
||||
|
||||
.amigo-voice-icon span {
|
||||
display: block;
|
||||
width: 3px;
|
||||
background: #2d2d2d;
|
||||
border-radius: 2px;
|
||||
animation: voiceWave 1.2s ease-in-out infinite;
|
||||
}
|
||||
|
||||
.amigo-voice-icon span:nth-child(1) {
|
||||
height: 8px;
|
||||
animation-delay: 0s;
|
||||
}
|
||||
|
||||
.amigo-voice-icon span:nth-child(2) {
|
||||
height: 14px;
|
||||
animation-delay: 0.2s;
|
||||
}
|
||||
|
||||
.amigo-voice-icon span:nth-child(3) {
|
||||
height: 10px;
|
||||
animation-delay: 0.4s;
|
||||
}
|
||||
|
||||
.amigo-voice-bubble.playing .amigo-voice-icon span {
|
||||
animation: voiceWaveActive 0.6s ease-in-out infinite;
|
||||
}
|
||||
|
||||
.amigo-voice-duration {
|
||||
font-size: 14px;
|
||||
color: #2d2d2d;
|
||||
font-weight: 500;
|
||||
min-width: 24px;
|
||||
}
|
||||
|
||||
.amigo-voice-unread {
|
||||
position: absolute;
|
||||
top: -4px;
|
||||
right: -4px;
|
||||
width: 8px;
|
||||
height: 8px;
|
||||
background: #ff4d4f;
|
||||
border-radius: 50%;
|
||||
border: 2px solid #fff;
|
||||
}
|
||||
|
||||
@keyframes voiceWave {
|
||||
0%, 100% { transform: scaleY(0.5); }
|
||||
50% { transform: scaleY(1); }
|
||||
}
|
||||
|
||||
@keyframes voiceWaveActive {
|
||||
0%, 100% { transform: scaleY(0.3); }
|
||||
50% { transform: scaleY(1); }
|
||||
}
|
||||
|
||||
/* ---- Music Card ---- */
|
||||
.amigo-music-card {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 16px;
|
||||
padding: 16px;
|
||||
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
||||
border-radius: 12px;
|
||||
max-width: 400px;
|
||||
margin: 16px 0;
|
||||
box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
|
||||
transition: transform 0.2s ease, box-shadow 0.2s ease;
|
||||
}
|
||||
|
||||
.amigo-music-card:hover {
|
||||
transform: translateY(-2px);
|
||||
box-shadow: 0 8px 25px rgba(102, 126, 234, 0.6);
|
||||
}
|
||||
|
||||
.amigo-music-card__art {
|
||||
position: relative;
|
||||
width: 80px;
|
||||
height: 80px;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.amigo-music-card__cover {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
object-fit: cover;
|
||||
border-radius: 8px;
|
||||
box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
|
||||
}
|
||||
|
||||
.amigo-music-card__play {
|
||||
position: absolute;
|
||||
inset: 0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
background: rgba(0, 0, 0, 0.3);
|
||||
border-radius: 8px;
|
||||
border: none;
|
||||
cursor: pointer;
|
||||
opacity: 0;
|
||||
transition: opacity 0.2s ease;
|
||||
}
|
||||
|
||||
.amigo-music-card__art:hover .amigo-music-card__play {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.amigo-music-card__play-icon {
|
||||
width: 36px;
|
||||
height: 36px;
|
||||
background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M8 5v14l11-7z'/%3E%3C/svg%3E") no-repeat center;
|
||||
background-size: contain;
|
||||
}
|
||||
|
||||
.amigo-music-card__meta {
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.amigo-music-card__title {
|
||||
display: block;
|
||||
font-size: 16px;
|
||||
font-weight: 600;
|
||||
color: #fff;
|
||||
margin-bottom: 4px;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.amigo-music-card__artist {
|
||||
display: block;
|
||||
font-size: 14px;
|
||||
color: rgba(255, 255, 255, 0.8);
|
||||
margin-bottom: 12px;
|
||||
}
|
||||
|
||||
.amigo-music-card__timeline {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
.amigo-music-card__time {
|
||||
font-size: 12px;
|
||||
color: rgba(255, 255, 255, 0.7);
|
||||
min-width: 36px;
|
||||
}
|
||||
|
||||
.amigo-music-card__seek-wrap {
|
||||
flex: 1;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.amigo-music-card__seek {
|
||||
width: 100%;
|
||||
height: 4px;
|
||||
-webkit-appearance: none;
|
||||
appearance: none;
|
||||
background: rgba(255, 255, 255, 0.3);
|
||||
border-radius: 2px;
|
||||
outline: none;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.amigo-music-card__seek::-webkit-slider-thumb {
|
||||
-webkit-appearance: none;
|
||||
width: 12px;
|
||||
height: 12px;
|
||||
background: #fff;
|
||||
border-radius: 50%;
|
||||
cursor: pointer;
|
||||
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
|
||||
}
|
||||
|
||||
/* Dark theme support */
|
||||
[data-theme="dark"] .live-photo {
|
||||
background: #1a1a1a;
|
||||
}
|
||||
|
||||
[data-theme="dark"] .amigo-voice-bubble {
|
||||
background: linear-gradient(135deg, #3d3d3d 0%, #2d2d2d 100%);
|
||||
}
|
||||
|
||||
[data-theme="dark"] .amigo-voice-icon span,
|
||||
[data-theme="dark"] .amigo-voice-duration {
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
[data-theme="dark"] .amigo-music-card {
|
||||
background: linear-gradient(135deg, #4a5568 0%, #2d3748 100%);
|
||||
}
|
||||
Reference in new issue
Block a user