diff options
Diffstat (limited to 'web/templates/head.html')
-rw-r--r-- | web/templates/head.html | 75 |
1 files changed, 17 insertions, 58 deletions
diff --git a/web/templates/head.html b/web/templates/head.html index 76ee70ced..2b83119d8 100644 --- a/web/templates/head.html +++ b/web/templates/head.html @@ -3,14 +3,14 @@ <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"> <meta name="robots" content="noindex, nofollow"> - <title>{{ .Title }}</title> + <title>{{ .Props.Title }}</title> <!-- iOS add to homescreen --> <meta name="apple-mobile-web-app-capable" content="yes" /> <meta name="apple-mobile-web-app-status-bar-style" content="default"> <meta name="mobile-web-app-capable" content="yes" /> - <meta name="apple-mobile-web-app-title" content="{{ .Title }}"> - <meta name="application-name" content="{{ .Title }}"> + <meta name="apple-mobile-web-app-title" content="{{ .Props.Title }}"> + <meta name="application-name" content="{{ .Props.Title }}"> <meta name="format-detection" content="telephone=no"> <!-- iOS add to homescreen --> @@ -18,25 +18,30 @@ <link rel="manifest" href="/static/config/manifest.json"> <!-- Android add to homescreen --> - <link rel="stylesheet" href="/static/css/bootstrap-3.3.1.min.css"> + <script> + window.config = {{ .ClientProps }}; + </script> + + + <link rel="stylesheet" href="/static/css/bootstrap-3.3.5.min.css"> <link rel="stylesheet" href="/static/css/jasny-bootstrap.min.css" rel="stylesheet"> + <link rel="stylesheet" href="/static/css/bootstrap-colorpicker.min.css" rel="stylesheet"> - <script src="/static/js/react-with-addons-0.13.1.js"></script> + <script src="/static/js/react-with-addons-0.13.3.js"></script> <script src="/static/js/jquery-1.11.1.js"></script> - <script src="/static/js/bootstrap-3.3.1.js"></script> + <script src="/static/js/bootstrap-3.3.5.js"></script> + <script src="/static/js/bootstrap-colorpicker.min.js"></script> + <script src="/static/js/react-bootstrap-0.25.1.js"></script> <link id="favicon" rel="icon" href="/static/images/favicon.ico" type="image/x-icon"> <link rel="shortcut icon" href="/static/images/favicon.ico" type="image/x-icon"> <link href='/static/css/google-fonts.css' rel='stylesheet' type='text/css'> <link rel="stylesheet" href="/static/css/styles.css"> - <script src="/static/js/perfect-scrollbar-0.6.3.jquery.js"></script> + <script src="/static/js/perfect-scrollbar-0.6.5.jquery.js"></script> <script src="/static/js/jquery-dragster/jquery.dragster.js"></script> - <script type="text/javascript" src="https://www.google.com/jsapi?autoload={'modules':[{'name':'visualization','version':'1','packages':['annotationchart']}]}"></script> - - <script type="text/javascript" src="https://cloudfront.loggly.com/js/loggly.tracker.js" async></script> <style id="antiClickjack">body{display:none !important;}</style> <script src="/static/js/bundle.js"></script> <script type="text/javascript"> @@ -45,30 +50,10 @@ blocker.parentNode.removeChild(blocker); } </script> - <script> - if (window.config == null) { - window.config = {}; - } - window.config.SiteName = '{{ .SiteName }}'; - window.config.ProfileWidth = '{{ .Props.ProfileWidth }}' - window.config.ProfileHeight = '{{ .Props.ProfileHeight }}' - </script> - - - <script> - if (window.config.LogglyWriteKey != null && window.config.LogglyWriteKey !== "") { - var LTracker = LTracker || []; - window.LTracker = LTracker; - LTracker.push({'logglyKey': window.config.LogglyWriteKey, 'sendConsoleErrors' : window.config.LogglyConsoleErrors }); - } else { - window.LTracker = []; - console.warn("config.js missing LogglyWriteKey, Loggly analytics is not reporting"); - } - </script> <script type="text/javascript"> - if (window.config.SegmentWriteKey != null && window.config.SegmentWriteKey !== "") { + if (window.config.SegmentDeveloperKey != null && window.config.SegmentDeveloperKey !== "") { !function(){var analytics=window.analytics=window.analytics||[];if(!analytics.initialize)if(analytics.invoked)window.console&&console.error&&console.error("Segment snippet included twice.");else{analytics.invoked=!0;analytics.methods=["trackSubmit","trackClick","trackLink","trackForm","pageview","identify","group","track","ready","alias","page","once","off","on"];analytics.factory=function(t){return function(){var e=Array.prototype.slice.call(arguments);e.unshift(t);analytics.push(e);return analytics}};for(var t=0;t<analytics.methods.length;t++){var e=analytics.methods[t];analytics[e]=analytics.factory(e)}analytics.load=function(t){var e=document.createElement("script");e.type="text/javascript";e.async=!0;e.src=("https:"===document.location.protocol?"https://":"http://")+"cdn.segment.com/analytics.js/v1/"+t+"/analytics.min.js";var n=document.getElementsByTagName("script")[0];n.parentNode.insertBefore(e,n)};analytics.SNIPPET_VERSION="3.0.1"; - analytics.load(window.config.SegmentWriteKey); + analytics.load(window.config.SegmentDeveloperKey); var user = window.UserStore.getCurrentUser(true); if (user) { analytics.identify(user.id, { @@ -77,7 +62,6 @@ createdAt: user.create_at, username: user.username, team_id: user.team_id, - team_domain: window.getSubDomain(), id: user.id }); } @@ -87,32 +71,7 @@ analytics = {}; analytics.page = function(){}; analytics.track = function(){}; - console.warn("config.js missing SegmentWriteKey, SegmentIO analytics is not tracking"); - } - </script> - <!-- Snowplow starts plowing --> - <script type="text/javascript"> - if ('{{ .Props.AnalyticsUrl }}'.trim() !== '') { - ;(function(p,l,o,w,i,n,g){if(!p[i]){p.GlobalSnowplowNamespace=p.GlobalSnowplowNamespace||[]; - p.GlobalSnowplowNamespace.push(i);p[i]=function(){(p[i].q=p[i].q||[]).push(arguments) - };p[i].q=p[i].q||[];n=l.createElement(o);g=l.getElementsByTagName(o)[0];n.async=1; - n.src=w;g.parentNode.insertBefore(n,g)}}(window,document,"script","//d1fc8wv8zag5ca.cloudfront.net/2.4.2/sp.js","snowplow")); - - window.snowplow('newTracker', 'cf', '{{ .Props.AnalyticsUrl }}', { - appId: '{{ .SiteName }}' - }); - - var user = window.UserStore.getCurrentUser(true); - if (user) { - window.snowplow('setUserId', user.id); - } - - window.snowplow('trackPageView'); - } else { - window.snowplow = function(){}; - console.warn("config.json missing AnalyticsUrl, Snowplow analytics is not tracking"); } </script> - <!-- Snowplow stops plowing --> </head> {{end}} |