mirror of
https://github.com/jakejarvis/jarv.is.git
synced 2025-07-19 10:15:30 -04:00
re-organize a bunch of partials
This commit is contained in:
2
layouts/partials/scripts/commento.html
Normal file
2
layouts/partials/scripts/commento.html
Normal file
@@ -0,0 +1,2 @@
|
||||
<div id="commento"></div>
|
||||
<script async defer src="https://comments.jarv.is/js/commento.js"></script>
|
22
layouts/partials/scripts/disqus.html
Normal file
22
layouts/partials/scripts/disqus.html
Normal file
@@ -0,0 +1,22 @@
|
||||
{{ if .Site.DisqusShortname }}
|
||||
{{ if ne .Params.comments false }}
|
||||
<div id="disqus_thread"></div>
|
||||
<script type="application/javascript">
|
||||
var disqus_config = function () {
|
||||
this.page.title = '{{ $.Title }}';
|
||||
this.page.url = '{{ $.Permalink }}';
|
||||
this.page.identifier = '{{ $.Permalink }}';
|
||||
};
|
||||
(function() {
|
||||
// Don't clutter Disqus account with localhost URLs.
|
||||
if (["localhost", "127.0.0.1"].indexOf(window.location.hostname) != -1) return;
|
||||
|
||||
var d = document, s = d.createElement('script'); s.async = true;
|
||||
s.src = 'https://' + {{ $.Site.DisqusShortname }} + '.disqus.com/embed.js';
|
||||
s.setAttribute('data-timestamp', +new Date());
|
||||
(d.head || d.body).appendChild(s);
|
||||
})();
|
||||
</script>
|
||||
<noscript>Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript" rel="nofollow">comments powered by Disqus.</a></noscript>
|
||||
{{ end }}
|
||||
{{ end }}
|
13
layouts/partials/scripts/fathom.html
Normal file
13
layouts/partials/scripts/fathom.html
Normal file
@@ -0,0 +1,13 @@
|
||||
<script>
|
||||
(function(j, a, r, v, i, s){
|
||||
a[v]=a[v]||function(){
|
||||
(a[v].q=a[v].q||[]).push(arguments)
|
||||
};
|
||||
i=j.createElement('script'),
|
||||
s=j.getElementsByTagName('script')[0];
|
||||
i.async=1; i.src=r; i.id='fathom-script';
|
||||
s.parentNode.insertBefore(i,s)
|
||||
})(document, window, 'https://s.jarv.is/tracker.js', 'fathom');
|
||||
fathom('set', 'siteId', 'DYCXU');
|
||||
fathom('trackPageview');
|
||||
</script>
|
8
layouts/partials/scripts/google_analytics.html
Normal file
8
layouts/partials/scripts/google_analytics.html
Normal file
@@ -0,0 +1,8 @@
|
||||
{{ with .Site.GoogleAnalytics }}
|
||||
<script>
|
||||
window.ga=window.ga||function(){(ga.q=ga.q||[]).push(arguments)};ga.l=+new Date;
|
||||
ga('create', '{{ . }}', 'auto');
|
||||
ga('send', 'pageview');
|
||||
</script>
|
||||
<script async src="https://www.google-analytics.com/analytics.js"></script>
|
||||
{{ end }}
|
19
layouts/partials/scripts/piwik.html
Normal file
19
layouts/partials/scripts/piwik.html
Normal file
@@ -0,0 +1,19 @@
|
||||
{{ if .Site.Params.PiwikServer }}
|
||||
<script type="text/javascript">
|
||||
var _paq = window._paq || [];
|
||||
/* tracker methods like "setCustomDimension" should be called before "trackPageView" */
|
||||
_paq.push(['setRequestMethod', 'POST']);
|
||||
_paq.push(['setSecureCookie', true]);
|
||||
_paq.push(['trackPageView']);
|
||||
_paq.push(['enableLinkTracking']);
|
||||
_paq.push(['enableHeartBeatTimer']);
|
||||
(function() {
|
||||
var u="{{ .Site.Params.PiwikServer }}";
|
||||
_paq.push(['setTrackerUrl', u+'piwik.php']);
|
||||
_paq.push(['setSiteId', '{{ .Site.Params.PiwikSiteId }}']);
|
||||
var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
|
||||
g.type='text/javascript'; g.async=true; g.defer=true; g.src=u+'piwik.js'; s.parentNode.insertBefore(g,s);
|
||||
})();
|
||||
</script>
|
||||
<noscript><p><img src="{{ .Site.Params.PiwikServer }}/send?idsite={{ .Site.Params.PiwikSiteId }}&rec={{ .Site.Params.PiwikSiteId }}" style="border:0;" alt="" /></p></noscript>
|
||||
{{ end }}
|
11
layouts/partials/scripts/shortcodes.html
Normal file
11
layouts/partials/scripts/shortcodes.html
Normal file
@@ -0,0 +1,11 @@
|
||||
{{ if .HasShortcode "gh-buttons" -}}
|
||||
{{ partial "scripts/shortcodes/gh-buttons" . }}
|
||||
{{ end -}}
|
||||
|
||||
{{ if .HasShortcode "tweet" -}}
|
||||
{{ partial "scripts/shortcodes/tweet" . }}
|
||||
{{ end -}}
|
||||
|
||||
{{ if .HasShortcode "facebook" -}}
|
||||
{{ partial "scripts/shortcodes/facebook" . }}
|
||||
{{ end -}}
|
2
layouts/partials/scripts/shortcodes/facebook.html
Normal file
2
layouts/partials/scripts/shortcodes/facebook.html
Normal file
@@ -0,0 +1,2 @@
|
||||
<div id="fb-root"></div>
|
||||
<script async defer src="https://connect.facebook.net/en_US/sdk.js#xfbml=1&version=v5.0"></script>
|
1
layouts/partials/scripts/shortcodes/gh-buttons.html
Normal file
1
layouts/partials/scripts/shortcodes/gh-buttons.html
Normal file
@@ -0,0 +1 @@
|
||||
<script async defer src="https://buttons.github.io/buttons.js"></script>
|
1
layouts/partials/scripts/shortcodes/tweet.html
Normal file
1
layouts/partials/scripts/shortcodes/tweet.html
Normal file
@@ -0,0 +1 @@
|
||||
<script async defer src="https://platform.twitter.com/widgets.js"></script>
|
Reference in New Issue
Block a user