diff docs/templates/google.html @ 382:3a61f45702cb

docs: Add documentation site.
author Ludovic Chabant <ludovic@chabant.com>
date Sun, 04 Oct 2015 08:02:43 -0700
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/docs/templates/google.html	Sun Oct 04 08:02:43 2015 -0700
@@ -0,0 +1,33 @@
+{% macro webfonts(fontnames) %}
+<link rel="stylesheet" type="text/css" href="http://fonts.googleapis.com/css?family={{ fontnames }}">
+{% endmacro %}
+
+{% macro analytics(siteId) %}
+<script type="text/javascript">
+
+  var _gaq = _gaq || [];
+  _gaq.push(['_setAccount', '{{ siteId }}']);
+  _gaq.push(['_trackPageview']);
+
+  (function() {
+    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
+    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
+    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
+  })();
+
+</script>
+{% endmacro %}
+
+{% macro adsense(client, name, slot, width, height) %}
+  <script type="text/javascript"><!--
+      google_ad_client = "{{ client }}";
+      /* {{ name }} */
+      google_ad_slot = "{{ slot }}";
+      google_ad_width = {{ width }};
+      google_ad_height = {{ height }};
+      //-->
+  </script>
+  <script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
+  </script>
+{% endmacro %}
+