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
This commit is contained in:
committed by
The Android Open Source Project
parent
efdcda4f90
commit
5db40c6db7
@@ -774,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%;
|
||||
}
|
||||
@@ -907,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;
|
||||
}
|
||||
@@ -925,7 +942,6 @@ div#app-list {
|
||||
.img-right {
|
||||
float:right;
|
||||
width:220px;
|
||||
height:165px;
|
||||
overflow:hidden;
|
||||
padding:8px 8px 8px 0;
|
||||
}
|
||||
@@ -936,12 +952,10 @@ 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;
|
||||
}
|
||||
|
||||
|
||||
|
@@ -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 * -- //
|
||||
|
BIN
tools/droiddoc/templates/assets/images/home/android_adc.png
Normal file
BIN
tools/droiddoc/templates/assets/images/home/android_adc.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.8 KiB |
BIN
tools/droiddoc/templates/assets/images/home/bg_home_carousel_board.png
Executable file
BIN
tools/droiddoc/templates/assets/images/home/bg_home_carousel_board.png
Executable file
Binary file not shown.
After Width: | Height: | Size: 1.9 KiB |
BIN
tools/droiddoc/templates/assets/images/home/bg_home_carousel_wheel.png
Executable file
BIN
tools/droiddoc/templates/assets/images/home/bg_home_carousel_wheel.png
Executable file
Binary file not shown.
After Width: | Height: | Size: 2.0 KiB |
BIN
tools/droiddoc/templates/assets/images/home/io-large.png
Executable file
BIN
tools/droiddoc/templates/assets/images/home/io-large.png
Executable file
Binary file not shown.
After Width: | Height: | Size: 5.4 KiB |
BIN
tools/droiddoc/templates/assets/images/home/io-small.png
Executable file
BIN
tools/droiddoc/templates/assets/images/home/io-small.png
Executable file
Binary file not shown.
After Width: | Height: | Size: 1.4 KiB |
Reference in New Issue
Block a user