diff --git a/public/assets/css/allStyle.css b/public/assets/css/allStyle.css index ea3d6427..a1e4da2b 100644 --- a/public/assets/css/allStyle.css +++ b/public/assets/css/allStyle.css @@ -84,13 +84,12 @@ h4 { text-align: center; } -.code { - font-family: monospace; - color: darkgrey; - word-wrap: break-word; +/* other */ + +input { + padding: 0.3em; } -/* other */ table { width: 100%; text-align: left; diff --git a/public/assets/css/componentStyle.css b/public/assets/css/componentStyle.css index a371417a..ef8a795b 100644 --- a/public/assets/css/componentStyle.css +++ b/public/assets/css/componentStyle.css @@ -12,17 +12,44 @@ margin: 2px 5px 2px 5px; } +/* learn more */ +.learn-more { + text-align: center; + margin-top: 2px; + padding-top: 2px; + border-top: 1px lightgrey solid; +} + /* examples */ .example { - display: inline-block; + clear: both; width: 100%; margin-bottom: 15px; + overflow: auto; +} + +.example-image, .example-code { + float: left; + margin: 5px 15px 5px 0px; } .example-image { - float: left; width: 20%; - margin: 5px 15px 5px 0px; +} + +.example-code { + padding: 2em; + width: 60%; + background-color: lightgrey; + font-family: monospace; + color: #666; + word-wrap: break-word; +} + +/* contribute */ +#github-logo { + float: right; + height: 1em; } /* all claims */ @@ -40,6 +67,12 @@ margin: 5px 30px 5px 0px; } +.all-claims-details { + word-wrap: break-word; + list-style: none; + list-style-type: none; +} + /* publish */ #drop-zone { border: 1px dashed lightgrey; @@ -72,3 +105,22 @@ canvas { font-weight: bold; } +@media (max-width: 750px) { + + .all-claims-img { + width:30%; + } + + .all-claims-details { + font-size: small; + } + +} + +@media (max-width: 475px) { + + .all-claims-img { + width:50%; + } + +} diff --git a/public/assets/img/GitHub-Mark-32px.png b/public/assets/img/GitHub-Mark-32px.png new file mode 100644 index 00000000..8b25551a Binary files /dev/null and b/public/assets/img/GitHub-Mark-32px.png differ diff --git a/public/assets/img/GitHub-Mark-64px.png b/public/assets/img/GitHub-Mark-64px.png new file mode 100644 index 00000000..182a1a3f Binary files /dev/null and b/public/assets/img/GitHub-Mark-64px.png differ diff --git a/public/assets/js/claimPublish.js b/public/assets/js/claimPublish.js index eae7e5c3..70d90dc6 100644 --- a/public/assets/js/claimPublish.js +++ b/public/assets/js/claimPublish.js @@ -82,10 +82,10 @@ function dragend_handler(ev) { document.getElementById('publish-submit').addEventListener('click', function(event){ event.preventDefault(); var name = document.getElementById('publish-name').value; - var invalidCharacters = /[^\w,-]/.exec(name); + var invalidCharacters = /[^A-Za-z0-9,-]/.exec(name); // validate 'name' if (invalidCharacters) { - alert(invalidCharacters + ' is not allowed. A-Z, a-z, 0-9, "_" and "-" only.'); + alert(invalidCharacters + ' is not allowed. A-Z, a-z, 0-9, and "-" only.'); return; } else if (name.length < 1) { alert("You must enter a name for your claim"); diff --git a/public/assets/js/memePublish.js b/public/assets/js/memePublish.js index e2f4798a..aeb249d9 100644 --- a/public/assets/js/memePublish.js +++ b/public/assets/js/memePublish.js @@ -58,7 +58,7 @@ function createProgressBar(element, size){ function stageAndPublish(file) { var name = nameInput.value; - var invalidCharacters = /[^\w,-]/.exec(name); + var invalidCharacters = /[^A-Za-z0-9,-]/.exec(name); // validate 'name' if (invalidCharacters) { alert(invalidCharacters + ' is not allowed. A-Z, a-z, 0-9, "_" and "-" only.'); diff --git a/routes/api-routes.js b/routes/api-routes.js index 945c2417..411c7343 100644 --- a/routes/api-routes.js +++ b/routes/api-routes.js @@ -57,7 +57,7 @@ module.exports = app => { } // validate name const name = body.name || file.name.substring(0, file.name.indexOf('.')); - const invalidCharacters = /[^\w,-]/.exec(name); + const invalidCharacters = /[^A-Za-z0-9,-]/.exec(name); if (invalidCharacters) { postToStats('publish', originalUrl, ip, 'Error: name'); res.status(400).send('Error: The name you provided is not allowed. Please use A-Z, a-z, 0-9, "_" and "-" only.'); diff --git a/routes/show-routes.js b/routes/show-routes.js index 5e54c9b9..f89e600c 100644 --- a/routes/show-routes.js +++ b/routes/show-routes.js @@ -12,6 +12,12 @@ function sendAnalyticsAndLog (ip, originalUrl) { } module.exports = (app) => { + // route to show 'about' page for spee.ch + app.get('/about', ({ ip, originalUrl }, res) => { + sendAnalyticsAndLog(ip, originalUrl); + // get and render the content + res.status(200).render('about'); + }); // route to show the meme-fodder meme maker app.get('/meme-fodder/play', ({ ip, originalUrl }, res) => { sendAnalyticsAndLog(ip, originalUrl); diff --git a/views/about.handlebars b/views/about.handlebars new file mode 100644 index 00000000..5c93d61a --- /dev/null +++ b/views/about.handlebars @@ -0,0 +1,16 @@ +
+ {{> 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}} +
+ diff --git a/views/allClaims.handlebars b/views/allClaims.handlebars index 9f50ce51..449807f7 100644 --- a/views/allClaims.handlebars +++ b/views/allClaims.handlebars @@ -1,7 +1,5 @@
-
- {{> topBar}} -
+ {{> topBar}}

All Claims

These are all the free, public assets at that claim. You can publish more at spee.ch.

@@ -21,7 +19,5 @@
{{/each}}
- + {{> footer}} \ No newline at end of file diff --git a/views/fourOhFour.handlebars b/views/fourOhFour.handlebars index 198d8f91..cc91ea9f 100644 --- a/views/fourOhFour.handlebars +++ b/views/fourOhFour.handlebars @@ -1,7 +1,5 @@
-
- {{> topBar}} -
+ {{> topBar}}

404: Not Found

That page does not exist. Return home.

diff --git a/views/index.handlebars b/views/index.handlebars index ffc21ec0..cde6ed02 100644 --- a/views/index.handlebars +++ b/views/index.handlebars @@ -1,19 +1,8 @@
-
- {{> topBar}} -
-
+ {{> topBar}} +
{{> publish}} - {{> examples}} - {{> documentation}} - -
- -
diff --git a/views/memeFodder.handlebars b/views/memeFodder.handlebars index 10a9c0fa..214bde12 100644 --- a/views/memeFodder.handlebars +++ b/views/memeFodder.handlebars @@ -1,18 +1,10 @@
-
- {{> topBar}} -
-
+ {{> topBar}} +
{{> memeFodderMaker}} {{> memeFodderResults}}
- - + {{> footer}}
diff --git a/views/noClaims.handlebars b/views/noClaims.handlebars index e406b254..dbe6c592 100644 --- a/views/noClaims.handlebars +++ b/views/noClaims.handlebars @@ -1,7 +1,5 @@
-
- {{> topBar}} -
+ {{> topBar}}

No Claims

There are no free, public images at that claim. You should publish one at spee.ch.

diff --git a/views/partials/bugs.handlebars b/views/partials/bugs.handlebars new file mode 100644 index 00000000..bd4c8c14 --- /dev/null +++ b/views/partials/bugs.handlebars @@ -0,0 +1,4 @@ +
+

Bugs

+

Spee.ch is young and under continuous development so it will have bugs. Please leave an issue on our github if you experience a problem or have suggestions.

+
diff --git a/views/partials/contribute.handlebars b/views/partials/contribute.handlebars index 627a0f36..cdf646df 100644 --- a/views/partials/contribute.handlebars +++ b/views/partials/contribute.handlebars @@ -1,8 +1,8 @@ -
-

Contribute

-

If you would like to help make Spee.ch amazing, join our slack channel!

-
-
-

Bugs

-

Spee.ch is young and under continuous development so it will have bugs. Please leave an issue on our github if you experience a problem or have suggestions.

+
+

Contribute + +

+

Spee.ch is an open source project. We would love for you to 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 index b6391dec..21113514 100644 --- a/views/partials/documentation.handlebars +++ b/views/partials/documentation.handlebars @@ -3,22 +3,21 @@ [open]