-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Homepage redesign #13528
Homepage redesign #13528
Conversation
✅ Deploy Preview for ethereumorg ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
large text, larger padding, larger border radius; for initial use on homepage
rm some deprecated/unused tokens; linting
add fallback banner for Vitalik's blog
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@wackerow I see a hydration issue related to the use of react-i18next
. I'll create a fix for that on dev
and let you know when to get this branch updated.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've tested a bit a few performance aspects. Left some comments.
Nice to have: I think we should try to optimize the external images if possible. There is one in particular that is >3mb. By doing a loading="lazy"
I think we reduce the negative impact for the loading time but it would be nice to optimize them at some point.
src/styles/config.ts
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<Card key={title} href={link}> | ||
<CardBanner> | ||
{/* eslint-disable-next-line @next/next/no-img-element */} | ||
<img src={imgSrc} alt="" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<img src={imgSrc} alt="" /> | |
<img src={imgSrc} alt="" loading="lazy" /> |
<img | ||
src={imageUrl} | ||
alt="" | ||
className="max-w-full object-cover object-center" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
className="max-w-full object-cover object-center" | |
className="max-w-full object-cover object-center" | |
loading="lazy" |
Always check for possible string value first before AtomElement struct
Homepage: enable atom feeds
migrate Codeblock component to tailwind, update colors
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wooo 🎉
🎉 🔜
Description
Introduces a revamp to the ethereum.org homepage
Change log
public/images/**
Imported new image assets. Up-res'ed the event placeholder image.
src/
@chakra-ui/
colors.ts
andsemanticTokens.ts
updated to match new token changes. Stepping-stone for upgrading old components to new theme using Tailwind/css tokensButton.ts
- Updates solid variant to use newprimary-action
for background, and white for textcomponents/
BigNumber/index.tsx
- Replaces old stats boxGridItem
Buttons/SvgButton.tsx
- New unique button type, currently placed as own componentChevron/index.tsx
- RTL-responsive next and prev arrows (instead of using Right and Left chevrons).Hero/HomeHero/index.tsx
- Updated with new theme/design, updated for tailwindHomepage/
- Subdirectory for homepage-specific components and hook logicBentoCard.tsx
- Card specifically designed for the homepage BentoBox and card SwiperuseBentoBox.ts
- Extracted logic and setup for homepage BentoBoxuseHome.ts
- Extracted logic for remainder of homepage tasksicons/*.svg
-1em
x1em
SVG icons imported for use throughout the homepageNav/
- Chevron update; Color mode toggle updates * See TODOsStatsBoxGrid/
useStatsBoxGrid.tsx
Swiper/index.tsx
- Re-usable swiper component built with Swiper, used on homepage for bento cards and RSS post cardsui/
Button.tsx
- Addedlg
size, and updated withprimary-action
color forsolid
variantcard.tsx
- Re-usable card components, initialized via shadcnsection.tsx
- Re-usable section components, templated from card.tsxskeleton.tsx
- Re-usable skeleton components, initialized via shadcn, custom added SkeletonLines for variable-line-width multi-line skeletonsWindowBox/index.tsx
- Re-usable "Window"-style box component with top icon + title-bar, and embedded gradient/shadow stylingEventCard.tsx
- Updated existing card to accept upgraded image placeholder/fallbackMainArticle.tsx
- Updates to tailwindMorpher.tsx
- Updates to tailwind and usehooks-tsThemeProvider.tsx
- * See TODOsUpcomingEventsList.tsx
- Simple removal of unused/deprecated propdata/\*\*
- Added a couple image URLs; lintinghooks/useRtFlip.ts
- Fixed tw flip class to-scale-x-100
intl/en/\*\*
- Intl string extractions / updatesapi/
fetchEthPrice.ts
- Added as a non-hook function to fetch ETH price for use in conjunction with Total ETH Staked, to calculate "total value securing Ethereum"fetchGrowThePie.ts
- Added fetch to GrowThePie for Tx Count and average Cost across all Ethereum networksfetchPosts.ts
- Added for non-XML/RSS feed fetching, currently containing logic for Attestant blog scrapefetchRSS.ts
- Added ability to fetch list of RSS feedsfetchTotalEthStaked.ts
- Changed return to single value with timestampfetchTotalValueLocked.ts
- Changed return to single value with timestamputils/
-date.ts
- AddsisValidDate
helper functionrss.ts
- Adds helper functions to sort, polish and post-process the list of RSS feed data for use by the frontendscreen.ts
- Adds helper function converting tailwind breakpoint names into pixel number valuesconstants.ts
- Updated latest constants (rm "ranges", add RSS/feed constants)types.ts
- Updated with latest types for event/rss/metric changespages/
index.tsx
<- Core Homepage structure updateslearning-tools.tsx
- Patched to accommodate updatedMainArticle
what-is-ethereum.tsx
- Patched to accommodate updatedtxCount
data sourcestyles/
colors.css
- Base color palette declarations (no light/dark differentiation)config.ts
- Exports the tailwind theme configuration as TS object for use elsewheredocsearch.css
- Adjusted for.dark
selector * See TODOfont.css
- Updated to handleblack/900
font weightglobal.css
- Extracted new base colors and tokens to other.css
files for organization; imported at top.semantic-tokens.css
- Named tokens for use in tailwind config, light/dark differentiation herepackage.json
/yarn.lock
yarn add swiper
yarn add -D xml2js @types/swiper @types/xml2js
tailwind.config.js
- Updated with new tokens, and addedextend
for custom tailwind classes as neededRemoves:
src/components/CommunityEvents/index.tsx
- No longer neededsrc/components/StatsBoxGrid/GridItem.tsx
- NowBigNumber
componentsrc/components/StatsBoxGrid/RangeSelector.tsx
- No more ranged datasrc/components/Nav/NextChevron.tsx
- Replaced withChevron
componentssrc/api/fetchNodes.ts
- No longer used, metric replaced with ave tx cost data from GrowThePiesrc/api/fetchTxCount.ts
- No longer used, metric replaced with data from GrowThePieTODO:
ThemeProvider.tsx
Nav/useNav.ts
Preview
Additional
"The internet is changing" section 🚧 to be added in separate PR