am 882bbe14: Merge commit \'5db40c6db73db3f4433dd3456107efb4468a4a99\' into manualmergeDroiddoc

Merge commit '882bbe1489518cabb661e06f6e87a6561d9239df'

* commit '882bbe1489518cabb661e06f6e87a6561d9239df':
  AI 150594: change the homepage markup and styles to allow variable height in
  AI 150537: Add support for language-specific tabs in android developer's blog. Pass the current language pref as an hl=lang url query.
  AI 150536: Change the formatting of sdk redirect pages so that they are not language-specific.
  AI 150535: add the Videos page to the site
This commit is contained in:
Dirk Dougherty 2009-07-25 10:12:09 -07:00 committed by Android Git Automerger
commit 5f07e2908c
13 changed files with 400 additions and 57 deletions

View file

@ -129,7 +129,7 @@ public class DocFile
} else {
if (outfile.indexOf("sdk/") != -1) {
hdf.setValue("sdk", "true");
if (outfile.indexOf("index.html") != -1) {
if ((outfile.indexOf("index.html") != -1) || (outfile.indexOf("features.html") != -1)) {
ClearPage.write(hdf, "sdkpage.cs", outfile);
} else {
ClearPage.write(hdf, "docpage.cs", outfile);

View file

@ -4,20 +4,25 @@
elif:sdk ?>sdk<?cs
elif:home ?>home<?cs
elif:community ?>community<?cs
elif:publish ?>publish<?cs
elif:about ?>about<?cs /if ?>">
elif:videos ?>videos<?cs /if ?>">
<li id="home-link"><a href="<?cs var:toroot ?><?cs if:android.whichdoc != "online" ?>offline.html<?cs else ?>index.html<?cs /if ?>">
<?cs if:!sdk.redirect ?>
<span class="en">Home</span>
<span class="de">Startseite</span>
<span class="es"></span>
<span class="fr"></span>
<span class="it"></span>
<span class="ja"></span>
<span class="zh-CN"></span>
<span class="zh-TW"></span>
<?cs /if ?>
</a></li>
<li id="sdk-link"><a href="<?cs var:toroot ?>sdk/<?cs var:sdk.current ?>/index.html">
<span class="en">SDK</span>
</a></li>
<li id="guide-link"><a href="<?cs var:toroot ?>guide/index.html" onClick="return loadLast('guide')">
<?cs if:!sdk.redirect ?>
<span class="en">Dev Guide</span>
<span class="de">Handbuch</span>
<span class="es">Guía</span>
@ -26,8 +31,10 @@
<span class="ja"></span>
<span class="zh-CN"></span>
<span class="zh-TW"></span>
<?cs /if ?>
</a></li>
<li id="reference-link"><a href="<?cs var:toroot ?>reference/packages.html" onClick="return loadLast('reference')">
<?cs if:!sdk.redirect ?>
<span class="en">Reference</span>
<span class="de">Referenz</span>
<span class="es">Referencia</span>
@ -36,20 +43,35 @@
<span class="ja"></span>
<span class="zh-CN"></span>
<span class="zh-TW"></span>
<?cs /if ?>
</a></li>
<li><a href="http://android-developers.blogspot.com">
<li><a href="http://android-developers.blogspot.com" onClick="return requestAppendHL(this.href)">
<?cs if:!sdk.redirect ?>
<span class="en">Blog</span>
<span class="de"></span>
<span class="es"></span>
<span class="fr"></span>
<span class="it"></span>
<span class="ja"></span>
<span class="zh-CN"></span>
<span class="zh-TW"></span>
<?cs /if ?>
</a></li>
<li id="videos-link"><a href="<?cs var:toroot ?>videos/index.html" onClick="return loadLast('videos')">
<span class="en">Videos</span>
<span class="ja"></span>
</a></li>
<li id="community-link"><a href="<?cs var:toroot ?>community/index.html">
<?cs if:!sdk.redirect ?>
<span class="en">Community</span>
<span class="de"></span>
<span class="es">Comunidad</span>
<span class="fr">Communauté</span>
<span class="it"></span>
<span class="ja"></span>
<span class="zh-CN"></span>
<span class="zh-TW"></span>
<?cs /if ?>
</a></li>
</ul>

View file

@ -4,7 +4,9 @@
<?cs if:sdk.redirect ?>
<head>
<title>Redirecting...</title>
<meta http-equiv="refresh" content="0;url=<?cs var:toroot ?>sdk/<?cs var:sdk.current ?>/index.html">
<meta http-equiv="refresh" content="0;url=<?cs var:toroot ?>sdk/<?cs
if:sdk.redirect.path ?><?cs var:sdk.redirect.path ?>"<?cs
else ?><?cs var:sdk.current ?>/index.html<?cs /if ?>"
<link href="<?cs var:toroot ?>assets/android-developer-docs.css" rel="stylesheet" type="text/css" />
</head>
<?cs else ?>
@ -17,12 +19,14 @@
<?cs call:sdk_nav() ?>
<?cs if:sdk.redirect ?>
<div class="g-unit">
<div id="jd-content">
<p>Redirecting to
<a href="/sdk/<?cs var:sdk.current ?>/index.html">
/sdk/<?cs var:sdk.current ?>/index.html
</a></p>
<a href="<?cs var:toroot ?>sdk/<?cs
if:sdk.redirect.path ?><?cs var:sdk.redirect.path ?>">/sdk/<?cs var:sdk.redirect.path ?><?cs
else ?><?cs var:sdk.current ?>/index.html">/sdk/<?cs var:sdk.current ?>/index.html<?cs /if ?>
</a> ...</p>
<?cs else ?>
<div class="g-unit" id="doc-content" >
<div id="jd-header" class="guide-header" >

View file

@ -191,6 +191,11 @@ hr.blue {
padding: 25px 0 0;
}
#headerLeft img{
height:50px;
width:180px;
}
#headerRight {
position:absolute;
right:0;
@ -244,12 +249,11 @@ hr.blue {
/* TAB HIGHLIGHTING */
.home #home-link a,
.publish #publish-link a,
.guide #guide-link a,
.reference #reference-link a,
.sdk #sdk-link a,
.community #community-link a,
.about #about-link a {
.videos #videos-link a {
background-image: url(images/bg_images_sprite.png);
background-position: 0 0;
background-repeat: no-repeat;
@ -259,12 +263,11 @@ hr.blue {
}
.home #home-link a:hover,
.publish #publish-link a:hover,
.guide #guide-link a:hover,
.reference #reference-link a:hover,
.sdk #sdk-link a:hover,
.community #community-link a:hover,
.about #about-link a:hover {
.videos #videos-link a:hover {
background-image: url(images/bg_images_sprite.png);
background-position: 0 0;
}
@ -771,65 +774,76 @@ td.gsc-search-button {
}
#carouselMain {
background: url('/assets/images/home/bg_home_carousel_board.png') 0 0 no-repeat;
height:auto;
padding: 25px 21px 0;
height:185px;
background-position:top;
overflow:hidden;
position:relative;
zoom:1; /*IE6*/
}
#carouselMain img {
margin:0;
}
#homeMiddle p {
margin:0;
padding-bottom: 1em;
#carouselMain .bulletinDesc h3 {
margin:0;
padding:0;
}
#carouselMain .bulletinDesc p {
margin:0;
padding:0.7em 0 0;
}
#carouselWheel {
background: url('/assets/images/home/bg_home_carousel_wheel.png') 0 0 no-repeat;
padding-top:40px;
height:150px;
}
.clearer { clear:both; }
#arrow-left, #arrow-right {
a#arrow-left, a#arrow-right {
float:left;
width:42px;
height:42px;
background-image:url(images/home/carousel_buttons_sprite.png);
background-repeat:no-repeat;
}
#arrow-left {
a#arrow-left {
margin:35px 3px 0 10px;
}
#arrow-right {
a#arrow-right {
margin:35px 10px 0 0;
}
.arrow-left-off,
#arrow-left.arrow-left-off:hover {
a.arrow-left-off,
a#arrow-left.arrow-left-off:hover {
background-position:0 0;
}
.arrow-right-off,
#arrow-right.arrow-right-off:hover {
a.arrow-right-off,
a#arrow-right.arrow-right-off:hover {
background-position:-42px 0;
}
#arrow-left:hover {
a#arrow-left:hover {
background-position:0 -42px;
}
#arrow-right:hover {
a#arrow-right:hover {
background-position:-42px -42px;
}
.arrow-left-on {
a.arrow-left-on {
background-position:0 0;
}
.arrow-right-on {
a.arrow-right-on {
background-position:-42px 0;
}
.arrow-right-off,
.arrow-left-off {
a.arrow-right-off,
a.arrow-left-off {
cursor:default;
}
.app-list-container {
margin:37px 20px 0;
_margin-top:33px;
margin:0 20px;
position:relative;
width:100%;
}
@ -904,13 +918,19 @@ div#app-list {
padding-bottom:.25em;
}
/*IE6*/
* html #app-list a { zoom: 1; margin:0 24px 0 15px;}
* html #list-clip {
width:430px !important;
}
/*carousel bulletin layouts*/
/*460px width*/
/*185px height*/
.img-left {
float:left;
width:230px;
height:165px;
overflow:hidden;
padding:8px 0 8px 8px;
}
@ -922,7 +942,6 @@ div#app-list {
.img-right {
float:right;
width:220px;
height:165px;
overflow:hidden;
padding:8px 8px 8px 0;
}
@ -933,13 +952,275 @@ div#app-list {
text-align:right;
}
.img-top {
height:80px;
text-align:center;
padding:20px 20px 0;
}
.desc-bottom {
height:100px;
margin:10px;
padding:10px;
}
/* VIDEO PAGE */
#mainBodyLeft.videoPlayer {
width:570px;
}
#mainBodyRight.videoPlayer {
width:330px;
}
/* player */
#videoPlayerBox {
background-color: #DAF3FC;
border-radius:7px;
-moz-border-radius:7px;
-webkit-border-radius:7px;
width:530px;
padding:20px;
border:1px solid #d3ecf5;
box-shadow:2px 3px 1px #eee;
-moz-box-shadow:2px 3px 1px #eee;
-webkit-box-shadow:2px 3px 1px #eee;
}
#videoBorder {
background-color: #FFF;
min-height:399px;
height:auto !important;
border:1px solid #ccdada;
border-radius:7px 7px 0 0;
-moz-border-radius:7px 7px 0 0;
-webkit-border-top-left-radius:7px;
-webkit-border-top-right-radius:7px;
}
#videoPlayerTitle {
width:500px;
padding:15px 15px 0;
}
#videoPlayerTitle h2 {
font-weight:bold;
font-size:1.2em;
color:#336666;
margin:0;
padding:0;
}
#objectWrapper {
padding:15px 15px;
height:334px;
width:500px;
}
/* playlist tabs */
ul#videoTabs {
list-style-type:none;
padding:0;
clear:both;
margin:0;
padding: 20px 0 0 15px;
zoom:1; /* IE7/8, otherwise top-padding is double */
}
ul#videoTabs li {
display:inline;
padding:0;
margin:0 3px 0 0;
line-height:2em;
}
ul#videoTabs li a {
border-radius:7px 7px 0 0;
-moz-border-radius:7px 7px 0 0;
-webkit-border-top-left-radius:7px;
-webkit-border-top-right-radius:7px;
background:#95c0d0;
color:#fff;
text-decoration:none;
padding:.45em 1.5em;
font-weight:bold;
}
ul#videoTabs li.selected a {
font-weight:bold;
text-decoration:none;
color:#555;
background:#daf3fc;
border-bottom:1px solid #daf3fc;
}
ul#videoTabs li:hover a {
background:#85acba;
}
ul#videoTabs li.selected:hover a {
background:#daf3fc;
}
/* playlists */
#videos {
background:#daf3fc;
margin-bottom:1.5em;
padding:15px;
border-radius:5px;
-moz-border-radius:5px;
-webkit-border-radius:5px;
box-shadow:2px 3px 1px #eee;
-moz-box-shadow:2px 3px 1px #eee;
-webkit-box-shadow:2px 3px 1px #eee;
}
#videos div {
display:none;
}
#videos div.selected {
display:block;
}
ul.videoPreviews {
list-style:none;
padding:0;
margin:0;
zoom:1; /* IE, otherwise, layout doesn't update when showing 'more' */
}
ul.videoPreviews li {
margin:0 0 5px;
padding:0;
overflow:hidden;
position:relative;
}
#mainBodyFixed ul.videoPreviews h3 {
font-size: 12px;
margin:0 0 1em 130px;
padding:0;
font-weight:bold;
color:inherit;
}
ul.videoPreviews a {
margin:1px;
padding:10px;
text-decoration:none;
height:90px;
display:block;
border-radius:5px;
-moz-border-radius:5px;
-webkit-border-radius:5px;
background-color:transparent;
}
ul.videoPreviews a:hover {
background-color:#FFF;
border:none; /* IE8, otherwise, bg doesn't work */
}
ul.videoPreviews a.selected {
background-color: #FF9900;
}
ul.videoPreviews img {
float:left;
clear:left;
margin:0;
}
ul.videoPreviews h3 {
font-size:12px;
font-weight:bold;
text-decoration:none;
margin:0 0 1em 130px;
padding:0;
}
ul.videoPreviews p {
font-size: 12px;
text-decoration:none;
margin:0 0 1.2em 130px;
}
ul.videoPreviews p.full {
display:none;
}
ul.videoPreviews span.more {
padding:0 0 0 12px;
background:url('/assets/images/arrow_bluelink_down.png') 0 2px no-repeat;
}
ul.videoPreviews span.less {
padding:0 0 0 12px;
background:url('/assets/images/arrow_bluelink_up.png') 0 2px no-repeat;
display:none;
}
ul.videoPreviews p.toggle {
position:absolute;
margin:0;
margin-top:-23px; /* instead of bottom:23px, because IE won't do it correctly */
left:140px;
}
ul.videoPreviews p.toggle a {
height:auto;
margin:0;
padding:0;
zoom:1; /* IE6, otherwise the margin considers the img on redraws */
}
ul.videoPreviews p.toggle a:hover {
text-decoration:underline;
background:transparent; /* IE6, otherwise it inherits white */
}
/* featured videos */
#mainBodyRight h2 {
padding:0 0 5px;
}
#mainBodyRight ul.videoPreviews {
margin:10px 0 0;
}
#mainBodyRight ul.videoPreviews li {
font-size:11px;
line-height:13px;
margin:0 0 5px;
padding:0;
}
#mainBodyRight ul.videoPreviews h3 {
padding:0;
margin:0;
}
#mainBodyRight ul.videoPreviews a {
text-decoration:none;
height:108px;
border:1px solid #FFF;
}
#mainBodyRight ul.videoPreviews a:hover {
border:1px solid #CCDADA;
}
#mainBodyRight ul.videoPreviews a.selected {
border:1px solid #FFF;
}
#mainBodyRight ul.videoPreviews p {
line-height:1.2em;
padding:0;
margin:4px 0 0 130px;
}
#mainBodyRight ul.videoPreviews img {
margin-top:5px;
}

