From 194dbb4a501f2912ac9f46e7e2cfc6e99e3c7246 Mon Sep 17 00:00:00 2001 From: Pacien TRAN-GIRARD Date: Tue, 13 May 2014 16:34:31 +0200 Subject: Load GA tracker with requirejs --- js/slide-deck.js | 19 +- js/slides.js | 6 +- scripts/md/base.html | 39 +-- slide_config.js | 10 +- template.html | 899 ++++++++++++++++++++++++++++++--------------------- 5 files changed, 552 insertions(+), 421 deletions(-) diff --git a/js/slide-deck.js b/js/slide-deck.js index 266de5c..f5d21c6 100644 --- a/js/slide-deck.js +++ b/js/slide-deck.js @@ -808,20 +808,11 @@ SlideDeck.prototype.loadTheme_ = function(theme) { * @private */ SlideDeck.prototype.loadAnalytics_ = function() { - var _gaq = window['_gaq'] || []; - _gaq.push([ '_setAccount', this.config_.settings.analytics ]); - _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); - })(); + window._gaq = window['_gaq'] || []; + window._gaq.push([ '_setAccount', this.config_.settings.analytics ]); + window._gaq.push([ '_trackPageview' ]); + + requirejs([ 'analytics' ]); }; // Polyfill missing APIs (if we need to), then create the slide deck. diff --git a/js/slides.js b/js/slides.js index bfef324..143dac2 100644 --- a/js/slides.js +++ b/js/slides.js @@ -7,6 +7,8 @@ require.config({ 'modernizr' : 'modernizr.custom.56571', 'prettify' : 'prettify/prettify', 'hammer' : 'hammer.min', + + 'analytics' : 'https://www.google-analytics.com/ga' }, shim : { @@ -16,6 +18,4 @@ require.config({ } }); -require(['slide-deck'], function(someModule) { - -}); +require(['slide-deck']); diff --git a/scripts/md/base.html b/scripts/md/base.html index 638dbb8..84f6aa9 100644 --- a/scripts/md/base.html +++ b/scripts/md/base.html @@ -9,7 +9,7 @@ URL: https://code.google.com/p/io-2012-slides
-A list where items build:
-Another list, but items fade as they build:
-target="_self"
to the link.Press 'h' to highlight important sections of code (wrapped in <b>
).
++ - - ++ ++ ++
+ ++ + + + + ++
+ +
+ ++ + +Slide with Bullets
+ ++ ++
+- + Titles are formatted as Open Sans with bold applied and font size is + set at 45 +
+- + Title capitalization is title case +
++
+- + Subtitle capitalization is title case +
+- + Subtitle capitalization is title case +
+- + Titles and subtitles should never have a period at the end +
++ + +Slide with Bullets that Build
+Subtitle Placeholder
+ ++ ++ A list where items build: +
++
+- + Pressing 'h' highlights code snippets +
+- + Pressing 'p' toggles speaker notes (if they're on the current slide) +
+- + Pressing 'f' toggles fullscreen viewing +
+- + Pressing 'w' toggles widescreen +
+- + Pressing 'o' toggles overview mode +
+- + Pressing 'ESC' toggles off these goodies +
++ Another list, but items fade as they build: +
++
+- + Hover over me! +
+- + Hover over me! +
+- + Hover over me! +
++ + +Slide with (Smaller Font)
+ ++ ++
+- + All links open in new tabs. +
+- + To change that this, add
++ target="_self"
+ to the link. ++ Hidden slides are left out of the presentation. + ++ + - -Code Slide (with Subtitle Placeholder)
+Subtitle Placeholder
+ ++ -+ Press 'h' to highlight important sections of code (wrapped in +
++ <b>
+ ). +<script type='text/javascript'> // Say hello world until the user starts questioning // the meaningfulness of their existence. @@ -118,15 +161,14 @@ URL: https://code.google.com/p/io-2012-slides } </script>-- - +Code Slide (Smaller Font)
- -- +++ + - -Code Slide (Smaller Font)
+ ++ -// Say hello world until the user starts questioning // the meaningfulness of their existence. function helloWorld(world) { @@ -135,13 +177,13 @@ function helloWorld(world) { } }-+<style> p { color: pink } b { color: blue } </style>-+<!DOCTYPE html> <html> <head> @@ -152,265 +194,380 @@ function helloWorld(world) { <body> </html>-- - -- - -- --
-- Point I wanted to make #1
-- Point I wanted to make #2
-- Point I wanted to make #3
-- Example link in notes.
-Remember to say this tag line!
-Slide with Speaker Notes
- -- -Press 'p' to toggle speaker notes.
-- - -- - -- --
-- See this amazing link: link.
-Remember to say this tag line!
-Presenter Mode
- -- -Add
-?presentme=true
to the URL to enabled presenter mode. - This setting is sticky, meaning refreshing the page will persist presenter - mode.Hit
-?presentme=false
to disable presenter mode.- - - -Slide with Image
- -- -- -
- - - -Slide with Image (Centered horz/vert)
- -- -- -
- - - -Table Option A
-Subtitle Placeholder
- -- --
-- -Column 1 Column 2 Column 3 Column 4 -- -Row 1 placeholder placeholder placeholder placeholder -- -Row 2 placeholder placeholder placeholder placeholder -- -Row 3 placeholder placeholder placeholder placeholder -- -Row 4 placeholder placeholder placeholder placeholder -- -Row 5 placeholder placeholder placeholder placeholder -- - - -Table Option A (Smaller Text)
-Subtitle Placeholder
- -- --
-- -Column 1 Column 2 Column 3 Column 4 -- -Row 1 placeholder placeholder placeholder placeholder -- -Row 2 placeholder placeholder placeholder placeholder -- -Row 3 placeholder placeholder placeholder placeholder -- -Row 4 placeholder placeholder placeholder placeholder -- -Row 5 placeholder placeholder placeholder placeholder -- - - -Table Option B
-Subtitle Placeholder
- -- --
-- -Header 1 placeholder placeholder placeholder -- -Header 2 placeholder placeholder placeholder -- -Header 3 placeholder placeholder placeholder -- -Header 4 placeholder placeholder placeholder -- -Header 5 placeholder placeholder placeholder -- - - -Slide Styles
- -- ----
-- class="red"
-- class="red2"
-- class="red3"
-- class="blue"
-- class="blue2"
-- class="blue3"
-- class="green"
-- class="green2"
--
-- class="green3"
-- class="yellow"
-- class="yellow2"
-- class="yellow3"
-- class="gray"
-- class="gray2"
-- class="gray3"
-- class="gray4"
-- I am centered text with a and button. --- - -- - Segue Slide
-Subtitle Placeholder
- -- - - -Full Image (with Optional Header)
- - -- - -- - -- This is an example of quote text. -- -- - - -Slide with Iframe
- -- - -- - -- - -- - -- - -<Thank You!>
-Important contact information goes here.
-- -
-- - -- --
- -
+ Remember to say this tag line! +
++ Press 'p' to toggle speaker notes. +
++ Remember to say this tag line! +
+
+ Add
+
+ ?presentme=true
+
+ to the URL to enabled presenter mode. This setting is sticky, meaning
+ refreshing the page will persist presenter mode.
+
+ Hit
+
+ ?presentme=false
+
+ to disable presenter mode.
+
+ | Column 1 | +Column 2 | +Column 3 | +Column 4 | +
---|---|---|---|---|
Row 1 | +placeholder | +placeholder | +placeholder | +placeholder | +
Row 2 | +placeholder | +placeholder | +placeholder | +placeholder | +
Row 3 | +placeholder | +placeholder | +placeholder | +placeholder | +
Row 4 | +placeholder | +placeholder | +placeholder | +placeholder | +
Row 5 | +placeholder | +placeholder | +placeholder | +placeholder | +
+ | Column 1 | +Column 2 | +Column 3 | +Column 4 | +
---|---|---|---|---|
Row 1 | +placeholder | +placeholder | +placeholder | +placeholder | +
Row 2 | +placeholder | +placeholder | +placeholder | +placeholder | +
Row 3 | +placeholder | +placeholder | +placeholder | +placeholder | +
Row 4 | +placeholder | +placeholder | +placeholder | +placeholder | +
Row 5 | +placeholder | +placeholder | +placeholder | +placeholder | +
Header 1 | +placeholder | +placeholder | +placeholder | +
---|---|---|---|
Header 2 | +placeholder | +placeholder | +placeholder | +
Header 3 | +placeholder | +placeholder | +placeholder | +
Header 4 | +placeholder | +placeholder | +placeholder | +
Header 5 | +placeholder | +placeholder | +placeholder | +
This is an example of quote text.+ +
+ Important contact information goes here. +
++ +
+