Page MenuHomePhabricator

[e.cash] Add blog page
ClosedPublic

Authored by johnkuney on Jun 28 2023, 21:25.

Details

Reviewers
Fabien
Group Reviewers
Restricted Project
Commits
rABC7f88b3b3d3e8: [e.cash] Add blog page
Summary

Adding the main blog page to the site

  • use the getBlogPosts function from the last diff to getStaticProps for all of the posts
  • render them on the page in a series of cards

note the theme color change is for this diff. That value worked better here and for the other places its used

Test Plan

preview the site and see if everything looks good
npm run test

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

The build failed due to an unexpected infrastructure outage. The administrators have been notified to investigate. Sorry for the inconvenience.
The build failed due to an unexpected infrastructure outage. The administrators have been notified to investigate. Sorry for the inconvenience.
Fabien requested changes to this revision.Jun 29 2023, 06:24
Fabien added a subscriber: Fabien.

The dateConvert function/tests should be its own diff

This revision now requires changes to proceed.Jun 29 2023, 06:24
The build failed due to an unexpected infrastructure outage. The administrators have been notified to investigate. Sorry for the inconvenience.
The build failed due to an unexpected infrastructure outage. The administrators have been notified to investigate. Sorry for the inconvenience.

Added a date convert function to render the dates in a nice way from the timestamps

Is that still a thing ? I can't see it in the diff

@bot preview-e.cash

web/e.cash/pages/blog.js
27 ↗(On Diff #41108)

worth defining 3 as a constant to this component

e.g.

const FEATURED_POSTS_COUNT = 3

56 ↗(On Diff #41108)

then this is also FEATURED_POSTS_COUNT

alt: define at the top,

featuredPosts = props.posts.slice(0,3)
posts = props.posts.slice(3)

...prob the better appproach, easier to read featuredPosts.map( vs props.posts.slice(0,3).map(...)

web/e.cash/styles/theme.js
54 ↗(On Diff #41108)

what was the purpose of adding this change here? did the previous color conflict with something on the new page?

web/e.cash/styles/theme.js
54 ↗(On Diff #41108)

oh ok i see your comment in the desc.

at this point in the stack -- blog links are expected to 404? still pending a logic to add those pages at build time?

define featured post and post at top

at this point in the stack -- blog links are expected to 404? still pending a logic to add those pages at build time?

Yes, need to create a post page and get the staticPaths, assumed should be a separate diff

Fabien added inline comments.
web/e.cash/styles/theme.js
54 ↗(On Diff #41110)

That's dark for sure !

This revision is now accepted and ready to land.Jun 29 2023, 19:37
This revision was automatically updated to reflect the committed changes.