AI 150594: change the homepage markup and styles to allow variable height in
the carousel bulletin items
also move the IO announcement into the carousel and add an ADC2 announcement
ALSO change the carousel script to write all bulletins to the DOM right away and show/hide them, instead of reading from the JSON and writing to the DOM each time on the fly
Automated import of CL 150594
diff --git a/tools/droiddoc/templates/assets/android-developer-core.css b/tools/droiddoc/templates/assets/android-developer-core.css
index 1c57e45..2841398 100644
--- a/tools/droiddoc/templates/assets/android-developer-core.css
+++ b/tools/droiddoc/templates/assets/android-developer-core.css
@@ -774,65 +774,76 @@
}
#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%;
}
@@ -907,13 +918,19 @@
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;
}
@@ -925,7 +942,6 @@
.img-right {
float:right;
width:220px;
- height:165px;
overflow:hidden;
padding:8px 8px 8px 0;
}
@@ -936,12 +952,10 @@
text-align:right;
}
.img-top {
- height:80px;
- text-align:center;
+ padding:20px 20px 0;
}
.desc-bottom {
- height:100px;
- margin:10px;
+ padding:10px;
}
diff --git a/tools/droiddoc/templates/assets/carousel.js b/tools/droiddoc/templates/assets/carousel.js
index 4eebd89..57eaff7 100644
--- a/tools/droiddoc/templates/assets/carousel.js
+++ b/tools/droiddoc/templates/assets/carousel.js
@@ -45,23 +45,8 @@
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 @@
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 * -- //
diff --git a/tools/droiddoc/templates/assets/images/home/android_adc.png b/tools/droiddoc/templates/assets/images/home/android_adc.png
new file mode 100644
index 0000000..9fe7f8f
--- /dev/null
+++ b/tools/droiddoc/templates/assets/images/home/android_adc.png
Binary files differ
diff --git a/tools/droiddoc/templates/assets/images/home/bg_home_carousel_board.png b/tools/droiddoc/templates/assets/images/home/bg_home_carousel_board.png
new file mode 100755
index 0000000..c577e02
--- /dev/null
+++ b/tools/droiddoc/templates/assets/images/home/bg_home_carousel_board.png
Binary files differ
diff --git a/tools/droiddoc/templates/assets/images/home/bg_home_carousel_wheel.png b/tools/droiddoc/templates/assets/images/home/bg_home_carousel_wheel.png
new file mode 100755
index 0000000..aa224ad
--- /dev/null
+++ b/tools/droiddoc/templates/assets/images/home/bg_home_carousel_wheel.png
Binary files differ
diff --git a/tools/droiddoc/templates/assets/images/home/io-large.png b/tools/droiddoc/templates/assets/images/home/io-large.png
new file mode 100755
index 0000000..986053c
--- /dev/null
+++ b/tools/droiddoc/templates/assets/images/home/io-large.png
Binary files differ
diff --git a/tools/droiddoc/templates/assets/images/home/io-small.png b/tools/droiddoc/templates/assets/images/home/io-small.png
new file mode 100755
index 0000000..3a22549
--- /dev/null
+++ b/tools/droiddoc/templates/assets/images/home/io-small.png
Binary files differ