added 'recent entries' to meme-fodder
This commit is contained in:
parent
adfeea1232
commit
2a2dff47e0
4 changed files with 31 additions and 12 deletions
|
@ -89,11 +89,10 @@ socket.on('publish-failure', function(msg){
|
|||
});
|
||||
socket.on('publish-complete', function(msg){
|
||||
var publishResults = '<p>Your publish is complete!</p>';
|
||||
publishResults += '<p><strong>NOTE: the transaction still needs to be mined by the network before you can access it! This will take a few minutes. To view the transaction on the blockchain explorer click the Transaction ID link below.</strong></p>';
|
||||
publishResults += '<p><strong>NOTE: the blockchain will need a few minutes to process your amazing work. Please allow some time for your asset to appear in the entries below.</strong></p>';
|
||||
publishResults += '<p>Your meme has been published to <a target="_blank" href="/' + msg.name + '">spee.ch/' + msg.name + '</a></p>';
|
||||
publishResults += '<p>Here is a direct link to where your meme will be stored: <a target="_blank" href="/' + msg.name + '/' + msg.result.claim_id + '">spee.ch/' + msg.name + '/' + msg.result.claim_id + '</a></p>';
|
||||
publishResults += '<p>Your Transaction ID is: <a target="_blank" href="https://explorer.lbry.io/#!/transaction?id=' + msg.result.txid + '">' + msg.result.txid + '</a></p>';
|
||||
publishResults += '<p>Your Claim ID is: ' + msg.result.claim_id + '</p>';
|
||||
publishResults += '<p>Here is a link to the claim where your asset will be published: <a target="_blank" href="https://spee.ch/' + msg.name + '">spee.ch/' + msg.name + '</a></p>';
|
||||
publishResults += '<p>Here is a direct link to where your asset will be stored: <a target="_blank" href="https://spee.ch/' + msg.name + '/' + msg.result.claim_id + '">spee.ch/' + msg.name + '/' + msg.result.claim_id + '</a></p>';
|
||||
publishResults += '<p><a href="/">Reload to publish another asset</a></p>';
|
||||
publishResults += '<p><a href="/meme-fodder/play">Reload to publish another</a></p>';
|
||||
document.getElementById('publish-active-area').innerHTML = publishResults;
|
||||
});
|
|
@ -5,15 +5,24 @@ const logger = require('winston');
|
|||
module.exports = (app, ua, googleAnalyticsId) => {
|
||||
// route to fetch all free public claims
|
||||
app.get('/meme-fodder/play', ({ originalUrl }, res) => {
|
||||
// google analytics
|
||||
logger.debug(`GET request on ${originalUrl}`);
|
||||
res.status(200).render('memeFodder');
|
||||
// get and serve content
|
||||
showController
|
||||
.getAllClaims('meme-fodder-entry')
|
||||
.then(orderedFreePublicClaims => {
|
||||
res.status(200).render('memeFodder', { claims: orderedFreePublicClaims });
|
||||
})
|
||||
.catch(error => {
|
||||
errorHandlers.handleRequestError(error, res);
|
||||
});
|
||||
});
|
||||
// route to fetch all free public claims
|
||||
app.get('/:name/all', ({ originalUrl, params }, res) => {
|
||||
logger.debug(`GET request on ${originalUrl}`);
|
||||
// google analytics
|
||||
ua(googleAnalyticsId, { https: true }).event('Show Routes', '/name/all', `${params.name}/all`).send();
|
||||
// fetch all free public claims
|
||||
// get and serve content
|
||||
showController
|
||||
.getAllClaims(params.name)
|
||||
.then(orderedFreePublicClaims => {
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<h3>Congratulations, you found the /meme-fodder game! </h3>
|
||||
<p>Here's how it is played...</p>
|
||||
<p>Here's how it's played...</p>
|
||||
<p>(1) <i>/meme-fodder</i> will always use the winning public, free image published to <a href="lbry://meme-fodder">lbry://meme-fodder</a>. (meaning the most recent, highest bid). Want to put a different image on the chopping block? Go publish it!</p>
|
||||
<p>(2) Create a meme based on the current claim with the tool below. Think you got a winner? <a href="https://twitter.com/hashtag/LbryMemeFodder" target="_blank">Share it with the community</a> and see what they think!</p>
|
||||
</div>
|
||||
|
|
|
@ -1,13 +1,24 @@
|
|||
<div class="col-md-12">
|
||||
<div class="card" id="publish">
|
||||
<div class="card-title card-block grey lighten-1 white-text">
|
||||
<h2>Recent Publishes</h2>
|
||||
<h2>Recent Entries</h2>
|
||||
</div>
|
||||
<div class="card-block" id="publish-active-area">
|
||||
<div class="row">
|
||||
<p>Below are some of the most recent entries published via /meme-fodder</p>
|
||||
(pull all the claims published to 'lbryMemeFodder' and display most recent 20 here)
|
||||
(maybe a voting system? Is there a way to allow people to donate funds to a claimId so that it will show up higher in the results?)
|
||||
<div class="col-md-12">
|
||||
<p>Below are some of the most recent entries published via /meme-fodder</p>
|
||||
(pull all the claims published to 'lbryMemeFodder' and display most recent 20 here)
|
||||
(maybe a voting system? Is there a way to allow people to donate funds to a claimId so that it will show up higher in the results?)
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
{{#each claims}}
|
||||
<div class="col-md-3">
|
||||
<a href="/{{this.name}}/{{this.claim_id}}">
|
||||
<img class="all-claims-img" src="/{{this.name}}/{{this.claim_id}}" /></a>
|
||||
</div>
|
||||
<hr>
|
||||
{{/each}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
Loading…
Reference in a new issue