Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(website): ecosystem page #149

Merged
merged 49 commits into from May 30, 2023
Merged
Show file tree
Hide file tree
Changes from 42 commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
4b74fb3
feat(website): ecosystem page layout
hadzhehsen May 22, 2023
e170276
fix(website): ecosystem layout
hadzhehsen May 22, 2023
8586cfa
feat(website): ecosystem page partners
hadzhehsen May 22, 2023
37cbcba
fix(website): ecosystem page mobile layout
hadzhehsen May 22, 2023
b824e57
fix(website): image mobile pos, tabs scroll
hadzhehsen May 22, 2023
96b9d5d
fix(website): tabs overflow
hadzhehsen May 22, 2023
8e745c4
fix(website): resolve comment
hadzhehsen May 22, 2023
18bef85
fix(website): add color to config
hadzhehsen May 22, 2023
1593a2c
fix(website): change type with enum & refactor
hadzhehsen May 22, 2023
0e55273
fix(website): change types in data array
hadzhehsen May 22, 2023
64bf40c
chore(website): remove unused imports
hadzhehsen May 22, 2023
be6a45d
feat(website): add storybook
hadzhehsen May 23, 2023
23ce567
feat(website): use variables and update config
hadzhehsen May 23, 2023
9922a92
feat(website): storyblok init
hadzhehsen May 23, 2023
30f8850
fix(website): priority title block image
hadzhehsen May 23, 2023
9721183
feat(website): get data from storyblok
hadzhehsen May 23, 2023
b86c271
fix(website): remove local partners data
hadzhehsen May 23, 2023
21faded
fix(website): enums, interface, partner card
hadzhehsen May 23, 2023
c7fe2d9
fix(website): revalidate data
hadzhehsen May 23, 2023
91a521f
fix(website): change card name font family
hadzhehsen May 23, 2023
8ad3df6
fix(website): revalidate data & format code
hadzhehsen May 23, 2023
3f891a4
fix(website): storyblok init in exact page
hadzhehsen May 23, 2023
451a1ac
fix(website): update img title block
hadzhehsen May 23, 2023
463d913
fix(website): close burger menu after click
hadzhehsen May 23, 2023
02a2903
fi(website): img ecosystem fund page title block
hadzhehsen May 24, 2023
478d75d
fix(website): change img index page contact block
hadzhehsen May 24, 2023
060e6e9
сhore(website): remove unused img
hadzhehsen May 24, 2023
08f964e
fix(website): add ecocystem link
hadzhehsen May 24, 2023
948064b
fix(website): change icon height, link width
hadzhehsen May 25, 2023
a8b9480
Merge branch 'dev' into feat/ecosystem-page
hadzhehsen May 25, 2023
d4a256c
fix(website): storyblok data version
hadzhehsen May 25, 2023
7bf384a
fix(website): use vercel_env for storyblok
hadzhehsen May 25, 2023
e514063
fix(website): tabs border & overflow
hadzhehsen May 25, 2023
2414810
fix(website): buttons apply block
hadzhehsen May 25, 2023
309f395
fix(website): resolve requested comments
hadzhehsen May 25, 2023
35599f1
fix(website): resolve more requested comments
hadzhehsen May 26, 2023
50254f2
Merge branch 'dev' into feat/ecosystem-page
olegshilov May 26, 2023
8a642c5
fix(website): resolve some more comments
hadzhehsen May 29, 2023
4eb7c6f
fix(website): sbInit back into getStaticProps
hadzhehsen May 30, 2023
9209c61
fix(website): add new partner type
hadzhehsen May 30, 2023
59ed7ed
chore(website): remove unused async
hadzhehsen May 30, 2023
15afb10
chore(website): stop use unnecessary slug const
olegshilov May 30, 2023
b638d3b
fix(website): storyblok data types
hadzhehsen May 30, 2023
6ddb41a
fix(website): filter & render filtered partners
hadzhehsen May 30, 2023
e4c743a
chore: add missing new lines
olegshilov May 30, 2023
4e33bb7
fix(website): fix partner card image width
olegshilov May 30, 2023
8fb0438
fix(website): move website link arrow card on partner card
olegshilov May 30, 2023
cfa96f2
ci: add storyblock token to build job
olegshilov May 30, 2023
3d6d891
ci: use self-hosted runner
olegshilov May 30, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 3 additions & 0 deletions apps/website/.gitignore
@@ -1 +1,4 @@
.vscode

