Skip to content

Commit

Permalink
feat: added standard block to the resources page
Browse files Browse the repository at this point in the history
Plus couple of fixes requested by the team.
  • Loading branch information
keriat committed Mar 13, 2023
1 parent b52ef63 commit 2cf43e6
Show file tree
Hide file tree
Showing 8 changed files with 528 additions and 81 deletions.
399 changes: 399 additions & 0 deletions public/images/standard.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion src/components/Block/Alliance.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export default function BlockAlliance() {
<li key={testimonialIndex}>
<a href={testimonial.website} target="_blank" className="relative flex rounded-lg bg-white dark:bg-zinc-700 p-6 shadow-xl shadow-slate-900/10 lg:hover:bg-white/70 dark:lg:hover:bg-zinc-700/70 transition-colors delay-75 ease-linear" rel="noreferrer">
<figure>
<QuoteIcon className="absolute top-6 left-6 fill-pink-100/40 group-hover:fill-white/70" />
<QuoteIcon className="absolute top-6 left-6 fill-pink-100/40 dark:fill-pink-50/5 group-hover:fill-white/70" />
<blockquote className="relative">
<p className="text-right text-lg text-slate-700 dark:text-zinc-100">{testimonial.content}</p>
</blockquote>
Expand Down
4 changes: 2 additions & 2 deletions src/components/Block/PinnedResources.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import React from "react";
const resources = [
{
creator: "Superform",
title: "SuperVaults: ERC4626 Adapters of different kinds",
title: "SuperVaults: ERC4626 Adapters",
description:
"Repository contains different types of ERC4626 adapters/wrappers for non-standardized DeFi Vaults. We follow yield-daddy implementation for some AAVE & Compound" +
" forked protocols, adding reward harvesting, but we also provide a set of original adapters over protocols like Arrakis, Lido, Uniswap or Compound-V3. A goal of this repository is to build a useful reference codebase to follow when implementing ERC4626 compatible adapters and vaults.",
Expand Down Expand Up @@ -64,7 +64,7 @@ export default function PinnedResources() {
<IoLogoGithub className="h-8 w-8" />
<small>Created by {resource.creator}</small>
</div>
<h3 className="mt-3 whitespace-nowrap bg-gradient-to-r from-pink-400 to-pink-900 bg-clip-text text-lg font-extrabold capitalize tracking-tight text-transparent dark:from-pink-100">
<h3 className="mt-3 whitespace-nowrap bg-gradient-to-r from-pink-400 to-pink-900 dark:from-pink-50 dark:to-pink-300 bg-clip-text text-lg font-extrabold capitalize tracking-tight text-transparent">
{resource.title}
</h3>
<p className="mt-2 leading-relaxed dark:text-white">{resource.description}</p>
Expand Down
79 changes: 79 additions & 0 deletions src/components/Block/Standard.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
import AtomTitle from "@/components/Atom/Title";
import Container from "@/components/Container";
import Image from "next/future/image";
import { SVGProps } from "react";
import { FaEthereum } from "react-icons/fa";
import { HiOutlineBookmarkAlt } from "react-icons/hi";
import { IoLogoGithub } from "react-icons/io";

const links = [
{
name: "Dev Docs",
href: "https://ethereum.org/en/developers/docs/standards/tokens/erc-4626/",
icon: (props: SVGProps<any>) => <FaEthereum {...props} />,
},
{
name: "EIP",
href: "https://eips.ethereum.org/EIPS/eip-4626",
icon: (props: SVGProps<any>) => <HiOutlineBookmarkAlt {...props} />,
},
{
name: "GitHub",
href: "https://github.com/ethereum/EIPs/blob/master/EIPS/eip-4626.md",
icon: (props: SVGProps<any>) => <IoLogoGithub {...props} />,
},
];

export default function Standard() {
return (
<div className="uiBlock lightBackground relative overflow-hidden">
<div aria-hidden="true" className="absolute inset-x-0 top-4 h-48 " />
<Container>
<div className="mx-auto py-16 md:grid lg:grid-cols-12 lg:gap-20 lg:py-32">
<div className="md:col-span-5 md:text-left" data-aos="fade-right">
<AtomTitle>ERC-4626 Standard</AtomTitle>
<p className="mb-4 text-lg leading-relaxed text-slate-700 dark:text-zinc-100">
<code className="mr-1 select-none whitespace-nowrap rounded-lg bg-pink-100 px-2 py-1 dark:bg-pink-900">ERC-4626</code> is a technical standard that aims to streamline
and harmonize the specifications of yield-bearing vaults.
</p>
<p className="mb-4 text-lg leading-relaxed text-slate-700 dark:text-zinc-100">
It introduces a standardized API for tokenized yield-bearing vaults that correspond to fractional ownership of a specific{" "}
<code className="mx-1 select-none whitespace-nowrap rounded-lg bg-pink-100 px-2 py-1 dark:bg-pink-900">ERC-20</code> token.
</p>
<p className="mb-4 text-lg leading-relaxed text-slate-700 dark:text-zinc-100">
Additionally, <code className="mr-1 select-none whitespace-nowrap rounded-lg bg-pink-100 px-2 py-1 dark:bg-pink-900">ERC-4626</code> presents an optional addendum for tokenized vaults that employ{" "}
<code className="mx-1 select-none whitespace-nowrap rounded-lg bg-pink-100 px-2 py-1 dark:bg-pink-900">ERC-20</code>, which provides fundamental capabilities for
depositing, withdrawing, and tracking token balances.
</p>
<div className="mt-4 flex flex-auto flex-col items-stretch space-y-4 md:mt-8 md:flex-row md:space-y-0 md:space-x-4">
{links.map((item) => (
<a
target="_blank"
rel="noopener noreferrer"
key={item.name}
href={item.href}
className="featuredLink group inline-flex items-center text-lg font-medium decoration-from-font"
>
<item.icon className="relative mr-1.5 inline-flex h-4 w-auto md:opacity-25 md:group-hover:opacity-100 dark:md:opacity-75" />
{item.name}
</a>
))}
</div>
</div>
<div className="relative h-auto w-full object-scale-down md:col-span-7" data-aos="fade-left">
<Image
priority={false}
unoptimized={true}
src="/images/standard.svg"
width={823}
height={370}
loading="lazy"
className="w-full 2xl:h-full 2xl:w-auto"
alt="WHAT IS ERC-4626?"
/>
</div>
</div>
</Container>
</div>
);
}
115 changes: 41 additions & 74 deletions src/components/Footer.tsx
Original file line number Diff line number Diff line change
@@ -1,95 +1,62 @@
import Container from "@/components/Container";
import { Component, SVGProps } from "react";
import { HiOutlineBookmarkAlt } from "react-icons/hi";
import { IoMdHeart, IoLogoGithub, IoLogoTwitter } from "react-icons/io";
import { FaEthereum, FaTelegramPlane } from "react-icons/fa";
import { SVGProps } from "react";
import { IoMdHeart, IoLogoTwitter } from "react-icons/io";
import { FaTelegramPlane } from "react-icons/fa";
import { AiOutlineUsergroupAdd } from "react-icons/ai";

const footerNavigation = {
social: [
{
name: "Dev Docs",
href: "https://ethereum.org/en/developers/docs/standards/tokens/erc-4626/",
icon: (props: SVGProps<any>) => <FaEthereum {...props} />,
name: "Follow us",
href: "https://twitter.com/erc4626",
icon: (props: SVGProps<any>) => <IoLogoTwitter {...props} />,
},
{
name: "EIP",
href: "https://eips.ethereum.org/EIPS/eip-4626",
icon: (props: SVGProps<any>) => <HiOutlineBookmarkAlt {...props} />,
name: "Discuss",
href: "https://t.me/erc4626alliance",
icon: (props: SVGProps<any>) => <FaTelegramPlane {...props} />,
},
{
name: "GitHub",
href: "https://github.com/ethereum/EIPs/blob/master/EIPS/eip-4626.md",
icon: (props: SVGProps<any>) => <IoLogoGithub {...props} />,
name: "Join the alliance",
href: "https://forms.gle/DsCsttsxBUYQTB9r6",
icon: (props: SVGProps<any>) => <AiOutlineUsergroupAdd {...props} />,
},
],
};

export default class Footer extends Component {
render() {
return (
<footer className="bg-white/70 dark:bg-zinc-900/90 pb-6 lg:py-6" aria-labelledby="footer-heading">
<h2 id="footer-heading" className="sr-only">
Footer
</h2>
<Container noPb>
<div className="flex flex-col md:flex-row md:items-center md:justify-between">
<div className="flex flex-row justify-center space-x-4 md:order-2">
{footerNavigation.social.map((item: { name: string; href?: string; icon: any }) => (
<a
target="_blank"
rel="noopener noreferrer"
key={item.name}
href={item.href}
className="group inline-flex items-center text-sm font-medium text-pink-700 dark:text-pink-400 underline decoration-from-font underline-offset-4 md:font-normal md:no-underline md:hover:text-pink-900 md:dark:hover:text-pink-400 md:hover:underline"
>
<item.icon className="relative mr-1.5 inline-flex h-4 w-auto md:opacity-25 dark:md:opacity-75 md:group-hover:opacity-100" />
{item.name}
</a>
))}
</div>
<div className="mt-4 flex flex-wrap items-center justify-center space-y-1 whitespace-nowrap text-sm dark:text-white text-pink-700 md:order-1 md:my-0 md:justify-between md:space-y-0">
<span>Handcrafted</span>
<span className="block w-full md:hidden" />
<span className="ml-1">with</span>
<span className="mx-1 md:mx-2">
<IoMdHeart className="h-4 w-4 text-red-600" />
</span>
<span className="inline-flex font-semibold">by The 4626 Alliance</span>
<span className="mx-4 h-0 w-full border-r border-pink-400 text-left md:h-5 md:w-auto"></span>
export default function Footer() {
return (
<footer className="bg-white/70 py-6 dark:bg-zinc-900/90" aria-labelledby="footer-heading">
<h2 id="footer-heading" className="sr-only">
Footer
</h2>
<Container noPb>
<div className="flex flex-col md:flex-row md:items-center md:justify-between">
<div className="flex flex-row justify-center space-x-4 md:order-2">
{footerNavigation.social.map((item: { name: string; href?: string; icon: any }) => (
<a
rel="noopener noreferrer"
href="twitter.com/erc4626"
target="_blank"
className="group inline-flex items-center font-medium text-pink-700 dark:text-pink-400 underline decoration-from-font underline-offset-4 md:font-normal md:no-underline md:hover:text-pink-900 md:hover:underline"
>
follow us
<IoLogoTwitter className="ml-1.5 inline-flex h-4 w-4 dark:md:opacity-75 md:opacity-25 md:group-hover:opacity-100" />
</a>
<span className="mx-4 h-3 border-r border-pink-400 text-left md:h-5"></span>
<a
rel="noopener noreferrer"
href="https://t.me/erc4626alliance"
target="_blank"
className="group inline-flex items-center font-medium text-pink-700 dark:text-pink-400 underline decoration-from-font underline-offset-4 md:font-normal md:no-underline md:hover:text-pink-900 md:hover:underline"
key={item.name}
href={item.href}
className="group inline-flex items-center text-sm font-medium text-pink-700 underline decoration-from-font underline-offset-4 dark:text-pink-400 md:font-normal md:no-underline md:hover:text-pink-900 md:hover:underline md:dark:hover:text-pink-400"
>
discuss
<FaTelegramPlane className="ml-1.5 inline-flex h-4 w-4 dark:md:opacity-75 md:opacity-25 md:group-hover:opacity-100" />
<item.icon className="relative mr-1.5 inline-flex h-4 w-auto md:opacity-25 md:group-hover:opacity-100 dark:md:opacity-75" />
{item.name}
</a>
<span className="mx-4 h-3 border-r border-pink-400 text-left md:h-5"></span>
<a
rel="noopener noreferrer"
href="https://forms.gle/DsCsttsxBUYQTB9r6"
target="_blank"
className="group inline-flex items-center font-medium text-pink-700 dark:text-pink-400 underline decoration-from-font underline-offset-4 md:font-normal md:no-underline md:hover:text-pink-900 dark:md:hover:text-pink-00 md:hover:underline"
>
join the alliance
<AiOutlineUsergroupAdd className="ml-1.5 inline-flex h-4 w-4 dark:md:opacity-75 md:opacity-25 md:group-hover:opacity-100" />
</a>
</div>
))}
</div>
<div className="mt-4 flex flex-wrap items-center justify-center space-y-1 whitespace-nowrap text-sm text-pink-700 dark:text-white md:order-1 md:my-0 md:justify-between md:space-y-0">
<span>Handcrafted</span>
<span className="block w-full md:hidden" />
<span className="ml-1">with</span>
<span className="mx-1 md:mx-2">
<IoMdHeart className="h-4 w-4 text-red-600" />
</span>
<span className="inline-flex font-semibold">by The 4626 Alliance</span>
</div>
</Container>
</footer>
);
}
</div>
</Container>
</footer>
);
}
2 changes: 1 addition & 1 deletion src/components/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ export default function Header() {
</nav>
</nav>
{isHeaderExpanded && <div className={`absolute inset-x-0 top-0 z-10 origin-top-right transform p-1`}>
<div className="rounded-lg bg-white shadow-sm ring-1 ring-black ring-opacity-5">
<div className="rounded-lg bg-white dark:bg-zinc-900 shadow-sm ring-1 ring-black ring-opacity-5">
<div className="flex items-center justify-between px-4 pt-1">
<div className="h-[80px] w-auto md:hover:cursor-pointer" onClick={scrollToTop}>
{logo}
Expand Down
6 changes: 3 additions & 3 deletions src/components/Resources.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import AtomTitle from "@/components/Atom/Title";
import Container from "@/components/Container";
import PinnedResources from "@/components/Block/PinnedResources";
import React, { useEffect } from "react";
import { linksResources } from "@/config/data";
import { IoLogoGithub } from "react-icons/io";
import { useEffect } from "react";

const Resources = () => {
useEffect(() => {
Expand Down Expand Up @@ -32,9 +32,9 @@ const Resources = () => {
href={item.href}
target="_blank"
rel="noreferrer noopener group"
className="group inline-flex items-center whitespace-nowrap rounded-lg border border-pink-600/10 py-3.5 pl-2.5 pr-4 text-sm shadow-sm md:text-base group bg-white text-pink-700 underline-offset-4 md:hover:underline"
className="group group inline-flex items-center whitespace-nowrap rounded-lg border border-pink-600/10 bg-white py-3.5 pl-2.5 pr-4 text-sm text-pink-700 underline-offset-4 shadow-sm md:text-base md:hover:underline"
>
<IoLogoGithub className="-ml-0.5 mr-1.5 h-4 w-4 md:h-8 md:w-8 opacity-25 md:group-hover:opacity-100" />
<IoLogoGithub className="-ml-0.5 mr-1.5 h-4 w-4 opacity-25 md:h-8 md:w-8 md:group-hover:opacity-100" />
{item.name}
</a>
</li>
Expand Down
2 changes: 2 additions & 0 deletions src/pages/resources.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import Head from "next/head";
import Resources from "../components/Resources";
import Tweets from "../components/Tweets";
import Authors from "../components/Authors";
import Standard from "../components/Block/Standard";

export default function VaultsPage() {
const config = getConfig("ERC-4626 Resources", "Resources to help aid in the development of ERC 4626 vaults.");
Expand All @@ -17,6 +18,7 @@ export default function VaultsPage() {
</Head>
<Layout>
<Resources />
<Standard />
<Tweets />
<Authors />
</Layout>
Expand Down

0 comments on commit 2cf43e6

Please sign in to comment.