Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(62)

Unified Diff: utils/apidoc/apidoc.dart

Issue 9020028: Hook up favicon, link to main page, and fix process bug. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Respond to review. Created 9 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | utils/apidoc/static/header-background.jpeg » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: utils/apidoc/apidoc.dart
diff --git a/utils/apidoc/apidoc.dart b/utils/apidoc/apidoc.dart
index 1d1c8b2666cc2975998fdd92090e4aba2d1af0e8..b7f8eb5dfb681b64aeebba31af7f2b554a87e57f 100644
--- a/utils/apidoc/apidoc.dart
+++ b/utils/apidoc/apidoc.dart
@@ -20,7 +20,6 @@ void main() {
parseOptions('../../frog', [] /* args */, files);
initializeWorld(files);
final apidoc = new Apidoc();
- apidoc.mainTitle = 'Dart API Reference';
HtmlDiff.initialize();
@@ -32,6 +31,48 @@ void main() {
}
class Apidoc extends doc.Dartdoc {
+ Apidoc() {
+ mainTitle = 'Dart API Reference';
+ mainUrl = 'http://dartlang.org';
+
+ final note = 'http://code.google.com/policies.html#restrictions';
+ final cca = 'http://creativecommons.org/licenses/by/3.0/';
+ final bsd = 'http://code.google.com/google_bsd_license.html';
+ final tos = 'http://www.dartlang.org/tos.html';
+ final privacy = 'http://www.google.com/intl/en/privacy/privacy-policy.html';
+
+ footerText =
+ '''
+ <p>Except as otherwise <a href="$note">noted</a>, the content of this
+ page is licensed under the <a href="$cca">Creative Commons Attribution
+ 3.0 License</a>, and code samples are licensed under the
+ <a href="$bsd">BSD License</a>.</p>
+ <p><a href="$tos">Terms of Service</a> |
+ <a href="$privacy">Privacy Policy</a></p>
+ ''';
+ }
+
+ void writeHeadContents(String title) {
+ super.writeHeadContents(title);
+
+ // Add the analytics code.
+ doc.writeln(
+ '''
+ <script type="text/javascript">
+ var _gaq = _gaq || [];
+ _gaq.push(['_setAccount', 'UA-26406144-4']);
+ _gaq.push(['_setDomainName', 'dartlang.org']);
+ _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>
+ ''');
+ }
+
getTypeComment(Type type) {
return _mergeComments(super.getTypeComment(type), getTypeDoc(type));
}
« no previous file with comments | « no previous file | utils/apidoc/static/header-background.jpeg » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698