From 0af0ffb2da1c36917c18a13e9ec53d912dcc9e61 Mon Sep 17 00:00:00 2001 From: bill bittner Date: Thu, 22 Jun 2017 00:16:51 -0700 Subject: [PATCH] updated meme-fodder selection rules --- public/assets/js/claimPublish.js | 3 +-- public/assets/js/memeDraw.js | 16 ++++++++++++++-- public/assets/js/memePublish.js | 3 +-- views/partials/memeFodderMaker.handlebars | 5 ++--- views/partials/memeFodderResults.handlebars | 5 ++--- 5 files changed, 20 insertions(+), 12 deletions(-) diff --git a/public/assets/js/claimPublish.js b/public/assets/js/claimPublish.js index c1981ddd..8d329507 100644 --- a/public/assets/js/claimPublish.js +++ b/public/assets/js/claimPublish.js @@ -137,8 +137,7 @@ socket.on('publish-complete', function(msg){ var publishResults; var directUrl = '/' + msg.name + '/' + msg.result.claim_id; // build new publish area - publishResults = '

Your publish is complete! Go ahead, share it with the world!

'; - publishResults += '

Check it out, here: view it here!

'; + publishResults = '

Your publish is complete! View it here!

'; publishResults += '

View the transaction details

'; publishResults += '

'; // update publish area diff --git a/public/assets/js/memeDraw.js b/public/assets/js/memeDraw.js index db1cf2c5..dbfb4f31 100644 --- a/public/assets/js/memeDraw.js +++ b/public/assets/js/memeDraw.js @@ -22,6 +22,18 @@ img.onload = function() { drawMeme() } +function newCanvas(image){ + // hide start image + img = image; + // get dimensions of the start img + canvasHeight = canvasWidth * (img.height / img.width); + // size the canvas + canvas.width = canvasWidth; + canvas.height = canvasHeight; + // draw the meme + drawMeme() +} + // if the text changes, re-draw the meme topText.addEventListener('keyup', drawMeme); bottomText.addEventListener('keyup', drawMeme); @@ -40,14 +52,14 @@ function drawMeme() { var text1 = topText.value; text1 = text1.toUpperCase(); x = canvasWidth / 2; - y = 0; + y = 5; wrapText(ctx, text1, x, y, canvasWidth, fontSize, false); ctx.textBaseline = 'bottom'; var text2 = bottomText.value; text2 = text2.toUpperCase(); - y = canvasHeight; + y = canvasHeight - 5; wrapText(ctx, text2, x, y, canvasHeight, fontSize, true); diff --git a/public/assets/js/memePublish.js b/public/assets/js/memePublish.js index cf7998cc..452d616c 100644 --- a/public/assets/js/memePublish.js +++ b/public/assets/js/memePublish.js @@ -116,8 +116,7 @@ socket.on('publish-complete', function(msg){ var publishResults; var directUrl = '/' + msg.name + '/' + msg.result.claim_id; // build new publish area - publishResults = '

Your publish is complete! Go ahead, share it with the world!

'; - publishResults += '

Check it out, here: view it here!

'; + publishResults = '

Your publish is complete! View it here!

'; publishResults += '

View the transaction details

'; publishResults += '

'; // update publish area diff --git a/views/partials/memeFodderMaker.handlebars b/views/partials/memeFodderMaker.handlebars index 35aca513..2828fd1a 100644 --- a/views/partials/memeFodderMaker.handlebars +++ b/views/partials/memeFodderMaker.handlebars @@ -7,9 +7,8 @@

Congratulations, you found the /meme-fodder game

-

Here's how it's played...

-

Create a meme based on the current lbry://meme-fodder claim using the tools below. Got a masterpiece? Share it with the community and see what they think!

-

Spee.ch/meme-fodder/play will always use the public, free image that owns the claim lbry://meme-fodder. Want to put a different image on the chopping block? Go publish it!

+

Create a meme based on the current lbry://meme-fodder claims using the tool below. Got a masterpiece? Share it with the community and see what they think!

+

Spee.ch/meme-fodder/play uses the free, public images at the claim lbry://meme-fodder. Want to put a different image on the chopping block? Go publish it!

diff --git a/views/partials/memeFodderResults.handlebars b/views/partials/memeFodderResults.handlebars index b611a31a..70c41190 100644 --- a/views/partials/memeFodderResults.handlebars +++ b/views/partials/memeFodderResults.handlebars @@ -6,14 +6,13 @@
-

Below are some of the most recent images that have been fuel for our enjoyment on /meme-fodder

+

Below are the images published to /meme-fodder. Click one to choose it as your canvas.

{{#each claims}}
- - +

{{/each}}