create account

[LandingPage] Make the rewards pull from the Utopian API; fallback to current data. by netuoso

View this thread on: hive.blogpeakd.comecency.com
· @netuoso · (edited)
$50.71
[LandingPage] Make the rewards pull from the Utopian API; fallback to current data.
# Make the rewards pull from the Utopian API; fallback to current data.

This update contains the necessary changes to make the displayed rewards on the landing page reflect the current rewards from Utopian as read through the stats API. When the API is unreachable for any reason, the stats will fallback to the currently set values. This should show users a very up-to-date information even in the event of service disruption.

On top of the addition of the AJAX call for the stats, this update also contains some minor changes that remove the Idea Lightbulb image in exchange for font-awesome icons. This should improve rendering and load times for users on mobile.

A few screenshots are attached below, but you can view the current code on [the Github pages deploy](https://netuoso.github.io/utopian-io-landingpage/) at anytime.

PS: This repo is for a flat page design that can be hosted with minimal overhead. For the same theme/site in a Ruby/Rails flavor, you can check out [this contribution](https://utopian.io/utopian-io/@netuoso/coded-landing-page-in-new-design-for-utopian-io).

# Screenshots

![Screen Shot 2017-11-03 at 1.33.58 PM.png](https://res.cloudinary.com/hpiynhbhq/image/upload/v1509734062/duurdgf0lhpghyvj6n6l.png)

---

![Screen Shot 2017-11-03 at 1.33.41 PM.png](https://res.cloudinary.com/hpiynhbhq/image/upload/v1509734052/dhkaqva84tgxse32uwit.png)
![Screen Shot 2017-11-03 at 1.33.36 PM.png](https://res.cloudinary.com/hpiynhbhq/image/upload/v1509734058/b6ixwznc1bj2m9gjy1li.png)

---

# Github Repositories
- [@mktcode repo](https://github.com/mktcode/utopian-io-landingpage)
- [@netuoso repo](https://github.com/netuoso/utopian-io-landingpage)

# What is Github Pages?
GitHub Pages is a static site hosting service. GitHub Pages is designed to host your personal, organization, or project pages directly from a GitHub repository. ... You can create and publish GitHub Pages online using the Jekyll Theme Chooser. If you prefer to work locally, you can use GitHub Desktop or the command line.
[Source](https://help.github.com/articles/what-is-github-pages/)<br /><hr/><em>Open Source Contribution posted via <a href="https://utopian.io/utopian-io/@netuoso/landingpage-make-the-rewards-pull-from-the-utopian-api-fallback-to-current-data">Utopian.io</a></em><hr/>
👍  , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , and 86 others
properties (23)
authornetuoso
permlinklandingpage-make-the-rewards-pull-from-the-utopian-api-fallback-to-current-data
categoryutopian-io
json_metadata"{"community":"utopian","app":"steemit/0.1","format":"markdown","repository":{"id":109086697,"name":"utopian-io-landingpage","full_name":"mktcode/utopian-io-landingpage","owner":{"login":"mktcode","id":6792578,"avatar_url":"https://avatars1.githubusercontent.com/u/6792578?v=4","gravatar_id":"","url":"https://api.github.com/users/mktcode","html_url":"https://github.com/mktcode","followers_url":"https://api.github.com/users/mktcode/followers","following_url":"https://api.github.com/users/mktcode/following{/other_user}","gists_url":"https://api.github.com/users/mktcode/gists{/gist_id}","starred_url":"https://api.github.com/users/mktcode/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mktcode/subscriptions","organizations_url":"https://api.github.com/users/mktcode/orgs","repos_url":"https://api.github.com/users/mktcode/repos","events_url":"https://api.github.com/users/mktcode/events{/privacy}","received_events_url":"https://api.github.com/users/mktcode/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mktcode/utopian-io-landingpage","description":"The landingpage for utopian.io","fork":false,"url":"https://api.github.com/repos/mktcode/utopian-io-landingpage","forks_url":"https://api.github.com/repos/mktcode/utopian-io-landingpage/forks","keys_url":"https://api.github.com/repos/mktcode/utopian-io-landingpage/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mktcode/utopian-io-landingpage/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mktcode/utopian-io-landingpage/teams","hooks_url":"https://api.github.com/repos/mktcode/utopian-io-landingpage/hooks","issue_events_url":"https://api.github.com/repos/mktcode/utopian-io-landingpage/issues/events{/number}","events_url":"https://api.github.com/repos/mktcode/utopian-io-landingpage/events","assignees_url":"https://api.github.com/repos/mktcode/utopian-io-landingpage/assignees{/user}","branches_url":"https://api.github.com/repos/mktcode/utopian-io-landingpage/branches{/branch}","tags_url":"https://api.github.com/repos/mktcode/utopian-io-landingpage/tags","blobs_url":"https://api.github.com/repos/mktcode/utopian-io-landingpage/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mktcode/utopian-io-landingpage/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mktcode/utopian-io-landingpage/git/refs{/sha}","trees_url":"https://api.github.com/repos/mktcode/utopian-io-landingpage/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mktcode/utopian-io-landingpage/statuses/{sha}","languages_url":"https://api.github.com/repos/mktcode/utopian-io-landingpage/languages","stargazers_url":"https://api.github.com/repos/mktcode/utopian-io-landingpage/stargazers","contributors_url":"https://api.github.com/repos/mktcode/utopian-io-landingpage/contributors","subscribers_url":"https://api.github.com/repos/mktcode/utopian-io-landingpage/subscribers","subscription_url":"https://api.github.com/repos/mktcode/utopian-io-landingpage/subscription","commits_url":"https://api.github.com/repos/mktcode/utopian-io-landingpage/commits{/sha}","git_commits_url":"https://api.github.com/repos/mktcode/utopian-io-landingpage/git/commits{/sha}","comments_url":"https://api.github.com/repos/mktcode/utopian-io-landingpage/comments{/number}","issue_comment_url":"https://api.github.com/repos/mktcode/utopian-io-landingpage/issues/comments{/number}","contents_url":"https://api.github.com/repos/mktcode/utopian-io-landingpage/contents/{+path}","compare_url":"https://api.github.com/repos/mktcode/utopian-io-landingpage/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mktcode/utopian-io-landingpage/merges","archive_url":"https://api.github.com/repos/mktcode/utopian-io-landingpage/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mktcode/utopian-io-landingpage/downloads","issues_url":"https://api.github.com/repos/mktcode/utopian-io-landingpage/issues{/number}","pulls_url":"https://api.github.com/repos/mktcode/utopian-io-landingpage/pulls{/number}","milestones_url":"https://api.github.com/repos/mktcode/utopian-io-landingpage/milestones{/number}","notifications_url":"https://api.github.com/repos/mktcode/utopian-io-landingpage/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mktcode/utopian-io-landingpage/labels{/name}","releases_url":"https://api.github.com/repos/mktcode/utopian-io-landingpage/releases{/id}","deployments_url":"https://api.github.com/repos/mktcode/utopian-io-landingpage/deployments","created_at":"2017-11-01T04:24:55Z","updated_at":"2017-11-01T21:54:56Z","pushed_at":"2017-11-03T18:27:28Z","git_url":"git://github.com/mktcode/utopian-io-landingpage.git","ssh_url":"git@github.com:mktcode/utopian-io-landingpage.git","clone_url":"https://github.com/mktcode/utopian-io-landingpage.git","svn_url":"https://github.com/mktcode/utopian-io-landingpage","homepage":null,"size":1290,"stargazers_count":1,"watchers_count":1,"language":"HTML","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":2,"mirror_url":null,"archived":false,"open_issues_count":3,"forks":2,"open_issues":3,"watchers":1,"default_branch":"master","score":11.236499},"pullRequests":[],"platform":"github","type":"development","tags":["utopian-io","landingpage","steemdev","programming","github"],"links":["https://netuoso.github.io/utopian-io-landingpage/","https://utopian.io/utopian-io/@netuoso/coded-landing-page-in-new-design-for-utopian-io","https://github.com/mktcode/utopian-io-landingpage","https://github.com/netuoso/utopian-io-landingpage","https://help.github.com/articles/what-is-github-pages/","https://utopian.io/utopian-io/@netuoso/landingpage-make-the-rewards-pull-from-the-utopian-api-fallback-to-current-data"],"image":["https://res.cloudinary.com/hpiynhbhq/image/upload/v1509734062/duurdgf0lhpghyvj6n6l.png","https://res.cloudinary.com/hpiynhbhq/image/upload/v1509734052/dhkaqva84tgxse32uwit.png","https://res.cloudinary.com/hpiynhbhq/image/upload/v1509734058/b6ixwznc1bj2m9gjy1li.png"]}"
created2017-11-03 18:41:21
last_update2017-11-03 18:45:00
depth0
children5
last_payout2017-11-10 18:41:21
cashout_time1969-12-31 23:59:59
total_payout_value37.653 HBD
curator_payout_value13.056 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length2,292
author_reputation151,901,967,807,285
root_title"[LandingPage] Make the rewards pull from the Utopian API; fallback to current data."
beneficiaries
0.
accountajvest
weight8
1.
accountcryptoctopus
weight94
2.
accountelear
weight144
3.
accountfreedom
weight1,379
4.
accountjohnsmith
weight76
5.
accountmasterthematrix
weight6
6.
accountmateria
weight5
7.
accountnetuoso
weight14
max_accepted_payout1,000,000.000 HBD
percent_hbd0
post_id19,374,505
net_rshares27,279,175,752,465
author_curate_reward""
vote details (150)
@arie.steem ·
Thank you for the contribution sir . It has been approved.

You can contact us on [Discord][discord].
[[utopian-moderator]][moderators]

[moderators]:  https://utopian.io/moderators
[discord]:  https://discord.gg/4NYhZU6
properties (22)
authorarie.steem
permlinkre-netuoso-landingpage-make-the-rewards-pull-from-the-utopian-api-fallback-to-current-data-20171103t191610502z
categoryutopian-io
json_metadata{"tags":["utopian-io"],"community":"utopian","app":"utopian/1.0.0"}
created2017-11-03 19:16:18
last_update2017-11-03 19:16:18
depth1
children0
last_payout2017-11-10 19:16:18
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length221
author_reputation43,266,931,781,631
root_title"[LandingPage] Make the rewards pull from the Utopian API; fallback to current data."
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id19,376,855
net_rshares0
@elear ·
Thank you so much @netuoso. Amazing work!
properties (22)
authorelear
permlinkre-netuoso-landingpage-make-the-rewards-pull-from-the-utopian-api-fallback-to-current-data-20171104t072445421z
categoryutopian-io
json_metadata{"tags":["utopian-io"],"community":"utopian","app":"utopian/1.0.0"}
created2017-11-04 07:24:48
last_update2017-11-04 07:24:48
depth1
children0
last_payout2017-11-11 07:24:48
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length41
author_reputation59,749,428,580,040
root_title"[LandingPage] Make the rewards pull from the Utopian API; fallback to current data."
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id19,414,130
net_rshares0
@mkt ·
Hey @netuoso! Thank you for your participation! Would still be great to talk to you on discord or whatever but you don't seem to be too chatty. :P But that's ok. I also commented on your PR. Would love to merge something from you but your PR is a liiiiittle bit messy. ;)
properties (22)
authormkt
permlinkre-netuoso-landingpage-make-the-rewards-pull-from-the-utopian-api-fallback-to-current-data-20171104t090105143z
categoryutopian-io
json_metadata{"tags":["utopian-io"],"community":"busy","app":"busy/2.0.0"}
created2017-11-04 09:01:06
last_update2017-11-04 09:01:06
depth1
children1
last_payout2017-11-11 09:01:06
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length271
author_reputation45,513,283,519,678
root_title"[LandingPage] Make the rewards pull from the Utopian API; fallback to current data."
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id19,418,920
net_rshares0
@netuoso ·
You are always welcome to message me on discord. My name is the same everywhere. I looked for you and didn't see it, but didnt look very hard. 

I don't check SteemIt comments too often. I wish I could turn on pushes for particular people or for messages with certain tags or keywords. 

I'll check the PR and maybe make the changes if you asked for some.
properties (22)
authornetuoso
permlinkre-mkt-re-netuoso-landingpage-make-the-rewards-pull-from-the-utopian-api-fallback-to-current-data-20171104t153937331z
categoryutopian-io
json_metadata{"tags":["utopian-io"],"app":"steemit/0.1"}
created2017-11-04 15:39:39
last_update2017-11-04 15:39:39
depth2
children0
last_payout2017-11-11 15:39:39
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length355
author_reputation151,901,967,807,285
root_title"[LandingPage] Make the rewards pull from the Utopian API; fallback to current data."
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id19,444,058
net_rshares0
@utopian-io ·
$0.05
### Hey @netuoso I am @utopian-io. I have just super-voted you at 64% Power!
#### Suggestions https://utopian.io/rules
-Your contribution is less informative than others in this category.
-Utopian has detected 2 bot votes. I am the only bot you should love!!
#### Achievements
-I am a bot...I love developers... <3
-Votes on this contribution are going well. Nice!
-You are having more votes than average for this category. Nice!
-You have a good amount of votes on your contributions. Good job!
**Up-vote this comment to grow my power and help Open Source contributions like this one.**
👍  
properties (23)
authorutopian-io
permlinkre-netuoso-landingpage-make-the-rewards-pull-from-the-utopian-api-fallback-to-current-data-20171104t160109400z
categoryutopian-io
json_metadata{"tags":["utopian-io"],"community":"utopian","app":"utopian/1.0.0"}
created2017-11-04 16:01:09
last_update2017-11-04 16:01:09
depth1
children0
last_payout2017-11-11 16:01:09
cashout_time1969-12-31 23:59:59
total_payout_value0.038 HBD
curator_payout_value0.012 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length587
author_reputation152,955,367,999,756
root_title"[LandingPage] Make the rewards pull from the Utopian API; fallback to current data."
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id19,445,666
net_rshares24,178,927,576
author_curate_reward""
vote details (1)