diff --git a/docs/src/templates/docs.css b/docs/src/templates/docs.css index 99ea7454e17d..fbb8a990e532 100644 --- a/docs/src/templates/docs.css +++ b/docs/src/templates/docs.css @@ -265,6 +265,23 @@ li { height: 1em; } +#disqus_thread { + float: right; + margin-top: 1em; + margin-right: 3em; + width: 57em; + padding: 0.5em 1em 1em 1em; + background: #fff; + overflow: hidden; + + -moz-box-shadow: 4px 4px 6px #48577D; + -webkit-box-shadow: 4px 4px 6px #48577D; + box-shadow: 4px 4px 6px #48577D; + + -moz-border-radius: 15px; + -webkit-border-radius: 15px; + border-radius: 15px; +} #content { background-color: #fff; diff --git a/docs/src/templates/docs.js b/docs/src/templates/docs.js index d1069a770dac..9743c7b56e4d 100644 --- a/docs/src/templates/docs.js +++ b/docs/src/templates/docs.js @@ -7,7 +7,6 @@ function DocsController($location, $browser, $window, $cookies) { DOCS_PATH = /^\/(api)|(guide)|(cookbook)|(misc)|(tutorial)/; this.$location = $location; - self.versionNumber = angular.version.full; self.version = angular.version.full + " " + angular.version.codeName; self.subpage = false; @@ -66,9 +65,23 @@ function DocsController($location, $browser, $window, $cookies) { }; this.afterPartialLoaded = function() { + var currentPageId = $location.hashPath.substr(1); SyntaxHighlighter.highlight(); $window.scrollTo(0,0); $window._gaq.push(['_trackPageview', $location.path()]); + $window._gaq.push(['_trackPageview', currentPageId]); + this.loadDisqus(currentPageId); + }; + + this.loadDisqus = function(currentPageId) { + var disqus_shortname = 'angularjs'; // required: replace example with your forum shortname + var disqus_identifier = currentPageId; + /* * * Per Disqus: DON'T EDIT BELOW THIS LINE * * */ + (function() { + var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true; + dsq.src = 'http://angularjs.disqus.com/embed.js'; + (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq); + })(); }; this.getFeedbackUrl = function() { @@ -77,6 +90,7 @@ function DocsController($location, $browser, $window, $cookies) { "body=" + escape("Hi there,\n\nI read " + $location.absUrl() + " and wanted to ask ...."); }; + /** stores a cookie that is used by apache to decide which manifest ot send */ this.enableOffline = function() { //The cookie will be good for one year! diff --git a/docs/src/templates/index.html b/docs/src/templates/index.html index d5cfaed2d290..45268b01f7b7 100644 --- a/docs/src/templates/index.html +++ b/docs/src/templates/index.html @@ -70,8 +70,11 @@

Report an Issue or Ask a Question + - +
+
+