Update article.jsx

feat(core): Add pin icon for pinned articles on homepage (issue #1337)
pull/1339/head
Yuanhao Shen 2025-01-02 04:18:29 +08:00 committed by GitHub
parent b00d5ae9d9
commit 5edb008564
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 0 deletions

View File

@ -48,6 +48,8 @@ module.exports = class extends Component {
{/* Metadata */}
{page.layout !== 'page' ? <div class="article-meta is-size-7 is-uppercase level is-mobile">
<div class="level-left">
{/* PIN Icon */}
{page.top ? (<i class="fas fa-thumbtack level-item" title="Pinned"></i>) : null}
{/* Creation Date */}
{page.date && <span class="level-item" dangerouslySetInnerHTML={{
__html: _p('article.created_at', `<time dateTime="${date_xml(page.date)}" title="${new Date(page.date).toLocaleString()}">${date(page.date)}</time>`)