This PR adds 15% beneficiaries for , a http to https redirection and some general improvements listed below. A few tiny bugs have been fixed too, but they are way too small for an extra contribution :)
https://github.com/knacksteem/knacksteem.org
https://github.com/knacksteem/knacksteem.org/pull/15
https://github.com/knacksteem/knacksteem.org/pull/16
https://github.com/knacksteem/knacksteem.org/pull/18
https://github.com/knacksteem/knacksteem.org/pull/20
https://github.com/knacksteem/knacksteem.org/pull/23
"Do you have any talent? If yes! then KnackSteem is for you."
"Rewards people with talents, it can be any talent, anything you know how to do best is highly welcome on the platform."
http > https redirection for the express server.Most changes should be self explanatory, here are additional details about some specific tasks:
15% of the author reward goes to , the code to post new articles is a bit more complex now. The
extensions array includes the settings for beneficiaries:
//post with beneficiaries
const operations = [
['comment',
{
parent_author: '',
parent_permlink: tags[0],
author: store.user.username,
permlink: newPermLink,
title: title,
body: body,
json_metadata: JSON.stringify({
tags: tags
})
}
],
['comment_options', {
author: store.user.username,
permlink: newPermLink,
max_accepted_payout: '100000.000 SBD',
percent_steem_dollars: 50,
allow_votes: true,
allow_curation_rewards: true,
extensions: [
[0, {
beneficiaries: [{account: 'knacksteem.org', weight: 1500}]
}]
]
}]
];
await SteemConnect.broadcast(operations);
(actions/articles.js)
Side Note: In order to post articles with beneficiaries, you need to add the comment_options scope to your SteemConnect login.
Automatic redirection is done with the express middleware express-http-to-https, excluding redirection on localhost:
app.use(redirectToHTTPS([/localhost:(\d{4})/], [], 301));
(server.js)
nginx would be a better solution for this (and for static resources) - So if someone wants to contribute...or i may just do it by myself later.
The inline styles have been moved to CSS files, and the bug that leads to larger cover images is gone - see screenshots.
coverImage {
width: 280px;
float: left;
margin-right: 20px;
}
.coverImage img {
width: 100%;
height: auto;
}
(components/ArticleListItem/index.css)
My GitHub Account: https://github.com/ateufel