Skip to content

Commit

Permalink
feat(Add IPFS): Added IPFS list on web3 tools page
Browse files Browse the repository at this point in the history
  • Loading branch information
srmasharad committed Apr 17, 2023
1 parent 277e997 commit 2ddcbc2
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 6 deletions.
3 changes: 2 additions & 1 deletion src/components/DetailedListView.astro
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ interface Props {
subtitle: string;
items: DetailedListViewItem[];
showArrow?: boolean;
target?: string;
}
const { props } = Astro;
Expand All @@ -28,7 +29,7 @@ const { props } = Astro;
{
props.items.map((item) => {
return (
<a class="list item" href={normalizeUrl(item.href)}>
<a class="list item" href={normalizeUrl(item.href)} target={item.target} rel={item.target ? "noreferrer" : undefined}>
<div class="title and intro">
<div class="title with badge">
<h3 class="title">{item.title}</h3>
Expand Down
9 changes: 9 additions & 0 deletions src/data/tools.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,15 @@ const tools: Web3ToolItem[] = [
category: 'Blockchain Hack Database',
icon: 'code-square-01',
badges: []
},
{
path: 'https://ipfs.neptunemutual.net/',
title: 'Neptune Mutual IPFS Gateway',
intro: 'Retrieve the IPFS content of our marketplace, the details surrounding our protocol.',
category: 'IPFS Gateway',
icon: 'code-square-01',
badges: [],
target: '_blank'
}
]

Expand Down
7 changes: 2 additions & 5 deletions src/views/Web3Tools.astro
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ const items = tools.map((tool) => {
category: tool.category,
icon: tool.icon,
href: tool.path || `/web3-tools/${tool.slug}/`,
target: tool.target,
};
});
---
Expand All @@ -31,8 +32,4 @@ const items = tools.map((tool) => {
<DetailedListView title="" subtitle="" items={items} showArrow />
</div>

<NewsletterSignupForm
heading="Sign up for our newsletter"
text="Be the first to know about releases and industry news and insights."
showFeedButtons={false}
/>
<NewsletterSignupForm heading="Sign up for our newsletter" text="Be the first to know about releases and industry news and insights." showFeedButtons={false} />
2 changes: 2 additions & 0 deletions types/custom.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ interface DetailedListViewItem {
href: string
icon: string
category: string
target?: string
}

interface NamedIcon {
Expand Down Expand Up @@ -228,6 +229,7 @@ interface Web3ToolItem {
icon: string
text: string
}>
target?: '_blank' | '_self' | '_parent' | '_top'
}

interface TableRenderConfig<T> {
Expand Down

0 comments on commit 2ddcbc2

Please sign in to comment.