Skip to content

Commit

Permalink
Merge pull request #74 from shandianchengzi/master
Browse files Browse the repository at this point in the history
使用 icon 来表示不同种类的文章
  • Loading branch information
mudongliang committed May 14, 2024
2 parents 950ed30 + bf31cfa commit 04e249f
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 2 deletions.
Binary file added pages/public/assets/logo_general.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added pages/public/assets/logo_kernel.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added pages/public/assets/logo_syzkaller.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 8 additions & 2 deletions pages/src/components/Card.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,19 @@ export default function Card({ id, href, frontmatter, secHeading = true, body }:
>
{secHeading ? (
id ? (
<h2 {...headerProps}><span>[{id.split('/')[0]}]</span> {title}</h2>
<h2 {...headerProps}>
<img className="inline-block w-6 h-6 me-2" src={"/assets/logo_" + id.split('/')[0] + ".png"} alt={id.split('/')[0] + " icon"}/>
{title}
</h2>
) : (
<h2 {...headerProps}>{title}</h2>
)
) : (
id ? (
<h3 {...headerProps}><span>[{id.split('/')[0]}]</span> {title}</h3>
<h3 {...headerProps}>
<img className="inline-block w-6 h-6 me-2" src={"/assets/logo_" + id.split('/')[0] + ".png"} alt={id.split('/')[0] + " icon"}/>
{title}
</h3>
) : (
<h3 {...headerProps}>{title}</h3>
)
Expand Down

0 comments on commit 04e249f

Please sign in to comment.