Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

关于在首页的置顶文章卡片上增加置顶图标的建议 #1337

Open
AryCra07 opened this issue Dec 30, 2024 · 0 comments
Open

关于在首页的置顶文章卡片上增加置顶图标的建议 #1337

AryCra07 opened this issue Dec 30, 2024 · 0 comments
Labels
feature:core Feature request that affects layout, styles, scripts, etc.

Comments

@AryCra07
Copy link

确保你在提交功能建议之前仔细阅读了Hexo文档Icarus用户指南,和GitHub issues来了解你的建议是否已经被他人提出过。

你的功能建议与某个使用问题相关么?请详述。

我在使用过程中发现,在文章的 Front Matter 中设置文章置顶之后,在首页的置顶文章卡片上并没有出现置顶图标。

image

描述你想要的解决方案

layout\common\article.jsx 的这个 div 中添加:

{/* TOP icon colored with 玉红 */}
{page.top && page.top !== 0 ? (<i class="fas fa-thumbtack level-item" style="color:#c04851" title="置顶"></i>) : null}

即可达到置顶图标的效果。

图标效果展示:

image

@ppoffice ppoffice added the feature:core Feature request that affects layout, styles, scripts, etc. label Dec 31, 2024
AryCra07 added a commit to AryCra07/hexo-theme-icarus that referenced this issue Jan 1, 2025
feat(core): Add pin icon for pinned articles on homepage (issue ppoffice#1337)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature:core Feature request that affects layout, styles, scripts, etc.
Projects
None yet
Development

No branches or pull requests

2 participants