Merge branch 'master' into patch-5

This commit is contained in:
Mark Firth 2017-11-09 11:11:46 +10:00 committed by GitHub
commit 15ab2e0317
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 46 additions and 18 deletions

4
.gitignore vendored
View file

@ -1,3 +1,5 @@
node_modules node_modules
.idea .idea
config/config.json config/config.json
config/sequelizeCliConfig.js
config/speechConfig.js

View file

@ -516,7 +516,7 @@ table {
display: block; display: block;
width: 100%; width: 100%;
} }
#video-player, .show-asset-light { #video-player, .showlite-asset {
padding: 6px; padding: 6px;
border: 1px solid #555; border: 1px solid #555;
background-color: #fff; background-color: #fff;
@ -524,7 +524,8 @@ table {
#video-player { #video-player {
cursor: pointer; cursor: pointer;
} }
.show-asset-light {
.showlite-asset {
max-width: 50%; max-width: 50%;
margin: 0 auto; margin: 0 auto;
margin-top: 2%; margin-top: 2%;

View file

@ -36,7 +36,7 @@
padding-right: 1.5em; padding-right: 1.5em;
} }
.show-asset-light { .showlite-asset {
max-width: 100%; max-width: 100%;
} }

View file

@ -185,6 +185,7 @@ module.exports = (app) => {
res.status(200).render('noChannel'); res.status(200).render('noChannel');
} else if (!result.claims) { // channel found, but no claims } else if (!result.claims) { // channel found, but no claims
res.status(200).render('channel', { res.status(200).render('channel', {
layout : 'channel',
channelName : result.channelName, channelName : result.channelName,
longChannelId : result.longChannelId, longChannelId : result.longChannelId,
shortChannelId: result.shortChannelId, shortChannelId: result.shortChannelId,
@ -198,6 +199,7 @@ module.exports = (app) => {
} else { // channel found, with claims } else { // channel found, with claims
const totalPages = determineTotalPages(result.claims.length); const totalPages = determineTotalPages(result.claims.length);
res.status(200).render('channel', { res.status(200).render('channel', {
layout : 'channel',
channelName : result.channelName, channelName : result.channelName,
longChannelId : result.longChannelId, longChannelId : result.longChannelId,
shortChannelId: result.shortChannelId, shortChannelId: result.shortChannelId,
@ -225,9 +227,6 @@ module.exports = (app) => {
logger.debug('file extension =', fileExtension); logger.debug('file extension =', fileExtension);
} else { } else {
method = SHOW; method = SHOW;
if (headers['accept'] && !headers['accept'].split(',').includes('text/html')) {
method = SERVE;
}
} }
logger.debug('claim name = ', name); logger.debug('claim name = ', name);
logger.debug('method =', method); logger.debug('method =', method);

View file

@ -0,0 +1,30 @@
<!DOCTYPE html>
<html lang="en" prefix="og: http://ogp.me/ns# fb: http://ogp.me/ns/fb#">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1, user-scalable=no">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Spee.ch</title>
<link rel="stylesheet" href="/assets/css/reset.css" type="text/css">
<link rel="stylesheet" href="/assets/css/general.css" type="text/css">
<link rel="stylesheet" href="/assets/css/mediaQueries.css" type="text/css">
<meta name="twitter:card" content="summary" />
<meta name="twitter:site" content="@spee_ch" />
<meta property="og:title" content="{{this.channelName}} on Spee.ch">
<meta property="og:site_name" content="Spee.ch">
<meta property="og:type" content="website">
<meta property="og:image" content="https://spee.ch/assets/img/Speech_Logo_Main@OG-02.jpg">
<meta property="og:url" content="http://spee.ch/{{this.channelName}}:{{this.longChannelId}}">
<meta property="og:description" content="View images and videos from {{this.channelName}}">
<!--google font-->
<link href="https://fonts.googleapis.com/css?family=Roboto:300" rel="stylesheet">
<!-- google analytics -->
{{ googleAnalytics }}
</head>
<body>
<script src="/assets/js/generalFunctions.js"></script>
<script src="/assets/js/navBarFunctions.js"></script>
{{> navBar}}
{{{ body }}}
</body>
</html>

View file

@ -9,13 +9,13 @@
<link rel="stylesheet" href="/assets/css/general.css" type="text/css"> <link rel="stylesheet" href="/assets/css/general.css" type="text/css">
<link rel="stylesheet" href="/assets/css/mediaQueries.css" type="text/css"> <link rel="stylesheet" href="/assets/css/mediaQueries.css" type="text/css">
<meta name="twitter:card" content="summary" /> <meta name="twitter:card" content="summary" />
<meta name="twitter:site" content="@lbryio" /> <meta name="twitter:site" content="@spee_ch" />
<meta property="og:title" content="spee.ch"> <meta property="og:title" content="Spee.ch">
<meta property="og:site_name" content="spee.ch"> <meta property="og:site_name" content="Spee.ch">
<meta property="og:type" content="website"> <meta property="og:type" content="website">
<meta property="og:image" content="https://spee.ch/assets/img/Speech_Logo_Main@OG-02.jpg"> <meta property="og:image" content="https://spee.ch/assets/img/Speech_Logo_Main@OG-02.jpg">
<meta property="og:url" content="http://spee.ch/"> <meta property="og:url" content="http://spee.ch/">
<meta property="og:description" content="Open-source, decentralized image and video hosting."> <meta property="og:description" content="Open-source, decentralized image and video sharing.">
<!--google font--> <!--google font-->
<link href="https://fonts.googleapis.com/css?family=Roboto:300" rel="stylesheet"> <link href="https://fonts.googleapis.com/css?family=Roboto:300" rel="stylesheet">
<!-- google analytics --> <!-- google analytics -->

View file

@ -20,9 +20,6 @@
</head> </head>
<body> <body>
<script src="/assets/js/generalFunctions.js"></script> <script src="/assets/js/generalFunctions.js"></script>
<script src="/assets/js/validationFunctions.js"></script>
<script src="/assets/js/authFunctions.js"></script>
<script src="/assets/js/loginFunctions.js"></script>
<script src="/assets/js/navBarFunctions.js"></script> <script src="/assets/js/navBarFunctions.js"></script>
{{> navBar}} {{> navBar}}
{{{ body }}} {{{ body }}}

View file

@ -40,7 +40,6 @@
</div> </div>
</div> </div>
<script src="/assets/js/authFunctions.js"></script>
<script type="text/javascript"> <script type="text/javascript">
// show or hide the channel selection tools // show or hide the channel selection tools
function toggleChannel (selectedOption) { function toggleChannel (selectedOption) {

View file

@ -1,12 +1,12 @@
{{#ifConditional fileInfo.fileType '===' 'video/mp4'}} {{#ifConditional fileInfo.fileType '===' 'video/mp4'}}
{{#ifConditional fileInfo.fileExt '===' '.gifv'}} {{#ifConditional fileInfo.fileExt '===' '.gifv'}}
<video class="show-asset-light" autoplay loop muted> <video class="showlite-asset" autoplay loop muted>
<source src="/{{fileInfo.claimId}}/{{fileInfo.name}}.{{fileInfo.fileExt}}"> <source src="/{{fileInfo.claimId}}/{{fileInfo.name}}.{{fileInfo.fileExt}}">
{{!--fallback--}} {{!--fallback--}}
Your browser does not support the <code>video</code> element. Your browser does not support the <code>video</code> element.
</video> </video>
{{else}} {{else}}
<video class="show-asset-light" controls id="video-player"> <video class="showlite-asset" controls id="video-player">
<source src="/{{fileInfo.claimId}}/{{fileInfo.name}}.{{fileInfo.fileExt}}"> <source src="/{{fileInfo.claimId}}/{{fileInfo.name}}.{{fileInfo.fileExt}}">
{{!--fallback--}} {{!--fallback--}}
Your browser does not support the <code>video</code> element. Your browser does not support the <code>video</code> element.
@ -16,6 +16,6 @@
<a class="link--primary fine-print" href="/{{fileInfo.claimId}}/{{fileInfo.name}}">hosted via spee&lt;h</a> <a class="link--primary fine-print" href="/{{fileInfo.claimId}}/{{fileInfo.name}}">hosted via spee&lt;h</a>
{{else}} {{else}}
<a href="/{{fileInfo.claimId}}/{{fileInfo.name}}"> <a href="/{{fileInfo.claimId}}/{{fileInfo.name}}">
<img class="show-asset-lite" src="/{{fileInfo.claimId}}/{{fileInfo.name}}.{{fileInfo.fileExt}}" alt="{{fileInfo.fileName}}"/> <img class="showlite-asset" src="/{{fileInfo.claimId}}/{{fileInfo.name}}.{{fileInfo.fileExt}}" alt="{{fileInfo.fileName}}"/>
</a> </a>
{{/ifConditional}} {{/ifConditional}}