KnackSteem update Overall Layout of Home, Editor, Preview and view for a particular post

Repository

https://github.com/knacksteem/knacksteem.org

Pull Request

https://github.com/knacksteem/knacksteem.org/pull/54

image

image

This PR adds the user avatar, the time the the post was made, and the tags entered by the user on posting to the block chain and refactor of component to add the similar post feature to the ArticleDetail component.

The overall responsive layout of the Editor post area has being fixed along with the ArticleDetailI component which was referenced in the issues below.

https://github.com/knacksteem/knacksteem.org/issues/53

Made use of the PrettyDate function to return time in a nice format on the ArticleListItem.

export const prettyDate = (time) => {
  const date = new Date(time),
    diff = (((new Date()).getTime() - date.getTime()) / 1000) + date.getTimezoneOffset() * 60,
    day_diff = Math.floor(diff / 86400);

  if (day_diff === 0) {
    //posted just today
    if (diff < 60) {
      return 'just now';
    } else if (diff < 120) {
      return '1 minute ago';
    } else if (diff < 3600) {
      return Math.floor(diff / 60) + ' minutes ago';
    } else if (diff < 7200) {
      return '1 hour ago';
    } else {
      return Math.floor(diff / 3600) + ' hours ago';
    }
  } else if (day_diff === 1) {
    return 'yesterday';
  } else if (day_diff < 7) {
    return day_diff + ' days ago';
  } else {
    return Math.ceil(day_diff / 7) + ' weeks ago';
  }
};

Issue

https://github.com/knacksteem/knacksteem.org/issues/53

Task Request

https://steemit.com/knacksteem/@knowledges/development-task-request-help-build-knacksteem-front-end-800-steem-bounty

What's next?

I believe notifications and layouts for moderator will be my next target.

Commits

https://github.com/knacksteem/knacksteem.org/pull/54/commits/76ee84f20e600521e1c70e215cbb5bf55f11634b

https://github.com/knacksteem/knacksteem.org/pull/54/commits/62497d551669e4103ac04dc061a35be69088eab4

https://github.com/knacksteem/knacksteem.org/pull/54/commits/966c6cf1a3a09ec49f8336969de9386e337ce2be

https://github.com/knacksteem/knacksteem.org/pull/54/commits/9cb2aaae39b752305c440fb08c3045efe8d2b411

Github Account

https://github.com/ogbiyoyosky

H2
H3
H4
3 columns
2 columns
1 column
Join the conversation now