1
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:
2020-01-14 18:08:42 -05:00
parent 53099d3a77
commit 6c44b7d44d
34 changed files with 160 additions and 88 deletions

View File

@@ -0,0 +1,2 @@
<div id="commento"></div>
<script async defer src="https://comments.jarv.is/js/commento.js"></script>

View 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 }}

View 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>

View 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 }}

View 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 }}&amp;rec={{ .Site.Params.PiwikSiteId }}" style="border:0;" alt="" /></p></noscript>
{{ end }}

View 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 -}}

View 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>

View File

@@ -0,0 +1 @@
<script async defer src="https://buttons.github.io/buttons.js"></script>

View File

@@ -0,0 +1 @@
<script async defer src="https://platform.twitter.com/widgets.js"></script>