Files
docker-docs/_includes/analytics/polldaddy.html
Sebastiaan van Stijn 8bf577084a Move polldaddy script to an include, and update some options
- use a config-variable for the ID
- exclude the script if no ID is set
- set default font and font-color

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-10-14 15:33:16 +02:00

19 lines
789 B
HTML

{%- if site.polldaddy_id and site.polldaddy_id != '' -%}
<script>
let PDRTJS_settings_{{ site.polldaddy_id }} = {
"id": "{{ site.polldaddy_id }}",
"unique_id": "{{ page.path }}",
"title": "{{ page.title | default: page_title }}",
"font_family": "Open Sans, sans serif",
"font_color": "b9c2cc",
"font_align": "center",
"permalink": "https://github.com/docker/docker.github.io/blob/master/{{ page.path }}"
};
(function (d, c, j) {
if (!document.getElementById(j)) {
let pd=d.createElement(c),s;pd.id=j;pd.src='https://polldaddy.com/js/rating/rating.js';s=document.getElementsByTagName(c)[0];s.parentNode.insertBefore(pd, s);
}
}(document, 'script', 'pd-rating-js'));
</script>
{%- endif -%}