Skip to content

Commit

Permalink
State of wallet report (#174)
Browse files Browse the repository at this point in the history
* adding state of wallet report and support figures

* Remove spaces from image filenames in state wallet reports

Ran a script to replace all spaces in image filenames with underscores to prevent issues when referencing image paths.

* Add Ambire wallet logo

* Fix image links and formatting in "State of Wallets 2024" document

- Corrected image captions and paths for better clarity and consistency.
- Updated figure references to ensure proper display in the document.
- Improved overall formatting for enhanced readability.

* Fix image path reference

* Remove package-lock.json as the project uses yarn for build.

* Update State of Wallets 2024 post

- Add import statements for Figure and LogoGrid components
- Restructure headings and improve formatting
- Implement Figure component for images with captions
- Add LogoGrid component to display wallet logos
- Update custom styles for better heading hierarchy
- Fix react-loadable dependency in yarn.lock

* Rename file to lowercase to avoid case sensitivity issues between local and build environments.

* Add light/dark background to logo grid for better PNG visibility

- Implemented background colors to ensure PNG logos with white main body are displayed correctly in light mode.

* Fix some misplaced headings

* Fix figure caption text color for light and dark modes

Adjusted figure caption text color using INFIMA variable in global CSS to ensure it matches the main text color in both light and dark modes.

* Merge final edits from Reid

* Conduct  a final formatting of the code

* fix: update EIP-712 section layout for improved readability

- Refactored the EIP-712 section to use a responsive grid layout for figures.
- Changed the structure from individual Figure components to a row/column format for better alignment and presentation.

---------

Co-authored-by: tho <[email protected]>
  • Loading branch information
odysseus0 and tho authored Oct 4, 2024
1 parent b353656 commit dec6859
Show file tree
Hide file tree
Showing 37 changed files with 917 additions and 23,644 deletions.
714 changes: 714 additions & 0 deletions content/2024-08-17-state-of-wallets.mdx

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions content/authors.yml
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,12 @@ angela:
url: https://twitter.com/0xangelfish
image_url: https://pbs.twimg.com/profile_images/1547456118787489792/L3_9GSdZ_400x400.jpg

tesa:
name: Tesa Ho
title: Market Research @Flashbots
url: https://twitter.com/defin00b
image_url: https://x.com/defin00b/photo

brock:
name: Brock Smedley
title: Searcher Experience @ Flashbots
Expand Down
23,643 changes: 0 additions & 23,643 deletions package-lock.json

This file was deleted.

46 changes: 46 additions & 0 deletions src/components/Figure/Figure.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
import React from 'react';

interface FigureProps {
src: string;
number: number;
caption: string;
captionUrl?: string;
}

const Figure: React.FC<FigureProps> = ({ src, number, caption, captionUrl }) => {
const fullCaption = `Figure ${number}. ${caption}`;

return (
<figure style={{ textAlign: 'center', margin: '20px 0', maxWidth: '100%' }}>
<div style={{ maxWidth: '1000px', margin: '0 auto', overflow: 'hidden' }}>
<img
src={src}
alt={fullCaption}
style={{ maxWidth: '100%', height: 'auto', maxHeight: '500px', objectFit: 'contain' }}
/>
</div>
<figcaption
className="figure-caption"
style={{
marginTop: '2px', // Further reduced from 5px to 2px
fontStyle: 'italic',
maxWidth: '600px',
margin: '2px auto 0', // Adjusted top margin here as well
lineHeight: 1.2, // Reduced line height for tighter text
fontSize: '0.9em', // Slightly smaller font size
}}
>
Figure {number}.{' '}
{captionUrl ? (
<a href={captionUrl} target="_blank" rel="noopener noreferrer">
{caption}
</a>
) : (
caption
)}
</figcaption>
</figure>
);
};

export default Figure;
8 changes: 8 additions & 0 deletions src/components/LogoGrid/LogoGrid.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import React from 'react';
import styles from './styles.module.scss';

const LogoGrid = ({ children }) => {
return <div className={styles.logoGrid}>{children}</div>;
};

export default LogoGrid;
61 changes: 61 additions & 0 deletions src/components/LogoGrid/styles.module.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
.logoGrid {
display: grid;
grid-template-columns: repeat(4, 1fr);
gap: 20px;
align-items: center;
justify-items: center;
background-color: #2c2c2c; // Slightly lighter than the logo containers
padding: 20px;
border-radius: 12px; // Optional: adds rounded corners to the entire grid
}

.logoGrid img {
max-width: 100%;
height: auto;
}

.LogoGrid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
gap: 30px;
justify-items: center;
align-items: start;
padding: 20px;
}

.logo-item {
width: 100%;
max-width: 150px;

figure {
margin: 0;
display: flex;
flex-direction: column;
align-items: center;
}
}

.logo-image-container {
width: 100px;
height: 100px;
display: flex;
justify-content: center;
align-items: center;
margin-bottom: 10px;
background-color: #1e1e1e; // Dark background color
border-radius: 8px; // Optional: adds rounded corners
}

.logo-image {
max-width: 100%;
max-height: 100%;
object-fit: contain;
}

figcaption {
font-size: 14px;
margin: 0;
line-height: 1.2;
text-align: center;
color: #ffffff; // White text for better visibility on dark background
}
9 changes: 9 additions & 0 deletions src/scss/custom.scss
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,11 @@ h1, h2, h3, h4, h5, h6 {
margin: 4rem auto 2rem;
}

.markdown > h4 {
margin: 2rem auto 1rem;
font-size: 1.1em;
}

// Align writings' hero with website's hero
.margin-top--md,
.margin-vert--md {
Expand Down Expand Up @@ -155,3 +160,7 @@ h1, h2, h3, h4, h5, h6 {
max-width: var(--ifm-container-width-xl);
width: 88vw;
}

.figure-caption {
color: var(--ifm-color-content);
}
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.
Binary file added static/img/state_of_wallets_figures/cw_logo.png
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
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
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
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
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
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
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
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
64 changes: 64 additions & 0 deletions static/img/state_of_wallets_figures/rainbow_wallet_logo.svg
10 changes: 9 additions & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1679,7 +1679,7 @@
dependencies:
prop-types "^15.6.2"

"@docusaurus/[email protected]", "react-loadable@npm:@docusaurus/[email protected]":
"@docusaurus/[email protected]":
version "5.5.2"
resolved "https://registry.npmjs.org/@docusaurus/react-loadable/-/react-loadable-5.5.2.tgz"
integrity sha512-A3dYjdBGuy0IGT+wyLIGIKLRE+sAk1iNk0f1HjNDysO7u8lhL4N3VEm+FAubmJbAztn94F7MxBTPmnixbiyFdQ==
Expand Down Expand Up @@ -9150,6 +9150,14 @@ react-loadable@^5.5.0:
dependencies:
prop-types "^15.5.0"

"react-loadable@npm:@docusaurus/[email protected]":
version "5.5.2"
resolved "https://registry.npmjs.org/@docusaurus/react-loadable/-/react-loadable-5.5.2.tgz"
integrity sha512-A3dYjdBGuy0IGT+wyLIGIKLRE+sAk1iNk0f1HjNDysO7u8lhL4N3VEm+FAubmJbAztn94F7MxBTPmnixbiyFdQ==
dependencies:
"@types/react" "*"
prop-types "^15.6.2"

react-router-config@^5.1.1:
version "5.1.1"
resolved "https://registry.npmjs.org/react-router-config/-/react-router-config-5.1.1.tgz"
Expand Down

0 comments on commit dec6859

Please sign in to comment.