Skip to content

Commit

Permalink
Adds brand-kit, CSS + component
Browse files Browse the repository at this point in the history
  • Loading branch information
cordt-sei committed May 26, 2024
1 parent e5ea963 commit 88ddaec
Show file tree
Hide file tree
Showing 7 changed files with 1,419 additions and 615 deletions.
73 changes: 73 additions & 0 deletions components/DownloadableImage.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
// components/DownloadableImage.tsx
import NextImage from 'next/image';
import styles from '../styles/DownloadableImage.module.css';
import { useState, useEffect } from 'react';

interface DownloadableImageProps {
url: string;
alt: string;
name: string;
downloadable?: boolean;
}

const DownloadableImage = ({ url, alt, name, downloadable = true }: DownloadableImageProps) => {
const [imageDimensions, setImageDimensions] = useState({ width: 0, height: 0 });
const [showModal, setShowModal] = useState(false);

useEffect(() => {
const img = new window.Image();
img.src = url;
img.onload = () => {
setImageDimensions({ width: img.width, height: img.height });
};
}, [url]);

const handleImageClick = (e: React.MouseEvent) => {
if (downloadable) {
e.preventDefault();
const link = document.createElement('a');
link.href = url;
link.download = name;
link.click();
} else {
setShowModal(true);
document.body.style.overflow = 'hidden';
}
};

const closeModal = () => {
setShowModal(false);
document.body.style.overflow = 'auto';
};

return (
<>
<div className={styles.imageWrapper}>
<div className={styles.imageContainer}>
<NextImage
src={url}
alt={alt}
width={imageDimensions.width}
height={imageDimensions.height}
className={styles.image}
onClick={handleImageClick}
/>
</div>
{downloadable && (
<a href={url} download={name} className={styles.downloadButton} onClick={handleImageClick}>
<i className="fas fa-download"></i>
</a>
)}
</div>
{showModal && (
<div className={styles.modal} onClick={closeModal}>
<div className={styles.modalContent}>
<NextImage src={url} alt={alt} layout="fill" objectFit="contain" />
</div>
</div>
)}
</>
);
};

export default DownloadableImage;
23 changes: 23 additions & 0 deletions data/imageData.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
// src/imageData.ts
export interface ImageData {
url: string;
alt: string;
name: string;
}

const images: ImageData[] = [
{ url: 'https://cdn.sei.io/brand_/brand_01.png', alt: 'Logotype', name: 'brand_01' },
{ url: 'https://cdn.sei.io/brand_/brand_02.png', alt: 'Main Logo', name: 'brand_02' },
{ url: 'https://cdn.sei.io/brand_/brand_03.png', alt: 'Symbol Gradient', name: 'brand_03' },
{ url: 'https://cdn.sei.io/brand_/brand_04.png', alt: 'Symbol Clearspace', name: 'brand_04' },
{ url: 'https://cdn.sei.io/brand_/brand_05.png', alt: 'Logo Misuse', name: 'brand_05' },
{ url: 'https://cdn.sei.io/brand_/brand_06.png', alt: 'Sei Color Palette', name: 'brand_06' },
{ url: 'https://cdn.sei.io/brand_/brand_07.png', alt: 'Sei Gradient', name: 'brand_07' },
{ url: 'https://cdn.sei.io/brand_/brand_08.png', alt: 'Typography', name: 'brand_08' },
{ url: 'https://cdn.sei.io/brand_/brand_09.png', alt: 'Typography', name: 'brand_09' },
{ url: 'https://cdn.sei.io/brand_/brand_10.png', alt: 'Typography', name: 'brand_10' },
{ url: 'https://cdn.sei.io/brand_/brand_11.png', alt: 'Typography', name: 'brand_11' },
// Add more image entries as needed
];

export default images;
8 changes: 6 additions & 2 deletions next.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
const withNextra = require('nextra')({
theme: 'nextra-theme-docs',
themeConfig: './theme.config.tsx',
})
});

