Massive clobber of all template files in developer site for new design
Change-Id: I5f243dcb377a8b2e573c404a9e685cc64e0e06d2
diff --git a/tools/droiddoc/templates-sdk/sdkpage.cs b/tools/droiddoc/templates-sdk/sdkpage.cs
index f6c7cfa..38fb67b 100644
--- a/tools/droiddoc/templates-sdk/sdkpage.cs
+++ b/tools/droiddoc/templates-sdk/sdkpage.cs
@@ -12,11 +12,18 @@
<?cs else ?>
<?cs include:"head_tag.cs" ?>
<?cs /if ?>
-<body class="gc-documentation" itemscope itemtype="http://schema.org/CreativeWork">
-<a name="top"></a>
-<?cs call:custom_masthead() ?>
+<body class="gc-documentation
+ <?cs if:(guide||develop||training||reference||tools||sdk) ?>develop<?cs
+ elif:design ?>design<?cs
+ elif:distribute ?>distribute<?cs
+ /if ?>" itemscope itemtype="http://schema.org/CreativeWork">
+ <a name="top"></a>
+<?cs include:"header.cs" ?>
-<?cs call:sdk_nav() ?>
+
+<div <?cs if:fullpage
+?><?cs else
+?>class="col-13" id="doc-col"<?cs /if ?> >
<?cs if:sdk.redirect ?>
@@ -39,13 +46,9 @@
#
?>
-<div class="g-unit" id="doc-content" >
- <div id="jd-header" class="guide-header" >
- <span class="crumb"> </span>
- <h1 itemprop="name"><?cs if:android.whichdoc == "online" ?>Download the <?cs /if ?><?cs
-var:page.title ?></h1>
- </div>
-
+<?cs if:header.hide ?><?cs else ?>
+<h1 itemprop="name"><?cs var:page.title ?></h1>
+<?cs /if ?>
<div id="jd-content" itemprop="description">
<?cs if:sdk.not_latest_version ?>
@@ -73,26 +76,6 @@
#
?>
-<p>The Android NDK is a companion tool to the Android SDK that lets you build
-performance-critical portions of your apps in native code. It provides headers and
-libraries that allow you to build activities, handle user input, use hardware sensors,
-access application resources, and more, when programming in C or C++. If you write
-native code, your applications are still packaged into an .apk file and they still run
-inside of a virtual machine on the device. The fundamental Android application model
-does not change.</p>
-
-<p>Using native code does not result in an automatic performance increase,
-but always increases application complexity. If you have not run into any limitations
-using the Android framework APIs, you probably do not need the NDK. Read <a
-href="<?cs var:toroot ?>sdk/ndk/overview.html">What is the NDK?</a> for more information about what
-the NDK offers and whether it will be useful to you.
-</p>
-<p>
-The NDK is designed for use <em>only</em> in conjunction with the
-Android SDK. If you have not already installed and setup the <a
-href="http://developer.android.com/sdk/index.html">Android SDK</a>, please
-do so before downloading the NDK.
-</p>
<table class="download">
<tr>
@@ -126,6 +109,9 @@
<td><?cs var:ndk.linux_checksum ?></td>
</tr>
</table>
+
+ <?cs ######## HERE IS THE JD DOC CONTENT ######### ?>
+ <?cs call:tag_list(root.descr) ?>
<?cs else ?>
<?cs # end if NDK ...
@@ -145,14 +131,12 @@
?>
<?cs if:android.whichdoc == "online" ?>
- <p>Welcome Developers! If you are new to the Android SDK, please read the steps below, for an
-overview of how to set up the SDK. </p>
- <p>If you're already using the Android SDK, you should
-update to the latest tools or platform using the <em>Android SDK and AVD Manager</em>, rather than
-downloading a new SDK starter package. See <a
-href="<?cs var:toroot ?>sdk/adding-components.html">Adding SDK Components</a>.</p>
+<?cs ######## HERE IS THE JD DOC CONTENT FOR ONLINE ######### ?>
+<?cs call:tag_list(root.descr) ?>
+<div class="wrap">
+<div class="pax col-13 online" style="display:none">
<table class="download">
<tr>
<th>Platform</th>
@@ -172,7 +156,8 @@
<tr>
<!-- blank TD from Windows rowspan -->
<td>
- <a onclick="onDownload(this)" href="http://dl.google.com/android/<?cs var:sdk.win_installer
+ <a onclick="onDownload(this)" id="win-sdk" href="http://dl.google.com/android/<?cs
+var:sdk.win_installer
?>"><?cs var:sdk.win_installer ?></a> (Recommended)
</td>
<td><?cs var:sdk.win_installer_bytes ?> bytes</td>
@@ -181,7 +166,8 @@
<tr class="alt-color">
<td>Mac OS X (intel)</td>
<td>
- <a onclick="onDownload(this)" href="http://dl.google.com/android/<?cs var:sdk.mac_download
+ <a onclick="onDownload(this)" id="mac-sdk" href="http://dl.google.com/android/<?cs
+var:sdk.mac_download
?>"><?cs var:sdk.mac_download ?></a>
</td>
<td><?cs var:sdk.mac_bytes ?> bytes</td>
@@ -190,26 +176,52 @@
<tr>
<td>Linux (i386)</td>
<td>
- <a onclick="onDownload(this)" href="http://dl.google.com/android/<?cs var:sdk.linux_download
+ <a onclick="onDownload(this)" id="linux-sdk" href="http://dl.google.com/android/<?cs
+var:sdk.linux_download
?>"><?cs var:sdk.linux_download ?></a>
</td>
<td><?cs var:sdk.linux_bytes ?> bytes</td>
<td><?cs var:sdk.linux_checksum ?></td>
</tr>
</table>
+
+
+<script>
+ function onDownload(link) {
+ $("#filename").text($(link).html());
+ $("#next-steps").fadeIn('slow');
+ $("#intro").fadeOut('slow');
+ $('.pax').slideUp();
+ $('.reqs').slideUp();
+ }
+
+
+ var os;
+ var $link;
+ if (navigator.appVersion.indexOf("Win")!=-1) {
+ os = "Windows";
+ $link = $('#win-sdk');
+ } else if (navigator.appVersion.indexOf("Mac")!=-1) {
+ os = "Mac";
+ $link = $('#mac-sdk');
+ } else if (navigator.appVersion.indexOf("Linux")!=-1) {
+ os = "Linux";
+ $link = $('#linux-sdk');
+ }
+ if (os) {
+ $('#download-button').text("Download the SDK for " + os).removeClass("disabled");
+ $('#download-button').click(function() {onDownload($link.get());}).attr('href', $link.attr('href'));
+ } else {
+ $('.pax').show();
+ $('#download-button').css({'font-size':'14px'});
+ }
-<div id="next-steps" style="display:none">
- <p><b><em><span id="filename"></span></em> is now downloading. Follow the steps below to
-get started.</b></p>
-</div>
-
-<script type="text/javascript">
-function onDownload(link) {
- $("#filename").text($(link).html());
- $("#next-steps").show();
-}
</script>
+
+</div><!-- end pax -->
+</div><!-- end wrap -->
+
<?cs else ?> <?cs # end if online ?>
<?cs if:sdk.preview ?><?cs # it's preview offline docs ?>
@@ -225,10 +237,16 @@
</style>
<?cs else ?><?cs # it's normal offline docs ?>
+
+ <?cs ######## HERE IS THE JD DOC CONTENT FOR OFFLINE ######### ?>
+ <?cs call:tag_list(root.descr) ?>
<style type="text/css">
- p.offline-message { display:block; }
- p.online-message { display:none; }
- </style>
+ body .offline { display:block; }
+ body .online { display:none; }
+ </style>
+ <script>
+ $('.reqs').show();
+ </script>
<?cs /if ?>
<?cs /if ?> <?cs # end if/else online ?>
@@ -237,7 +255,6 @@
<?cs /if ?> <?cs # end if/else redirect ?>
-<?cs call:tag_list(root.descr) ?>
</div><!-- end jd-content -->