diff --git a/front/src/css/dashboard.css b/front/src/css/dashboard.css index 104695f..c5e089a 100644 --- a/front/src/css/dashboard.css +++ b/front/src/css/dashboard.css @@ -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; +} diff --git a/front/src/css/index.css b/front/src/css/index.css index 8bcc1ff..20f1b18 100644 --- a/front/src/css/index.css +++ b/front/src/css/index.css @@ -177,3 +177,6 @@ input[type=submit].clicked { top: 0.2em; box-shadow: none; } +.homeSponsor { + margin-top: 3em; +} diff --git a/front/src/css/main.css b/front/src/css/main.css index c870840..add9c9c 100644 --- a/front/src/css/main.css +++ b/front/src/css/main.css @@ -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; diff --git a/front/src/less/dashboard.less b/front/src/less/dashboard.less index b46ed02..974ec04 100644 --- a/front/src/less/dashboard.less +++ b/front/src/less/dashboard.less @@ -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; + } } \ No newline at end of file diff --git a/front/src/less/index.less b/front/src/less/index.less index bbc8b4d..6892452 100644 --- a/front/src/less/index.less +++ b/front/src/less/index.less @@ -199,4 +199,8 @@ input[type=submit].clicked { left: 0.1em; top: 0.2em; box-shadow: none; +} + +.homeSponsor { + margin-top: 3em; } \ No newline at end of file diff --git a/front/src/less/main.less b/front/src/less/main.less index 2aac50b..3d5bbe3 100644 --- a/front/src/less/main.less +++ b/front/src/less/main.less @@ -250,6 +250,9 @@ a.linkButton { .github { margin: 1em 0 0 0.5em; } + .sponsor { + font-size: 0.9em; + } } [class^="icon-"]:before, [class*=" icon-"]:before { diff --git a/front/src/views/about.html b/front/src/views/about.html index dab850c..e838117 100644 --- a/front/src/views/about.html +++ b/front/src/views/about.html @@ -5,5 +5,9 @@

By the way, it's free because we are geeks, not businessmen. All we want is a on GitHub. It will boost our motivation to add more awesome features!!!

+ <%if (sponsoring.about) { %> + + <% } %> +


Back to index

\ No newline at end of file diff --git a/front/src/views/dashboard.html b/front/src/views/dashboard.html index 955bdba..ecc4692 100644 --- a/front/src/views/dashboard.html +++ b/front/src/views/dashboard.html @@ -55,9 +55,10 @@ -
- Did you know? You can bookmark this result page URL or share it, Yellow Lab Tools keeps test results for years! -
+ <%if (sponsoring.dashboard) { %> + + <% } %> +
diff --git a/front/src/views/index.html b/front/src/views/index.html index 6e376dc..0bed0eb 100644 --- a/front/src/views/index.html +++ b/front/src/views/index.html @@ -110,3 +110,7 @@

Untangles the JavaScript spaghetti code

+ +<%if (sponsoring.home) { %> +
<%- sponsoring.home %>
+<% } %> \ No newline at end of file diff --git a/lib/server/controllers/frontController.js b/lib/server/controllers/frontController.js index f193a29..fb156c6 100644 --- a/lib/server/controllers/frontController.js +++ b/lib/server/controllers/frontController.js @@ -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 || {} }); }); diff --git a/server_config/settings-prod.json b/server_config/settings-prod.json index b219b33..aff5cc0 100644 --- a/server_config/settings-prod.json +++ b/server_config/settings-prod.json @@ -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)" + } } \ No newline at end of file diff --git a/server_config/settings.json b/server_config/settings.json index 25f19fc..a23c7ff 100644 --- a/server_config/settings.json +++ b/server_config/settings.json @@ -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)" + } } \ No newline at end of file