![image.png](https://ipfs.busy.org/ipfs/QmTMhCQjFTCaKDuP9Da59Ncv5Q4BbvHnqjXjvnu4JeCBnE) #### Repository https://github.com/mcfarhat/actifit-landingpage *I created this repository and then transferred ownership to [mcfarhat](https://github.com/mcfarhat). That's why there are no PRs but you can see me as [the only contributor](https://github.com/mcfarhat/actifit-landingpage/graphs/contributors). For future updates there will be PRs.* #### Read about the project: https://steemit.com/actifit/@actifit/announcing-actifit-innovative-smt-for-rewarding-fitness-activity # Landingpage and Wallet The project was in need of a first little landingpage and a way for people to see their current funds. Since this includes some data fetching and logic, I decided to use [Vue.js](https://vuejs.org/) and [Nuxt.js](https://nuxtjs.org/) again, to have a solid framework to work with. The layout is completely custom, no templates were used, just bare [Bootstrap 4](https://getbootstrap.com/). The images come from [pixabay.com](https://pixabay.com) and are free and require no attribution. But anyway, here are the sources: https://pixabay.com/en/adult-body-casual-close-up-1867757/ https://pixabay.com/en/people-man-guy-running-sport-2590796/ https://pixabay.com/en/home-fitness-equipment-1840858/ Since the user wallet was the driving purpose of this page, there's a prominently placed box in the header, where you can enter a username and then see the account balance and transaction history. There's no login or other validation. You can type in any username and see it's balance and history. By the way,... there are no features such as sending and receiving funds. It is really just pure information. <center> ![image.png](https://ipfs.busy.org/ipfs/QmfByKAotvLo9TUwhvPFXdPLcDR3PjrRzxEFWjmkBXHLy1) </center> ![image.png](https://ipfs.busy.org/ipfs/QmYXLWNLz1B4h2JBLUfjtmh1vQQyqcMFqyfBoMwR6Yq7MU) The main page contains only a little bit of text and some images, that I tried to arrange nicely. The only dynamic part is those two numbers - *Tokens Distributed* and *Token Holders*. ![image.png](https://ipfs.busy.org/ipfs/Qmf5zk8XnqXrptipcJssX6vgWtoPwpBXQz8NZWWz1TRuxG) # # Implementation I started with the wallet view, since this was the main task. First step was to install a fresh Nuxt.js app. You can do this easily with the [npx installer for Nuxt](https://github.com/nuxt-community/create-nuxt-app). `npx create-nuxt-app actifit-landingpage` This results in this first commit: https://github.com/mcfarhat/actifit-landingpage/commit/863d551e7ca75e90da4f27e949652728c957f9c3 The second commit actually already implements the wallet view functionality: https://github.com/mcfarhat/actifit-landingpage/commit/f3d3624442c1b7fb102ad735fb27279db1daf235 There are two views, one for the homepage, which contains a form to provide the username and later became the actual landingpage, and the wallet page to view your account balance and transaction history. On click on the "Show Wallet" button or by hitting enter in the input field, the `goToWallet` method is triggered, and sends you to `/wallet/<username>` if the provided username is at least 3 characters long. https://github.com/mcfarhat/actifit-landingpage/blob/master/pages/index.vue#L136 The wallet page then just fetches the data from the API that the project already provides, and displays it. https://github.com/mcfarhat/actifit-landingpage/blob/master/pages/wallet/_username.vue#L55 Regarding the rest of the landingpage, well... I don't really know what to write about it. It's plain and simple HTML/CSS. Nothing that needs any explanation, I guess. I can only say that [all the commits](https://github.com/mcfarhat/actifit-landingpage/commits/master) after the first two, are only related to the looks of the website and displaying the content nicely. Oh and of course it's mobile optimized: <center> ![localhost_3000_(iPhone 5_SE).png](https://ipfs.busy.org/ipfs/QmV3FmtTKvbuy4Vdqm7FEd6skSwyqAndTftMamjQteCf1e) </center> # <center><sup>Final Result:</sup><br>[actifit.io](https://actifit.io/)</center> # This is just the first iteration, the minimum that was required. I'm already talking with @mcfarhat about future updates, so don't see this as a finished project. I guess it's far from that but it's a start.
post_id | 56,823,050 |
---|---|
author | mkt |
permlink | actifit-landingpage-and-wallet-view |
category | utopian-io |
json_metadata | {"tags":["utopian-io","development","actifit","vuejs","webdesign"],"community":"busy","links":["https:\/\/github.com\/mcfarhat\/actifit-landingpage","https:\/\/github.com\/mcfarhat","https:\/\/github.com\/mcfarhat\/actifit-landingpage\/graphs\/contributors","https:\/\/steemit.com\/actifit\/@actifit\/announcing-actifit-innovative-smt-for-rewarding-fitness-activity","https:\/\/vuejs.org\/","https:\/\/nuxtjs.org\/","https:\/\/getbootstrap.com\/","https:\/\/pixabay.com","https:\/\/pixabay.com\/en\/adult-body-casual-close-up-1867757\/","https:\/\/pixabay.com\/en\/people-man-guy-running-sport-2590796\/"],"image":["https:\/\/ipfs.busy.org\/ipfs\/QmTMhCQjFTCaKDuP9Da59Ncv5Q4BbvHnqjXjvnu4JeCBnE"],"users":["actifit","mcfarhat"],"app":"busy\/2.5.2","format":"markdown"} |
created | 2018-07-17 12:39:30 |
last_update | 2018-07-17 12:51:24 |
depth | 0 |
children | 8 |
net_rshares | 66,593,377,642,738 |
last_payout | 2018-07-24 12:39:30 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 105.603 SBD |
curator_payout_value | 33.777 SBD |
pending_payout_value | 0.000 SBD |
promoted | 0.000 SBD |
body_length | 4,298 |
author_reputation | 44,782,786,305,028 |
root_title | "Actifit Landingpage and Wallet View" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 SBD |
percent_steem_dollars | 10,000 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
yuxi | 0 | 11,210,574,326 | 39% | ||
achiron | 0 | 14,486,136,471 | 100% | ||
jamzed | 0 | 30,138,603,118 | 100% | ||
miniature-tiger | 0 | 97,461,209,618 | 100% | ||
upheaver | 0 | 1,125,931,042 | 6% | ||
mkt | 0 | 22,572,667,428 | 100% | ||
helo | 0 | 22,278,792,995 | 100% | ||
flauwy | 0 | 8,547,720,776 | 5% | ||
tensor | 0 | 26,685,684,845 | 100% | ||
roxane | 0 | 213,612,507,179 | 10% | ||
ricardovieira | 0 | 8,713,152,952 | 100% | ||
doughtaker | 0 | 18,068,834,016 | 100% | ||
drorion | 0 | 23,368,024,270 | 100% | ||
codingdefined | 0 | 53,038,900,682 | 100% | ||
dreamarif | 0 | 481,439,737 | 50% | ||
alexzicky | 0 | 25,060,328,419 | 50% | ||
crokkon | 0 | 53,180,260,217 | 100% | ||
espoem | 0 | 26,272,767,762 | 25% | ||
mcfarhat | 0 | 37,382,407,372 | 50% | ||
loshcat | 0 | 2,981,869,139 | 100% | ||
utopian-io | 0 | 65,633,689,303,496 | 42.63% | ||
favcau | 0 | 40,192,274,738 | 100% | ||
steemtaker | 0 | 20,677,296,968 | 50% | ||
aldahyr77 | 0 | 136,906,118 | 100% | ||
cahlen | 0 | 71,804,565,913 | 100% | ||
steemitstats | 0 | 3,304,983,694 | 5% | ||
adasq | 0 | 8,392,186,130 | 100% | ||
cryptonewsly | 0 | 233,653,447 | 100% | ||
jamesndungu | 0 | 608,612,014 | 100% | ||
amosbastian | 0 | 55,576,911,223 | 100% | ||
tdre | 0 | 5,636,550,734 | 100% | ||
go4d | 0 | 780,165,477 | 100% | ||
josephace135 | 0 | 4,673,898,364 | 100% | ||
dacx | 0 | 10,699,802,520 | 42% | ||
juanwhite | 0 | 1,241,509,868 | 100% | ||
reazuliqbal | 0 | 14,212,623,484 | 40% | ||
j85063 | 0 | 7,912,455,915 | 10% | ||
analyzer | 0 | 280,320,025 | 100% | ||
zcool | 0 | 235,840,193 | 10% | ||
moenawar | 0 | 8,687,917,000 | 100% | ||
adam-saudagar | 0 | 2,998,809,530 | 100% | ||
mhossain | 0 | 222,191,382 | 40% | ||
chadrona | 0 | 983,864,198 | 100% | ||
hanffreunde | 0 | 204,478,027 | 100% | ||
tanzil2020 | 0 | 64,236,014 | 20% | ||
pathik | 0 | 458,222,408 | 100% | ||
badadas | 0 | 303,164,718 | 50% | ||
chrislyr | 0 | 778,566,396 | 100% | ||
yuki-nee | 0 | 589,487,808 | 100% | ||
boomtube | 0 | 231,697,590 | 40% | ||
bdcommunity2 | 0 | 448,652,791 | 100% | ||
gamerbd | 0 | 448,682,191 | 100% |
Thank you for the fantastic work so far @mkt ! :)
post_id | 56,824,669 |
---|---|
author | mcfarhat |
permlink | re-mkt-actifit-landingpage-and-wallet-view-20180717t125712123z |
category | utopian-io |
json_metadata | {"tags":["utopian-io"],"users":["mkt"],"app":"steemit\/0.1"} |
created | 2018-07-17 12:57:18 |
last_update | 2018-07-17 12:57:18 |
depth | 1 |
children | 0 |
net_rshares | 0 |
last_payout | 2018-07-24 12:57:18 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 SBD |
curator_payout_value | 0.000 SBD |
pending_payout_value | 0.000 SBD |
promoted | 0.000 SBD |
body_length | 49 |
author_reputation | 104,178,422,702,645 |
root_title | "Actifit Landingpage and Wallet View" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 SBD |
percent_steem_dollars | 10,000 |
This is awesome. It will let users see their tokens at a glance and ultimately increase the userbase
post_id | 56,826,794 |
---|---|
author | zoneboy |
permlink | re-mkt-actifit-landingpage-and-wallet-view-20180717t131820050z |
category | utopian-io |
json_metadata | {"tags":["utopian-io"],"app":"steemit\/0.1"} |
created | 2018-07-17 13:18:21 |
last_update | 2018-07-17 13:18:21 |
depth | 1 |
children | 0 |
net_rshares | 0 |
last_payout | 2018-07-24 13:18:21 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 SBD |
curator_payout_value | 0.000 SBD |
pending_payout_value | 0.000 SBD |
promoted | 0.000 SBD |
body_length | 100 |
author_reputation | 94,769,080,451,415 |
root_title | "Actifit Landingpage and Wallet View" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 SBD |
percent_steem_dollars | 10,000 |
* More Vue wonders, congrats. * My eyes went crossed when I saw this: `this.transactions = json ? json : this.transactions`, can you explain? * So if json has data, then transactions will get json, otherwise, it get itself? Your contribution has been evaluated according to [Utopian policies and guidelines](https://join.utopian.io/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](https://review.utopian.io/result/3/2211213). ---- Need help? Write a ticket on https://support.utopian.io/. Chat with us on [Discord](https://discord.gg/uTyJkNm). [[utopian-moderator]](https://join.utopian.io/)
post_id | 56,847,991 |
---|---|
author | helo |
permlink | re-mkt-actifit-landingpage-and-wallet-view-20180717t170558303z |
category | utopian-io |
json_metadata | {"links":["https:\/\/join.utopian.io\/guidelines","https:\/\/review.utopian.io\/result\/3\/2211213","https:\/\/support.utopian.io\/","https:\/\/discord.gg\/uTyJkNm","https:\/\/join.utopian.io\/"],"app":"steemit\/0.1","tags":["utopian-io"]} |
created | 2018-07-17 17:05:57 |
last_update | 2018-07-17 17:05:57 |
depth | 1 |
children | 4 |
net_rshares | 26,068,112,570 |
last_payout | 2018-07-24 17:05:57 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.042 SBD |
curator_payout_value | 0.011 SBD |
pending_payout_value | 0.000 SBD |
promoted | 0.000 SBD |
body_length | 720 |
author_reputation | 119,612,833,307,875 |
root_title | "Actifit Landingpage and Wallet View" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 SBD |
percent_steem_dollars | 10,000 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
mkt | 0 | 20,178,413,088 | 100% | ||
espoem | 0 | 5,838,392,836 | 5% | ||
mops2e | 0 | 51,306,646 | 55% |
Exactly... although, this is more a workaround. The default value for `this.transactions` is an empty array. Unfortunately this API endpoint returns a `200 OK` response even though it returns invalid JSON for some reason. This is why I had to add this check there. It makes sure that `this.transactions` is still an empty array in case of an invalid response.
post_id | 56,851,501 |
---|---|
author | mkt |
permlink | re-helo-re-mkt-actifit-landingpage-and-wallet-view-20180717t174711989z |
category | utopian-io |
json_metadata | {"format":"markdown","community":"busy","links":[],"app":"busy\/2.5.2","tags":["utopian-io"],"users":[],"image":[]} |
created | 2018-07-17 17:47:12 |
last_update | 2018-07-17 17:49:21 |
depth | 2 |
children | 3 |
net_rshares | 21,405,437,194 |
last_payout | 2018-07-24 17:47:12 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.033 SBD |
curator_payout_value | 0.009 SBD |
pending_payout_value | 0.000 SBD |
promoted | 0.000 SBD |
body_length | 359 |
author_reputation | 44,782,786,305,028 |
root_title | "Actifit Landingpage and Wallet View" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 SBD |
percent_steem_dollars | 10,000 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
helo | 0 | 21,405,437,194 | 100% |
It looked like code poetry with its symmetry. And it gave me an idea! π‘
post_id | 56,863,240 |
---|---|
author | helo |
permlink | re-mkt-re-helo-re-mkt-actifit-landingpage-and-wallet-view-20180717t201058377z |
category | utopian-io |
json_metadata | {"links":[],"tags":["utopian-io"],"image":[],"format":"markdown","community":"busy","app":"busy\/2.5.3","users":[]} |
created | 2018-07-17 20:10:57 |
last_update | 2018-07-17 20:10:57 |
depth | 3 |
children | 0 |
net_rshares | 0 |
last_payout | 2018-07-24 20:10:57 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 SBD |
curator_payout_value | 0.000 SBD |
pending_payout_value | 0.000 SBD |
promoted | 0.000 SBD |
body_length | 73 |
author_reputation | 119,612,833,307,875 |
root_title | "Actifit Landingpage and Wallet View" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 SBD |
percent_steem_dollars | 10,000 |
Nice project! I would do it like this though: `this.transactions = json || this.transactions`
post_id | 56,928,529 |
---|---|
author | luschn |
permlink | re-mkt-re-helo-re-mkt-actifit-landingpage-and-wallet-view-20180718t112106540z |
category | utopian-io |
json_metadata | {"tags":["utopian-io"],"app":"steemit\/0.1"} |
created | 2018-07-18 11:23:12 |
last_update | 2018-07-18 11:23:12 |
depth | 3 |
children | 1 |
net_rshares | 112,822,826,333 |
last_payout | 2018-07-25 11:23:12 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.184 SBD |
curator_payout_value | 0.052 SBD |
pending_payout_value | 0.000 SBD |
promoted | 0.000 SBD |
body_length | 93 |
author_reputation | 19,349,362,753,909 |
root_title | "Actifit Landingpage and Wallet View" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 SBD |
percent_steem_dollars | 10,000 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
mkt | 0 | 20,168,803,447 | 100% | ||
limesoda | 0 | 54,764,878,137 | 24% | ||
nissla | 0 | 13,596,809,577 | 50% | ||
berndpfeiffer | 0 | 16,711,259,553 | 100% | ||
retroboy | 0 | 6,440,505,061 | 100% | ||
gamebot | 0 | 608,445,751 | 100% | ||
needforsteem | 0 | 532,124,807 | 100% |
Hey @mkt **Thanks for contributing on Utopian**. Weβre already looking forward to your next contribution! **Want to chat? Join us on Discord https://discord.gg/h52nFrV.** <a href='https://v2.steemconnect.com/sign/account-witness-vote?witness=utopian-io&approve=1'>Vote for Utopian Witness!</a>
post_id | 57,053,598 |
---|---|
author | utopian-io |
permlink | re-actifit-landingpage-and-wallet-view-20180719t133009z |
category | utopian-io |
json_metadata | {"app":"beem\/0.19.42"} |
created | 2018-07-19 13:30:12 |
last_update | 2018-07-19 13:30:12 |
depth | 1 |
children | 0 |
net_rshares | 0 |
last_payout | 2018-07-26 13:30:12 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 SBD |
curator_payout_value | 0.000 SBD |
pending_payout_value | 0.000 SBD |
promoted | 0.000 SBD |
body_length | 295 |
author_reputation | 152,913,012,544,965 |
root_title | "Actifit Landingpage and Wallet View" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 SBD |
percent_steem_dollars | 10,000 |