Mercurial > piecrust2
comparison docs/templates/google.html @ 259:adb066ffb363
Merge docs.
author | Ludovic Chabant <ludovic@chabant.com> |
---|---|
date | Sun, 22 Feb 2015 22:03:54 -0800 |
parents | 26e59f837558 |
children | acd119fda1f7 |
comparison
equal
deleted
inserted
replaced
258:7ec06ec14247 | 259:adb066ffb363 |
---|---|
1 {% macro webfonts(fontnames) %} | |
2 <link rel="stylesheet" type="text/css" href="http://fonts.googleapis.com/css?family={{ fontnames }}"> | |
3 {% endmacro %} | |
4 | |
5 {% macro analytics(siteId) %} | |
6 <script type="text/javascript"> | |
7 | |
8 var _gaq = _gaq || []; | |
9 _gaq.push(['_setAccount', '{{ siteId }}']); | |
10 _gaq.push(['_trackPageview']); | |
11 | |
12 (function() { | |
13 var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; | |
14 ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; | |
15 var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); | |
16 })(); | |
17 | |
18 </script> | |
19 {% endmacro %} | |
20 | |
21 {% macro adsense(client, name, slot, width, height) %} | |
22 <script type="text/javascript"><!-- | |
23 google_ad_client = "{{ client }}"; | |
24 /* {{ name }} */ | |
25 google_ad_slot = "{{ slot }}"; | |
26 google_ad_width = {{ width }}; | |
27 google_ad_height = {{ height }}; | |
28 //--> | |
29 </script> | |
30 <script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> | |
31 </script> | |
32 {% endmacro %} |