add frontend config
This commit is contained in:
parent
01779e3133
commit
696702a0c8
@ -31,6 +31,8 @@ var styles = [
|
|||||||
];
|
];
|
||||||
|
|
||||||
module.exports = function(grunt) {
|
module.exports = function(grunt) {
|
||||||
|
scripts.unshift(grunt.option('configPath') || 'src/js/defaultConfig.js');
|
||||||
|
|
||||||
grunt.initConfig({
|
grunt.initConfig({
|
||||||
pkg: grunt.file.readJSON('package.json'),
|
pkg: grunt.file.readJSON('package.json'),
|
||||||
clean: {
|
clean: {
|
||||||
|
@ -4,6 +4,11 @@
|
|||||||
|
|
||||||
var netStatsApp = angular.module('netStatsApp', ['netStatsApp.filters', 'netStatsApp.directives', 'ngStorage']);
|
var netStatsApp = angular.module('netStatsApp', ['netStatsApp.filters', 'netStatsApp.directives', 'ngStorage']);
|
||||||
|
|
||||||
|
netStatsApp.run(function($rootScope) {
|
||||||
|
$rootScope.networkName = networkName || 'Ethereum';
|
||||||
|
$rootScope.faviconPath = faviconPath || '/favicon.ico';
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
/* Services */
|
/* Services */
|
||||||
|
|
||||||
|
2
src/js/defaultConfig.js
Normal file
2
src/js/defaultConfig.js
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
var networkName = 'Ethereum';
|
||||||
|
var faviconPath = '/favicon.ico';
|
@ -3,12 +3,12 @@ doctype html
|
|||||||
html(ng-app="netStatsApp")
|
html(ng-app="netStatsApp")
|
||||||
head
|
head
|
||||||
meta(name="viewport", content="width=device-width, initial-scale=1.0, maximum-scale=1.0")
|
meta(name="viewport", content="width=device-width, initial-scale=1.0, maximum-scale=1.0")
|
||||||
title Ethereum Network Status
|
title {{ $root.networkName }} Network Status
|
||||||
style(type="text/css") [ng\:cloak], [ng-cloak], [data-ng-cloak], [x-ng-cloak], .ng-cloak, .x-ng-cloak { display: none !important; }
|
style(type="text/css") [ng\:cloak], [ng-cloak], [data-ng-cloak], [x-ng-cloak], .ng-cloak, .x-ng-cloak { display: none !important; }
|
||||||
link(rel='stylesheet', href='/css/netstats.min.css')
|
link(rel='stylesheet', href='/css/netstats.min.css')
|
||||||
meta(name='robots', content='index,follow')
|
meta(name='robots', content='index,follow')
|
||||||
meta(name='googlebot', content='index,follow')
|
meta(name='googlebot', content='index,follow')
|
||||||
link(rel='shortcut icon', type="image/x-icon", href="/favicon.ico")
|
link(rel='shortcut icon', type="image/x-icon", href="{{$root.faviconPath}}")
|
||||||
body
|
body
|
||||||
block content
|
block content
|
||||||
script(src="/js/netstats.min.js")
|
script(src="/js/netstats.min.js")
|
||||||
|
@ -3,12 +3,12 @@ doctype html
|
|||||||
html(ng-app="netStatsApp")
|
html(ng-app="netStatsApp")
|
||||||
head
|
head
|
||||||
meta(name="viewport", content="width=device-width, initial-scale=1.0, maximum-scale=1.0")
|
meta(name="viewport", content="width=device-width, initial-scale=1.0, maximum-scale=1.0")
|
||||||
title Testnet Network Status
|
title {{ $root.networkName }} Network Status
|
||||||
style(type="text/css") [ng\:cloak], [ng-cloak], [data-ng-cloak], [x-ng-cloak], .ng-cloak, .x-ng-cloak { display: none !important; }
|
style(type="text/css") [ng\:cloak], [ng-cloak], [data-ng-cloak], [x-ng-cloak], .ng-cloak, .x-ng-cloak { display: none !important; }
|
||||||
link(rel='stylesheet', href='/css/netstats.min.css')
|
link(rel='stylesheet', href='/css/netstats.min.css')
|
||||||
meta(name='robots', content='index,follow')
|
meta(name='robots', content='index,follow')
|
||||||
meta(name='googlebot', content='index,follow')
|
meta(name='googlebot', content='index,follow')
|
||||||
link(rel='shortcut icon', type="image/x-icon", href="/favicon.ico")
|
link(rel='shortcut icon', type="image/x-icon", href="{{$root.faviconPath}}")
|
||||||
body
|
body
|
||||||
block content
|
block content
|
||||||
script(src="/js/netstats.min.js")
|
script(src="/js/netstats.min.js")
|
||||||
|
Loading…
Reference in New Issue
Block a user