# local env files
.env*.local
36 changes: 24 additions & 12 deletions apps/website/components/burger-menu/burger-menu.tsx
@@ -1,5 +1,5 @@
import clsx from 'clsx';
import { ReactNode } from 'react';
import { PropsWithChildren, ReactNode } from 'react';
import Link from 'next/link';
import {
DiscordIcon,
Expand All @@ -15,15 +15,22 @@ import {
} from '@haqq/website/ui-kit';
import { SubscribeForm } from '@haqq/website/forms';

interface NavLinkProps {
href: string;
isOutLink?: boolean;
onClick?: () => void;
}

type SocialLinkProps = Pick<NavLinkProps, 'href'> & {
icon: ReactNode;
};

function BurgerMenuNavLink({
href,
children,
isOutLink = false,
}: {
href: string;
children: ReactNode;
isOutLink?: boolean;
}) {
onClick,
}: PropsWithChildren<NavLinkProps>) {
const additionalProps = isOutLink
? {
target: '_blank',
Expand All @@ -34,6 +41,7 @@ function BurgerMenuNavLink({
<Link
href={href}
className="text-[13px] leading-[20px] sm:text-[15px] sm:leading-[24px]"
onClick={onClick}
{...additionalProps}
>
{children}
Expand All @@ -45,11 +53,7 @@ function BurgerMenuSocialLink({
href,
children,
icon,
}: {
href: string;
children: ReactNode;
icon: ReactNode;
}) {
}: PropsWithChildren<SocialLinkProps>) {
return (
<Link
href={href}
Expand All @@ -64,7 +68,13 @@ function BurgerMenuSocialLink({
);
}

export function BurgerMenu({ className }: { className?: string }) {
export function BurgerMenu({
className,
onClick,
}: {
className?: string;
onClick?: () => void;
}) {
return (
<div
className={clsx(
Expand All @@ -73,10 +83,12 @@ export function BurgerMenu({ className }: { className?: string }) {
// 'backdrop-blur transform-gpu',
className,
)}
onClick={onClick}
>
<div className="flex flex-col items-start space-y-[16px] mb-[60px] sm:mb-[80px]">
<BurgerMenuNavLink href="/#about">About</BurgerMenuNavLink>
<BurgerMenuNavLink href="/ecosystem-fund">Fund</BurgerMenuNavLink>
<BurgerMenuNavLink href="/ecosystem">Ecosystem</BurgerMenuNavLink>
{/* <BurgerMenuNavLink href="/#technology">Technology</BurgerMenuNavLink> */}
<BurgerMenuNavLink href="/#developers">Developers</BurgerMenuNavLink>
<BurgerMenuNavLink href="https://docs.haqq.network" isOutLink>
Expand Down
1 change: 1 addition & 0 deletions apps/website/components/footer/footer.tsx
Expand Up @@ -95,6 +95,7 @@ export function Footer() {
<nav className="flex flex-col space-y-[8px] sm:space-y-[12px]">
<FooterNavLink href="/#about">About</FooterNavLink>
<FooterNavLink href="/ecosystem-fund">Fund</FooterNavLink>
<FooterNavLink href="/ecosystem">Ecosystem</FooterNavLink>
{/* <FooterNavLink href="#technology">Technology</FooterNavLink> */}
<FooterNavLink href="/#developers">Developers</FooterNavLink>
<FooterNavLink href="https://docs.haqq.network" isOutLink>
Expand Down
6 changes: 5 additions & 1 deletion apps/website/components/header/header.tsx
Expand Up @@ -63,6 +63,7 @@ export function Header() {
<nav className="flex-row space-x-6 items-center mr-[80px] hidden lg:flex">
<HeaderNavLink href="/#about">About</HeaderNavLink>
<HeaderNavLink href="/ecosystem-fund">Fund</HeaderNavLink>
<HeaderNavLink href="/ecosystem">Ecosystem</HeaderNavLink>
{/* <HeaderNavLink href="/#technology">Technology</HeaderNavLink> */}
<HeaderNavLink href="/#developers">Developers</HeaderNavLink>
<HeaderNavLink href="https://docs.haqq.network" isOutLink>
Expand All @@ -86,7 +87,10 @@ export function Header() {
{isBurgerMenuOpen && (
<Fragment>
<ScrollLock isActive />
<BurgerMenu className="fixed lg:hidden w-full sm:w-[468px] top-[62px] sm:top-[71px] h-[calc(100vh-62px)] sm:h-[calc(100vh-71px)] right-0 z-40" />
<BurgerMenu
onClick={handleMenuOpen}
className="fixed lg:hidden w-full sm:w-[468px] top-[62px] sm:top-[71px] h-[calc(100vh-62px)] sm:h-[calc(100vh-71px)] right-0 z-40"
/>
<div
onClick={handleMenuOpen}
className="hidden sm:block lg:hidden absolute w-full right-0 -z-0 bg-black/50 top-[62px] sm:top-[71px] h-[calc(100vh-62px)] sm:h-[calc(100vh-71px)]"
Expand Down
3 changes: 3 additions & 0 deletions apps/website/next.config.mjs
Expand Up @@ -32,5 +32,8 @@ export default withNx(
},
];
},
images: {
domains: ['a.storyblok.com'],
},
}),
);
1 change: 1 addition & 0 deletions apps/website/pages/_app.tsx
Expand Up @@ -15,6 +15,7 @@ type AppPropsWithLayout = AppProps & {
Component: NextPageWithLayout;
};


export default function App({ Component, pageProps }: AppPropsWithLayout) {
// Use the layout defined at the page level, if available
if (Component.getLayout) {
Expand Down
46 changes: 46 additions & 0 deletions apps/website/pages/ecosystem.tsx
@@ -0,0 +1,46 @@
import { getStoryblokApi, storyblokInit, apiPlugin } from '@storyblok/react';

function mapStoryblockDataToPartners(data) {
olegshilov marked this conversation as resolved.
Show resolved Hide resolved
return data.story.content.body[0].columns.map((el) => {
return {
_uid: el._uid,
name: el.name,
logoUrl: el.logo.filename,
link: el.link,
description: el.description,
type: el.type,
status: el.status,
};
});
}

export { EcosystemPage as default } from '@haqq/website/ecosystem-page';

export async function getStaticProps() {
let data;

storyblokInit({
accessToken: process.env.STORYBLOK_ACCESS_TOKEN,
use: [apiPlugin],
});

try {
const storyblokApi = getStoryblokApi();
const response = await storyblokApi.get('cdn/stories/partners', {
version: process.env.VERCEL_ENV === 'production' ? 'published' : 'draft',
});
data = response?.data;
} catch (error) {
console.error(error);
}

const partners = mapStoryblockDataToPartners(data);

return {
props: {
partners: partners ?? [],
key: data?.story?.id ?? false,
},
revalidate: 1800,
};
}
2 changes: 2 additions & 0 deletions apps/website/tailwind.config.js
Expand Up @@ -18,10 +18,12 @@ module.exports = {
'haqq-border': '#FFFFFF3D',
'haqq-black': '#0D0D0E',
'haqq-orange': '#EC5728',
'haqq-light-orange': '#FF8D69',
'haqq-blue': '#091D53',
'haqq-seaweed': '#157C83',
'haqq-bigfoot-feet': '#E98C50',
'haqq-azure': '#ECFEFE',
'haqq-gold': '#E3A13F',
},
fontFamily: {
serif: ['var(--font-clash)'],
Expand Down
11 changes: 2 additions & 9 deletions libs/website/brand-assets-page/tsconfig.lib.json
Expand Up @@ -2,9 +2,7 @@
"extends": "./tsconfig.json",
"compilerOptions": {
"outDir": "../../../dist/out-tsc",
"types": [
"node"
]
"types": ["node"]
},
"files": [
"../../../node_modules/@nrwl/react/typings/cssmodule.d.ts",
Expand All @@ -21,10 +19,5 @@
"src/**/*.spec.jsx",
"src/**/*.test.jsx"
],
"include": [
"src/**/*.js",
"src/**/*.jsx",
"src/**/*.ts",
"src/**/*.tsx"
]
"include": ["src/**/*.js", "src/**/*.jsx", "src/**/*.ts", "src/**/*.tsx"]
}
Expand Up @@ -11,9 +11,7 @@ export function ApplyBlock() {
backgroundImage: `url(${bgImgData.src})`,
}}
>
<Text className="text-haqq-bigfoot-feet">
Grants and Investment Program
</Text>
<Text className="text-haqq-gold">Grants and Investment Program</Text>
<Heading className="mt-[8px]">
Apply now for the HAQQ Ecosystem Fund, and let's{' '}
<br className="hidden absolute top-0 lg:block" />
Expand All @@ -24,9 +22,9 @@ export function ApplyBlock() {
target="_blank"
rel={'noopener noreferrer'}
>
<Button variant={2} className="uppercase mt-[24px]">
Apply now
</Button>
<div className="mt-[24px]">
<Button variant={2}>Apply now</Button>
</div>
</Link>
</section>
);
Expand Down
11 changes: 2 additions & 9 deletions libs/website/ecosystem-fund-page/tsconfig.lib.json
Expand Up @@ -2,9 +2,7 @@
"extends": "./tsconfig.json",
"compilerOptions": {
"outDir": "../../../dist/out-tsc",
"types": [
"node"
]
"types": ["node"]
},
"files": [
"../../../node_modules/@nrwl/react/typings/cssmodule.d.ts",
Expand All @@ -21,10 +19,5 @@
"src/**/*.spec.jsx",
"src/**/*.test.jsx"
],
"include": [
"src/**/*.js",
"src/**/*.jsx",
"src/**/*.ts",
"src/**/*.tsx"
]
"include": ["src/**/*.js", "src/**/*.jsx", "src/**/*.ts", "src/**/*.tsx"]
}
12 changes: 12 additions & 0 deletions libs/website/ecosystem-page/.babelrc
@@ -0,0 +1,12 @@
{
"presets": [
[
"@nx/react/babel",
{
"runtime": "automatic",
"useBuiltIns": "usage"
}
]
],
"plugins": []
}
18 changes: 18 additions & 0 deletions libs/website/ecosystem-page/.eslintrc.json
@@ -0,0 +1,18 @@
{
"extends": ["plugin:@nx/react", "../../../.eslintrc.json"],
"ignorePatterns": ["!**/*"],
"overrides": [
{
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
"rules": {}
},
{
"files": ["*.ts", "*.tsx"],
"rules": {}
},
{
"files": ["*.js", "*.jsx"],
"rules": {}
}
]
}
7 changes: 7 additions & 0 deletions libs/website/ecosystem-page/README.md
@@ -0,0 +1,7 @@
# website-ecosystem-page

This library was generated with [Nx](https://nx.dev).

## Running unit tests

Run `nx test website-ecosystem-page` to execute the unit tests via [Jest](https://jestjs.io).
11 changes: 11 additions & 0 deletions libs/website/ecosystem-page/jest.config.ts
@@ -0,0 +1,11 @@
/* eslint-disable */
export default {
displayName: 'website-ecosystem-page',
preset: '../../../jest.preset.js',
transform: {
'^(?!.*\\.(js|jsx|ts|tsx|css|json)$)': '@nx/react/plugins/jest',
'^.+\\.[tj]sx?$': ['babel-jest', { presets: ['@nx/react/babel'] }],
},
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx'],
coverageDirectory: '../../../coverage/libs/website/ecosystem-page',
};
30 changes: 30 additions & 0 deletions libs/website/ecosystem-page/project.json
@@ -0,0 +1,30 @@
{
"name": "website-ecosystem-page",
"$schema": "../../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "libs/website/ecosystem-page/src",
"projectType": "library",
"tags": [],
"targets": {
"lint": {
"executor": "@nx/linter:eslint",
"outputs": ["{options.outputFile}"],
"options": {
"lintFilePatterns": ["libs/website/ecosystem-page/**/*.{ts,tsx,js,jsx}"]
}
},
"test": {
"executor": "@nx/jest:jest",
"outputs": ["{workspaceRoot}/coverage/{projectRoot}"],
"options": {
"jestConfig": "libs/website/ecosystem-page/jest.config.ts",
"passWithNoTests": true
},
"configurations": {
"ci": {
"ci": true,
"codeCoverage": true
}
}
}
}
}
30 changes: 30 additions & 0 deletions libs/website/ecosystem-page/src/assets/sunshine.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.