From 3d4e31f2e1418f74db54a27c66fe2f433f8ef412 Mon Sep 17 00:00:00 2001 From: bill bittner Date: Fri, 29 Sep 2017 11:59:53 -0700 Subject: [PATCH 001/151] basic styling for about --- public/assets/css/BEM.css | 144 ++++++++---------- public/assets/css/componentStyle.css | 15 +- public/assets/css/mediaQueries.css | 10 -- views/about.handlebars | 42 +++-- views/channel.handlebars | 17 +-- views/fourOhFour.handlebars | 3 +- views/index.handlebars | 11 +- views/login.handlebars | 5 +- views/new.handlebars | 4 +- views/noChannel.handlebars | 3 +- views/noClaims.handlebars | 3 +- views/partials/channelCreationForm.handlebars | 4 +- views/partials/channelLoginForm.handlebars | 4 +- views/partials/contribute.handlebars | 8 - views/partials/documentation.handlebars | 36 ----- views/partials/examples.handlebars | 17 --- views/partials/footer.handlebars | 3 - views/partials/learnMore.handlebars | 3 - views/partials/publishForm-Channel.handlebars | 2 +- views/partials/publishForm-Details.handlebars | 8 +- views/partials/publishForm-Url.handlebars | 6 +- views/partials/topBar.handlebars | 34 ++--- views/partials/whatIsSpeech.handlebars | 5 - views/show.handlebars | 6 +- views/statistics.handlebars | 3 +- views/trending.handlebars | 4 +- 26 files changed, 147 insertions(+), 253 deletions(-) delete mode 100644 views/partials/contribute.handlebars delete mode 100644 views/partials/documentation.handlebars delete mode 100644 views/partials/examples.handlebars delete mode 100644 views/partials/footer.handlebars delete mode 100644 views/partials/learnMore.handlebars delete mode 100644 views/partials/whatIsSpeech.handlebars diff --git a/public/assets/css/BEM.css b/public/assets/css/BEM.css index dfa8262e..9960c939 100644 --- a/public/assets/css/BEM.css +++ b/public/assets/css/BEM.css @@ -5,7 +5,8 @@ /* TEXT */ body, button, input, textarea, label, select, option { - font-family: serif; + font-family: monospace; + font-size: large; } p { @@ -21,6 +22,10 @@ p { padding:0px; } +.block-quote { + font-size: 4rem; +} + /* HEADERS */ h1 { @@ -37,6 +42,8 @@ h2 { h3 { color: black;; + font-weight: normal; + font-size: 1rem; } .h3--secondary { @@ -49,31 +56,6 @@ h4 { /* CONTAINERS */ -.wrapper { - margin-left: 20%; - width:60%; -} - -.full { - clear: both; -} - -.main { - float: left; - width: 65%; - -} - -.panel { - overflow: auto; - word-wrap: break-word; -} - -.sidebar { - float: right; - width: 33%; -} - footer { display: inline-block; width: 100%; @@ -89,23 +71,8 @@ footer { /* COLUMNS AND ROWS */ -.col-left, .col-right { - overflow: auto; - margin: 0px; - width: 48%; -} - -.col-left { - padding: 5px 10px 5px 0px; - float: left; -} - -.col-right { - padding: 5px 0px 5px 10px; - float: right; -} - .row { + clear: both; padding: 1em 2% 1em 2%; margin: 0px; @@ -121,16 +88,6 @@ footer { padding-bottom: 0.5em; } -.top-bar { - margin: 2em 0px 2px 0px; - padding: 0px 0px 2px 0px; - border-bottom: 1px lightgrey solid; - overflow: auto; - text-align: right; - vertical-align: text-bottom; -} - - .column { display: inline-block; padding: 0px; @@ -138,51 +95,88 @@ footer { } .column--1 { - width: 8%; + width: 10%; } .column--2 { - width: 16%; + width: 20%; } .column--3 { - width: 24%; + width: 30%; } .column--4 { - width: 32%; -} - -.column--5 { width: 40%; } +.column--5 { + width: 50%; +} + .column--6 { - width: 48%; + width: 60%; } .column--7 { - width: 56%; + width: 70%; } .column--8 { - width: 64%; -} - -.column--9 { - width: 72%; -} - -.column--10 { width: 80%; } -.column--11 { - width: 88%; +.column--9 { + width: 90%; } -.column--12 { - width: 96%; +.column--10 { + width: 100%; +} + +/* ALIGNMENT */ +.align-content-left { + text-align: left; +} + +.align-content-center { + text-align: center; +} + +.align-content-right { + text-align: right; +} + +.align-content-top { + vertical-align: top; +} + +.align-content-right { + vertical-align: bottom; +} + +/* TOP BAR */ + +.nav-bar { + border-bottom: 2px solid #eaeaea; +} + +.nav-bar-logo, .nav-bar-title, .nav-bar-link { + display: inline-block; +} + +.nav-bar-title { + font-size: 1.5em; + color: black; +} + +.nav-bar-title--superscript { + font-size: small; + vertical-align: top; +} + +.nav-bar-link { + padding: 1em 0.5em 1em 0.5em; } /* LINKS */ @@ -263,10 +257,6 @@ table { /* other */ -.stop-float { - clear: both; -} - .toggle-link { float: right; } diff --git a/public/assets/css/componentStyle.css b/public/assets/css/componentStyle.css index 9c043422..1e1604fd 100644 --- a/public/assets/css/componentStyle.css +++ b/public/assets/css/componentStyle.css @@ -5,24 +5,11 @@ } #logo { - height: 1.5em; + } #title { - margin: 2px 5px 2px 5px; -} -.top-bar-left { - float: left; -} - -.top-bar-tagline { - font-style: italic; - color: grey; -} - -.top-bar-right { - margin-left: 0.5em; } /* publish */ diff --git a/public/assets/css/mediaQueries.css b/public/assets/css/mediaQueries.css index 6a36df91..07f262fb 100644 --- a/public/assets/css/mediaQueries.css +++ b/public/assets/css/mediaQueries.css @@ -1,15 +1,5 @@ -@media (max-width: 1250px) { - .wrapper { - margin-left: 10%; - width:80%; - } -} @media (max-width: 1000px) { - .wrapper { - margin-left: 10%; - width:80%; - } .main { float: none; diff --git a/views/about.handlebars b/views/about.handlebars index 9600c2f0..907b5ff1 100644 --- a/views/about.handlebars +++ b/views/about.handlebars @@ -1,17 +1,31 @@ -
{{> topBar}} -
-

About Spee.ch

-

Spee.ch is a single-serving site that reads and publishes images to and from the LBRY blockchain.

-

Spee.ch is an image hosting service, but with the added benefit that it stores your images on a decentralized network of computers -- the LBRY network. This means that your images are stored in multiple locations without a single point of failure.

- {{> examples}} - {{> documentation}} - {{> bugs}} -
- - {{> footer}} -
+
+
+
+ Open-source, decentralized image and video hosting +
+
+

+ GITHUB +

+

+ SLACK CHANNEL +

+

+ DOCUMENTATION +

+
+
+
+

Spee.ch is a media-hosting site that reads and publishes content from the LBRY blockchain.

+

Spee.ch is a hosting service, but with the added benefit that it stores your content on a decentralized network of computers -- the LBRY network. This means that your images are stored in multiple locations without a single point of failure.

+

[Contribute]

+

Spee.ch is an open source project. Please contribute to the existing site, or fork it and make your own!

+

If you have an idea for your own spee.ch-like site on top of LBRY, fork our github repo and go to town!

+

If you want to improve spee.ch, join our slack channel or solve one of our github issues.

+
+
+
+ \ No newline at end of file diff --git a/views/channel.handlebars b/views/channel.handlebars index 9434af0c..0effe7c2 100644 --- a/views/channel.handlebars +++ b/views/channel.handlebars @@ -1,11 +1,8 @@ -
- {{> topBar}} -
-

{{this.channelName}}:{{this.longChannelId}}

-

Below is all the free content in this channel.

- {{#each this.claims}} - {{> contentListItem}} - {{/each}} -
- {{> footer}} +{{> topBar}} +
+

{{this.channelName}}:{{this.longChannelId}}

+

Below is all the free content in this channel.

+ {{#each this.claims}} + {{> contentListItem}} + {{/each}}
diff --git a/views/fourOhFour.handlebars b/views/fourOhFour.handlebars index cc91ea9f..b3b88595 100644 --- a/views/fourOhFour.handlebars +++ b/views/fourOhFour.handlebars @@ -1,7 +1,6 @@ -
+ {{> topBar}}

404: Not Found

That page does not exist. Return home.

-
\ No newline at end of file diff --git a/views/index.handlebars b/views/index.handlebars index 1e1bc2e1..cc1ed490 100644 --- a/views/index.handlebars +++ b/views/index.handlebars @@ -1,14 +1,7 @@ -
-
-
- {{> topBar}} - {{> publishForm}} - {{> learnMore}} - {{> footer}} -
-
+{{> topBar}} +{{> publishForm}} diff --git a/views/login.handlebars b/views/login.handlebars index 7309d518..0fcb108f 100644 --- a/views/login.handlebars +++ b/views/login.handlebars @@ -1,4 +1,4 @@ -
+ {{> topBar}}

Log In

@@ -15,8 +15,7 @@ {{>channelCreationForm}}
- {{> footer}} -
+ diff --git a/views/new.handlebars b/views/new.handlebars index 8b6cbbfb..4e09d809 100644 --- a/views/new.handlebars +++ b/views/new.handlebars @@ -1,4 +1,4 @@ -
+ {{> topBar}}

New on Spee.ch

@@ -22,5 +22,3 @@
{{/each}}
- {{> footer}} - \ No newline at end of file diff --git a/views/noChannel.handlebars b/views/noChannel.handlebars index 585c0298..3b68d168 100644 --- a/views/noChannel.handlebars +++ b/views/noChannel.handlebars @@ -1,8 +1,7 @@ -
+ {{> topBar}}

No Claims

There are no free assets on this channel.

If you think this message is an error, contact us in the LBRY slack!

-
\ No newline at end of file diff --git a/views/noClaims.handlebars b/views/noClaims.handlebars index 9e918fa8..e1f01bda 100644 --- a/views/noClaims.handlebars +++ b/views/noClaims.handlebars @@ -1,8 +1,7 @@ -
+ {{> topBar}}

No Claims

There are no free assets at that claim. You should publish one at spee.ch.

NOTE: it is possible your claim was published, but it is still being processed by the blockchain

-
\ No newline at end of file diff --git a/views/partials/channelCreationForm.handlebars b/views/partials/channelCreationForm.handlebars index 743aa534..ee15381a 100644 --- a/views/partials/channelCreationForm.handlebars +++ b/views/partials/channelCreationForm.handlebars @@ -4,7 +4,7 @@
-
+
@ @@ -16,7 +16,7 @@
-
+
diff --git a/views/partials/channelLoginForm.handlebars b/views/partials/channelLoginForm.handlebars index 8aa0e06f..9383dfc0 100644 --- a/views/partials/channelLoginForm.handlebars +++ b/views/partials/channelLoginForm.handlebars @@ -4,7 +4,7 @@
-
+
@ @@ -15,7 +15,7 @@
-
+
diff --git a/views/partials/contribute.handlebars b/views/partials/contribute.handlebars deleted file mode 100644 index b2245524..00000000 --- a/views/partials/contribute.handlebars +++ /dev/null @@ -1,8 +0,0 @@ -
-

Contribute - -

-

Spee.ch is an open source project. Please contribute to the existing site, or fork it and make your own!

-

If you have an idea for your own spee.ch-like site on top of LBRY, fork our github repo and go to town!

-

If you want to improve spee.ch, join our slack channel or solve one of our github issues.

-
diff --git a/views/partials/documentation.handlebars b/views/partials/documentation.handlebars deleted file mode 100644 index 90982856..00000000 --- a/views/partials/documentation.handlebars +++ /dev/null @@ -1,36 +0,0 @@ -
-

Documentation - [ + ] -

- -
\ No newline at end of file diff --git a/views/partials/examples.handlebars b/views/partials/examples.handlebars deleted file mode 100644 index a583aaf0..00000000 --- a/views/partials/examples.handlebars +++ /dev/null @@ -1,17 +0,0 @@ -
-

Examples - [ + ] -

- -
\ No newline at end of file diff --git a/views/partials/footer.handlebars b/views/partials/footer.handlebars deleted file mode 100644 index c4b66085..00000000 --- a/views/partials/footer.handlebars +++ /dev/null @@ -1,3 +0,0 @@ -
-

thanks for visiting spee.ch

-
\ No newline at end of file diff --git a/views/partials/learnMore.handlebars b/views/partials/learnMore.handlebars deleted file mode 100644 index 61d645e0..00000000 --- a/views/partials/learnMore.handlebars +++ /dev/null @@ -1,3 +0,0 @@ -
-

Spee.ch is an open-source project. You should contribute on github, or fork it and make your own!

-
\ No newline at end of file diff --git a/views/partials/publishForm-Channel.handlebars b/views/partials/publishForm-Channel.handlebars index d8e7a01e..ff4d2005 100644 --- a/views/partials/publishForm-Channel.handlebars +++ b/views/partials/publishForm-Channel.handlebars @@ -2,7 +2,7 @@
-
+
@@ -13,7 +13,7 @@
-
+
@@ -22,7 +22,7 @@
-
+
diff --git a/views/partials/publishForm-Url.handlebars b/views/partials/publishForm-Url.handlebars index ccaa1c27..58197ba2 100644 --- a/views/partials/publishForm-Url.handlebars +++ b/views/partials/publishForm-Url.handlebars @@ -1,13 +1,15 @@
+
-
+ +
Spee.ch/{{#if user}}{{user.channelName}}:{{user.shortChannelId}}/{{/if}}
-
+
\ No newline at end of file diff --git a/views/partials/topBar.handlebars b/views/partials/topBar.handlebars index 05eb6c2d..e4564a2d 100644 --- a/views/partials/topBar.handlebars +++ b/views/partials/topBar.handlebars @@ -1,20 +1,20 @@ -
- -

Spee.ch

(beta) - popular - source - help - - {{#if user}} - - {{else}} - login - {{/if}} -
Open-source, decentralized image and video hosting.
+ diff --git a/views/partials/channelCreationForm.handlebars b/views/partials/channelCreationForm.handlebars index ee15381a..3ce651a3 100644 --- a/views/partials/channelCreationForm.handlebars +++ b/views/partials/channelCreationForm.handlebars @@ -1,10 +1,9 @@
- -
- -
-
+
+
+ +
@ @@ -12,13 +11,14 @@
- -
-
-
-
- +
+
+ +
+
+ +
diff --git a/views/partials/channelLoginForm.handlebars b/views/partials/channelLoginForm.handlebars index 9383dfc0..8418b36a 100644 --- a/views/partials/channelLoginForm.handlebars +++ b/views/partials/channelLoginForm.handlebars @@ -1,28 +1,28 @@ - -
- -
-
-
-
- @ - +
+
+ +
+
+
+ @ + +
- -
- +
+
+ +
+ +
-
- +
+
- -
- -
+ {{> topBar}} -{{> publishForm}} +
+
+
+

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

+ +
+
+ +
+
+
+
+
+
+ {{> publishForm-Channel}} + {{> publishForm-Url}} + {{> publishForm-Details}} + {{> publishForm-Submit}} +
+
+ -- 2.45.3 From f3fbc2068b3b9ee3d19754691f398f93e760c00d Mon Sep 17 00:00:00 2001 From: bill bittner Date: Fri, 29 Sep 2017 15:56:13 -0700 Subject: [PATCH 005/151] first pass at publish and show pages --- public/assets/css/_componentStyle.css | 12 +- public/assets/css/general.css | 12 +- public/assets/css/publish.css | 23 ++- public/assets/js/publishFileFunctions.js | 94 ----------- views/index.handlebars | 114 +++++++------ views/partials/asset.handlebars | 42 +++-- views/partials/assetInfo.handlebars | 165 +++++++++++-------- views/partials/publishForm-Submit.handlebars | 85 +++++++++- views/show.handlebars | 30 +--- 9 files changed, 292 insertions(+), 285 deletions(-) diff --git a/public/assets/css/_componentStyle.css b/public/assets/css/_componentStyle.css index 1e1604fd..3cacbf44 100644 --- a/public/assets/css/_componentStyle.css +++ b/public/assets/css/_componentStyle.css @@ -13,17 +13,9 @@ } /* publish */ -#drop-zone { - border: 1px dashed lightgrey; - padding: 1em; - height: 13em; - background: #F5F0EF; -} -#asset-preview-holder { - width: 100%; - margin-bottom: 1em; -} + + /* show routes */ .show-asset { diff --git a/public/assets/css/general.css b/public/assets/css/general.css index e4546438..0eeac677 100644 --- a/public/assets/css/general.css +++ b/public/assets/css/general.css @@ -36,10 +36,6 @@ h1 { h2 { font-size: x-large; - margin-top: 1em; - border-top: 1px #999 solid; - background-color: lightgray; - padding: 6px; } h3 { @@ -173,6 +169,14 @@ input:-webkit-autofill { border: 1px solid grey; } +.input-disabled { + border: 1px solid black; + padding: 0.5em; + margin: 0.5em 0.3em 0.5em 0.3em; + color: black; + background-color: white; +} + /* BUTTONS */ button { diff --git a/public/assets/css/publish.css b/public/assets/css/publish.css index 33888827..5cd2e281 100644 --- a/public/assets/css/publish.css +++ b/public/assets/css/publish.css @@ -1,14 +1,25 @@ /* Publish Form */ -/* blocks */ -.publish { - -} - -/* elements */ .publish-dropzone { border: 1px dashed lightgrey; padding: 1em; height: 13em; background: #F5F0EF; +} + +.asset-preview { + display: block; + width: 100%; +} + + +/* Show page */ + +.asset-display { + display: block; + width: 100%; +} + +.copy-input { + } \ No newline at end of file diff --git a/public/assets/js/publishFileFunctions.js b/public/assets/js/publishFileFunctions.js index c535d1a6..e69de29b 100644 --- a/public/assets/js/publishFileFunctions.js +++ b/public/assets/js/publishFileFunctions.js @@ -1,94 +0,0 @@ -/* drop zone functions */ - -function drop_handler(ev) { - ev.preventDefault(); - // if dropped items aren't files, reject them - var dt = ev.dataTransfer; - if (dt.items) { - if (dt.items[0].kind == 'file') { - var droppedFile = dt.items[0].getAsFile(); - previewAndStageFile(droppedFile); - } - } -} - -function dragover_handler(ev) { - ev.preventDefault(); -} - -function dragend_handler(ev) { - var dt = ev.dataTransfer; - if (dt.items) { - for (var i = 0; i < dt.items.length; i++) { - dt.items.remove(i); - } - } else { - ev.dataTransfer.clearData(); - } -} - -/* publish functions */ - -// update the publish status -function updatePublishStatus(msg){ - document.getElementById('publish-status').innerHTML = msg; -} - -// When a file is selected for publish, validate that file and -// stage it so it will be ready when the publish button is clicked. -function previewAndStageFile(selectedFile){ - var previewHolder = document.getElementById('asset-preview-holder'); - var dropzone = document.getElementById('drop-zone'); - var previewReader = new FileReader(); - var nameInput = document.getElementById('claim-name-input'); - // validate the file's name, type, and size - try { - validateFile(selectedFile); - } catch (error) { - showError('input-error-file-selection', error.message); - return; - } - // set the image preview, if an image was provided - if (selectedFile.type !== 'video/mp4') { - previewReader.readAsDataURL(selectedFile); - previewReader.onloadend = function () { - dropzone.style.display = 'none'; - previewHolder.style.display = 'block'; - previewHolder.innerHTML = 'image preview'; - }; - } - // set the name input value to the image name if none is set yet - if (nameInput.value === "") { - var filename = selectedFile.name.substring(0, selectedFile.name.indexOf('.')) - nameInput.value = cleanseClaimName(filename); - checkClaimName(nameInput.value); - } - // store the selected file for upload - stagedFiles = [selectedFile]; -} - -// Validate the publish submission and then trigger publishing. -function publishSelectedImage(event) { - var claimName = document.getElementById('claim-name-input').value; - var channelName = document.getElementById('channel-name-select').value; - // prevent default so this script can handle submission - event.preventDefault(); - // validate, submit, and handle response - validateFilePublishSubmission(stagedFiles, claimName, channelName) - .then(() => { - uploader.submitFiles(stagedFiles); - }) - .catch(error => { - if (error.name === 'FileError') { - showError(document.getElementById('input-error-file-selection'), error.message); - } else if (error.name === 'NameError') { - showError(document.getElementById('input-error-claim-name'), error.message); - } else if (error.name === 'ChannelNameError'){ - console.log(error); - showError(document.getElementById('input-error-channel-select'), error.message); - } else { - showError(document.getElementById('input-error-publish-submit'), error.message); - } - return; - }) -}; \ No newline at end of file diff --git a/views/index.handlebars b/views/index.handlebars index 67558102..f4efe359 100644 --- a/views/index.handlebars +++ b/views/index.handlebars @@ -1,24 +1,25 @@ {{> topBar}} -
-
-
-

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

- -
-
- -
+
+
+

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

+ +
-
-
-
- {{> publishForm-Channel}} - {{> publishForm-Url}} - {{> publishForm-Details}} - {{> publishForm-Submit}} + @@ -26,35 +27,39 @@ - diff --git a/views/partials/asset.handlebars b/views/partials/asset.handlebars index a963b07d..3b903df2 100644 --- a/views/partials/asset.handlebars +++ b/views/partials/asset.handlebars @@ -1,23 +1,19 @@ - \ No newline at end of file + +{{#ifConditional fileInfo.fileType '===' 'video/mp4'}} + {{#ifConditional fileInfo.fileExt '===' 'gifv'}} + + {{else}} + + {{/ifConditional}} +{{else}} + +{{/ifConditional}} + \ No newline at end of file diff --git a/views/partials/assetInfo.handlebars b/views/partials/assetInfo.handlebars index b485bc69..1529907a 100644 --- a/views/partials/assetInfo.handlebars +++ b/views/partials/assetInfo.handlebars @@ -1,76 +1,99 @@ -

Title

-

{{fileInfo.title}} -

-