View file

@ -208,7 +208,7 @@ function resizeAll() {
}
function getBaseUri(uri) {
intlUrl = uri.substring(0,6) == "/intl/";
var intlUrl = (uri.substring(0,6) == "/intl/");
if (intlUrl) {
base = uri.substring(uri.indexOf('intl/')+5,uri.length);
base = base.substring(base.indexOf('/')+1, base.length);
@ -220,6 +220,19 @@ function getBaseUri(uri) {
}
}
function requestAppendHL(uri) {
//append "?hl=<lang> to an outgoing request (such as to blog)
var lang = getLangPref();
if (lang) {
var q = 'hl=' + lang;
uri += '?' + q;
window.location = uri;
return false;
} else {
return true;
}
}
function loadLast(cookiePath) {
var location = window.location.href;
if (location.indexOf("/"+cookiePath+"/") != -1) {
@ -418,5 +431,9 @@ function loadLangPref() {
}
function getLangPref() {
return $("#language").find(":selected").attr("value");
var lang = $("#language").find(":selected").attr("value");
if (!lang) {
lang = readCookie("pref_lang");
}
return (lang != 0) ? lang : 'en';
}

View file

@ -45,23 +45,8 @@ function droid(appName){
currentDroid = appName;
var droid = droidList[appName];
var layout = droid.layout;
var imgDiv = document.getElementById("bulletinImg");
var descDiv = document.getElementById("bulletinDesc");
if (layout == "imgLeft") {
imgDiv.className = "img-left";
descDiv.className = "desc-right";
} else if (layout == "imgTop") {
imgDiv.className = "img-top";
descDiv.className = "desc-bottom";
} else if (layout == "imgRight") {
imgDiv.className = "img-right";
descDiv.className = "desc-left";
}
imgDiv.innerHTML = "<img src='" + toRoot + assetsRoot + "images/home/" + droid.img + "'>";
descDiv.innerHTML = (droid.title != "") ? "<h3>" + droid.title + "</h3>" + droid.desc : droid.desc;
$("#"+appName).show().siblings().hide();
if(oldDroid)
oldDroid.removeClass("selected");
@ -95,7 +80,41 @@ function buildCarousel() {
a.appendChild(br);
a.appendChild(span);
appList.appendChild(a);
/* add the bulletins */
var layout = droid.layout;
var div = document.createElement("div");
var imgDiv = document.createElement("div");
var descDiv = document.createElement("div");
div.setAttribute("id", x);
div.setAttribute("style", "display:none");
imgDiv.setAttribute("class", "bulletinImg");
descDiv.setAttribute("class", "bulletinDesc");
if (layout == "imgLeft") {
$(imgDiv).addClass("img-left");
$(descDiv).addClass("desc-right");
} else if (layout == "imgTop") {
$(imgDiv).addClass("img-top");
$(descDiv).addClass("desc-bottom");
} else if (layout == "imgRight") {
$(imgDiv).addClass("img-right");
$(descDiv).addClass("desc-left");
}
imgDiv.innerHTML = "<img src='" + toRoot + assetsRoot + "images/home/" + droid.img + "'>";
descDiv.innerHTML = (droid.title != "") ? "<h3>" + droid.title + "</h3>" + droid.desc : droid.desc;
$(div).append(imgDiv);
$(div).append(descDiv);
$("#carouselMain").append(div);
}
}
// -- * slider * -- //

Binary file not shown.

After

Width:  |  Height:  |  Size: 180 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 181 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB