Add sponsoring slots on home, dashboard and about pages

This commit is contained in:
Gaël Métais
2018-04-05 19:16:59 -05:00
parent e58c00ecdf
commit 5d017258b7
12 changed files with 60 additions and 23 deletions
+8 -8
View File
@@ -158,14 +158,6 @@
.summary .fromShare {
margin-bottom: 3em;
}
.summary .apiTip {
font-size: 0.8em;
margin-bottom: 4em;
color: #413;
}
.summary .apiTip a {
color: inherit;
}
.summary .tweet .tweetText {
color: #413;
background: #F2F2F2;
@@ -189,3 +181,11 @@
.summary .tweet input {
font-size: 0.9em;
}
.summary .sponsor {
font-size: 0.9em;
margin-bottom: 4em;
color: #413;
}
.summary .sponsor a {
color: inherit;
}
+3
View File
@@ -177,3 +177,6 @@ input[type=submit].clicked {
top: 0.2em;
box-shadow: none;
}
.homeSponsor {
margin-top: 3em;
}
+3
View File
@@ -295,6 +295,9 @@ a.linkButton {
.footer .github {
margin: 1em 0 0 0.5em;
}
.footer .sponsor {
font-size: 0.9em;
}
[class^="icon-"]:before,
[class*=" icon-"]:before {
vertical-align: baseline;
+9 -9
View File
@@ -158,15 +158,6 @@
margin-bottom: 3em;
}
.summary .apiTip {
font-size: 0.8em;
margin-bottom: 4em;
color: #413;
a {
color: inherit;
}
}
.summary .tweet {
.tweetText {
color: #413;
@@ -189,4 +180,13 @@
input {
font-size: 0.9em;
}
}
.summary .sponsor {
font-size: 0.9em;
margin-bottom: 4em;
color: #413;
a {
color: inherit;
}
}
+4
View File
@@ -199,4 +199,8 @@ input[type=submit].clicked {
left: 0.1em;
top: 0.2em;
box-shadow: none;
}
.homeSponsor {
margin-top: 3em;
}
+3
View File
@@ -250,6 +250,9 @@ a.linkButton {
.github {
margin: 1em 0 0 0.5em;
}
.sponsor {
font-size: 0.9em;
}
}
[class^="icon-"]:before, [class*=" icon-"]:before {
+4
View File
@@ -5,5 +5,9 @@
<p>By the way, <b>it's free</b> because we are geeks, not businessmen. All we want is <a href="https://github.com/gmetais/YellowLabTools" target="_blank" class="star">a <span>&#9733;</span> on GitHub</a>. It will boost our motivation to add more awesome features!!!</p>
<%if (sponsoring.about) { %>
<div class="sponsor"><%- sponsoring.about %></div>
<% } %>
<p><br><a href="<%= baseUrl %>">Back to index</a></p>
</div>
+4 -3
View File
@@ -55,9 +55,10 @@
</div>
</div>
<div ng-if="!error && !fromSocialShare" class="apiTip">
<b>Did you know?</b> You can <b>bookmark</b> this result page URL or <b>share it</b>, Yellow Lab Tools keeps test results for years!
</div>
<%if (sponsoring.dashboard) { %>
<div ng-if="!error && !fromSocialShare" class="sponsor"><%- sponsoring.dashboard %></div>
<% } %>
<div class="tweet" ng-if="!error && !fromSocialShare">
<form ng-submit="sendTweet()">
+4
View File
@@ -110,3 +110,7 @@
<p>Untangles the JavaScript spaghetti code</p>
</div>
</div>
<%if (sponsoring.home) { %>
<div class="homeSponsor"><%- sponsoring.home %></div>
<% } %>
+4 -1
View File
@@ -1,6 +1,8 @@
var path = require('path');
var express = require('express');
var serverSettings = (process.env.IS_TEST) ? require('../../../test/fixtures/settings.json') : require('../../../server_config/settings.json');
var FrontController = function(app) {
'use strict';
@@ -23,7 +25,8 @@ var FrontController = function(app) {
app.get('/views/:viewName', function(req, res) {
res.setHeader('Cache-Control', 'public, max-age=' + cacheDuration);
res.render(path.join(__dirname, assetsPath, 'views/' + req.params.viewName), {
baseUrl: app.locals.baseUrl || '/'
baseUrl: app.locals.baseUrl || '/',
sponsoring: serverSettings.sponsoring || {}
});
});
+7 -1
View File
@@ -9,5 +9,11 @@
},
"maxAnonymousRunsPerDay": 99999999,
"maxAnonymousCallsPerDay": 99999999,
"blockedUrls": []
"blockedUrls": [],
"sponsoring" : {
"home": "(this is a private instance)",
"dashboard": null,
"about": "(this is a private instance)"
}
}
+7 -1
View File
@@ -9,5 +9,11 @@
},
"maxAnonymousRunsPerDay": 99999999,
"maxAnonymousCallsPerDay": 99999999,
"blockedUrls": []
"blockedUrls": [],
"sponsoring" : {
"home": "(this is a private instance)",
"dashboard": null,
"about": "(this is a private instance)"
}
}