diff options
Diffstat (limited to 'web/templates')
-rw-r--r-- | web/templates/authorize.html | 26 | ||||
-rw-r--r-- | web/templates/channel.html | 3 | ||||
-rw-r--r-- | web/templates/footer.html | 10 | ||||
-rw-r--r-- | web/templates/head.html | 39 | ||||
-rw-r--r-- | web/templates/home.html | 2 | ||||
-rw-r--r-- | web/templates/login.html | 2 | ||||
-rw-r--r-- | web/templates/password_reset.html | 2 | ||||
-rw-r--r-- | web/templates/signup_team.html | 4 | ||||
-rw-r--r-- | web/templates/signup_team_complete.html | 2 | ||||
-rw-r--r-- | web/templates/signup_user_complete.html | 2 | ||||
-rw-r--r-- | web/templates/verify.html | 2 | ||||
-rw-r--r-- | web/templates/welcome.html | 2 |
12 files changed, 52 insertions, 44 deletions
diff --git a/web/templates/authorize.html b/web/templates/authorize.html new file mode 100644 index 000000000..3392c1b1e --- /dev/null +++ b/web/templates/authorize.html @@ -0,0 +1,26 @@ +{{define "authorize"}} +<html> +{{template "head" . }} +<body class="white"> + <div class="container-fluid"> + <div class="inner__wrap"> + <div class="row content"> + <div class="signup-header"> + {{.Props.TeamName}} + </div> + <div class="col-sm-12"> + <div id="authorize"></div> + </div> + <div class="footer-push"></div> + </div> + <div class="row footer"> + {{template "footer" . }} + </div> + </div> + </div> + <script> + window.setup_authorize_page('{{ .Props.TeamName }}', '{{ .Props.AppName }}', '{{ .Props.ResponseType }}', '{{ .Props.ClientId }}', '{{ .Props.RedirectUri }}', '{{ .Props.Scope }}', '{{ .Props.State }}' ); + </script> +</body> +</html> +{{end}} diff --git a/web/templates/channel.html b/web/templates/channel.html index a732a25ce..92aaaf02f 100644 --- a/web/templates/channel.html +++ b/web/templates/channel.html @@ -49,8 +49,9 @@ <div id="access_history_modal"></div> <div id="activity_log_modal"></div> <div id="removed_from_channel_modal"></div> + <div id="register_app_modal"></div> <script> - window.setup_channel_page('{{ .Props.TeamDisplayName }}', '{{ .Props.TeamType }}', '{{ .Props.TeamId }}', '{{ .Props.ChannelName }}', '{{ .Props.ChannelId }}'); + window.setup_channel_page({{ .Props }}); $('body').tooltip( {selector: '[data-toggle=tooltip]'} ); $('.modal-body').css('max-height', $(window).height() * 0.7); $('.modal-body').perfectScrollbar(); diff --git a/web/templates/footer.html b/web/templates/footer.html index 204a89f03..4b15295b4 100644 --- a/web/templates/footer.html +++ b/web/templates/footer.html @@ -1,7 +1,7 @@ {{define "footer"}} <div class="footer-pane col-xs-12"> <div class="col-xs-12"> - <span class="pull-right footer-site-name">{{ .SiteName }}</span> + <span class="pull-right footer-site-name">{{ .ClientProps.SiteName }}</span> </div> <div class="col-xs-12"> <span class="pull-right footer-link copyright">© 2015 SpinPunch</span> @@ -12,9 +12,9 @@ </div> </div> <script> - document.getElementById("help_link").setAttribute("href", config.HelpLink); - document.getElementById("terms_link").setAttribute("href", config.TermsLink); - document.getElementById("privacy_link").setAttribute("href", config.PrivacyLink); - document.getElementById("about_link").setAttribute("href", config.AboutLink); + document.getElementById("help_link").setAttribute("href", '/static/help/help.html'); + document.getElementById("terms_link").setAttribute("href", '/static/help/terms.html'); + document.getElementById("privacy_link").setAttribute("href", '/static/help/privacy.html'); + document.getElementById("about_link").setAttribute("href", '/static/help/about.html'); </script> {{end}} diff --git a/web/templates/head.html b/web/templates/head.html index e4b9bfe19..dcd643b58 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,6 +18,11 @@ <link rel="manifest" href="/static/config/manifest.json"> <!-- Android add to homescreen --> + <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"> @@ -35,9 +40,7 @@ <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"> @@ -46,28 +49,8 @@ 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); var user = window.UserStore.getCurrentUser(true); @@ -88,7 +71,6 @@ analytics = {}; analytics.page = function(){}; analytics.track = function(){}; - console.warn("config.js missing SegmentWriteKey, SegmentIO analytics is not tracking"); } </script> <!-- Snowplow starts plowing --> @@ -100,7 +82,7 @@ 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 }}' + appId: window.config.SiteName }); var user = window.UserStore.getCurrentUser(true); @@ -111,7 +93,6 @@ window.snowplow('trackPageView'); } else { window.snowplow = function(){}; - console.warn("config.json missing AnalyticsUrl, Snowplow analytics is not tracking"); } </script> <!-- Snowplow stops plowing --> diff --git a/web/templates/home.html b/web/templates/home.html index 9ec8b7000..0d8b89061 100644 --- a/web/templates/home.html +++ b/web/templates/home.html @@ -17,7 +17,7 @@ </div> </div> <script> - window.setup_home_page({{.Props.TeamURL}}); + window.setup_home_page({{ .Props }}); </script> </body> </html> diff --git a/web/templates/login.html b/web/templates/login.html index 4b2813358..a5809a1f4 100644 --- a/web/templates/login.html +++ b/web/templates/login.html @@ -20,7 +20,7 @@ </div> </div> <script> -window.setup_login_page('{{.Props.TeamDisplayName}}', '{{.Props.TeamName}}', '{{.Props.AuthServices}}'); +window.setup_login_page({{ .Props }}); </script> </body> </html> diff --git a/web/templates/password_reset.html b/web/templates/password_reset.html index 6244f6418..7f6335c92 100644 --- a/web/templates/password_reset.html +++ b/web/templates/password_reset.html @@ -9,7 +9,7 @@ </div> </div> <script> - window.setup_password_reset_page('{{ .Props.IsReset }}', '{{ .Props.TeamDisplayName }}', '{{ .Props.TeamName }}', '{{ .Props.Hash }}', '{{ .Props.Data }}'); + window.setup_password_reset_page({{ .Props }}); </script> </body> </html> diff --git a/web/templates/signup_team.html b/web/templates/signup_team.html index 8d9d6e0b8..a6000696e 100644 --- a/web/templates/signup_team.html +++ b/web/templates/signup_team.html @@ -9,7 +9,7 @@ <div class="col-sm-12"> <div class="signup-team__container"> <img class="signup-team-logo" src="/static/images/logo.png" /> - <h1>{{ .SiteName }}</h1> + <h1>{{ .ClientProps.SiteName }}</h1> <h4 class="color--light">All team communication in one place, searchable and accessible anywhere</h4> <div id="signup-team"></div> </div> @@ -22,7 +22,7 @@ </div> </div> <script> -window.setup_signup_team_page('{{.Props.AuthServices}}'); +window.setup_signup_team_page({{ .Props }}); </script> </body> </html> diff --git a/web/templates/signup_team_complete.html b/web/templates/signup_team_complete.html index 041889435..4b179b1e1 100644 --- a/web/templates/signup_team_complete.html +++ b/web/templates/signup_team_complete.html @@ -19,7 +19,7 @@ </div> </div> <script> -window.setup_signup_team_complete_page('{{.Props.Email}}', '{{.Props.Data}}', '{{.Props.Hash}}'); +window.setup_signup_team_complete_page({{ .Props }}); </script> </body> </html> diff --git a/web/templates/signup_user_complete.html b/web/templates/signup_user_complete.html index e9f6bafcf..2400b7b77 100644 --- a/web/templates/signup_user_complete.html +++ b/web/templates/signup_user_complete.html @@ -19,7 +19,7 @@ </div> </div> <script> - window.setup_signup_user_complete_page('{{.Props.Email}}', '{{.Props.TeamName}}', '{{.Props.TeamDisplayName}}', '{{.Props.TeamId}}', '{{.Props.Data}}', '{{.Props.Hash}}', '{{.Props.AuthServices}}'); + window.setup_signup_user_complete_page({{ .Props }}); </script> </body> </html> diff --git a/web/templates/verify.html b/web/templates/verify.html index de839db68..cb4832512 100644 --- a/web/templates/verify.html +++ b/web/templates/verify.html @@ -9,7 +9,7 @@ </div> </div> <script> - window.setupVerifyPage('{{.Props.IsVerified}}', '{{.Props.TeamURL}}', '{{.Props.UserEmail}}'); + window.setupVerifyPage({{ .Props }}); </script> </body> </html> diff --git a/web/templates/welcome.html b/web/templates/welcome.html index bab7a135d..e7eeb5648 100644 --- a/web/templates/welcome.html +++ b/web/templates/welcome.html @@ -11,7 +11,7 @@ <div class="row main"> <div class="app__content"> <div class="welcome-info"> - <h1>Welcome to {{ .SiteName }}!</h1> + <h1>Welcome to {{ .ClientProps.SiteName }}!</h1> <p> You do not appear to be part of any teams. Please contact your administrator to have him send you an invitation to a private team. |