-
Notifications
You must be signed in to change notification settings - Fork 85
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rework helpers to be individual modules, instead of mixing in to only Haml helpers.
- Loading branch information
Bob McWhirter
committed
Mar 1, 2010
1 parent
582ba47
commit 18ac214
Showing
7 changed files
with
66 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
|
||
module Awestruct | ||
module Extensions | ||
module GoogleAnalytics | ||
|
||
def google_analytics() | ||
html = '' | ||
html += %Q(<script type="text/javascript">\n) | ||
html += %Q(var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");\n) | ||
html += %Q(document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));\n) | ||
html += %Q(</script>\n) | ||
html += %Q(<script type="text/javascript">\n) | ||
html += %Q(try {\n) | ||
html += %Q(var pageTracker = _gat._getTracker("#{site.google_analytics}");\n) | ||
html += %Q(pageTracker._trackPageview();\n) | ||
html += %Q(} catch(err) {}</script>\n) | ||
html | ||
end | ||
end | ||
end | ||
|
||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,19 @@ | ||
|
||
#module Awestruct | ||
#module Extension | ||
#class IntenseDebate | ||
# | ||
#def execute(site) | ||
#end | ||
# | ||
#end | ||
#end | ||
#end | ||
module Awestruct | ||
module Extensions | ||
module IntenseDebate | ||
|
||
module Haml::Helpers | ||
|
||
def intense_debate_comments() | ||
html = %Q(<script>\n) | ||
html += %Q( var idcomments_acct='#{site.intense_debate_acct}';\n) | ||
html += %Q( var idcomments_post_id;\n) | ||
html += %Q( var idcomments_post_url;\n) | ||
html += %Q(</script>\n) | ||
html += %Q(<span id="IDCommentsPostTitle" style="display:none"></span>\n) | ||
html += %Q(<script type='text/javascript' src='http://www.intensedebate.com/js/genericCommentWrapperV2.js'></script>\n) | ||
html | ||
def intense_debate_comments() | ||
html = %Q(<script>\n) | ||
html += %Q( var idcomments_acct='#{site.intense_debate_acct}';\n) | ||
html += %Q( var idcomments_post_id;\n) | ||
html += %Q( var idcomments_post_url;\n) | ||
html += %Q(</script>\n) | ||
html += %Q(<span id="IDCommentsPostTitle" style="display:none"></span>\n) | ||
html += %Q(<script type='text/javascript' src='http://www.intensedebate.com/js/genericCommentWrapperV2.js'></script>\n) | ||
html | ||
end | ||
end | ||
end | ||
|
||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters