Yufan Sheng
0126b71722
* style: better reply button. * feat: add astro badge. * chore: drop useless styles. * feat: use new options.ts for global configuration. * fix: the invalid import.meta.env.PROD in astro build. * feat: move og to new assert prefix. * chore: add better og description. * chore: make sure all the images link could be correctly replaced. * feat: add upyun uploader.
33 lines
888 B
Plaintext
33 lines
888 B
Plaintext
---
|
|
import { latestComments } from '@/helpers/db/query';
|
|
import options from '@/options';
|
|
|
|
const comments = await latestComments();
|
|
---
|
|
|
|
{
|
|
options.settings.sidebar.comment > 0 && (
|
|
<div id="recent-comments" class="widget widget_recent_comments">
|
|
<div class="widget-title">近期评论</div>
|
|
<ul id="recentcomments">
|
|
{comments.map((comment) => (
|
|
<li class="recentcomments">
|
|
<span class="comment-author-link">
|
|
{comment.authorLink === '' ? (
|
|
comment.author
|
|
) : (
|
|
<a href={comment.authorLink} target="_blank" rel="nofollow">
|
|
{comment.author}
|
|
</a>
|
|
)}
|
|
</span>
|
|
{'发表在《'}
|
|
<a href={comment.permalink}>{comment.title}</a>
|
|
{'》'}
|
|
</li>
|
|
))}
|
|
</ul>
|
|
</div>
|
|
)
|
|
}
|