joinpeertube/themes/hugo-bootstrap-premium/layouts/partials/base/scripts.html

91 lines
3.9 KiB
HTML
Raw Normal View History

2018-02-28 15:33:36 +00:00
{{ if ne .Site.Params.mailmunchid "" }}
<!-- MailMunch -->
<script src="//s3.amazonaws.com/mailmunch/static/site.js" id="mailmunch-script" data-mailmunch-site-id="{{ .Site.Params.mailmunchid }}" async="async"></script>
{{ end }}
{{ if ne .Site.Params.sumomeid "" }}
<!-- sumome -->
<script src="//load.sumome.com/" data-sumo-site-id="{{ .Site.Params.sumomeid }}" async="async"></script>
{{ end }}
<script src="{{ "js/jquery.min.js" | absURL }}"></script>
<script src="{{ "js/bootstrap.min.js" | absURL }}"></script>
{{ if eq .Site.Params.switchlang true }}
<script src="{{ "js/js.cookie.js" | absURL }}"></script>
{{ end }}
{{ if eq .Site.Params.popover.enablepopover true}}
<script src="{{ "js/angular.min.js" | absURL }}"></script>
<script src="/js/popover/angular-storage.min.js"></script>
{{ end }}
<script src="{{ "js/highlight.pack.js" | absURL }}"></script>
<script src="{{ "js/site.js" | absURL }}"></script>
<script>hljs.initHighlightingOnLoad();</script>
{{ with .Site.Params.googleAnalytics }}
<script>
var _gaq=[['_setAccount','{{ . }}'],['_trackPageview']];
(function(d,t){var g=d.createElement(t),s=d.getElementsByTagName(t)[0];
g.src=('https:'==location.protocol?'//ssl':'//www')+'.google-analytics.com/ga.js';
s.parentNode.insertBefore(g,s)}(document,'script'));
</script>
{{ end }}
<script>
var ENABLE_POPOVER = {{.Site.Params.popover.enablepopover}}, // enable or disable popover: true/false.
EXPIRE_COOKIE = {{.Site.Params.popover.expirecookie}}, // show it again after number of days to visitor that has not subscribed.
SHOW_MODAL_TIMEOUT = {{.Site.Params.popover.showmodaltimeout}}, // show popover modal after time interval in milliseconds.
MOUSE_LEAVE = {{.Site.Params.popover.mouseleave}}, //show popover when mouse leaves window: true/false.
MODAL_SIZE = {{.Site.Params.popover.modalsize}}, //lg or sm. Empty is md. If phone is detected lg is used.
POST_URL = {{.Site.Params.popover.posturl}}, // post url, for example zapier hooks.
SIGNUP_HEADER = {{.Site.Params.popover.signupheader}},
HEADER_IMAGE = {{.Site.Params.popover.headerimage}},
IMG_DESCRIPTION = {{.Site.Params.popover.imagedescription}},
SIGNUP_TEXT = {{.Site.Params.popover.signuptext}},
INPUT_PLACEHOLDER = {{.Site.Params.popover.inputplaceholder}},
SUBMIT_BUTTON = {{.Site.Params.popover.submitbutton}},
SUCCESS_MESSAGE = {{.Site.Params.popover.successmessage}},
ERROR_MESSAGE = {{.Site.Params.popover.errormessage}},
OPTIN = {{.Site.Params.popover.optin}},
COOKIE_NAME = {{.Site.Params.popover.cookiename}},
CONTENTLANGUAGE = {{ .Site.Params.DefaultContentLanguage }}; // used in pathnamereplace.js
</script>
{{ if eq .Site.Params.switchlang true }}
<script src="{{ "js/pathnamereplace.js" | absURL }}"></script>
{{ end }}
{{ if eq .Site.Params.popover.enablepopover true }}
<script src="/js/popover/angular-modal-service.min.js"></script>
<script src="/js/angular-ismobile.min.js"></script>
<script src="/js/popover/popover.min.js"></script>
{{ end }}
{{ if ne .Site.Params.mathjax "" }}
<script type="text/javascript"
src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/{{.Site.Params.mathjax}}/MathJax.js"></script>
<script type="text/javascript"
src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/{{.Site.Params.mathjax}}/config/TeX-AMS-MML_HTMLorMML.js"></script>
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
tex2jax: {
inlineMath: [['$','$'], ['\\(','\\)']],
displayMath: [['$$','$$'], ['\[','\]']],
processEscapes: true,
processEnvironments: true,
skipTags: ['script', 'noscript', 'style', 'textarea', 'pre'],
TeX: { equationNumbers: { autoNumber: "AMS" },
extensions: ["AMSmath.js", "AMSsymbols.js"] }
}
});
</script>
<script type="text/x-mathjax-config">
MathJax.Hub.Queue(function() {
for(var all in MathJax.Hub.getAllJax()) {
all.SourceElement().parentNode.className += ' has-jax';
}
});
</script>
{{ end }}
{{ range .Site.Params.customJS }}
<script type="text/javascript" src="{{ . | absURL}}"></script>
{{ end }}