diff options
author | Adin Scannell <ascannell@google.com> | 2019-11-18 13:40:27 -0800 |
---|---|---|
committer | Adin Scannell <ascannell@google.com> | 2020-04-21 12:00:59 -0700 |
commit | 957e26a6f30d40e2bff042d76a327d0a2cfbabae (patch) | |
tree | 3e95d46355585ae4661de5cef30cdca72a7c94bb /themes/docsy/layouts/partials/feedback.html | |
parent | dc2f198866c5fd8162a79978eb3633975d3ba11f (diff) |
Move website to a simpler jekyll-based template
This will allow us to merge the site into the main repository.
This merge allows the documentation to be kept up-to-date and
synchronized with the main project. Builds will be triggered on any
update, removing the need for the cron-based reploy.
Diffstat (limited to 'themes/docsy/layouts/partials/feedback.html')
-rw-r--r-- | themes/docsy/layouts/partials/feedback.html | 57 |
1 files changed, 0 insertions, 57 deletions
diff --git a/themes/docsy/layouts/partials/feedback.html b/themes/docsy/layouts/partials/feedback.html deleted file mode 100644 index 097832190..000000000 --- a/themes/docsy/layouts/partials/feedback.html +++ /dev/null @@ -1,57 +0,0 @@ -<style> - .feedback--answer { - display: inline-block; - } - .feedback--answer-no { - margin-left: 1em; - } - .feedback--response { - display: none; - margin-top: 1em; - } - .feedback--response__visible { - display: block; - } -</style> -<h2 class="feedback--title">Feedback</h2> -<p class="feedback--question">Was this page helpful?</p> -<button class="feedback--answer feedback--answer-yes">Yes</button> -<button class="feedback--answer feedback--answer-no">No</button> -<p class="feedback--response feedback--response-yes"> - {{ .yes | safeHTML }} -</p> -<p class="feedback--response feedback--response-no"> - {{ .no | safeHTML }} -</p> -<script> - const yesButton = document.querySelector('.feedback--answer-yes'); - const noButton = document.querySelector('.feedback--answer-no'); - const yesResponse = document.querySelector('.feedback--response-yes'); - const noResponse = document.querySelector('.feedback--response-no'); - const disableButtons = () => { - yesButton.disabled = true; - noButton.disabled = true; - }; - const sendFeedback = (value) => { - if (typeof ga !== 'function') return; - const args = { - command: 'send', - hitType: 'event', - category: 'Helpful', - action: 'click', - label: window.location.pathname, - value: value - }; - ga(args.command, args.hitType, args.category, args.action, args.label, args.value); - }; - yesButton.addEventListener('click', () => { - yesResponse.classList.add('feedback--response__visible'); - disableButtons(); - sendFeedback(1); - }); - noButton.addEventListener('click', () => { - noResponse.classList.add('feedback--response__visible'); - disableButtons(); - sendFeedback(0); - }); -</script> |