summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsmain@google.com <smain@google.com>2014-10-16 16:32:37 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2014-10-16 16:32:38 +0000
commitf0d8234ba94bac48d0f5848ff9a15d2cd9bcef6b (patch)
tree8200c6c927ed4399c7e9fd25768effcfa14661e1
parente18eb50850201e573084a0cd8e1199d877170b64 (diff)
parentfbdb2a1b62feb71b3e4e9a7d6e3e9669a40f4a4c (diff)
downloadbuild-f0d8234ba94bac48d0f5848ff9a15d2cd9bcef6b.zip
build-f0d8234ba94bac48d0f5848ff9a15d2cd9bcef6b.tar.gz
build-f0d8234ba94bac48d0f5848ff9a15d2cd9bcef6b.tar.bz2
Merge "add helpouts banner thing to recruit providers includes script to randomly change the URL and text of link as an A/B test it's a bad A/B test because it does not save the A/B per session" into lmp-dev
-rw-r--r--tools/droiddoc/templates-sdk/assets/css/default.css45
-rw-r--r--tools/droiddoc/templates-sdk/assets/images/styles/helpouts-logo-35.pngbin0 -> 1437 bytes
-rw-r--r--tools/droiddoc/templates-sdk/assets/images/styles/helpouts-logo-35_2x.pngbin0 -> 3315 bytes
-rw-r--r--tools/droiddoc/templates-sdk/components/masthead.cs31
4 files changed, 74 insertions, 2 deletions
diff --git a/tools/droiddoc/templates-sdk/assets/css/default.css b/tools/droiddoc/templates-sdk/assets/css/default.css
index 5f21892..622bb89 100644
--- a/tools/droiddoc/templates-sdk/assets/css/default.css
+++ b/tools/droiddoc/templates-sdk/assets/css/default.css
@@ -1246,7 +1246,7 @@ code {
legend {
display: none;
}
-a:link, a:visited {
+a:link, a:visited, .link-color {
color: #258aaf;
text-decoration: none;
}
@@ -7347,3 +7347,46 @@ a.home-new-cta-btn:hover,
font-style: italic;
color: #F80;
}
+
+
+
+/* Helpouts widget */
+.resource-card-6x2.helpouts-card {
+ width: 220px;
+ height: 40px;
+ position:absolute;
+ z-index:999;
+ top:-8px;
+ right:1px;
+}
+
+.resource-card-6x2.helpouts-card > .card-info {
+ left:35px;
+ height:35px;
+ padding:4px 8px 4px 0;
+}
+
+.resource-card-6x2.helpouts-card > .card-info .helpouts-description {
+ display:block;
+ overflow:visible;
+ font-size:12px;
+ line-height:12px;
+ text-align:right;
+ color:#666;
+}
+
+.helpouts-description .link-color {
+ text-transform: uppercase;
+}
+
+.resource-card-6x2 > .card-bg.helpouts-card-bg {
+ width:35px;
+ height:35px;
+ margin:2px 0 0 0;
+ background-image: url(../images/styles/helpouts-logo-35_2x.png);
+ background-image: -webkit-image-set(url(../images/styles/helpouts-logo-35.png) 1x, url(../images/styles/helpouts-logo-35_2x.png) 2x);
+}
+
+.resource-card-6x2 > .card-bg.helpouts-card-bg:after {
+ display:none;
+} \ No newline at end of file
diff --git a/tools/droiddoc/templates-sdk/assets/images/styles/helpouts-logo-35.png b/tools/droiddoc/templates-sdk/assets/images/styles/helpouts-logo-35.png
new file mode 100644
index 0000000..3c2dc1a
--- /dev/null
+++ b/tools/droiddoc/templates-sdk/assets/images/styles/helpouts-logo-35.png
Binary files differ
diff --git a/tools/droiddoc/templates-sdk/assets/images/styles/helpouts-logo-35_2x.png b/tools/droiddoc/templates-sdk/assets/images/styles/helpouts-logo-35_2x.png
new file mode 100644
index 0000000..e34be2e
--- /dev/null
+++ b/tools/droiddoc/templates-sdk/assets/images/styles/helpouts-logo-35_2x.png
Binary files differ
diff --git a/tools/droiddoc/templates-sdk/components/masthead.cs b/tools/droiddoc/templates-sdk/components/masthead.cs
index 3135a0c..4d3b02d 100644
--- a/tools/droiddoc/templates-sdk/components/masthead.cs
+++ b/tools/droiddoc/templates-sdk/components/masthead.cs
@@ -157,7 +157,36 @@
<?cs elif:training || guide || reference || tools || develop || google || samples ?>
<!-- Secondary x-nav -->
<div id="nav-x">
- <div class="wrap">
+ <div class="wrap" style="position:relative">
+
+ <?cs if:reference ?>
+ <a id="helpoutsLink" class="resource resource-card resource-card-6x2x3 resource-card-6x2 helpouts-card"
+ href="http://helpouts.google.com/partner/landing/provider/googledevelopers" target="_blank">
+ <div class="card-bg helpouts-card-bg"></div>
+ <div class="card-info">
+ <div class="helpouts-description">
+ <div class="text">Help developers solve problems<br/>
+ <span id="helpoutsLinkText" class="link-color" style="display:block;padding-top:5px;text-align:right">Learn more</span>
+ </div>
+ </div>
+ </div>
+ </a>
+ <script>
+ var textA = "LEARN MORE";
+ var linkA = "http://helpouts.google.com/partner/landing/provider/googledevelopers?utm_source=android_banner1&utm_medium=banner&utm_campaign=android_provider_banner1";
+ var textB = "SIGN UP NOW";
+ var linkB = "http://helpouts.google.com/partner/landing/provider/googledevelopers?utm_source=android_banner2&utm_medium=banner&utm_campaign=android_provider_banner2";
+
+ if (Math.floor(1/Math.random()) > 1) {
+ $("a#helpoutsLink").attr('href', linkA);
+ $("span#helpoutsLinkText").text(textA);
+ } else {
+ $("a#helpoutsLink").attr('href', linkB);
+ $("span#helpoutsLinkText").text(textB);
+ }
+ </script>
+ <?cs /if ?>
+
<ul class="nav-x col-9 develop" style="width:100%">
<li class="training"><a href="<?cs var:toroot ?>training/index.html"
zh-tw-lang="訓練課程"