OSDN Git Service

Updates for new doclava customizations
authorBen Dodson <bjdodson@google.com>
Tue, 24 Aug 2010 23:14:02 +0000 (16:14 -0700)
committerBen Dodson <bjdodson@google.com>
Tue, 24 Aug 2010 23:14:18 +0000 (16:14 -0700)
Change-Id: I98f45e3fe92953968014b2d6589515ca39a5c920

tools/droiddoc/templates-pdk/components/left_nav.cs [new file with mode: 0644]
tools/droiddoc/templates-pdk/components/masthead.cs [new file with mode: 0644]
tools/droiddoc/templates-pdk/customizations.cs [moved from tools/droiddoc/templates-pdk/customization.cs with 51% similarity]

diff --git a/tools/droiddoc/templates-pdk/components/left_nav.cs b/tools/droiddoc/templates-pdk/components/left_nav.cs
new file mode 100644 (file)
index 0000000..a6d0ae3
--- /dev/null
@@ -0,0 +1,15 @@
+<?cs def:custom_left_nav() ?>
+  <?cs if:doc.hidenav != "true" ?>
+    <?cs if:doc.type == "source" ?>
+      <?cs call:source_nav() ?>
+    <?cs elif:doc.type == "porting" ?>
+      <?cs call:porting_nav() ?>
+    <?cs elif:doc.type == "compatibility" ?>
+      <?cs call:compatibility_nav() ?>
+    <?cs elif:doc.type == "community" ?>
+      <?cs call:community_nav() ?>
+    <?cs elif:doc.type == "about" ?>
+      <?cs call:about_nav() ?>
+    <?cs /if ?>
+  <?cs /if ?>
+<?cs /def ?>
diff --git a/tools/droiddoc/templates-pdk/components/masthead.cs b/tools/droiddoc/templates-pdk/components/masthead.cs
new file mode 100644 (file)
index 0000000..cab58d7
--- /dev/null
@@ -0,0 +1,36 @@
+<?cs 
+def:custom_masthead() ?>
+  <div id="header">
+      <div id="headerLeft">
+          <a href="<?cs var:toroot?>" tabindex="-1"><img
+              src="<?cs var:toroot ?>assets/images/open_source.png" alt="Android Open Source Project" /></a>
+          <ul class="<?cs if:home ?>home<?cs
+                      elif:doc.type == "source" ?>source<?cs
+                      elif:doc.type == "porting" ?>porting<?cs
+                      elif:doc.type == "compatibility" ?>compatibility<?cs
+                      elif:doc.type == "community" ?>community<?cs
+                      elif:doc.type == "about" ?>about<?cs /if ?>">
+              <li id="home-link"><a href="<?cs var:toroot ?>index.html"><span>Home</span></a></li>
+              <li id="source-link"><a href="<?cs var:toroot ?>source/index.html"
+                                  onClick="return loadLast('source')"><span>Source</span></a></li>
+              <li id="porting-link"><a href="<?cs var:toroot ?>porting/index.html"
+                                  onClick="return loadLast('porting')"><span>Porting</span></a></li>
+              <li id="compatibility-link"><a href="<?cs var:toroot ?>compatibility/index.html"
+                                  onClick="return loadLast('compatibility')"><span>Compatibility</span></a></li>
+              <li id="community-link"><a href="<?cs var:toroot ?>community/index.html"
+                                  onClick="return loadLast('community')"><span>Community</span></a></li>
+              <li id="about-link"><a href="<?cs var:toroot ?>about/index.html"
+                                  onClick="return loadLast('about')"><span>About</span></a></li>
+          </ul> 
+      </div>
+      <div id="headerRight">
+          <div id="headerLinks">
+            <!-- <img src="<?cs var:toroot ?>assets/images/icon_world.jpg" alt="" /> -->
+            <span class="text">
+              <!-- &nbsp;<a href="#">English</a> | -->
+              <a href="http://www.android.com">Android.com</a>
+            </span>
+          </div>
+      </div><!-- headerRight -->
+  </div><!-- header --><?cs 
+/def ?><?cs # custom_masthead ?>
@@ -1,44 +1,6 @@
 <?cs # This file defines custom definitions for the masthead (logo, searchbox, tabs, etc) and 
