diff --git a/public/assets/css/allStyle.css b/public/assets/css/allStyle.css index cb258dea..7360bb7c 100644 --- a/public/assets/css/allStyle.css +++ b/public/assets/css/allStyle.css @@ -14,7 +14,7 @@ .main { float: left; - width: 75%; + width: 65%; margin-right: 1%; padding-right: 1%; border-right: 1px lightgrey solid; @@ -23,7 +23,7 @@ .sidebar { float: left; - width: 22%; + width: 32%; } footer { @@ -105,6 +105,10 @@ table { float: right; } +.wrap-words { + word-wrap: break-word; +} + @media (max-width: 1250px) { .wrapper { diff --git a/public/assets/css/componentStyle.css b/public/assets/css/componentStyle.css index 2f09f62f..06864bcb 100644 --- a/public/assets/css/componentStyle.css +++ b/public/assets/css/componentStyle.css @@ -16,7 +16,16 @@ .show-image, .show-video { width: 100%; - padding-top: 1em; +} + +.table-metadata { + font-size: small; +} + +.left-column { + width: 30%; + font-weight: bold; + vertical-align: top; } /* learn more */ @@ -37,16 +46,17 @@ .example-image, .example-code { float: left; - margin: 5px 15px 5px 0px; + margin: 2%; } .example-image { - width: 20%; + width: 21%; } .example-code { - padding: 2em; - width: 60%; + float: right; + padding: 4%; + width: 62%; background-color: lightgrey; font-family: monospace; color: #666; diff --git a/public/assets/js/claimPublish.js b/public/assets/js/claimPublish.js index e43424aa..22021a82 100644 --- a/public/assets/js/claimPublish.js +++ b/public/assets/js/claimPublish.js @@ -168,26 +168,9 @@ 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! View it here:
'; - publishResults += ''; - publishResults += ''; - publishResults += ''; - publishResults += ''; + publishResults = 'Your publish is complete! You are being redicted to it
'; + publishResults += 'if you do not get redirected, click here
'; // update publish area document.getElementById('publish-active-area').innerHTML = publishResults; - // update the link holder - document.getElementById('direct-link-holder').innerText = 'https://spee.ch' + directUrl; - // enable copy-to-clipboard - var copyBtn = document.querySelector('.copy-button'); - copyBtn.addEventListener('click', function(event) { - // select the text - var text = document.getElementById('direct-link-holder'); - text.select(); - try { - var successful = document.execCommand('copy'); - var msg = successful ? 'successful' : 'unsuccessful'; - } catch (err) { - alert('Oops, unable to copy'); - } - }); + window.location.href = directUrl; }); \ No newline at end of file diff --git a/routes/serve-routes.js b/routes/serve-routes.js index e9333814..558f3d5e 100644 --- a/routes/serve-routes.js +++ b/routes/serve-routes.js @@ -31,10 +31,10 @@ function serveFile ({ fileName, fileType, filePath }, res) { res.status(200).sendFile(filePath, options); } -function servePage ({ fileName, filePath }, res) { - logger.debug(`serving show page for ${fileName}`); +function servePage (fileInfo, res) { + logger.debug(`serving show page for ${fileInfo.fileName}`); // set default options - res.status(200).render('show', { filePath }); + res.status(200).render('show', { fileInfo }); } function sendAnalyticsAndLog (headers, ip, originalUrl) { @@ -61,6 +61,7 @@ module.exports = (app) => { const mimetypes = headers['accept'].split(','); if (mimetypes.includes('text/html')) { postToStats('show', originalUrl, ip, 'success'); + logger.debug('fileInfo', fileInfo); servePage(fileInfo, res); } else { postToStats('serve', originalUrl, ip, 'success'); diff --git a/views/partials/asset.handlebars b/views/partials/asset.handlebars index 85be4b89..4a475f8d 100644 --- a/views/partials/asset.handlebars +++ b/views/partials/asset.handlebars @@ -1,6 +1,7 @@video loading...
+loading...
links go here
+Direct Link: | +https://spee.ch/{{fileInfo.name}}/{{fileInfo.claimId}} | +
Embed: | +<img src="https://spee.ch/{{fileInfo.name}}/{{fileInfo.claimId}}" /> |
+
metadata goes here
+Name | +{{fileInfo.name}} | +
Claim Id | +{{fileInfo.claimId}} | +
File Name | +{{fileInfo.fileName}} | +
fileType | +{{fileInfo.fileType}} | +