Test adding events to codeblocks

This commit is contained in:
Ryan Watters
2017-03-23 23:17:13 -05:00
parent bc055d0ac2
commit 2dab2351d5
6 changed files with 17 additions and 8 deletions
+1 -2
View File
@@ -60,8 +60,7 @@ watch = true
organizationname = ""
sitedescription = ""
release = "0.20"
# Add GA Tracking Code Here. This leverages a built-in (ie, "internal") partial from HUGO: https://gohugo.io/extras/analytics#configuring-google-analytics
googleanalyticstrackingcode = ""
googleanalyticstrackingcode = "UA-76549364-1"
## Critical Render Path. If true, site style will be embedded in a <style> tag in each html <head> as part of Gulp Build. False puts a typical <link> to the stylesheet in <head>>
usecrp = true
## Twitter handle without the "@"
+1 -1
View File
@@ -12,7 +12,7 @@ ns:
signature:
workson: []
hugoversion:
relatedfuncs: [last,seq]
relatedfuncs: [last,first,seq]
deprecated: false
aliases: []
---
+2 -2
View File
@@ -4,7 +4,7 @@
<!-- GitHub Buttons -->
<!-- <script async defer src="https://buttons.github.io/buttons.js"></script> -->
<!-- Google Analytics -->
<!-- <script>
<script>
(function() {
if (window.location.hostname === "localhost") {
console.log("Analytics not running on local dev.");
@@ -29,7 +29,7 @@
});
}
})();
</script> -->
</script>
<!-- Algolia embed -->
<script type="text/javascript" src="https://cdn.jsdelivr.net/docsearch.js/2/docsearch.min.js"></script>
<script type="text/javascript">
-1
View File
@@ -1,4 +1,3 @@
{{$icon := index (split (.Get "file") ".") 1 }}
<div class="code" id="{{.Get "file" | urlize}}">
{{- with .Get "file" -}}
<div class="filename">{{.}}</div>
+11
View File
@@ -0,0 +1,11 @@
$('.copy-button').on('click', function() {
let id = $(this).parent().attr('id'),
url = window.location.pathname;
ga('send', 'event', 'Code', 'Copy', id);
});
$('.download-button').on('click', function() {
let id = $(this).parent().attr('id'),
url = window.location.pathname;
ga('send', 'event', 'Code', 'Download', id);
});
+2 -2
View File
File diff suppressed because one or more lines are too long