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

in #utopian-io5 years ago

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

Sort:  

That seems a lot of work! :)

  • It seems the pull request was including unresolved conflicts.

  • There are duplicate commit messages in your branch's git history. It's a good practice to squash multiple commits into one for that kind of cases.

  • Looks like PrettyDate stops making things prettier after weeks. That would be good to have to make that work with months and years, too. (Btw, I know you just used the functionality already exists, however, pasting the original function to the your contribution post, I had to review that piece of code, too :))


Your contribution has been evaluated according to Utopian policies and guidelines, as well as a predefined set of questions pertaining to the category.

To view those questions and the relevant answers related to your post, click here.


Need help? Write a ticket on https://support.utopian.io/.
Chat with us on Discord.
[utopian-moderator]

Thank you for your review, @emrebeyler! Keep up the good work!

Hi @sirfreeman!

Your post was upvoted by @steem-ua, new Steem dApp, using UserAuthority for algorithmic post curation!
Your post is eligible for our upvote, thanks to our collaboration with @utopian-io!
Feel free to join our @steem-ua Discord server

Congratulations @sirfreeman! You have completed the following achievement on the Steem blockchain and have been rewarded with new badge(s) :

You received more than 2000 upvotes. Your next target is to reach 3000 upvotes.

Click here to view your Board of Honor
If you no longer want to receive notifications, reply to this comment with the word STOP

Support SteemitBoard's project! Vote for its witness and get one more award!

Hey, @sirfreeman!

Thanks for contributing on Utopian.
We’re already looking forward to your next contribution!

Get higher incentives and support Utopian.io!
Simply set @utopian.pay as a 5% (or higher) payout beneficiary on your contribution post (via SteemPlus or Steeditor).

Want to chat? Join us on Discord https://discord.gg/h52nFrV.

Vote for Utopian Witness!

Task Request: Add Core Features & 'Communities' To Ulogs.org (Plus 880 Steem Bounty) & Further Insight Into The 'Grand Vision' For Ulogs.org. https://steemit.com/utopian-io/@surpassinggoogle/task-request-add-core-features-and-communities-to-ulogs-org-880-steem-bounty-and-more

Coin Marketplace

STEEM 0.31
TRX 0.11
JST 0.033
BTC 64275.02
ETH 3139.81
USDT 1.00
SBD 4.14