Merge "docs: Updates to GIFs on WH home page" into mnc-io-docs

am: 5ca058d38e

* commit '5ca058d38ec22e0a160859aee8d774dc59bf759c':
  docs: Updates to GIFs on WH home page

Change-Id: I280afb495fb816376e368ca16c2a401adfeeb3a2
This commit is contained in:
Eric Schmidt
2016-05-18 19:23:31 +00:00
committed by android-build-merger
9 changed files with 30 additions and 12 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.3 MiB

After

Width:  |  Height:  |  Size: 3.0 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.9 MiB

After

Width:  |  Height:  |  Size: 9.2 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 MiB

After

Width:  |  Height:  |  Size: 3.2 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 188 KiB

After

Width:  |  Height:  |  Size: 69 KiB

View File

@@ -76,7 +76,9 @@ excludeFromSuggestions=true
<div class="cols" style="margin-top:1em;">
<div class="col-4of12 gif-container">
<img class="partner-gifs"
src="/images/topic/instant-apps/s3-BandH-static.png">
src="/images/topic/instant-apps/s3-BandH-static.png"
data-stat="/images/topic/instant-apps/s3-BandH-static.png"
data-anim="/images/topic/instant-apps/s3-BandH-animated.gif">
<p class="figure-caption">
<em>B&amp;H Photo<br/>
(via Google Search)</em>
@@ -85,7 +87,9 @@ excludeFromSuggestions=true
<div class="col-4of12 gif-container">
<img class="partner-gifs"
src="/images/topic/instant-apps/s3-BuzzFeed-static.png">
src="/images/topic/instant-apps/s3-BuzzFeed-static.png"
data-stat="/images/topic/instant-apps/s3-BuzzFeed-static.png"
data-anim="/images/topic/instant-apps/s3-BuzzFeed-animated.gif">
<p class="figure-caption">
<em>BuzzfeedVideo<br/>
(via a shared link)</em>
@@ -94,7 +98,9 @@ excludeFromSuggestions=true
<div class="col-4of12 gif-container">
<img class="partner-gifs"
src="/images/topic/instant-apps/s3-ParkandPay-static.png">
src="/images/topic/instant-apps/s3-ParkandPay-static.png"
data-stat="/images/topic/instant-apps/s3-ParkandPay-static.png"
data-anim="/images/topic/instant-apps/s3-ParkandPay-animated.gif">
<p class="figure-caption">
<em>Park and Pay<br/>
(via NFC)</em>
@@ -263,18 +269,30 @@ excludeFromSuggestions=true
(function () {
function swapOnMouseover(evt) {
var target = evt.target;
var imageSrc = $(target).attr("src");
// Assumes that images are named *-static and *-animated.
if (imageSrc.indexOf("static") > -1) {
var newImageSrc = imageSrc.replace("static.png", "animated.gif");
$(target).attr("src", newImageSrc).removeAttr("onmouseenter");
function onMouseEnter(evt) {
if (evt.target.dataset && evt.target.dataset.anim) {
swap(evt.target, {
newStr: evt.target.dataset.anim
});
}
}
$(".partner-gifs").mouseenter(swapOnMouseover);
function onMouseOut(evt) {
if (evt.target.dataset && evt.target.dataset.stat) {
swap(evt.target, {
newStr: evt.target.dataset.stat
});
}
}
function swap(target, options) {
if (options && options.newStr) {
$(target).attr("src", options.newStr);
}
}
$(".partner-gifs").mouseenter(onMouseEnter);
$(".partner-gifs").mouseout(onMouseOut);
})();

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.3 MiB

After

Width:  |  Height:  |  Size: 3.0 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.9 MiB

After

Width:  |  Height:  |  Size: 9.2 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 MiB

After

Width:  |  Height:  |  Size: 3.2 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 188 KiB

After

Width:  |  Height:  |  Size: 69 KiB