Skip to content
This repository has been archived by the owner on Jul 1, 2024. It is now read-only.

Commit

Permalink
feat/layout main page (#1)
Browse files Browse the repository at this point in the history
* add new component

* add layout footer

* add layout block

* add layout

* add layout footer

* add layout footer

* add layout footer and fixed styles

* Remove idea from git

* Revert docs

* fix layout main page

* fix links for image

* add light theme

* fix styles

* add fonts

* add adaptive layout

* fix texts and add background gradient

* fixes

* fixes

* fixes

Co-authored-by: shoom3301 <shoom3301@gmail.com>
  • Loading branch information
pavelkurmacheff and shoom3301 authored Nov 18, 2021
1 parent 654be97 commit b82cc26
Show file tree
Hide file tree
Showing 43 changed files with 3,120 additions and 183 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,5 @@
npm-debug.log*
yarn-debug.log*
yarn-error.log*

.idea
4 changes: 1 addition & 3 deletions docs/limit-order-protocol/smart-contract/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,10 @@
* [Permitable](libraries/Permitable.md)
* [RevertReasonParser](libraries/RevertReasonParser.md)
* [mocks](mocks/README.md)
* [interfaces](mocks/interfaces/README.md)
* [IWithdrawable](mocks/interfaces/IWithdrawable.md)
* [AggregatorMock](mocks/AggregatorMock.md)
* [InteractiveNotificationReceiverMock](mocks/InteractiveNotificationReceiverMock.md)
* [TokenMock](mocks/TokenMock.md)
* [WrappedTokenMock](mocks/WrappedTokenMock.md)
* [LimitOrderProtocol](LimitOrderProtocol.md)
* [OrderMixin](OrderMixin.md)
* [OrderRFQMixin](OrderRFQMixin.md)
* [OrderRFQMixin](OrderRFQMixin.md)
55 changes: 40 additions & 15 deletions docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,33 +50,58 @@ const config = {
},
items: [
{
href: 'https://app.1inch.io',
label: 'App',
label: 'Protocols',
position: 'left',
items: [
{
label: 'Aggregation protocol',
href: '/docs/aggregation-protocol/introduction',
},
{
label: 'Limit order protocol',
href: '/docs/limit-order-protocol/introduction'
},
{
label: 'Liquidity protocol',
href: '/'
}
]
},
{
href: '/docs/aggregation-protocol/introduction',
label: 'Do swaps',
position: 'left',
},
{
href: '/docs/limit-order-protocol/introduction',
label: 'Trade limit orders',
label: 'Opensource',
position: 'left',
items: [
{
label: 'Grants Program',
href: '/'
},
{
label: 'Bug bounty',
href: '/'
},
{
label: 'Smartcontracts',
href: '/'
},
{
label: 'Web 3.0',
href: '/'
}
]
},
// {
// label: 'More',
// position: 'left',
// items: [
// ]
// },
{
href: 'https://github.com/1inch',
label: 'GitHub',
position: 'right',
},
],
},
footer: {
style: 'dark',
links: [
],
copyright: `Copyright © ${new Date().getFullYear()} 1inch Network.`,
},
prism: {
theme: lightCodeTheme,
darkTheme: darkCodeTheme,
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
"dependencies": {
"@docusaurus/core": "2.0.0-beta.6",
"@docusaurus/preset-classic": "2.0.0-beta.6",
"@docusaurus/theme-search-algolia": "^2.0.0-beta.9",
"@mdx-js/react": "^1.6.21",
"@svgr/webpack": "^5.5.0",
"buffer": "^6.0.3",
Expand Down
83 changes: 83 additions & 0 deletions src/components/homepage-developer-links/HomepageDeveloperLinks.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
import React from 'react';
import styles from './HomepageDeveloperLinks.module.css';
import Link from '@docusaurus/Link';
import grantsProgramImage from '../../../static/img/grants-program.png';
import bugBountyImage from '../../../static/img/bug-bounty.png';
import smartImage from '../../../static/img/smart.png';
import web3Image from '../../../static/img/web3.png';

const DeveloperList = [
{
link: 'https://1inch.io',
image: grantsProgramImage,
title: 'Grants program',
description: (
<>
Incentivizing individual developers and teams to build on the 1inch Network's protocols and contribute
to protocol evolution.
</>
),
},
{
link: 'https://1inch.io',
image: bugBountyImage,
title: 'Bug bounty',
description: (
<>
Engaging adopters and maximizing the network's decentralization through growing stakeowner numbers and
their participation
</>
),
},
{
link: 'https://1inch.io',
image: smartImage,
title: 'Smartcontracts',
description: (
<ul className={styles.developerCardList}>
<li>cumukative-merkle-drop</li>
<li>offchain-oracle</li>
<li>cumukative-merkle-drop</li>
<li>offchain-oracle</li>
</ul>
),
},
{
link: 'https://1inch.io',
image: web3Image,
title: 'Web 3.0',
description: (
<ul className={styles.developerCardList}>
<li>permit-signed-approvals-utils</li>
<li>multicall</li>
<li>multicall</li>
<li>more</li>
</ul>
),
}
];

function DeveloperLink({image, title, description, link}) {
return (
<Link className={styles.developerCard} to={link}>
<img className={styles.developerCardImage} src={image} alt={title}/>
<h3 className={styles.developerCardTitle}>{title}</h3>
<div className={styles.developerCardText}>{description}</div>
</Link>
);
}

export default function HomepageDeveloperLinks() {
return (
<section className="page-container">
<h2 className={styles.developerLinksTitle}>Developer links</h2>
<div className={styles.developerLinksWrap}>
{
DeveloperList.map((props, idx) => (
<DeveloperLink key={idx} {...props} />
))
}
</div>
</section>
);
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
.developerLinksTitle {
font-size: 32px;
margin-bottom: 24px;
color: var(--1inch-title);
}

.developerLinksWrap {
display: grid;
grid-template-columns: 1fr 1fr 1fr 1fr;
grid-column-gap: 28px;
}

.developerCard {
border: 1px solid var(--1inch-border);
border-radius: 16px;
padding: 32px 24px;
display: block;
}

.developerCard:hover {
text-decoration: none;
}

.developerCardImage {
width: 64px;
height: 64px;
margin-bottom: 24px;
}

.developerCardTitle {
color: var(--1inch-title);
margin-bottom: 16px;
font-weight: 500;
}

.developerCardText {
color: var(--1inch-text);
font-size: 16px;
line-height: 26px;
}

.developerCardList {
padding-left: 24px;
margin-bottom: 0;
}


@media (max-width: 1200px) {
.developerLinksWrap {
grid-column-gap: 16px;
}
}

@media (max-width: 900px) {
.developerLinksWrap {
grid-template-columns: 1fr 1fr;
grid-row-gap: 16px;
}
}


@media (max-width: 600px) {
.developerLinksWrap {
grid-template-columns: 1fr;
}
}
Loading

0 comments on commit b82cc26

Please sign in to comment.