|
|
@ -87,19 +87,21 @@ watch(slug, load, { immediate: true }) |
|
|
<h1 class="detail-title">{{ article.title }}</h1> |
|
|
<h1 class="detail-title">{{ article.title }}</h1> |
|
|
<p v-if="article.summary" class="detail-summary">{{ article.summary }}</p> |
|
|
<p v-if="article.summary" class="detail-summary">{{ article.summary }}</p> |
|
|
<div class="detail-meta"> |
|
|
<div class="detail-meta"> |
|
|
<span>作者:{{ article.authorName }}</span> |
|
|
|
|
|
<ArticleMetaBar |
|
|
|
|
|
mode="detail" |
|
|
|
|
|
:created-at="article.publishedAt || article.createdAt" |
|
|
|
|
|
:view-count="article.viewCount" |
|
|
|
|
|
:content="article.content" |
|
|
|
|
|
/> |
|
|
|
|
|
<button class="star-btn" :class="{ starred }" @click="toggleStar"> |
|
|
|
|
|
<svg class="star-icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="18" height="18"> |
|
|
|
|
|
<path d="M12 2l3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01L12 2z" fill="currentColor"/> |
|
|
|
|
|
</svg> |
|
|
|
|
|
<span class="star-count">{{ starCount }}</span> |
|
|
|
|
|
</button> |
|
|
|
|
|
|
|
|
<span class="detail-author">作者:{{ article.authorName }}</span> |
|
|
|
|
|
<div class="detail-meta-row"> |
|
|
|
|
|
<ArticleMetaBar |
|
|
|
|
|
mode="detail" |
|
|
|
|
|
:created-at="article.publishedAt || article.createdAt" |
|
|
|
|
|
:view-count="article.viewCount" |
|
|
|
|
|
:content="article.content" |
|
|
|
|
|
/> |
|
|
|
|
|
<button class="star-btn" :class="{ starred }" @click="toggleStar"> |
|
|
|
|
|
<svg class="star-icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="18" height="18"> |
|
|
|
|
|
<path d="M12 2l3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01L12 2z" fill="currentColor"/> |
|
|
|
|
|
</svg> |
|
|
|
|
|
<span class="star-count">{{ starCount }}</span> |
|
|
|
|
|
</button> |
|
|
|
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
<div class="detail-tags"> |
|
|
<div class="detail-tags"> |
|
|
<span v-for="tag in article.tagNames" :key="tag" class="tag">{{ tag }}</span> |
|
|
<span v-for="tag in article.tagNames" :key="tag" class="tag">{{ tag }}</span> |
|
|
@ -133,12 +135,24 @@ watch(slug, load, { immediate: true }) |
|
|
|
|
|
|
|
|
.detail-meta { |
|
|
.detail-meta { |
|
|
display: flex; |
|
|
display: flex; |
|
|
gap: 20px; |
|
|
|
|
|
|
|
|
flex-direction: column; |
|
|
|
|
|
gap: 6px; |
|
|
color: var(--ac-text-disabled); |
|
|
color: var(--ac-text-disabled); |
|
|
font-size: 13px; |
|
|
font-size: 13px; |
|
|
margin: 12px 0; |
|
|
margin: 12px 0; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.detail-author { |
|
|
|
|
|
color: var(--ac-text-secondary); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.detail-meta-row { |
|
|
|
|
|
display: flex; |
|
|
|
|
|
align-items: center; |
|
|
|
|
|
flex-wrap: wrap; |
|
|
|
|
|
gap: 8px 20px; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
.detail-tags { |
|
|
.detail-tags { |
|
|
margin-bottom: 16px; |
|
|
margin-bottom: 16px; |
|
|
} |
|
|
} |
|
|
|