Skip to content

Commit

Permalink
Merge pull request #32 from EveripediaNetwork/update-design
Browse files Browse the repository at this point in the history
Update Section Design
  • Loading branch information
Adebesin-Cell authored Apr 5, 2024
2 parents d3a22ad + 2b7d2e8 commit 9d5ac9b
Show file tree
Hide file tree
Showing 18 changed files with 232 additions and 23 deletions.
Binary file added public/images/iq-code-dark.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 public/images/iq-code-light.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 public/images/iq-social-dark-1.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 public/images/iq-social-dark-2.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 public/images/iq-social-dark.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 public/images/iq-social-light-1.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 public/images/iq-social-light-2.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 public/images/iq-social-light.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 3 additions & 2 deletions src/app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ export const metadata: Metadata = {
description:
"Join our mission to expand the scope of human knowledge with BrainDAO, the governing DAO powering the IQ ecosystem.",
viewport: "",
metadataBase: new URL("https://braindao.org"),
openGraph: {
title:
"BrainDAO - Building a more intelligent future through the IQ token.",
Expand Down Expand Up @@ -37,9 +38,9 @@ export const metadata: Metadata = {

export default function RootLayout({
children,
}: {
}: Readonly<{
children: React.ReactNode;
}) {
}>) {
return (
<html lang="en" className={montserrat.className}>
<head>
Expand Down
3 changes: 2 additions & 1 deletion src/components/layouts/Iqtoken.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@

import { useErc20 } from "@/hooks/useEr20";
import { useLockOverview } from "@/hooks/useLockOverview";
import { motion } from "framer-motion";
import { useTheme } from "next-themes";
import Image from "next/image";
import React, { useEffect, useRef, useState } from "react";
import InViewAnimateBottom from "../transitions/InViewAnimateBottom";
import InViewAnimateSlideDown from "../transitions/InViewSlideDown";
import InViewAnimateSlideUp from "../transitions/inViewSlideUp";
import { fetchPriceChange, numFormatter } from "../utils/stats-utils";
import { motion } from "framer-motion";

export const StatsPointers = ({
title,
Expand Down Expand Up @@ -76,6 +76,7 @@ export const TokenBrief = ({
href={action}
target="_blank"
className="flex justify-center w-[200px] xl:w-[256px] text-white/90 dark:bg-brand-800 bg-brand-500 py-3 xl:py-4 mt-4 xl:mt-8 rounded-md hover:bg-brand-700 transition-all ease-in-out duration-300"
rel="noreferrer"
>
{buttonText}
</a>
Expand Down
10 changes: 6 additions & 4 deletions src/components/layouts/ecosystem/Iqgpt.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@ const Iqgpt = () => {
const [appTheme, setAppTheme] = useState("");

useEffect(() => {
setAppTheme(theme || "");
setAppTheme(theme ?? "");
}, [theme]);
let imageUrl;
let imageUrl: string | undefined;
if (appTheme === "light") {
imageUrl = "/images/iq-gpt.png";
}
Expand All @@ -61,7 +61,9 @@ const Iqgpt = () => {
<TokenBrief
title="IQ GPT"
description={`IQ GPT is an extension of IQ.wiki's decentralized framework, integrating crypto-focused AI models that utilize diverse data sources to bolster capabilities, offering insights into intricate terms, live market trends, and breaking news.`}
description2={`IQ GPT is powered by the IQ token, enabling IQ holders to participate in governance and get access to additional features.`}
description2={
"IQ GPT is powered by the IQ token, enabling IQ holders to participate in governance and get access to additional features."
}
action="https://iqgpt.com"
buttonText="Explore IQ GPT"
/>
Expand Down Expand Up @@ -95,7 +97,7 @@ const Iqgpt = () => {
{imageUrl && <Image src={imageUrl} alt="" fill sizes="100vw" />}
</div>
</InViewAnimateBottom>
<div className="h-[174px] w-full absolute dark:bg-gradient-linear bg-gradient-linear-light bg-cover left-0 -bottom-2 sm:bottom-0"></div>
<div className="h-[174px] w-full absolute dark:bg-gradient-linear bg-gradient-linear-light bg-cover left-0 -bottom-2 sm:bottom-0" />
</div>
);
};
Expand Down
4 changes: 4 additions & 0 deletions src/components/layouts/ecosystem/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ import React from "react";
import IqDashboard from "./IqDashboard";
import Iqgpt from "./Iqgpt";
import Iqwiki from "./Iqwiki";
import Iqcode from "./iqcode";
import Iqsocial from "./iqsocial";

const Ecosystem = () => {
return (
Expand All @@ -14,6 +16,8 @@ const Ecosystem = () => {
</div>
<Iqgpt />
<IqDashboard />
<Iqsocial />
<Iqcode />
</div>
);
};
Expand Down
80 changes: 80 additions & 0 deletions src/components/layouts/ecosystem/iqcode.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
"use client";

import InViewAnimateBottom from "@/components/transitions/InViewAnimateBottom";
import { useTheme } from "next-themes";
import Image from "next/image";
import React, { useEffect, useState } from "react";
import { TokenBrief } from "../Iqtoken";

export const FeatureList = ({
title,
description,
icon,
delay,
}: {
title: string;
description: string;
icon: JSX.Element;
delay?: number;
}) => {
return (
<InViewAnimateBottom className="flex flex-1 flex-col gap-4 items-start">
<div className="w-12 h-12 rounded-full flex justify-center text-xl dark:text-brand-800 text-brand-500 items-center border-8 dark:border-brand-200 border-brand-50 dark:bg-brand-400 bg-brand-100">
{icon}
</div>
<div className="">
<h4 className="dark:text-whiteAlpha-900 text-gray800 font-semibold text-lg md:text-xl mb-1">
{title}
</h4>
<p className="text-sm lg:text-base">{description}</p>
</div>
</InViewAnimateBottom>
);
};

const Iqcode = () => {
const { theme } = useTheme();
const [appTheme, setAppTheme] = useState("");

useEffect(() => {
setAppTheme(theme ?? "");
}, [theme]);

let imageUrl: string | undefined;
if (appTheme === "light") {
imageUrl = "/images/iq-code-light.png";
}
if (appTheme === "dark") {
imageUrl = "/images/iq-code-dark.png";
}

return (
<div
id="iq-code"
className="max-w-[1536px] px-4 sm:px-10 xl:px-[120px] mx-auto flex flex-col gap-10 xl:gap-16 pt-[48px] sm:pt-[80px] 2xl:pt-24 relative"
>
<TokenBrief
title="IQ code"
description={
"IQ code is an upcoming smart contract coding tool with AI features specifically tailored for smart contracts. The product will function as a Solidity advisor, aiming to improve coding efficiency and code quality, to assist developers. "
}
action="https://iqcode.ai/demo"
buttonText="See Demo"
/>

<InViewAnimateBottom>
{imageUrl && (
<Image
src={imageUrl}
alt="IQ Code Illustration"
sizes="100vw"
height={690}
width={1300}
/>
)}
</InViewAnimateBottom>
</div>
);
};

export default Iqcode;
117 changes: 117 additions & 0 deletions src/components/layouts/ecosystem/iqsocial.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
"use client";

import InViewAnimateBottom from "@/components/transitions/InViewAnimateBottom";
import { useTheme } from "next-themes";
import Image from "next/image";
import React, { useEffect, useState } from "react";
import { TokenBrief } from "../Iqtoken";

export const getImageUrl = (
appTheme: string,
imageName: string,
num?: number
) => {
let imageUrl = `/images/${imageName}-${
appTheme === "dark" ? "dark" : "light"
}`;
if (num !== undefined) {
imageUrl += `-${num}`;
}
imageUrl += ".png";
return imageUrl;
};

export const FeatureList = ({
title,
description,
icon,
delay,
}: {
title: string;
description: string;
icon: JSX.Element;
delay?: number;
}) => {
return (
<InViewAnimateBottom className="flex flex-1 flex-col gap-4 items-start">
<div className="w-12 h-12 rounded-full flex justify-center text-xl dark:text-brand-800 text-brand-500 items-center border-8 dark:border-brand-200 border-brand-50 dark:bg-brand-400 bg-brand-100">
{icon}
</div>
<div className="">
<h4 className="dark:text-whiteAlpha-900 text-gray800 font-semibold text-lg md:text-xl mb-1">
{title}
</h4>
<p className="text-sm lg:text-base">{description}</p>
</div>
</InViewAnimateBottom>
);
};

const Iqsocial = () => {
const { theme } = useTheme();
const [appTheme, setAppTheme] = useState("");

useEffect(() => {
setAppTheme(theme ?? "");
}, [theme]);

return (
<div
id="iq-social"
className="max-w-[1536px] px-4 sm:px-10 xl:px-[120px] mx-auto flex flex-col gap-10 xl:gap-16 pt-[48px] sm:pt-[80px] 2xl:pt-24 relative"
>
<TokenBrief
title="IQ social"
description={`IQ.social is an AI-powered social forum designed to enhance users' knowledge and awareness of the cryptocurrency and blockchain industry. The platform is governed by HiIQ stakers who curate and rank all of the articles submitted to IQ.social.`}
action="https://iq.social"
buttonText="Explore IQ Social"
/>

<InViewAnimateBottom>
<div className="grid grid-cols-1 md:grid-cols-[1.5fr_1fr] gap-5">
<Image
src={getImageUrl(appTheme, "iq-social")}
alt="IQ.social Illustration"
width={750}
height={490}
/>
<div>
<div className="border border-gray-200 dark:border-white/40 pb-6 bg-white rounded-3xl dark:bg-gray-700">
<Image
src={getImageUrl(appTheme, "iq-social", 1)}
alt="IQ.social Illustration"
width={590}
height={340}
/>
<p className="text-gray-600 dark:text-white/70 pl-10 font-semibold text-xs xl:text-lg pr-5 md:pr-0">
Share your curated crypto news with the community by submitting
links under your preferred categories.
</p>
</div>
</div>
</div>
<div className="border border-gray-200 dark:border-white/40 mt-2.5 bg-white rounded-3xl dark:bg-gray-700 px-10 grid grid-cols-1 md:grid-cols-[1.5fr_1fr] gap-5">
<Image
src={getImageUrl(appTheme, "iq-social", 2)}
alt="IQ.social Illustration"
width={560}
height={200}
className="h-full w-full object-cover mt-5 md:mt-0"
/>
<div className="pt-0 pb-10 md:py-10">
<h1 className="text-gray-600 dark:text-white/70 font-medium text-xs xl:text-base">
Categories
</h1>
<p className="text-gray-600 dark:text-white/70 font-semibold text-xs xl:text-lg">
Discover a diverse array of categories on IQ social, including the
latest in AI news, nfts, development, cryptocurrencies and
regulations.
</p>
</div>
</div>
</InViewAnimateBottom>
</div>
);
};

export default Iqsocial;
21 changes: 11 additions & 10 deletions src/components/svgs/BrainLogoWhite.tsx

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion src/components/svgs/BraindaoLogoDark.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ export const BraindaoLogoDark = () => {
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<title>braindao logo</title>
<g id="surface1">
<path
style={{
Expand All @@ -30,7 +31,7 @@ export const BraindaoLogoDark = () => {
<path
d="M53.494 31V18.4H59.65C61.234 18.4 62.422 18.7 63.214 19.3C64.018 19.9 64.42 20.692 64.42 21.676C64.42 22.336 64.258 22.912 63.934 23.404C63.61 23.884 63.166 24.256 62.602 24.52C62.038 24.784 61.39 24.916 60.658 24.916L61 24.178C61.792 24.178 62.494 24.31 63.106 24.574C63.718 24.826 64.192 25.204 64.528 25.708C64.876 26.212 65.05 26.83 65.05 27.562C65.05 28.642 64.624 29.488 63.772 30.1C62.92 30.7 61.666 31 60.01 31H53.494ZM56.392 28.804H59.794C60.55 28.804 61.12 28.684 61.504 28.444C61.9 28.192 62.098 27.796 62.098 27.256C62.098 26.728 61.9 26.338 61.504 26.086C61.12 25.822 60.55 25.69 59.794 25.69H56.176V23.566H59.29C59.998 23.566 60.538 23.446 60.91 23.206C61.294 22.954 61.486 22.576 61.486 22.072C61.486 21.58 61.294 21.214 60.91 20.974C60.538 20.722 59.998 20.596 59.29 20.596H56.392V28.804ZM67.0597 31V21.316H69.7417V24.052L69.3637 23.26C69.6517 22.576 70.1137 22.06 70.7497 21.712C71.3857 21.352 72.1597 21.172 73.0717 21.172V23.764C72.9517 23.752 72.8437 23.746 72.7477 23.746C72.6517 23.734 72.5497 23.728 72.4417 23.728C71.6737 23.728 71.0497 23.95 70.5697 24.394C70.1017 24.826 69.8677 25.504 69.8677 26.428V31H67.0597ZM80.0485 31V29.11L79.8685 28.696V25.312C79.8685 24.712 79.6825 24.244 79.3105 23.908C78.9505 23.572 78.3925 23.404 77.6365 23.404C77.1205 23.404 76.6105 23.488 76.1065 23.656C75.6145 23.812 75.1945 24.028 74.8465 24.304L73.8385 22.342C74.3665 21.97 75.0025 21.682 75.7465 21.478C76.4905 21.274 77.2465 21.172 78.0145 21.172C79.4905 21.172 80.6365 21.52 81.4525 22.216C82.2685 22.912 82.6765 23.998 82.6765 25.474V31H80.0485ZM77.0965 31.144C76.3405 31.144 75.6925 31.018 75.1525 30.766C74.6125 30.502 74.1985 30.148 73.9105 29.704C73.6225 29.26 73.4785 28.762 73.4785 28.21C73.4785 27.634 73.6165 27.13 73.8925 26.698C74.1805 26.266 74.6305 25.93 75.2425 25.69C75.8545 25.438 76.6525 25.312 77.6365 25.312H80.2105V26.95H77.9425C77.2825 26.95 76.8265 27.058 76.5745 27.274C76.3345 27.49 76.2145 27.76 76.2145 28.084C76.2145 28.444 76.3525 28.732 76.6285 28.948C76.9165 29.152 77.3065 29.254 77.7985 29.254C78.2665 29.254 78.6865 29.146 79.0585 28.93C79.4305 28.702 79.7005 28.372 79.8685 27.94L80.3005 29.236C80.0965 29.86 79.7245 30.334 79.1845 30.658C78.6445 30.982 77.9485 31.144 77.0965 31.144ZM85.2179 31V21.316H88.0259V31H85.2179ZM86.6219 19.966C86.1059 19.966 85.6859 19.816 85.3619 19.516C85.0379 19.216 84.8759 18.844 84.8759 18.4C84.8759 17.956 85.0379 17.584 85.3619 17.284C85.6859 16.984 86.1059 16.834 86.6219 16.834C87.1379 16.834 87.5579 16.978 87.8819 17.266C88.2059 17.542 88.3679 17.902 88.3679 18.346C88.3679 18.814 88.2059 19.204 87.8819 19.516C87.5699 19.816 87.1499 19.966 86.6219 19.966ZM96.5179 21.172C97.2859 21.172 97.9699 21.328 98.5699 21.64C99.1819 21.94 99.6619 22.408 100.01 23.044C100.358 23.668 100.532 24.472 100.532 25.456V31H97.7239V25.888C97.7239 25.108 97.5499 24.532 97.2019 24.16C96.8659 23.788 96.3859 23.602 95.7619 23.602C95.3179 23.602 94.9159 23.698 94.5559 23.89C94.2079 24.07 93.9319 24.352 93.7279 24.736C93.5359 25.12 93.4399 25.612 93.4399 26.212V31H90.6319V21.316H93.3139V23.998L92.8099 23.188C93.1579 22.54 93.6559 22.042 94.3039 21.694C94.9519 21.346 95.6899 21.172 96.5179 21.172ZM103.275 31V18.4H108.999C110.367 18.4 111.573 18.664 112.617 19.192C113.661 19.708 114.477 20.434 115.065 21.37C115.653 22.306 115.947 23.416 115.947 24.7C115.947 25.972 115.653 27.082 115.065 28.03C114.477 28.966 113.661 29.698 112.617 30.226C111.573 30.742 110.367 31 108.999 31H103.275ZM106.191 28.606H108.855C109.695 28.606 110.421 28.45 111.033 28.138C111.657 27.814 112.137 27.358 112.473 26.77C112.821 26.182 112.995 25.492 112.995 24.7C112.995 23.896 112.821 23.206 112.473 22.63C112.137 22.042 111.657 21.592 111.033 21.28C110.421 20.956 109.695 20.794 108.855 20.794H106.191V28.606ZM116.315 31L121.931 18.4H124.811L130.445 31H127.385L122.777 19.876H123.929L119.303 31H116.315ZM119.123 28.3L119.897 26.086H126.377L127.169 28.3H119.123ZM137.696 31.216C136.7 31.216 135.776 31.054 134.924 30.73C134.084 30.406 133.352 29.95 132.728 29.362C132.116 28.774 131.636 28.084 131.288 27.292C130.952 26.5 130.784 25.636 130.784 24.7C130.784 23.764 130.952 22.9 131.288 22.108C131.636 21.316 132.122 20.626 132.746 20.038C133.37 19.45 134.102 18.994 134.942 18.67C135.782 18.346 136.694 18.184 137.678 18.184C138.674 18.184 139.586 18.346 140.414 18.67C141.254 18.994 141.98 19.45 142.592 20.038C143.216 20.626 143.702 21.316 144.05 22.108C144.398 22.888 144.572 23.752 144.572 24.7C144.572 25.636 144.398 26.506 144.05 27.31C143.702 28.102 143.216 28.792 142.592 29.38C141.98 29.956 141.254 30.406 140.414 30.73C139.586 31.054 138.68 31.216 137.696 31.216ZM137.678 28.732C138.242 28.732 138.758 28.636 139.226 28.444C139.706 28.252 140.126 27.976 140.486 27.616C140.846 27.256 141.122 26.83 141.314 26.338C141.518 25.846 141.62 25.3 141.62 24.7C141.62 24.1 141.518 23.554 141.314 23.062C141.122 22.57 140.846 22.144 140.486 21.784C140.138 21.424 139.724 21.148 139.244 20.956C138.764 20.764 138.242 20.668 137.678 20.668C137.114 20.668 136.592 20.764 136.112 20.956C135.644 21.148 135.23 21.424 134.87 21.784C134.51 22.144 134.228 22.57 134.024 23.062C133.832 23.554 133.736 24.1 133.736 24.7C133.736 25.288 133.832 25.834 134.024 26.338C134.228 26.83 134.504 27.256 134.852 27.616C135.212 27.976 135.632 28.252 136.112 28.444C136.592 28.636 137.114 28.732 137.678 28.732Z"
fill="white"
fill-opacity="0.92"
fillOpacity="0.92"
/>
</svg>
);
Expand Down
5 changes: 3 additions & 2 deletions src/components/transitions/InViewAnimateBottom.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
"use client";

import { useAnimation, motion } from "framer-motion";
import React, { useEffect, useState } from "react";
import { motion, useAnimation } from "framer-motion";
import type React from "react";
import { useEffect, useState } from "react";
import { useInView } from "react-intersection-observer";

export type TInViewAnimate = {
Expand Down
7 changes: 4 additions & 3 deletions src/components/transitions/InViewSlideDown.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
"use client";

import { useAnimation, motion } from "framer-motion";
import React, { useEffect, useState } from "react";
import { motion, useAnimation } from "framer-motion";
import type React from "react";
import { useEffect, useState } from "react";
import { useInView } from "react-intersection-observer";

export type TInViewAnimate = {
Expand All @@ -25,7 +26,7 @@ const InViewAnimateSlideDown: React.FC<TInViewAnimate> = ({
y: "30vh",
transition: {
duration: 1.5,
delay: delay ? delay : 0.2,
delay: delay ?? 0.2,
},
});
}
Expand Down

0 comments on commit 9d5ac9b

Please sign in to comment.