summaryrefslogtreecommitdiffstats
path: root/tools/droiddoc/templates-sdk
diff options
context:
space:
mode:
authorsmain@google.com <smain@google.com>2014-10-03 15:37:49 -0700
committersmain@google.com <smain@google.com>2014-10-15 13:05:21 -0700
commitfbdb2a1b62feb71b3e4e9a7d6e3e9669a40f4a4c (patch)
treee999175360b2dae9751f59fb14e344d34ae92539 /tools/droiddoc/templates-sdk
parentc69af6faebbc2546aebee2c5d08eedb28f2b52ee (diff)
downloadbuild-fbdb2a1b62feb71b3e4e9a7d6e3e9669a40f4a4c.zip
build-fbdb2a1b62feb71b3e4e9a7d6e3e9669a40f4a4c.tar.gz
build-fbdb2a1b62feb71b3e4e9a7d6e3e9669a40f4a4c.tar.bz2
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 Change-Id: Ie8338a7403834d2322c5088039f2936207db734b
Diffstat (limited to 'tools/droiddoc/templates-sdk')
-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="訓練課程"