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

Add brand assets page #474

Merged
merged 8 commits into from
Nov 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions docs/brand-assets.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
title: Brand Assets
---

import BrandAssets from "@site/src/components/BrandAssets/index.tsx";

<BrandAssets />
2 changes: 1 addition & 1 deletion docs/sidebars.js
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,6 @@ module.exports = {
href: 'https://status.flashbots.net/',
label: 'Status',
},
'policies/privacy','policies/terms-of-service', 'policies/prohibited-use-policy',
'policies/privacy','policies/terms-of-service', 'policies/prohibited-use-policy', 'brand-assets',
],
};
31 changes: 31 additions & 0 deletions src/components/BrandAssets/AssetCard.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
/**
* Copyright (c) Flashbots Ltd. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
import React, { ReactNode } from "react"
import styles from './styles.module.css';
import Download from "./Download";

interface IAssetCard {
title?: string
cover?: string
svg?: string
png?: string
}

function AssetCard({ title, cover, svg, png }: IAssetCard) {
return (
<div className="my-4 w-1/2 w-full">
<img alt="" src={ cover } className="w-full h-56 object-cover border border-solid border-slate-500/25 rounded-xl"/>
<div className="w-full flex items-center gap-1 bg-gray-50/0 rounded-lg">
<p className="px-2 grow m-0">{ title }</p>
<Download file={ svg } type="svg" />
<Download file={ png } type="png" />
</div>
</div>
)
}

export default AssetCard
25 changes: 25 additions & 0 deletions src/components/BrandAssets/Download.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
/**
* Copyright (c) Flashbots Ltd. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
import React, { ReactNode } from "react"

interface IDownload {
file?: string
}

function Download({ file, type }: IDownload) {
return (
<a target="\_blank" href={ file } download className="border border-solid py-1 px-3 border-slate-400/50 rounded-lg flex items-center text-sm font-mono font-bold">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" className="w-4 h-4 pr-1">
<path d="M10.75 2.75a.75.75 0 00-1.5 0v8.614L6.295 8.235a.75.75 0 10-1.09 1.03l4.25 4.5a.75.75 0 001.09 0l4.25-4.5a.75.75 0 00-1.09-1.03l-2.955 3.129V2.75z" />
<path d="M3.5 12.75a.75.75 0 00-1.5 0v2.5A2.75 2.75 0 004.75 18h10.5A2.75 2.75 0 0018 15.25v-2.5a.75.75 0 00-1.5 0v2.5c0 .69-.56 1.25-1.25 1.25H4.75c-.69 0-1.25-.56-1.25-1.25v-2.5z" />
</svg>
{ type }
</a>
)
}

export default Download
41 changes: 41 additions & 0 deletions src/components/BrandAssets/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
/**
* Copyright (c) Flashbots Ltd. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
import {useState} from 'react';
import AssetCard from './AssetCard';

export default function BrandAssets() {

return (
<div>
<div className='flex max-[768px]:flex-col gap-4'>
<AssetCard
title="Flashbots Logo - Dark"
cover="/img/brand-assets/flashbots_logo_dark.jpg"
svg="/img/brand-assets/flashbots_logo_dark.svg"
png="/img/brand-assets/flashbots_logo_dark.png"
/>
<AssetCard
title="Flashbots Logo - Light"
cover="/img/brand-assets/flashbots_logo_light.jpg"
svg="/img/brand-assets/flashbots_logo_light.svg"
png="/img/brand-assets/flashbots_logo_light.png"
/>
</div>

<div className='flex max-[768px]:flex-col gap-4'>
<AssetCard
title="Flashbots Icon"
cover="/img/brand-assets/flashbots_icon.jpg"
svg="/img/brand-assets/flashbots_icon.svg"
png="/img/brand-assets/flashbots_icon.png"
/>
<div className='block my-4 w-1/2 w-full'></div>
</div>

</div>
);
}
6 changes: 6 additions & 0 deletions src/components/BrandAssets/styles.module.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
.root {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(clamp(100px,(1024px - 100vw) *1000, 100%), 1fr));
gap: 1rem;
margin-bottom: 2rem;
}
Binary file added static/img/brand-assets/flashbots_icon.jpg
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 static/img/brand-assets/flashbots_icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 16 additions & 0 deletions static/img/brand-assets/flashbots_icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading