diff --git a/public/assets/css/componentStyle.css b/public/assets/css/componentStyle.css index 3a89c372..4677aa2b 100644 --- a/public/assets/css/componentStyle.css +++ b/public/assets/css/componentStyle.css @@ -22,7 +22,6 @@ } .top-bar-right { - vertical-align: text-bottom; margin-left: 0.5em; } @@ -166,13 +165,6 @@ button.copy-button { list-style-type: none; } -/* meme */ -canvas { - background-color: white; - width: 100%; - height: auto; -} - /* statistics */ .totals-row { border-top: 1px solid grey; @@ -194,12 +186,28 @@ canvas { width: 100%; } + .top-bar-tagline { + clear: both; + text-align: left; + width: 100%; + } + } @media (max-width: 475px) { + div#publish-active-area { + margin-left: 2em; + margin-right: 2em; + } + .all-claims-img { width:50%; } + .top-bar-right { + display: none; + } + + } diff --git a/routes/api-routes.js b/routes/api-routes.js index bbaccffb..01a27f85 100644 --- a/routes/api-routes.js +++ b/routes/api-routes.js @@ -8,11 +8,6 @@ const errorHandlers = require('../helpers/libraries/errorHandlers.js'); const { postToStats, sendGoogleAnalytics } = require('../controllers/statsController.js'); module.exports = (app, hostedContentPath) => { - // route to return a file directly - app.get('/api/streamFile/:name', ({ params }, res) => { - const filePath = `${hostedContentPath}/${params.name}`; - res.status(200).sendFile(filePath); - }); // route to run a claim_list request on the daemon app.get('/api/claim_list/:name', ({ headers, ip, originalUrl, params }, res) => { // google analytics diff --git a/speech.js b/speech.js index ae6a7e7d..8215f50d 100644 --- a/speech.js +++ b/speech.js @@ -16,15 +16,15 @@ const db = require('./models'); // require our models for syncing const logLevel = config.get('Logging.LogLevel'); require('./config/loggerSetup.js')(logger, logLevel); -// serve static files from public directory (css/js/img) -app.use(express.static(`${__dirname}/public`)); - -// configure express app -app.enable('trust proxy'); // trust the proxy to get ip address for us -app.use(bodyParser.json()); // for parsing application/json -app.use(bodyParser.urlencoded({ extended: true })); // for parsing application/x-www-form-urlencoded -app.use(siofu.router); -app.use((req, res, next) => { // logging middleware +// trust the proxy to get ip address for us +app.enable('trust proxy'); +// add middleware +app.use(express.static(`${__dirname}/public`)); // 'express.static' to serve static files from public directory +app.use(express.static(`${__dirname}/public`)); // 'express.static' to serve static files from public directory +app.use(bodyParser.json()); // 'body parser' for parsing application/json +app.use(bodyParser.urlencoded({ extended: true })); // 'body parser' for parsing application/x-www-form-urlencoded +app.use(siofu.router); // 'socketio-file-upload' router for uploading with socket.io +app.use((req, res, next) => { // custom logging middleware to log all incomming http requests logger.verbose(`Request on ${req.originalUrl} from ${req.ip}`); next(); }); @@ -84,7 +84,10 @@ db.sequelize logger.info('Retrieving daemon download directory'); return getDownloadDirectory(); }) - .then(hostedContentPath => { // require routes & wrap in socket.io + .then(hostedContentPath => { + // add the hosted content folder at a static path + app.use('/media', express.static(hostedContentPath)); + // require routes & wrap in socket.io require('./routes/api-routes.js')(app, hostedContentPath); require('./routes/show-routes.js')(app); require('./routes/serve-routes.js')(app); diff --git a/views/layouts/show.handlebars b/views/layouts/show.handlebars index 47b7ad3c..a62a2781 100644 --- a/views/layouts/show.handlebars +++ b/views/layouts/show.handlebars @@ -13,7 +13,7 @@ - + {{{ body }}} diff --git a/views/partials/asset.handlebars b/views/partials/asset.handlebars index b6f8acc1..8097da32 100644 --- a/views/partials/asset.handlebars +++ b/views/partials/asset.handlebars @@ -2,12 +2,12 @@
{{#ifConditional fileInfo.fileType '===' 'video/mp4'}} {{else}} - + {{/ifConditional}}
\ No newline at end of file diff --git a/views/partials/footer.handlebars b/views/partials/footer.handlebars index 501234d9..4c26fcb0 100644 --- a/views/partials/footer.handlebars +++ b/views/partials/footer.handlebars @@ -1,3 +1,3 @@ \ No newline at end of file diff --git a/views/partials/topBar.handlebars b/views/partials/topBar.handlebars index 130eb90b..bffb3b14 100644 --- a/views/partials/topBar.handlebars +++ b/views/partials/topBar.handlebars @@ -1,9 +1,7 @@

Spee.ch

(beta) - Open-source, decentralized image and video hosting. - help source - - + help +
Open-source, decentralized image and video hosting.
\ No newline at end of file diff --git a/views/partials/trendingAssets.handlebars b/views/partials/trendingAssets.handlebars index 705dc463..9532b449 100644 --- a/views/partials/trendingAssets.handlebars +++ b/views/partials/trendingAssets.handlebars @@ -7,37 +7,31 @@ {{#unless this.nsfw}} {{#ifConditional this.fileType '===' 'video/mp4'}} - {{/unless}} + {{/each}} + \ No newline at end of file + + diff --git a/views/showLite.handlebars b/views/showLite.handlebars index 619bc507..6ac8467d 100644 --- a/views/showLite.handlebars +++ b/views/showLite.handlebars @@ -2,13 +2,13 @@ {{#ifConditional fileInfo.fileType '===' 'video/mp4'}} {{else}} - {{fileInfo.fileName}} + {{fileInfo.fileName}} {{/ifConditional}} \ No newline at end of file