-left nav (toc) that gets placed on all pages, for the open source site?>
-
-<?cs 
-def:custom_masthead() ?>
-  <div id="header">
-      <div id="headerLeft">
-          <a href="<?cs var:toroot?>" tabindex="-1"><img
-              src="<?cs var:toroot ?>assets/images/open_source.png" alt="Android Open Source Project" /></a>
-          <ul class="<?cs if:home ?>home<?cs
-                      elif:doc.type == "source" ?>source<?cs
-                      elif:doc.type == "porting" ?>porting<?cs
-                      elif:doc.type == "compatibility" ?>compatibility<?cs
-                      elif:doc.type == "community" ?>community<?cs
-                      elif:doc.type == "about" ?>about<?cs /if ?>">
-              <li id="home-link"><a href="<?cs var:toroot ?>index.html"><span>Home</span></a></li>
-              <li id="source-link"><a href="<?cs var:toroot ?>source/index.html"
-                                  onClick="return loadLast('source')"><span>Source</span></a></li>
-              <li id="porting-link"><a href="<?cs var:toroot ?>porting/index.html"
-                                  onClick="return loadLast('porting')"><span>Porting</span></a></li>
-              <li id="compatibility-link"><a href="<?cs var:toroot ?>compatibility/index.html"
-                                  onClick="return loadLast('compatibility')"><span>Compatibility</span></a></li>
-              <li id="community-link"><a href="<?cs var:toroot ?>community/index.html"
-                                  onClick="return loadLast('community')"><span>Community</span></a></li>
-              <li id="about-link"><a href="<?cs var:toroot ?>about/index.html"
-                                  onClick="return loadLast('about')"><span>About</span></a></li>
-          </ul> 
-      </div>
-      <div id="headerRight">
-          <div id="headerLinks">
-            <!-- <img src="<?cs var:toroot ?>assets/images/icon_world.jpg" alt="" /> -->
-            <span class="text">
-              <!-- &nbsp;<a href="#">English</a> | -->
-              <a href="http://www.android.com">Android.com</a>
-            </span>
-          </div>
-      </div><!-- headerRight -->
-  </div><!-- header --><?cs 
-/def ?><?cs # custom_masthead ?>
-
-
+left nav (toc) that gets placed on all pages, for the open source site. See also the components/
+directory. ?>
 <?cs def:community_nav() ?>
   <div class="g-section g-tpl-240" id="body-content">
     <div class="g-unit g-first side-nav-resizable" id="side-nav">
@@ -53,7 +15,6 @@ def:custom_masthead() ?>
     </script>
   </div>
 <?cs /def ?>
-
 <?cs def:about_nav() ?>
   <div class="g-section g-tpl-240" id="body-content">
     <div class="g-unit g-first side-nav-resizable" id="side-nav">
@@ -68,7 +29,6 @@ def:custom_masthead() ?>
     </script>
   </div>
 <?cs /def ?>
-
 <?cs def:porting_nav() ?>
   <div class="g-section g-tpl-240" id="body-content">
     <div class="g-unit g-first side-nav-resizable" id="side-nav">
@@ -83,7 +43,6 @@ def:custom_masthead() ?>
     </script>
   </div>
 <?cs /def ?>
-
 <?cs def:source_nav() ?>
   <div class="g-section g-tpl-240" id="body-content">
     <div class="g-unit g-first side-nav-resizable" id="side-nav">
@@ -98,7 +57,6 @@ def:custom_masthead() ?>
     </script>
   </div>
 <?cs /def ?>
-
 <?cs def:compatibility_nav() ?>
   <div class="g-section g-tpl-240" id="body-content">
     <div class="g-unit g-first side-nav-resizable" id="side-nav">
@@ -113,23 +71,6 @@ def:custom_masthead() ?>
     </script>
   </div>
 <?cs /def ?>
-
-<?cs def:custom_left_nav() ?>
-  <?cs if:doc.hidenav != "true" ?>
-    <?cs if:doc.type == "source" ?>
-      <?cs call:source_nav() ?>
-    <?cs elif:doc.type == "porting" ?>
-      <?cs call:porting_nav() ?>
-    <?cs elif:doc.type == "compatibility" ?>
-      <?cs call:compatibility_nav() ?>
-    <?cs elif:doc.type == "community" ?>
-      <?cs call:community_nav() ?>
-    <?cs elif:doc.type == "about" ?>
-      <?cs call:about_nav() ?>
-    <?cs /if ?>
-  <?cs /if ?>
-<?cs /def ?>
-
 <?cs def:custom_cc_copyright() ?>
 <?cs /def ?>