From ea4669b29081b3c6a9809cda310d0e0e107e8c9e Mon Sep 17 00:00:00 2001 From: bill bittner Date: Fri, 9 Jun 2017 20:39:07 -0700 Subject: [PATCH 1/2] added drag and drop file selection --- public/assets/css/style.css | 11 ++++ views/index.handlebars | 85 +++++++++++++++++++++++-------- views/partials/publish.handlebars | 44 +++++++++------- 3 files changed, 99 insertions(+), 41 deletions(-) diff --git a/public/assets/css/style.css b/public/assets/css/style.css index 88ef37b6..dcf255b5 100644 --- a/public/assets/css/style.css +++ b/public/assets/css/style.css @@ -1,3 +1,14 @@ +#drop-zone { + border: 1px dashed lightgrey; + padding: 1em; + height: 200px; + width: 300px; +} + .all-claims-img { height: 200px; +} + +#image-preview { + display: none; } \ No newline at end of file diff --git a/views/index.handlebars b/views/index.handlebars index 3d829ea5..2f7fd6c4 100644 --- a/views/index.handlebars +++ b/views/index.handlebars @@ -5,16 +5,20 @@ {{> publish}} {{> links}} {{> documentation}} -{{> bugs}} {{> contribute}} +{{> bugs}} diff --git a/views/partials/publish.handlebars b/views/partials/publish.handlebars index d7385282..bd20d227 100644 --- a/views/partials/publish.handlebars +++ b/views/partials/publish.handlebars @@ -1,22 +1,28 @@

Publish Your Own

-
- -
- Image preview... -
- Name: -
- License: -
- NSFW: -

By clicking 'Publish' I attest that I have read and agree to the LBRY terms of service.

- -
+
+
+
+

Drag and drop your file here, or choose your file below.

+ + +
+ Image preview... +
+ Name: +
+ License: +
+ NSFW: +

By clicking 'Publish' I attest that I have read and agree to the LBRY terms of service.

+ + +
+
\ No newline at end of file -- 2.45.2 From 7b85197c405297bfaa6498a694e45523e3542adb Mon Sep 17 00:00:00 2001 From: bill bittner Date: Fri, 9 Jun 2017 20:46:19 -0700 Subject: [PATCH 2/2] fixed disapearing publish header --- views/index.handlebars | 10 ++++------ views/partials/documentation.handlebars | 4 ++-- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/views/index.handlebars b/views/index.handlebars index 2f7fd6c4..4f9ce3b0 100644 --- a/views/index.handlebars +++ b/views/index.handlebars @@ -23,9 +23,7 @@ var adder = 1; function addOne(){ var bars = '

|'; - for (var i = 0; i < x; i++){ - bars += ' | '; - } + for (var i = 0; i < x; i++){ bars += ' | '; } bars += '

'; element.innerHTML = bars; if (x === size){ @@ -112,7 +110,7 @@ event.file.meta.license = license; event.file.meta.nsfw = nsfw; // re-set the html in the publish area - document.getElementById('publish').innerHTML = '
'; + document.getElementById('publish-active-area').innerHTML = '
'; // start a progress animation createProgressBar(document.getElementById('progress-bar'), 12); }); @@ -126,7 +124,7 @@ updatePublishStatus(msg); }); socket.on('publish-failure', function(msg){ - document.getElementById('publish').innerHTML = '

' + msg + '

--(✖╭╮✖)→

'; + document.getElementById('publish-active-area').innerHTML = '

' + msg + '

--(✖╭╮✖)→

'; }); socket.on('publish-complete', function(msg){ var publishResults = '

Your publish is complete!

'; @@ -136,6 +134,6 @@ publishResults += '

Here is a direct link to your asset: spee.ch/' + msg.name + '/' + msg.result.claim_id + '

'; publishResults += '

NOTE: the transaction still needs to be mined by the network before you can access it! This may take a few minutes. To to view the transaction on the blockchain explorer click the Transaction ID link above.

'; publishResults += '

Reload to publish another asset

'; - document.getElementById('publish').innerHTML = publishResults; + document.getElementById('publish-active-area').innerHTML = publishResults; }); diff --git a/views/partials/documentation.handlebars b/views/partials/documentation.handlebars index 75291fd2..c8074f65 100644 --- a/views/partials/documentation.handlebars +++ b/views/partials/documentation.handlebars @@ -2,7 +2,7 @@

Documentation

Site Navigation

API

Note: these are being used for testing durring spee.ch development and may not be maintained

-