module.exports = withNextra()
module.exports = withNextra({
images: {
domains: ['cdn.sei.io'],
},
});
9 changes: 6 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,16 @@
},
"license": "MIT",
"dependencies": {
"@mdx-js/loader": "^3.0.1",
"@next/mdx": "^14.2.3",
"@rainbow-me/rainbowkit": "^1.3.3",
"lucide-react": "^0.314.0",
"next": "^14.0.3",
"next": "^14.2.3",
"next-compose-plugins": "^2.2.1",
"nextra": "^2.13.2",
"nextra-theme-docs": "^2.13.2",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"sharp": "^0.33.2",
"tailwind-merge": "^2.2.1",
"viem": "^1.21.4",
Expand Down
219 changes: 61 additions & 158 deletions pages/brand-kit.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,194 +3,97 @@ title: Sei Brand Kit
---

import { Callout } from "nextra/components";
import Image from 'next/image'
import Link from 'next/link'
import DownloadableImage from '../components/DownloadableImage';
import images from '../data/imageData';

# Sei Branding

<Callout type="info">
Please adhere to these guidelines when featuring Sei in marketing communications, such as advertising, articles, websites, and printed materials.
</Callout>

**Download full brand assets and guidelines**

<a
href="/branding/Sei_Brand_Assets.zip"
style={{
display: 'inline-block',
padding: '10px 20px',
fontSize: '14px',
color: '#8B0000',
backgroundColor: '#f8f8f8',
border: 'none',
borderRadius: '25px',
textAlign: 'center',
boxShadow: '0 4px 6px rgba(0, 0, 0, 0.1)',
fontFamily: 'Inter, sans-serif'
}}
download
>
Sei Brand Assets
</a>

Sei’s brand is inspired by Japanese Zen gardens, reflecting harmony, simplicity, and mindfulness. The angular and minimalistic design conveys speed, efficiency, and tranquility, aligning with Sei’s commitment to high performance and ease of use in the blockchain space.

## The Sei Logos

### Logotype

<Image src="/branding/Group_1376160676.png" alt="Logotype" width={500} height={500} />

### Main Logo
{images.filter(image => image.name === 'brand_01').map(image => (
<DownloadableImage key={image.name} url={image.url} alt={image.alt} name={image.name} downloadable={false} />
))}

<Image src="/branding/Sei_Colors_Logo_Light.png" alt="Main Logo" width={500} height={500} />

<a
href="/branding/Sei_Colors_Logo_Light.png"
style={{
display: 'inline-block',
padding: '10px 20px',
fontSize: '14px',
color: '#8B0000',
backgroundColor: '#f8f8f8',
border: 'none',
borderRadius: '25px',
textAlign: 'center',
boxShadow: '0 4px 6px rgba(0, 0, 0, 0.1)',
fontFamily: 'Inter, sans-serif'
}}
download
>
PNG
</a>
<a
href="/branding/Sei_Colors_Logo_Light.svg"
style={{
display: 'inline-block',
padding: '10px 20px',
fontSize: '14px',
color: '#8B0000',
backgroundColor: '#f8f8f8',
border: 'none',
borderRadius: '25px',
textAlign: 'center',
boxShadow: '0 4px 6px rgba(0, 0, 0, 0.1)',
fontFamily: 'Inter, sans-serif'
}}
download
>
SVG
</a>
<br />

### Logotype Clearspace

A certain amount of space is needed around the logomark to prevent it from becoming cluttered by surrounding artwork, images, or the edge of a page.
{images.filter(image => ['brand_03', 'brand_04'].includes(image.name)).map(image => (
<DownloadableImage key={image.name} url={image.url} alt={image.alt} name={image.name} downloadable={false} />
))}

<Image src="/branding/Group_1376160677.png" alt="Logotype Clearspace" width={500} height={500} />
<Image src="/branding/Group_1376160678.png" alt="Logotype Clearspace" width={500} height={500} />
<br />

### Symbol

<Image src="/branding/Group_1376160679.png" alt="Symbol" width={500} height={500} />
### Logo Misuse

### Symbol Gradient
{images.filter(image => image.name === 'brand_08').map(image => (
<DownloadableImage key={image.name} url={image.url} alt={image.alt} name={image.name} downloadable={false} />
))}

<Image src="/branding/Sei_Symbol_Gradient.png" alt="Symbol Gradient" width={500} height={500} />

<a
href="/branding/Sei_Symbol_Gradient.png"
style={{
display: 'inline-block',
padding: '10px 20px',
fontSize: '14px',
color: '#8B0000',
backgroundColor: '#f8f8f8',
border: 'none',
borderRadius: '25px',
textAlign: 'center',
boxShadow: '0 4px 6px rgba(0, 0, 0, 0.1)',
fontFamily: 'Inter, sans-serif'
}}
download
>
PNG
</a>
<a
href="/branding/Sei_Symbol_Gradient.svg"
style={{
display: 'inline-block',
padding: '10px 20px',
fontSize: '14px',
color: '#8B0000',
backgroundColor: '#f8f8f8',
border: 'none',
borderRadius: '25px',
textAlign: 'center',
boxShadow: '0 4px 6px rgba(0, 0, 0, 0.1)',
fontFamily: 'Inter, sans-serif'
}}
download
>
SVG
</a>
<br />

### Symbol Clearspace

<Image src="/branding/Group_1376160680.png" alt="Symbol Clearspace" width={500} height={500} />
{images.filter(image => image.name === 'brand_07').map(image => (
<DownloadableImage key={image.name} url={image.url} alt={image.alt} name={image.name} downloadable={false} />
))}

### Logo Misuse
<br />

### Typography

{images.filter(image => image.name.includes('brand_11') || image.name.includes('brand_12') || image.name.includes('brand_13') || image.name.includes('brand_14')).map(image => (
<DownloadableImage key={image.name} url={image.url} alt={image.alt} name={image.name} downloadable={false} />
))}

<br />

## Downloadable Assets

<Image src="/branding/Group_1376160681.png" alt="Logo Misuse" width={500} height={500} />
<br />

## Sei Colors
### Main Logo

{images.filter(image => image.name === 'brand_02').map(image => (
<DownloadableImage key={image.name} url={image.url} alt={image.alt} name={image.name} />
))}

<br />

### Symbol

{images.filter(image => image.name === 'brand_05').map(image => (
<DownloadableImage key={image.name} url={image.url} alt={image.alt} name={image.name} />
))}

<br />

### Symbol Gradient

{images.filter(image => image.name === 'brand_06').map(image => (
<DownloadableImage key={image.name} url={image.url} alt={image.alt} name={image.name} />
))}

<br />

### Sei Color Palette

<Image src="/branding/Group_1376160682.png" alt="Sei Color Palette" width={500} height={500} />
{images.filter(image => image.name === 'brand_09').map(image => (
<DownloadableImage key={image.name} url={image.url} alt={image.alt} name={image.name} />
))}

<br />

### Sei Gradient

<Image src="/branding/Group_1376160683.png" alt="Sei Gradient" width={500} height={500} />

## Typography

<Image src="/branding/Group_1376160684.png" alt="Typography" width={500} height={500} />
<Image src="/branding/Group_1376160685.png" alt="Typography" width={500} height={500} />
<Image src="/branding/Group_1376160686.png" alt="Typography" width={500} height={500} />
<Image src="/branding/Group_1376160687.png" alt="Typography" width={500} height={500} />

## Additional Assets

### Memes

<details>
<summary>Click to expand</summary>
<ul>
<li><a href="/branding/memes/1.png" download>1.png</a></li>
<li><a href="/branding/memes/2.png" download>2.png</a></li>
<li><a href="/branding/memes/3.png" download>3.png</a></li>
# cont'd
</ul>
</details>

### Animations

<details>
<summary>Click to expand</summary>
<ul>
<li><a href="/branding/animated/zen_ball_loop_preview_02_0001_0072.gif" download>Zen Ball Loop Preview 02</a></li>
<li><a href="/branding/animated/zen_ball_loop_preview_03.gif" download>Zen Ball Loop Preview 03</a></li>
# cont'd
</ul>
</details>

### Sound Effects

<details>
<summary>Click to expand</summary>
<ul>
<li><a href="/branding/sfx/sound1.mp3" download>Sound 1</a></li>
<li><a href="/branding/sfx/sound2.mp3" download>Sound 2</a></li>
# cont'd
</ul>
</details>
{images.filter(image => image.name === 'brand_10').map(image => (
<DownloadableImage key={image.name} url={image.url} alt={image.alt} name={image.name} />
))}
Loading

0 comments on commit 88ddaec

Please sign in to comment.