Resolve merge conflicts of a5f0068 to nyc-dev
Change-Id: Id0d573566abb989a173349ffaf01390cebd51607
diff --git a/tools/droiddoc/templates-sdk-dev/assets/css/default.css b/tools/droiddoc/templates-sdk-dev/assets/css/default.css
index cc4dce7..6fef241 100644
--- a/tools/droiddoc/templates-sdk-dev/assets/css/default.css
+++ b/tools/droiddoc/templates-sdk-dev/assets/css/default.css
@@ -17,18 +17,33 @@
height: 100%;
margin: 0;
padding: 0;
- background-color:#F9F9F9;
+ background-color: #fff;
-webkit-font-smoothing: antialiased;
+ -moz-osx-font-smoothing: grayscale;
/* prevent subpixel antialiasing, which thickens the text */
/* text-rendering: optimizeLegibility; */
/* turned off ligatures due to bug 5945455 */ }
body {
- color: #222;
- font: 14px/19px Roboto, sans-serif;
+ color: #515151;
+ color: rgba(0, 0, 0, .68);
+ font: 14px/24px Roboto, sans-serif;
font-weight: 400;
letter-spacing:.1;
- padding:0 10px; }
+ padding: 0 20px;
+}
+
+@media (max-width: 719px) {
+ html {
+ /* Disable accidental horizontal overflow. */
+ overflow-x: hidden;
+ }
+
+ body {
+ padding-left: 10px;
+ padding-right: 10px;
+ }
+}
#page-container {
width: 940px;
@@ -77,20 +92,6 @@
margin-right: 20px;
float: left; }
-#nav {
- margin:0;
- padding:0 0 30px;
-}
-
-#side-nav {
- min-height:5px; /* silly way to avoid doc floating left when nav goes fixed */
- margin-bottom:1px;
-}
-#devdoc-nav {
- outline:none;
- width:auto;
- margin: 20px 0 0; }
-
#devdoc-nav h2 {
border:0;
}
@@ -98,44 +99,266 @@
#devdoc-nav.fixed {
position: fixed;
margin:0;
- top: 65px; /* sticky-header height + 20px gutter */
+ top: 84px; /* sticky-header height + 20px gutter */
}
-#devdoc-nav span.small {
- font-size:12px;
- font-weight:normal;
+.dac-devdoc-toggle {
+ cursor: pointer;
+ padding: 8px 0;
+}
+
+.scroll-pane {
+ /* Match height of fixed parent. */
+ height: 100%;
}
#content {
width: 760px;
float: left; }
-a:hover,
-acronym:hover {
- color: #7aa1b0 !important; }
-a:focus,
-a:active {
- color: #33b5e5 !important; }
+/***** PREVIOUSLY style.css ******************/
+/* This should be close to the top, so it is easier to override. */
+[dir='rtl'] {
+ direction: rtl;
+}
+html {
+ line-height: 20px;
+}
+pre, table, input, textarea, code {
+ font-size: 1em;
+}
+address, abbr, cite {
+ font-style: normal;
+}
+[dir='rtl'] th {
+ text-align: right;
+}
+html[lang^=ja] blockquote, html[lang^=ja] q, html[lang^=ko] blockquote, html[lang^=ko] q,
+html[lang^=zh] blockquote, html[lang^=zh] q {
+ font-style: normal;
+}
+q {
+ font-style: italic;
+}
+fieldset, iframe, img {
+ border: 0;
+}
+img {
+ border: none;
+ -ms-interpolation-mode: bicubic;
+ max-width: 100%;
+ vertical-align: middle;
+}
+video {
+ max-width: 100%;
+ object-fit: cover;
+}
+q {
+ quotes: none;
+}
+sup, sub {
+ font-size: 11px;
+ line-height: 0;
+}
+
+table, fieldset {
+ margin: 0;
+}
+/* Biggest type */
+.display-1 {
+ font-size: 56px;
+ line-height: 68px;
+}
+@media (max-width: 719px) {
+ .display-1 {
+ font-size: 44px;
+ line-height: 56px;
+ }
+}
+h1, h2, h3 {
+ color: #212121;
+ color: rgba(0, 0, 0, .87);
+}
+h1 {
+ font-size: 44px;
+ line-height: 56px;
+ font-weight: 300;
+ margin: 0;
+ padding: 24px 0 12px;
+}
+h1.short {
+ padding-right:320px;
+}
+@media (max-width: 719px) {
+ h1 {
+ font-size: 36px;
+ line-height: 48px;
+ }
+}
+h2 {
+ clear: left;
+ font-size: 28px;
+ font-weight: 400;
+ line-height: 32px;
+ margin: 0;
+ padding: 12px 0 16px;
+}
+h3 {
+ font-size: 24px;
+ line-height: 32px;
+ font-weight: 400;
+ margin: 0;
+ padding: 8px 0 12px;
+}
+h4 {
+ font-size: 18px;
+ line-height: 24px;
+ margin: 0;
+ padding: 4px 0 8px;
+ font-weight: 500;
+}
+h5, h6 {
+ font-size: 16px;
+ line-height: 24px;
+ margin: 0;
+ padding: 4px 0 8px;
+}
+th>h3 {
+ font-size:inherit;
+ line-height:inherit;
+ font-weight:inherit;
+ margin:0;
+ padding:0;
+ color:inherit;
+}
+hr { /* applied to the bottom of h2 elements */
+ height: 1px;
+ margin: 7px 0 12px;
+ border: 0;
+ background: rgba(0, 0, 0, 0.1);
+}
+h2[id], h3[id], h4[id], h5[id], h6[id] {
+ margin-top: -64px;
+ border-top: 64px solid transparent;
+ -webkit-background-clip: padding-box;
+ -moz-background-clip: padding;
+ background-clip: padding-box;
+}
+p, pre, table, form {
+ margin: 0 0 12px;
+}
+small {
+ font-size: 11.5px;
+ color: #000;
+}
+ul, ol {
+ margin: 0 0 15px 20px;
+ padding: 0;
+}
+[dir='rtl'] ul, [dir='rtl'] ol {
+ margin: 10px 30px 10px 10px;
+}
+ul ul, ul ol, ol ul, ol ol {
+ margin-bottom: 0;
+ margin-top: 0;
+}
+li {
+ margin: 0 0 12px;
+}
+dt {
+ margin: 24px 0 12px;
+}
+dd {
+ margin:0 0 10px 40px;
+}
+dd p,
+dd pre,
+dd ul,
+dd ol,
+dd dl {
+ margin-top:10px;
+}
+li p,
+li pre,
+li ul,
+li ol,
+li dl {
+ margin-top: 6px;
+ margin-bottom: 6px;
+}
+dl dd dl:first-child {
+ margin-top: 0;
+}
+pre strong, pre b, a strong, a b, a code {
+ color: inherit;
+}
+pre, code {
+ color: #060;
+ font: 13px/18px Consolas, "Liberation Mono", Menlo, Monaco, Courier, monospace;
+ -webkit-font-smoothing: subpixel-antialiased;
+ -moz-osx-font-smoothing: auto;
+}
+legend {
+ display: none;
+}
+a, .link-color {
+ color: #039BE5;
+ text-decoration: none;
+}
+a:focus, a:hover {
+ color: rgba(3, 155, 229, .7);
+ text-decoration: none;
+}
+a.white {
+ color: #fff;
+ text-decoration:underline;
+}
+a.white:hover, a.white:active {
+ color: #ccc;
+}
+strong, b {
+ font-weight: bold;
+}
+table {
+ border-collapse: collapse;
+ border-spacing: 0;
+ border:0;
+ margin: .5em 1em 1em 0;
+ width:100%; /* consistent table widths; within IE's quirks */
+ background-color:#f7f7f7;
+}
+th, td {
+ padding: 4px 12px;
+ vertical-align: top;
+ text-align: left;
+}
+td {
+ background-color:inherit;
+ border:solid 1px #DDD;
+}
+td *:last-child {
+ margin-bottom:0;
+}
+th {
+ background-color: #999;
+ color: #fff;
+ border:solid 1px #DDD;
+ font-weight: normal;
+}
+tr:first-of-type th:first-of-type:empty {
+ visibility: hidden;
+}
a.external-link {
background:url('../images/styles/open_new_page.png') no-repeat 100% 50%;
padding-right:16px;
}
-img {
- border: none; }
#jd-content img {
margin-bottom:15px;
}
-ul {
- margin: 0;
- padding: 0; }
-
-strong {
- font-weight: 500; }
-
em {
font-style: italic; }
@@ -155,6 +378,7 @@
/* disclosures mixin */
/* content layout */
+/* This grid is deprecated in favor of .cols and .col-X */
.layout-content-row {
display: inline-block;
margin-bottom: 10px; }
@@ -168,7 +392,7 @@
margin-left: 0; }
.layout-content-col h3,
.layout-content-col h4 {
- margin-top:0; }
+ padding-top:0; }
.layout-content-col.span-1 {
width: 40px; }
@@ -257,161 +481,6 @@
.vspace.size-16 {
height: 160px; }
-/* nav */
-#nav {
- /* section header divs */
- /* expanded section header divs */
- /* sublinks */ }
- #nav li {
- list-style-type: none;
- font-size: 14px;
- margin:0;
- padding:0;
- line-height: 15px; }
- #nav a {
- color: #555555;
- text-decoration: none;
- word-wrap:break-word; }
- #nav .nav-section-header {
- position: relative;
- margin-bottom: 1px;
- padding: 0 30px 0 0; }
- #nav li.selected a, #nav li.selected > .nav-section-header > a {
- color: #09C;
- }
- #nav li.selected ul li a {
- /* don't highlight child items */
- color: #555555; }
- #nav .nav-section .nav-section .nav-section-header {
- /* no white line between second level sections */
- margin-bottom: 0; }
- /* section header links */
- #nav > li > div > a {
- display: block;
- color: #333333;
- font-weight: 500;
- padding: 10px 0 10px 10px; }
- #nav .nav-section-header:after {
- content: '';
- background: transparent url(../images/styles/disclosure_down.png) no-repeat scroll 50% 50%;
- width: 34px;
- height: 34px;
- display: block;
- position: absolute;
- top: 0;
- right: 0; }
- #nav .nav-section-header.empty {
- padding:0; }
- #nav .nav-section-header.empty:after {
- display: none; }
- /* nested nav headers */
- #nav .nav-section .nav-section {
- position: relative;
- padding: 0;
- margin: 0; }
- #nav .nav-section li a {
- /* first gen child (2nd level li) */
- display:block;
- font-weight: normal;
- text-transform: none;
- padding: 7px 5px 7px 10px;
- }
- #nav .nav-section li li a {
- /* second gen child (3rd level li) */
- padding: 5px 5px 5px 10px;
- }
- #nav li.expanded .nav-section-header {
- background:#e9e9e9;
- background: rgba(0, 0, 0, 0.05); }
- #nav li.expanded li .nav-section-header {
- background: transparent; }
- #nav li.expanded li ul {
- /* 3rd level ul */
- padding:0 0 0 10px;
- }
- #nav li.expanded > .nav-section-header:after {
- content: '';
- background: transparent url(../images/styles/disclosure_up.png) no-repeat scroll 50% 50%;
- width: 34px;
- height: 34px; }
- #nav li.expanded li ul.tree-list-children {
- padding: 0;
- }
- #nav li.expanded li ul.tree-list-children .tree-list-children {
- padding:0 0 0 10px;
- }
- #nav li span.tree-list-subtitle {
- display:inline-block;
- padding:5px 0 0 10px;
- color:#555;
- text-transform:uppercase;
- font-size:12px;
- }
- #nav li span.tree-list-subtitle:before {
- content: '—';
- }
- #nav li span.tree-list-subtitle:after {
- content: '—';
- }
- #nav li span.tree-list-subtitle.package {
- padding-top:15px;
- cursor:default;
- }
- #nav li span.tree-list-subtitle.package:before {
- content: '';
- }
- #nav li span.tree-list-subtitle.package:after {
- content: '';
- }
- #nav li ul.tree-list-children.classes {
- padding-left:10px;
- }
- #nav li ul {
- display:none;
- overflow: hidden;
- margin: 0; }
- #nav li ul.animate-height-in {
- -webkit-transition: height 0.25s ease-in;
- -moz-transition: height 0.25s ease-in;
- transition: height 0.25s ease-in; }
- #nav li ul.animate-height-out {
- -webkit-transition: height 0.25s ease-out;
- -moz-transition: height 0.25s ease-out;
- transition: height 0.25s ease-out; }
- #nav li ul li {
- padding: 0; }
- #nav li li li {
- padding: 0; }
- #nav li.expanded ul {
- }
- #nav li ul > li {
- padding:0;
- }
- #nav li ul > li:last-child {
- padding-bottom:5px;
- }
- #nav li ul.tree-list-children > li:last-child {
- padding-bottom:0;
- }
- #nav li.expanded ul > li {
- background:#efefef;
- background: rgba(0, 0, 0, 0.03); }
- #nav li.expanded ul > li li {
- background:inherit; }
- #nav li ul.tree-list-children ul {
- display:block; }
-
-#nav.samples-nav li li li {
- font-size:13px;
-}
-#nav.samples-nav li li li a {
- padding-top:3px;
- padding-bottom:3px;
-}
-#nav.samples-nav li li ul > li:last-child {
- padding-bottom:3px;
-}
-
.new,
.new-child {
font-size: .78em;
@@ -423,25 +492,19 @@
/* content header */
.content-header {
- height: 30px;
- margin:36px 0 23px; /* same as h1 */
- padding:0 0 10px;} /* same as h1 */
+ position: relative;
+}
+.content-header:before,
+.content-header:after {
+ content: '';
+ display: table;
+ /* Clear heading margins, to make absolutely positioned nav a bit more predictable. */
+}
.content-header.just-links {
margin-bottom:0;
padding-bottom:0;}
-.content-header h1 {
- margin:0;
- padding:0;
- width: 700px;
-}
-.content-header > div:first-child {
- height:1px; /* set fixed height for the header div to ensure the
- next/prev links align with toc on training classes */
-}
-
.content-footer {
- border-top: 1px solid #ccc;
margin-top: 10px;
padding-top:10px;
width:100%; }
@@ -453,7 +516,7 @@
margin-right:0;
}
.content-footer.wrap {
- width:940px;
+ max-width:940px;
}
.content-footer .plus-container {
margin:5px 0 0;
@@ -467,19 +530,17 @@
}
.content-header .paging-links {
- margin-top:-25px;
+ position: absolute;
+ right: 0;
+ top: 8px;
+ width: 220px;
}
.paging-links {
position: relative;
- height:30px; }
- .paging-links a {
- position: absolute; }
+ min-height:30px; }
.paging-links a,
.training-nav-top a {
- color: #555555;
- text-decoration: none;
- text-transform: uppercase; }
- .paging-links .prev-page-link:before,
+ text-decoration: none; }
.training-nav-top .prev-page-link:before,
a.back-link:before {
content: '';
@@ -488,18 +549,9 @@
height: 10px;
display: inline-block;
margin-right: 5px; }
- .training-nav-top .next-page-link,
- .training-nav-top .start-class-link,
- .training-nav-top .start-course-link {
- right: 10px; }
- .paging-links .prev-page-link {
- left: -15px; }
- .paging-links .next-page-link {
- right: 0; }
- .next-page-link:after,
- .start-class-link:after,
- .start-course-link:after,
- .next-class-link:after,
+ .training-nav-top .next-page-link:after,
+ .training-nav-top .start-class-link:after,
+ .training-nav-top .start-course-link:after,
.go-link:after {
content: '';
background: transparent url(../images/styles/disclosure_right.png) no-repeat scroll 50% 50%;
@@ -512,25 +564,30 @@
.next-page-link.inline:after {
content: none; }
- .content-footer .paging-links .next-page-link {
+ .content-footer {
left:0;
}
.training-nav-top a {
+ border-bottom:0;
+ box-sizing: border-box;
+ color: inherit;
display:block;
float:left;
- width:122px;
- height:28px;
- padding: 8px;
- line-height:28px;
+ padding:10px 0;
+ line-height:30px;
text-align:center;
- border:1px solid #DADADA;
- border-bottom:0;
+ width: 50%;
+ }
+
+ .training-nav-top a.prev-page-link {
+ padding-left: 15px;
+ text-align: left;
}
.training-nav-top a.next-page-link {
- border-left:0;
- width:123px;
+ padding-right: 15px;
+ text-align: right;
}
.paging-links a.disabled,
@@ -548,40 +605,54 @@
.training-nav-top a.start-class-link,
.training-nav-top a.start-course-link {
- width:262px;
- }
-
- .paging-links a.start-class-link {
width:100%;
}
/* list of classes on course landing page */
ol.class-list {
- list-style:none;
- margin-left:0;
+ counter-reset: class;
+ list-style: none;
+ margin: 60px 0 0;
}
ol.class-list>li {
- margin:0 0 15px;
- padding:5px 0 0;
- overflow:hidden;
- border-top:1px solid #ccc;
+ box-shadow: 0px 2px 5px 0 rgba(0, 0, 0, 0.26);
+ margin: 0 0 20px;
+ overflow: hidden;
}
- ol.class-list li a.title {
- font-size:16px;
- margin:0;
- clear:left;
- display:block;
- height:32px;
- padding:0 4px;
+ ol.class-list .title {
+ background: #00bcd4;
+ color: #fff;
+ display: block;
+ font-size: 20px;
+ font-weight: 500;
+ height: 32px;
+ padding: 52px 16px 12px;
+ position: relative;
}
- ol.class-list li a.title h2 {
- color:inherit;
- margin:0 0 10px;
+ ol.class-list .title:before {
+ border-bottom: 1px solid white;
+ box-sizing: border-box;
+ /* Disable the numbers for now, since vert few classes need to be taken in order. */
+ /* content: counter(class); */
+ counter-increment: class;
+ height: 40px;
+ left: 0;
+ padding: 10px 1px 0 5px;
+ position: absolute;
+ top: 0;
+ text-align: right;
+ min-width: 30px;
+ }
+ ol.class-list .title h2 {
+ color: currentColor;
+ font-size: inherit;
+ font-weight: inherit;
+ padding:0 0 10px;
display:block;
float:left;
width:675px;
}
- ol.class-list li a.title span {
+ ol.class-list .title span {
display:none;
float:left;
font-size:18px;
@@ -590,40 +661,71 @@
width: 10px;
height: 32px;
}
- ol.class-list li a.title:hover {
- background:#ddd;
- color:#258AAF !important;
- }
- ol.class-list li a.title:hover span {
- display:block;
- }
- #jd-content
- ol.class-list li img {
- float:left;
- clear:left;
- width:64px;
- margin:0 20px 0 0;
- }
- ol.class-list li p.description {
+ ol.class-list .description {
+ box-sizing: border-box;
float:left;
display:block;
- width:250px;
margin:0;
+ padding: 16px 10px 16px 16px;
+ width: 50%;
}
- ol.class-list li p.description.article {
+ ol.class-list .description.article {
width: 550px;
}
ol.class-list ol {
- float:left;
- width:320px;
- margin:0 0 0 30px;
- list-style:none;
- margin:0 0 0 20px;
+ box-sizing: border-box;
+ float: left;
+ list-style: none;
+ margin: 0;
+ padding: 16px 16px 16px 10px;
+ width: 50%;
}
- ol.class-list div.lessons li {
- margin:0 0 6px;
- line-height:16px;
+ ol.class-list .lessons li {
+ margin: 0 0 6px;
+ line-height: 16px;
+ }
+
+ /* Class colors */
+ ol.class-list li:nth-child(10n+1) .title {
+ background: #00bcd4;
+ }
+ ol.class-list li:nth-child(10n+2) .title {
+ background: #4db6ac;
+ }
+ ol.class-list li:nth-child(10n+3) .title {
+ background: #66bb6a;
+ }
+ ol.class-list li:nth-child(10n+4) .title {
+ background: #7cb342;
+ }
+ ol.class-list li:nth-child(10n+5) .title {
+ background: #afb42b;
+ }
+ ol.class-list li:nth-child(10n+6) .title {
+ background: #ffb300;
+ }
+ ol.class-list li:nth-child(10n+7) .title {
+ background: #ff7043;
+ }
+ ol.class-list li:nth-child(10n+8) .title {
+ background: #ec407a;
+ }
+ ol.class-list li:nth-child(10n+9) .title {
+ background: #ab47bc;
+ }
+ ol.class-list li:nth-child(10n+10) .title {
+ background: #7e57c2;
+ }
+
+ @media (max-width: 719px) {
+ ol.class-list ol,
+ ol.class-list .description {
+ float: none;
+ margin: 16px;
+ padding: 0;
+ width: auto;
+ }
}
@@ -641,7 +743,7 @@
}
h1.with-title-tabs {
display:inline-block;
- margin:0 0 -1px 0;
+ margin-bottom: -1px;
padding:0 60px 0 0;
border-bottom:1px solid #F9F9F9;
}
@@ -669,7 +771,7 @@
}
ul#title-tabs li a:hover,
ul#title-tabs li a:active {
- color:#93C !important;
+ color:#039BE5 !important;
}
@@ -722,7 +824,7 @@
animation-timing-function: ease-out; }
.design ol h4 {
- margin-bottom:0;
+ padding-bottom:0;
}
.design ol {
counter-reset: item; }
@@ -798,46 +900,6 @@
.design li.with-icon.use:before {
background-image: url(../images/styles/ico_use.png); }
-/* figures and callouts */
-.figure {
- position: relative; }
- .figure.pad-below {
- margin-bottom: 20px; }
- .figure .figure-callout {
- position: absolute;
- color: #fff;
- font-weight: 500;
- font-size: 16px;
- line-height: 23px;
- text-align: center;
- background: transparent url(../images/styles/callout.png) no-repeat scroll 50% 50%;
- padding-right: 2px;
- width: 30px;
- height: 29px;
- z-index: 1000; }
- .figure .figure-callout.top {
- top: -9px; }
- .figure .figure-callout.right {
- right: -5px; }
-
-.figure-caption {
- margin: 0 10px 20px 0;
- font-size: 14px;
- line-height: 20px;
- font-style: italic; }
-
-/* rows of figures */
-.figure-row {
- font-size: 0;
- line-height: 0;
- /* to prevent space between figures */ }
- .figure-row .figure {
- display: inline-block;
- vertical-align: top; }
- .figure-row .figure + .figure {
- margin-left: 10px;
- /* reintroduce space between figures */ }
-
/* video containers */
.framed-galaxynexus-land-span-13 {
background: transparent url(../images/styles/device_galaxynexus_blank_land_span13.png) no-repeat
@@ -1071,233 +1133,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-/***** PREVIOUSLY style.css ******************/
-
-
-
-
-
-@media screen, projection, print {
-[dir='rtl'] {
- direction: rtl;
-}
-html {
- line-height: 20px;
-}
-pre, table, input, textarea, code {
- font-size: 1em;
-}
-address, abbr, cite {
- font-style: normal;
-}
-[dir='rtl'] th {
- text-align: right;
-}
-html[lang^=ja] blockquote, html[lang^=ja] q, html[lang^=ko] blockquote, html[lang^=ko] q,
-html[lang^=zh] blockquote, html[lang^=zh] q {
- font-style: normal;
-}
-q {
- font-style: italic;
-}
-fieldset, iframe, img {
- border: 0;
-}
-img {
- -ms-interpolation-mode: bicubic;
- vertical-align: middle;
- max-width: 100%;
-}
-q {
- quotes: none;
-}
-sup, sub {
- font-size: 11px;
- line-height: 0;
-}
-}
-
-@media screen, projection {
-
-table, fieldset {
- margin: 0;
-}
-h1 {
- color:#333;
- font-size: 34px;
- margin: 36px 0 27px;
- padding:0 0 10px;
- font-weight:300;
-}
-h1, h2 {
- line-height: 30px;
-}
-h1.short {
- margin-right:320px;
-}
-h1.short {
- margin-right:320px;
-}
-h1.super {
- font-size: 37px;
-}
-h2 {
- color:#333;
- font-size: 26px;
- margin: 32px 0 20px;
- padding:0;
- font-weight:300;
-}
-h3 {
- color:#333;
- font-size: 21px;
- font-weight:400;
- margin:21px 0 14px 0;
-}
-h3, h4 {
- line-height: 21px;
-}
-h4 {
- font-size: 18px;
- margin: 12px 0;
- font-weight:500;
-}
-h5 {
- font-size: 14px;
-}
-h5, h6 {
- margin: 5px 0;
-}
-h6 {
- font-size: 12px;
-}
-hr { /* applied to the bottom of h2 elements */
- height: 1px;
- margin: 3px 0 12px;
- border: 0;
- background: #ccc;
-}
-p, pre, table, form {
- margin: 0 0 15px;
-}
-small {
- font-size: 11.5px;
- color: #000;
-}
-ul, ol {
- margin: 0 0 15px 18px;
- padding: 0;
-}
-[dir='rtl'] ul, [dir='rtl'] ol {
- margin: 10px 30px 10px 10px;
-}
-ul ul, ul ol, ol ul, ol ol {
- margin-bottom: 0;
- margin-top: 0;
-}
-li {
- margin:0 0 5px;
-}
-dd {
- margin:0 0 10px 30px;
-}
-dd p,
-dd pre,
-dd ul,
-dd ol,
-dd dl {
- margin-top:10px;
-}
-li p,
-li pre,
-li ul,
-li ol,
-li dl {
- margin-top:5px;
- margin-bottom:5px;
-}
-dl dd dl:first-child {
- margin-top:0;
-}
-pre strong, pre b, a strong, a b, a code {
- color: inherit;
-}
-pre, code {
- color: #060;
- font: 13px/1.5 monospace;
-}
-code {
- font-weight:bold;
- font: 13px/14px monospace;
-}
-
-legend {
- display: none;
-}
-a:link, a:visited, .link-color {
- color: #258aaf;
- text-decoration: none;
-}
-a:focus, a:hover, a:active {
- color: #33B5E5;
- text-decoration: none;
-}
-a.white {
- color: #fff;
- text-decoration:underline;
-}
-a.white:hover, a.white:active {
- color: #ccc !important;
-}
-strong, b {
- font-weight:bold;
- color: #222;
-}
-table {
- border-collapse: collapse;
- border-spacing: 0;
- border:0;
- margin: .5em 1em 1em 0;
- width:100%; /* consistent table widths; within IE's quirks */
- background-color:#f7f7f7;
-}
-th, td {
- padding: 4px 12px;
- vertical-align: top;
- text-align: left;
-}
-td {
- background-color:inherit;
- border:solid 1px #DDD;
-}
-td *:last-child {
- margin-bottom:0;
-}
-th {
- background-color: #999;
- color: #fff;
- border:solid 1px #DDD;
- font-weight: normal;
-}
-tr:first-of-type th:first-of-type:empty {
- visibility: hidden;
-}
-
/* --------------------------------------------------------------------------
Footer
*/
@@ -1439,7 +1274,7 @@
/* bump up spacing above subheadings */
h2 {
- margin-top: 40px !important;
+ padding-top: 40px !important;
}
/* print link URLs where possible and give links default text color */
@@ -1468,430 +1303,23 @@
}
/* =============================================================================
- Columns
- ========================================================================== */
-
-@media screen, projection, print {
-.full {
- padding: 2.5em 0;
- border-top: solid 1px #ddd;
- border-bottom: solid 1px #ddd;
- background: #f7f7f7;
-}
-.wrap {
- margin: 0 auto;
- width: 940px;
- clear: both;
-}
-.cols {
- height: 1%;
- margin: 0 -1.533742331288343558282%;
- width: 103.06748466257669%}
-*+html .cols {
- margin-bottom: 20px;
-}
-.cols:after {
- clear: both;
- content: ' ';
- display: block;
- height: 0;
- visibility: hidden;
-}
-.col-1, .col-2, .col-3, .col-4, .col-5, .col-6, .col-7, .col-8, .col-9, .col-10, .col-11, .col-12,
-.col-13, .col-14, .col-15, .col-16 {
- display: inline;
- float: left;
- margin-left: 10px;
- margin-right: 10px;
-}
-/*
-* html .col-1, * html .col-2, * html .col-3, * html .col-4, * html .col-5, * html .col-6, * html
-.col-7, * html .col-8, * html .col-9, * html .col-10, * html .col-11, * html .col-12 {
- margin: 0;
- padding: 0 1.4% 20px;
-}
-[dir='rtl'] .col-1, [dir='rtl'] .col-2, [dir='rtl'] .col-3, [dir='rtl'] .col-4, [dir='rtl'] .col-5,
-[dir='rtl'] .col-6, [dir='rtl'] .col-7, [dir='rtl'] .col-8, [dir='rtl'] .col-9, [dir='rtl'] .col-10,
-[dir='rtl'] .col-11, [dir='rtl'] .col-12 {
- float: right;
-}
-*/
-.col-1 { width: 40px }
-.col-2 { width: 100px }
-.col-3 { width: 160px }
-.col-4 { width: 220px }
-.col-5 { width: 280px }
-.col-6 { width: 340px }
-.col-7 { width: 400px }
-.col-8 { width: 460px }
-.col-9 { width: 520px }
-.col-10 { width: 580px }
-.col-11 { width: 640px }
-.col-12 { width: 700px }
-.col-13 { width: 760px }
-.col-14 { width: 820px }
-.col-15 { width: 880px }
-.col-16 { width: 940px }
-}
-
-.col-right {
- margin-right:0px;
-}
-
-@media screen and (max-width:772px) {
-.col-5, .col-6, .col-7 {
- clear: both;
- width: 97.0238096%}
-}
-
-/* =============================================================================
Layout
========================================================================== */
@media screen, projection, print {
-/* --------------------------------------------------------------------------
-Header, Login, Nav-X, Search
-*/
-#header {
- margin: 0;
- padding: 0;
-}
-#header:before, #header:after {
- content: "";
- display: table;
- clear: both
-}
-.logo, .nav-x {
- float: left;
-}
-.nav-x {
- margin-top: -2px;
- list-style-type: none;
-}
-.nav-x a {
- color: #333;
- font-size: 16px;
-}
-.about a.selected {
- color: #9933CC;
-}
-.design a.selected {
- color: #33b5e5;
-}
-.develop a.selected {
- color: #F80;
-}
-.distribute a.selected {
- color: #9C0;
-}
-
-
-
-.nav-x li {
- display: inline;
- margin-right: 45px;
-}
-.search {
- float: right;
- position: relative;
- width: 220px
-}
-.search .bottom, .search .left, .search .right {
+.training-nav-top {
+ border:1px solid #e5e5e5;
+ border-width: 1px 1px 0;
+ bottom: -56px;
+ box-sizing: border-box;
position: absolute;
- background-color: #a3a3a3;
-}
-.search .bottom {
- width: 220px;
- height: 1px;
- top: 24px;
- left: 0
-}
-.search .left, .search .right {
- height: 5px;
- width: 1px
-}
-.search .left { top: 19px; left: 0 }
-.search .right { top: 19px; right: 0 }
-.search form {
- float: left;
- margin-top: 2px;
- width: inherit;
-}
-.search .close,
-#player-frame .close {
- position: absolute;
- right: 8px;
- bottom: 4px;
- width: 16px;
- height: 16px;
- margin: 0;
- text-indent: -1000em;
- background: url(../images/close.png) no-repeat 0 0;
- z-index:9999;
-}
-.search .close:hover, .search .close:focus,
-#player-frame .close:hover, #player-frame .close:focus {
- background-position: -16px 0;
- cursor:pointer;
-}
-#player-frame .close {
- top: 6px;
-}
-.search form input {
- color: #999;
- font-size: 1em;
- width: inherit;
- border: none;
- margin: 0;
- padding:0 0 0 6px;
- z-index: 1500;
- background-color: transparent
-}
-.search:hover .bottom, .search:hover .left, .search:hover .right {
- background-color: #33b5e5;
-}
-.search:hover .icon {
- background-position: -8px 0
-}
-.search form input:focus {
- color: #222;
- font-weight: bold;
- outline:0;
-}
-/* Search Dropdown */
-.search-dropdown {
- padding: 15px;
- width: 192px;
- border: solid 1px #c5c5c5;
- background: #fff;
- position: absolute;
- top: 35px;
- left: 0;
- -moz-box-shadow: 0 0 10px rgba(0,0,0,0.2);
- -webkit-box-shadow: 0 0 10px rgba(0,0,0,0.2);
- box-shadow: 0 0 10px rgba(0,0,0,0.2)
-}
-.search-dropdown ul, .search-dropdown ul li {
- list-style-type: none;
- margin: 0;
- padding: 0
-}
-.search-dropdown ul li {
- clear: both
-}
-.search-dropdown img {
- float: left;
- margin: 0 10px 10px 0
-}
-.search-dropdown h6 {
- color: #222;
- margin: 0;
- line-height: normal
-}
-.search-dropdown .desc {
- color: #999;
- font-size: 11.5px;
- line-height: normal;
- margin: 0;
-}
-.search-dropdown li a:hover h6, .search-dropdown li a:hover .desc {
- color: #33b5e5
-}
-/* --------------------------------------------------------------------------
-Buttons
-*/
-.button, a.button, .button-secondary, a.button-secondary {
- border-image: initial;
- -webkit-border-radius: 2px;
- -moz-border-radius: 2px;
- border-radius: 2px;
- cursor: pointer;
-}
-.button, a.button {
- display:inline-block;
- background-color: #09c;
- background-image: -webkit-gradient(linear, left top, left bottom, from(#2faddb), to(#09c));
- background-image: -webkit-linear-gradient(top, #2faddb, #09c);
- background-image: -moz-linear-gradient(top, #2faddb, #09c);
- background-image: -ms-linear-gradient(top, #2faddb, #09c);
- background-image: -o-linear-gradient(top, #2faddb, #09c);
- background-image: linear-gradient(top, #2faddb, #09c);
- filter: progid:DXImageTransform.Microsoft.gradient(startColorStr='#2faddb', EndColorStr='#0099cc',GradientType=0);
- border: 1px solid #3990ab;
- color: #fff;
-}
-.button-secondary, a.button-secondary {
- background-color: #f3f3f3;
- border: 1px solid #dcdcdc;
- color: #444;
-}
-a.button, a.button:visited, a.button-secondary, a.button-secondary:visited {
- margin-right: 16px;
- font-weight: 400;
- min-width: 54px;
- outline: 0;
- padding: 8px 15px;
- text-align: center;
-}
-.button, .button-secondary {
- margin-right: 16px;
- font-weight: 400;
- min-width: 54px;
- outline: 0;
- padding: 0 15px;
- text-align: center;
-}
-.button:hover, a.button:hover {
- border-color: #09c;
- background-color: #4cadcb;
- background-image: -webkit-gradient(linear, left top, left bottom, from(#5dbcd9), to(#4cadcb));
- background-image: -webkit-linear-gradient(top, #5dbcd9, #4cadcb);
- background-image: -moz-linear-gradient(top, #5dbcd9, #4cadcb);
- background-image: -ms-linear-gradient(top, #5dbcd9, #4cadcb);
- background-image: -o-linear-gradient(top, #5dbcd9, #4cadcb);
- background-image: linear-gradient(top, #5dbcd9, #4cadcb);
- filter: progid:DXImageTransform.Microsoft.gradient(startColorStr='#5dbcd9',
-EndColorStr='#4cadcb',GradientType=0);
- color: #fff !important;
-}
-.button:active, a.button:active {
- background-color: #1e799a;
- background-image: none;
- border-color: #30b7e6;
-}
-a.button.big.subtitle {
- line-height:18px;
-}
-.button-secondary:hover, a.button-secondary:hover {
- border-color: #dbdbdb;
- background-color: #f3f3f3;
- background-image: -webkit-gradient(linear, left top, left bottom, from(#f9f9f9), to(#ececec));
- background-image: -webkit-linear-gradient(top, #f9f9f9, #ececec);
- background-image: -moz-linear-gradient(top, #f9f9f9, #ececec);
- background-image: -ms-linear-gradient(top, #f9f9f9, #ececec);
- background-image: -o-linear-gradient(top, #f9f9f9, #ececec);
- background-image: linear-gradient(top, #f9f9f9, #ececec);
- filter: progid:DXImageTransform.Microsoft.gradient(startColorStr='#f9f9f9',
-EndColorStr='#ececec');
- color: #33B5E5 !important;
-}
-.button-secondary:active, a.button-secondary:active {
- border-color: #dadada;
- background: #ebebeb; /* Old browsers */
- /* IE9 SVG, needs conditional override of 'filter' to 'none' */
- background:
-url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/
-Pgo8c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgdmlld0Jv
-eD0iMCAwIDEgMSIgcHJlc2VydmVBc3BlY3RSYXRpbz0ibm9uZSI+
-CiAgPGxpbmVhckdyYWRpZW50IGlkPSJncmFkLXVjZ2ctZ2VuZXJhdGVkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIg
-eDE9IjAlIiB5MT0iMCUiIHgyPSIwJSIgeTI9IjEwMCUiPgogICAgPHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2ViZWJl
-YiIgc3RvcC1vcGFjaXR5PSIxIi8+
-CiAgICA8c3RvcCBvZmZzZXQ9IjEwJSIgc3RvcC1jb2xvcj0iI2Y5ZjlmOSIgc3RvcC1vcGFjaXR5PSIxIi8+
-CiAgICA8c3RvcCBvZmZzZXQ9IjUwJSIgc3RvcC1jb2xvcj0iI2ZhZmFmYSIgc3RvcC1vcGFjaXR5PSIxIi8+
-CiAgICA8c3RvcCBvZmZzZXQ9IjkwJSIgc3RvcC1jb2xvcj0iI2Y5ZjlmOSIgc3RvcC1vcGFjaXR5PSIxIi8+
-CiAgICA8c3RvcCBvZmZzZXQ9IjEwMCUiIHN0b3AtY29sb3I9IiNmNmY2ZjYiIHN0b3Atb3BhY2l0eT0iMSIvPgogIDwvbGluZWFy
-R3JhZGllbnQ+
-CiAgPHJlY3QgeD0iMCIgeT0iMCIgd2lkdGg9IjEiIGhlaWdodD0iMSIgZmlsbD0idXJsKCNncmFkLXVjZ2ctZ2VuZXJhdGVkKSIg
-Lz4KPC9zdmc+);
- background: -moz-linear-gradient(top, #ebebeb 0%, #f9f9f9 5%, #fafafa 50%, #f9f9f9 90%,
-#ffffff 100%); /* FF3.6+ */
- background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#ebebeb),
-color-stop(5%,#f9f9f9), color-stop(50%,#fafafa), color-stop(90%,#f9f9f9), color-stop(100%,#ffffff));
-/* Chrome,Safari4+ */
- background: -webkit-linear-gradient(top, #ebebeb 0%,#f9f9f9 5%,#fafafa 50%,#f9f9f9
-90%,#ffffff 100%); /* Chrome10+,Safari5.1+ */
- background: -o-linear-gradient(top, #ebebeb 0%,#f9f9f9 5%,#fafafa 50%,#f9f9f9 90%,#ffffff
-100%); /* Opera 11.10+ */
- background: -ms-linear-gradient(top, #ebebeb 0%,#f9f9f9 5%,#fafafa 50%,#f9f9f9 90%,#ffffff
-100%); /* IE10+ */
- background: linear-gradient(top, #ebebeb 0%,#f9f9f9 5%,#fafafa 50%,#f9f9f9 90%,#ffffff
-100%); /* W3C */
- filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ebebeb',
-endColorstr='#ffffff',GradientType=0 ); /* IE6-8 */
- -webkit-box-shadow: inset 0px 0px 5px 2px rgba(0, 0, 0, .05);
- -moz-box-shadow: inset 0px 0px 5px 2px rgba(0, 0, 0, .05);
- box-shadow: inset 0px 0px 5px 2px rgba(0, 0, 0, .05);
- color: #258AAF !important;
-}
-.button.big {
- font-size:20px;
- display:inline-block;
-}
-.button.big span.small {
- font-size:14px;
-}
-.button-caption {
- margin-top:10px;
- font-size:12px;
- font-style:italic;
+ right: 0;
+ width: 280px;
}
-.button.disabled,
-.button.disabled:hover,
-.button.disabled:active {
- background:#ebebeb;
- color:#999 !important;
- border-color:#999;
- cursor:default;
-}
-
-.training-nav-top a.button-secondary,
-.training-nav-bottom a.button-secondary {
- display:block;
- float:left;
- margin:0;
- width:130px;
- text-transform:uppercase;
- font-weight:bold;
-
- background-color: #f3f3f3;
- background-image: -webkit-gradient(linear, left top, left bottom, from(#f9f9f9), to(#ececec));
- background-image: -webkit-linear-gradient(top, #f9f9f9, #ececec);
- background-image: -moz-linear-gradient(top, #f9f9f9, #ececec);
- background-image: -ms-linear-gradient(top, #f9f9f9, #ececec);
- background-image: -o-linear-gradient(top, #f9f9f9, #ececec);
- background-image: linear-gradient(top, #f9f9f9, #ececec);
- filter: progid:DXImageTransform.Microsoft.gradient(startColorStr='#f9f9f9',
-EndColorStr='#ececec');
- color: #33B5E5;
-}
-
-.training-nav-top a.button-secondary:hover,
-.training-nav-bottom a.button-secondary:hover {
- background-color: #09c;
- background-image: -webkit-gradient(linear, left top, left bottom, from(#2faddb), to(#09c));
- background-image: -webkit-linear-gradient(top, #2faddb, #09c);
- background-image: -moz-linear-gradient(top, #2faddb, #09c);
- background-image: -ms-linear-gradient(top, #2faddb, #09c);
- background-image: -o-linear-gradient(top, #2faddb, #09c);
- background-image: linear-gradient(top, #2faddb, #09c);
- filter: progid:DXImageTransform.Microsoft.gradient(startColorStr='#2faddb', EndColorStr='#09c');
- border: 1px solid #3990ab;
- color: #fff !important;
-}
-
-.training-nav-top a.button-secondary.last,
-.training-nav-bottom a.button-secondary.last {
- border-left:0;
-}
-
-.training-nav-top a.button-secondary.double-size,
-.training-nav-bottom a.button-secondary.double-size {
- width:291px;
-}
-
-.training-nav-top,
.training-nav-bottom {
float:right;
margin:0 0 0 20px;
-}
-
-.training-nav-top {
- position:relative;
- top:73px;
-}
-
-.training-nav-bottom {
padding:0 0 20px;
}
@@ -1904,33 +1332,38 @@
}
#tb-wrapper {
- margin:51px 0 0 20px; /* negative top-margin to counter the content-header bottom margin */
+ margin:56px 0 0 20px; /* negative top-margin to counter the content-header bottom margin */
}
#tb,
#qv {
- font-size:13px;
- line-height:18px;
- width:238px;
- border:1px solid #ccc;
- float:right;
+ border: 1px solid #e5e5e5;
+ box-sizing: border-box;
+ float: right;
+ line-height: 16px;
+ padding: 5px 0;
+ width: 240px;
}
#tb {
- width:278px;
+ width:280px;
}
#tb h2,
#qv h2 {
- margin:10px 15px;
- padding:0;
- text-transform:uppercase;
- border-bottom:1px solid gainsboro;
+ border-top: 1px solid #e5e5e5;
+ color: inherit;
+ font-size: 16px;
+ line-height: 24px;
+ margin: 15px 0 4px;
+ padding: 10px 15px 0;
}
-#tb *,
-#qv * {
- font-size:inherit;
+#tb h2:first-child,
+#qv h2:first-child {
+ border-top: 0;
+ padding-top: 0;
+ margin-top: 10px;
}
#tb .download-box,
@@ -1942,7 +1375,28 @@
#qv .download-box .filename {
font-size:11px;
margin:4px 4px 10px;
- color:#666;
+}
+
+@media (max-width: 719px) {
+ .training-nav-top {
+ left: 0;
+ width: auto;
+ }
+
+ #tb-wrapper {
+ clear: none;
+ float: none;
+ margin-left: 0;
+ }
+
+ #tb {
+ float: none;
+ width: auto;
+ }
+
+ #qv-wrapper {
+ display: none;
+ }
}
@@ -1959,9 +1413,10 @@
width:226px;
font-size:13px;
line-height:18px;
- border-left:4px solid #99CC00;
+ border-left:3px solid #96ca7c;
+ border-left-color: rgba(106, 179, 68, .7); /* #6ab344 * 70% */
float:right;
- padding:0 0 0 10px;
+ padding:0 0 0 20px;
margin:0 0 1em 20px;
}
@@ -1970,7 +1425,7 @@
.sidebox h4,
.sidebox h5 {
font-weight:bold;
- margin:0 0 10px;
+ padding: 0 0 10px;
line-height: 16px;
}
@@ -1985,7 +1440,15 @@
#tb ol,
#tb ul,
#qv ul {
- margin:0 15px 10px 35px;
+ list-style-type: none;
+ margin:0 15px 10px 15px;
+}
+
+#tb li,
+#qv li {
+ margin: 8px 0;
+ padding: 0 0 0 16px;
+ position: relative;
}
#tb p {
@@ -2005,11 +1468,7 @@
#qv ul ul,
.sidebox ol ol,
.sidebox ul ul {
- margin-bottom:0;
-}
-
-#qv ol ol {
- margin:3px 0 3px 15px;
+ margin: 8px 0;
}
.sidebox p,
@@ -2025,7 +1484,7 @@
h3.rel-resources {
-margin:1.25em auto;
+ padding:1.25em auto;
}
/* --------------------------------------------------------------------------
@@ -2145,7 +1604,6 @@
border-radius: 2px;
margin: 10px 0;
padding: 20px;
- color: #666;
position: relative;
background: #f9f9f9;
}
@@ -2202,7 +1660,7 @@
div.sdk-terms h3,
div.sdk-terms h2 {
- margin:0;
+ padding: 0;
}
div#sdk-terms-form {
@@ -2225,6 +1683,46 @@
border: solid 1px #ddd;
background: #f7f7f7;
}
+
+p.package-name {
+ margin:1em 0;
+}
+
+h1.api-title {
+ padding-bottom:0;
+}
+
+h2.api-section {
+ margin: 60px 0 0;
+}
+
+h2.api-section+hr {
+ margin-bottom: 30px;
+}
+
+h3.api-name {
+ margin: 80px 0 12px;
+ padding: 0;
+}
+
+/* remove top padding when this h3 (visibly) follows an h2.
+ This accounts for the variation in structure,
+ including the collapsed mobile headings */
+h2+hr+div>div>a+div>h3.api-name,
+h2+hr+a+div>h3.api-name,
+h2+hr+a+h3.api-name {
+ margin-top: 0;
+}
+
+pre.api-signature,
+code.api-signature {
+ color:inherit;
+ padding:0;
+ margin:1em 0;
+ border:0;
+ background:transparent;
+}
+
.str { color: #800; } /* Code string */
.kwd { color: #008; }
.typ { color: #606; }
@@ -2276,8 +1774,7 @@
padding: 0 0 0 4px;
}
#packages-nav li a, #packages-nav li a:active, #packages-nav li a:visited,
-#classes-nav li li a, #classes-nav li li a:active, #classes-nav li li a:visited,
-#nav-tree li a, #nav-tree li a:active, #nav-tree li a:visited {
+#classes-nav li li a, #classes-nav li li a:active, #classes-nav li li a:visited {
color: #222;
font-weight: normal;
}
@@ -2288,8 +1785,7 @@
#packages-nav li.selected a, #packages-nav li.selected a:active, #packages-nav li.selected
a:visited,
#classes-nav li li.selected a, #classes-nav li li.selected a:active, #classes-nav li li.selected
-a:visited,
-#nav-tree li div.selected {
+a:visited {
font-weight: 500;
color: #0099cc;
background-color:#fff; }
@@ -2297,10 +1793,7 @@
#classes-nav li.selected ul li a {
/* don't highlight child items */
color: #555555; }
-#nav-tree li div.selected a {
- font-weight: 500;
- color: #0099cc;
-}
+
#nav-swap {
height:30px;
border-top:1px solid #ccc;
@@ -2330,77 +1823,6 @@
cursor:pointer;
}
-
-/* nav tree */
-#side-nav, #swapper,
-#nav-tree, #tree-list {
- overflow:hidden;
- margin-left:0;
-}
-
-#devdoc-nav {
- overflow:visible !important; /* To keep the "to top" button visible */
-}
-
-#nav-tree ul {
- list-style:none;
- padding:0;
- margin:10px 0;
-}
-
-#nav-tree ul li div {
- padding:0 0 0 4px;
-}
-
-#side-nav #nav-tree ul li a,
-#side-nav #nav-tree ul li span.no-children {
- padding: 0;
- margin: 0;
-}
-
-#nav-tree .plus {
- margin: 0 3px 0 0;
-}
-
-#nav-tree ul ul {
- list-style: none;
- margin: 0;
- padding: 0 0 0 0;
-}
-
-#nav-tree ul li {
- margin: 0;
- padding: 0 0 0 0;
- white-space: nowrap;
-}
-
-#nav-tree .children_ul {
- padding:0;
- margin:0;
-}
-#nav-tree .children_ul li div {
- padding:0 0 0 10px;
-}
-#nav-tree .children_ul .children_ul li div {
- padding:0 0 0 20px;
-}
-
-#nav-tree a.nolink {
- color: #222;
- text-decoration: none;
-}
-
-#nav-tree span.label {
- width: 100%;
-}
-
-#nav-tree {
- overflow-x: auto;
- overflow-y: scroll;
- outline:0;
-}
-
-
/* Content */
#doc-col {
margin-right:0;
@@ -2423,7 +1845,7 @@
}
#doc-header h1 {
line-height: 0;
- margin-bottom: 15px;
+ padding-bottom: 15px;
}
#api-info-block {
float: right;
@@ -2443,7 +1865,7 @@
border-bottom: 1px solid #CCC;
background:#e9e9e9;
background: rgba(0, 0, 0, 0.05); /* matches #nav li.expanded */
-
+ line-height: 19px; /* Fix regression after page line-height is bumped to 24px */
}
#api-nav-title {
padding:0 5px;
@@ -2475,10 +1897,11 @@
-webkit-appearance: none;
background: transparent url(../images/arrows-up-down.png) 23px 5px no-repeat;
color: #222;
- height: 19px;
- line-height: 19px;
+ /* remove the lines below after xp testing
+ height: 19px;
+ line-height: 19px; */
padding: 0;
- margin:1px 0 0 0;
+ margin: .5px 0 0 0;
width:150%;
font-size:13px;
vertical-align:top;
@@ -2768,34 +2191,7 @@
}*/
/* --------------------------------------------------------------------------
-Butterbar
-*/
-#butterbar-wrapper {
- position:absolute;
- top:0;
- left:0;
- width:100%;
-}
-#butterbar {
- width:100%;
- margin:0 auto;
-}
-#butterbar-message {
- background-color:rgba(255, 187, 51, .4);
- font-size:13px;
- padding: 5px 0;
- text-align:center;
-}
-a#butterbar-message {
- cursor:pointer;
- display:block;
-}
-a#butterbar-message:hover {
- text-decoration:underline;
-}
-
-/* --------------------------------------------------------------------------
-Misc
+Misc and article typography
*/
@@ -2842,27 +2238,121 @@
p.img-caption {
margin: -10px 0 20px;
- font-size:13px;
- color:#666;
+ font-size: 13px;
}
-div.figure,
-div.figure-right {
- float:right;
- clear:right;
- margin:10px 0 0 0;
- padding:0 0 0 20px;
+/* figures and callouts */
+.figure {
+ position: relative;
+}
+
+.figure.pad-below {
+ margin-bottom: 20px;
+}
+
+.figure .figure-callout {
+ position: absolute;
+ color: #fff;
+ font-weight: 500;
+ font-size: 16px;
+ line-height: 23px;
+ text-align: center;
+ background: transparent url(../images/styles/callout.png) no-repeat scroll 50% 50%;
+ padding-right: 2px;
+ width: 30px;
+ height: 29px;
+ z-index: 1000;
+}
+
+.figure .figure-callout.top {
+ top: -9px;
+}
+
+.figure .figure-callout.right {
+ right: -5px;
+}
+
+.figure-caption {
+ margin: 0 10px 20px 0;
+ font-size: 14px;
+ line-height: 20px;
+ font-style: italic;
+}
+
+/* rows of figures */
+.figure-row {
+ font-size: 0;
+ line-height: 0;
+ /* to prevent space between figures */
+}
+
+.figure-row .figure {
+ display: inline-block;
+ vertical-align: top;
+}
+
+.figure-row .figure + .figure {
+ margin-left: 10px;
+ /* reintroduce space between figures */
+}
+
+.border-img {
+ border: 1px solid #CCC;
+}
+
+.center-img {
+ margin: auto;
+ text-align: center;
+}
+.center-img img {
+ margin-bottom: 15px;
+}
+
+.figure img,
+.figure-right img,
+.figure-left img,
+.figure-center img,
+.border-img {
+ margin-bottom: 15px;
+}
+
+.figure-center {
+ margin: 32px auto 24px;
+ max-width: 100%;
+}
+
+.figure,
+.figure-right {
+ clear: right;
+ float: right;
+ margin: 10px 0 0 0;
+ padding: 0 0 0 20px;
+ max-width: 50%;
/* width must be defined w/ an inline style matching the image width */
}
-div.figure-left {
- float:left;
- clear:left;
- margin:10px 0 0 0;
- padding:0 20px 0 0;
+.figure-left {
+ clear: left;
+ float: left;
+ margin: 10px 0 0 0;
+ padding: 0 20px 0 0;
+ max-width: 50%;
/* width must be defined w/ an inline style matching the image width */
}
+@media (max-width: 719px) {
+ /* Collapse on mobile. */
+ .figure,
+ .figure-right,
+ .figure-left {
+ float: none;
+ clear: none;
+ padding: 0;
+ margin: 32px auto 24px;
+ max-width: 100%;
+ }
+}
+
img.frame {
border:1px solid #DDD;
padding:4px;
@@ -2871,50 +2361,46 @@
p.table-caption {
margin: 0 0 4px 0;
font-size:13px;
- color:#666;
}
p.code-caption {
margin-bottom: 4px;
font: 12px/1.5 monospace;
- color:#666;
-}
-
-div.note,
-div.caution,
-div.warning {
- margin: 0 0 15px;
}
p.note, div.note,
p.caution, div.caution,
p.warning, div.warning {
- padding: 0 0 0 10px;
- border-left: 4px solid;
+ padding: 0 0 0 20px;
+ border-left: 3px solid;
+ margin: 16px 0;
}
p.note, div.note {
- border-color: #258AAF;
+ border-color: #4eb9ed;
+ border-color: rgba(3, 155, 229, .7); /* #039be5 * 70% */
}
p.caution, div.caution {
- border-color: #FF8800;
+ border-color: #ffbc4c;
+ border-color: rgba(255, 160, 0, .7); /* #ffa000 * 70% */
}
p.warning, div.warning {
- border-color: #ff4443;
+ border-color: #f48684;
+ border-color: rgba(239, 83, 80, .7); /* #ef5350 * 70% */
}
div.note.design {
- border-left: 4px solid #33B5E5;
+ border-left: 4px solid #00bcd4;
}
div.note.develop {
- border-left: 4px solid #F80;
+ border-left: 4px solid #ff7043;
}
div.note.distribute {
- border-left: 4px solid #9C0;
+ border-left: 4px solid #afb42b;
}
.note p, .caution p, .warning p {
@@ -2925,6 +2411,17 @@
margin-bottom:0;
}
+.summary-table {
+ background-color:#eceff1;
+ padding:1em;
+ margin-bottom:1.5em;
+}
+
+.summary-table h5 {
+ line-height:1em;
+ font-size:.98em;
+}
+
body.about blockquote {
display:block;
float:right;
@@ -2965,8 +2462,7 @@
a.notice-developers-video,
a.notice-developers,
a.notice-designers-video,
-a.notice-designers,
-a.notice-designers-material {
+a.notice-designers {
float:right;
clear:right;
width:238px;
@@ -2977,15 +2473,13 @@
a.notice-developers-video.wide,
a.notice-developers.wide,
a.notice-designers-video.wide,
-a.notice-designers.wide,
-a.notice-designers-material.wide {
+a.notice-designers.wide {
width:278px;
}
a.notice-developers-video div,
a.notice-developers div,
a.notice-designers-video div,
-a.notice-designers div,
-a.notice-designers-material div {
+a.notice-designers div {
min-height:40px;
background:url('../images/styles/notice-developers@2x.png') no-repeat 10px 10px;
background-size:40px 40px;
@@ -3003,42 +2497,34 @@
background:url('../images/styles/notice-developers-video@2x.png') no-repeat 10px 10px;
background-size:40px 40px;
}
-a.notice-designers-material div {
- background:url('../images/styles/notice-designers-material@2x.png') no-repeat 10px 10px;
- background-size:40px 40px;
-}
a.notice-developers-video:hover,
a.notice-developers:hover,
a.notice-designers-video:hover,
-a.notice-designers:hover,
-a.notice-designers-material:hover {
+a.notice-designers:hover {
background:#eee;
}
a.notice-developers-video h3,
a.notice-developers h3,
a.notice-designers-video h3,
-a.notice-designers h3,
-a.notice-designers-material h3 {
+a.notice-designers h3 {
font-size:13px;
line-height:18px;
font-weight:bold;
text-transform:uppercase;
color:#000 !important;
- margin:0 0 1px;
+ padding:0 0 1px;
}
a.notice-developers-video p,
a.notice-developers p,
a.notice-designers-video p,
-a.notice-designers p,
-a.notice-designers-material p {
+a.notice-designers p {
margin:0;
line-height:14px;
}
a.notice-developers-video.left,
a.notice-developers.left,
a.notice-designers-video.left,
-a.notice-designers.left,
-a.notice-designers-material.left {
+a.notice-designers.left {
margin-left:0;
float:left;
}
@@ -3180,7 +2666,7 @@
z-index:99;
width:450px;
position:fixed;
- margin:50px 0;
+ margin:80px 0;
padding:4em 4em 3em;
background:#FFF;
border:1px solid #999;
@@ -3368,8 +2854,7 @@
.feature-box h4,
.dialog h4 {
- margin: 15px 18px 10px;
- padding:0;
+ padding: 15px 18px 10px;
}
.feature-box p,
@@ -3446,36 +2931,31 @@
padding:0 0 0 4px;
}
-#jd-header {
- padding: 0 0 12px;
- margin: 20px 0 12px;
- font-size:12px;
- padding-bottom:12px;
- border-bottom:solid 1px #ccc;
-}
-
-#jd-header h1 {
- margin:0;
- padding:0 0 6px 0;
-}
-
/* not sure if this is needed in the ref docs, disabling for now
.jd-descr h2 {
margin:16px 0;
}
*/
+/* First paragraph of a content pages is a bit larger
+ - note the very specific selector. */
+.jd-descr > p:first-child,
+.jd-descr > #tb-wrapper + p,
+.jd-descr > #qv-wrapper + p {
+ font-size: 16px;
+ margin-bottom: 16px;
+}
+
/* page-top-right container for reference pages (holds
links to summary tables) */
#api-info-block {
font-size:12px;
margin:20px 0 0;
- padding:0 10px 6px;
font-weight:normal;
float:right;
text-align:right;
color:#999;
- max-width:80%;
+ max-width:300px;
font-size: 12px;
line-height:14px;
}
@@ -3490,12 +2970,17 @@
}
/* inheritance table */
+table.inhtable>tbody>tr>td {
+ padding-left:0;
+}
+table.inhtable>tbody>tr>td div:first-of-type {
+ padding-left:12px;
+}
+
.jd-inheritance-table {
border-spacing:0;
- margin:0;
+ margin:1em 0;
padding:0;
- font-size:12px;
- line-height:14px;
background-color:transparent;
}
.jd-inheritance-table tr td {
@@ -3505,23 +2990,13 @@
background-color:transparent;
}
.jd-inheritance-table .jd-inheritance-space {
- font-weight:bold;
- width:1em;
+ width:2em;
}
.jd-inheritance-table .jd-inheritance-interface-cell {
padding-left: 17px;
}
-
-.jd-sumtable a {
- text-decoration:none;
-}
-
-.jd-sumtable a:hover {
- text-decoration:underline;
-}
-
/* the link inside a sumtable for "Show All/Hide All" */
.toggle-all {
display:block;
@@ -3531,11 +3006,10 @@
}
/* adjustments for in/direct subclasses tables */
-.jd-sumtable.jd-sumtable-subclasses {
+.jd-sumtable-subclasses {
margin: 1em 0 0 0;
max-width:968px;
background-color:transparent;
- font-size:13px;
}
/* extra space between end of method name and open-paren */
@@ -3543,11 +3017,6 @@
margin-right: 2px;
}
-/* right alignment for the return type in sumtable */
-.jd-sumtable .jd-typecol {
- text-align:right;
-}
-
/* adjustments for the expando table-in-table */
.jd-sumtable-expando {
margin:.5em 0;
@@ -3568,7 +3037,9 @@
.jd-sumtable-subclasses div#subclasses-direct,
.jd-sumtable-subclasses div#subclasses-indirect {
- margin:0 0 0 13px;
+ /* left margin matches width of the toggle image,
+ so this section aligns with the text above */
+ margin:0 0 0 34px;
}
@@ -3637,13 +3108,9 @@
padding-top:5px;
border-top: 1px solid #ccc;
}
-body.google table.jd-sumtable th {
- background-color: #FFF;
- color:#000;
-}
h4.jd-tagtitle {
- margin:0;
+ padding:0;
}
h4 .normal {
@@ -3653,7 +3120,7 @@
/* API reference: heading for "Parameters", "See Also", etc.,
in details sections */
h5.jd-tagtitle {
- margin:0 0 .25em 0;
+ padding:0 0 .25em 0;
font-size:1em;
}
@@ -3676,6 +3143,7 @@
font-style:italic;
}
+
/* Inline api level indicator for methods */
div.api-level {
font-size:.8em;
@@ -3683,7 +3151,7 @@
color:#999;
float:right;
padding:0 8px 0;
- margin-top:-30px;
+ margin-top:-35px;
}
table.jd-tagtable td,
@@ -3695,426 +3163,8 @@
color:inherit;
}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-/* SEARCH FILTER */
-
-.menu-container {
- position:relative;
-}
-#search_autocomplete {
- font-weight:normal;
-}
-
-.search_filtered_wrapper.reference {
- width: 193px;
- float: right;
-}
-.search_filtered_wrapper.docs {
- width:875px;
- float: left;
- position:absolute;
- top:26px;
- right:66px;
-}
-.suggest-card {
- position:relative;
- width:170px;
- min-height:90px;
- padding:5px;
- border: solid 1px #C5C5C5;
- background: white;
- top: 15px;
- margin-right:-5px;
- -moz-box-shadow: 0 0 10px rgba(0,0,0,0.2);
- -webkit-box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
- box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
-}
-.suggest-card.reference {
- position:absolute;
- z-index:999;
- min-width:171px; /* +padding and border makes this match input width */
- min-height:93px; /* add 3px because this has 1 not 4px top border */
- width:auto;
- top:41px;
- margin:0;
-}
-.suggest-card.develop {
- z-index:997;
- border-top: solid 4px #F80;
- float:right;
-}
-.suggest-card.design {
- z-index:996;
- border-top: solid 4px #33b5e5;
- float:right;
-}
-.suggest-card.distribute {
- z-index:995;
- border-top: solid 4px #9C0;
- float:right;
-}
-.child-card {
- width:100%;
-}
-.suggest-card.dummy {
- width:172px;
- float:right;
- border:0;
- background:transparent;
- -moz-box-shadow: none;
- -webkit-box-shadow: none;
- box-shadow: none;
-}
-
-ul.search_filtered {
- min-width:100%;
- list-style: none;
- margin: 0 0 5px;
- padding: 0;
-}
-.search_filtered .jd-selected {
- background:#efefef;
- cursor:pointer;
-}
-.search_filtered .jd-selected,
-.search_filtered .jd-selected a {
- color:#09C !important;
-}
-
-.no-display {
- display: none;
-}
-
-.search_filtered li.jd-autocomplete {
- font-size: 0.81em;
- border: none;
- margin: 0 0 2px;
- padding: 0;
- line-height:1.5em;
-}
-
-.search_filtered li a {
- padding:0 5px;
- color:#222 !important;
- display:inline-block;
- line-height:12px;
-}
-
-.search_filtered li.header {
- font-weight:bold;
- color:#444;
- border: none;
- margin: 8px 0 2px;
- padding:1px 5px;
- line-height:1.5em;
-}
-.search_filtered li.header.small {
- font-size:0.85em;
-}
-
-.suggest-card.reference
-.search_filtered li.header {
- color:#aaa;
- font-size: 0.81em;
-}
-
-.search_filtered li.header:first-child {
- margin: 0 0 2px;
-}
-
-.show-item {
- display: table-row;
-}
-.hide-item {
- display: hidden;
-}
-
-
-
-
-
-/* SEARCH RESULTS */
-
-
-#leftSearchControl .gsc-twiddle {
- background-image : none;
-}
-
-#leftSearchControl td, #searchForm td {
- border: 0px solid #000;
- padding:0;
-}
-
-#leftSearchControl .gsc-resultsHeader .gsc-title {
- padding-left : 0px;
- font-weight : bold;
- font-size : 13px;
- color:#006699;
- display : none;
-}
-
-#leftSearchControl .gsc-resultsHeader div.gsc-results-selector {
- display : none;
-}
-
-#leftSearchControl .gsc-resultsRoot {
- padding-top : 6px;
-}
-
-#leftSearchControl div.gs-visibleUrl-long {
- display : block;
- color:#006699;
-}
-
-#leftSearchControl .gsc-webResult {
- padding:0 0 20px 0;
-}
-
-.gsc-webResult div.gs-visibleUrl-short,
-table.gsc-branding,
-.gsc-clear-button {
- display : none;
-}
-
-.gsc-cursor-box .gsc-cursor div.gsc-cursor-page,
-.gsc-cursor-box .gsc-trailing-more-results a.gsc-trailing-more-results,
-#leftSearchControl a,
-#leftSearchControl a b {
- color:#006699;
-}
-
-.gsc-resultsHeader {
- display: none;
-}
-
-/* Disable built in search forms */
-.gsc-control form.gsc-search-box {
- display : none;
-}
-table.gsc-search-box {
- margin:6px 0 0 0;
- border-collapse:collapse;
-}
-
-td.gsc-input {
- padding:0 2px;
- width:100%;
- vertical-align:middle;
-}
-
-input.gsc-input {
- border:1px solid #BCCDF0;
- width:99%;
- padding-left:2px;
- font-size:.95em;
-}
-
-td.gsc-search-button {
- text-align: right;
- padding:0;
- vertical-align:top;
-}
-
-
-#searchResults {
- overflow:hidden; /* because the repositioned page links makes the section think it needs to scroll
-(it doesn't) */
- height:auto;
-}
-
-#searchResults .gsc-control {
- position:relative;
- width:auto;
- padding:0 0 10px;
-}
-
-#searchResults .gsc-tabsArea {
- position:relative;
- white-space:nowrap;
- float:left;
- width:200px;
-}
-
-#searchResults .gsc-above-wrapper-area {
- display:none;
-}
-
-#searchResults .gsc-resultsbox-visible {
- float:left;
- width:720px;
- margin-left:20px;
-}
-
-#searchResults .gsc-tabHeader {
- padding: 3px 6px;
- position:relative;
- width:auto;
- display:block;
-}
-
-#searchResults h2#searchTitle {
- padding:0;
- margin:5px 0;
- border:none;
-}
-
-#searchResults h2#searchTitle em {
- font-style:normal;
- color:#33B5E5;
-}
-
-#searchResults .gsc-table-result {
- margin:5px 0 10px 0;
- background-color:transparent;
-}
-#searchResults .gs-web-image-box, .gs-promotion-image-box {
- width:120px;
-}
-#searchResults .gs-web-image-box img.gs-image, .gs-promotion-image-box img.gs-promotion-image {
- max-width:120px;
-}
-
-#searchResults .gsc-table-result .gsc-thumbnail {
- padding:0 20px 0 0;
-}
-
-#searchResults td {
- background-color:transparent;
-}
-
-#searchResults .gsc-expansionArea {
- position:relative;
-}
-#searchResults .gsc-tabsArea .gsc-cursor-box {
- width:200px;
- padding:20px 0 0 1px;
-}
-#searchResults .gsc-cursor-page {
- display:inline-block;
- float:left;
- margin:-1px 0 0 -1px;
- padding:0;
- height:27px;
- width:27px;
- text-align:center;
- line-height:2;
-}
-
-#searchResults .gsc-tabHeader.gsc-tabhInactive,
-#searchResults .gsc-cursor-page {
- text-decoration:none;
- color:#258AAF;
- border: solid 1px #DADADA;
-}
-
-#searchResults .gsc-tabHeader.gsc-tabhInactive:hover,
-#searchResults .gsc-cursor-page:hover {
- border-color: #DBDBDB;
- background-color: #F3F3F3;
- background-image: -webkit-gradient(linear, left top, left bottom, from(#F9F9F9), to(#ECECEC));
- background-image: -webkit-linear-gradient(top, #F9F9F9, #ECECEC);
- background-image: -moz-linear-gradient(top, #F9F9F9, #ECECEC);
- background-image: -ms-linear-gradient(top, #F9F9F9, #ECECEC);
- background-image: -o-linear-gradient(top, #F9F9F9, #ECECEC);
- background-image: linear-gradient(top, #F9F9F9, #ECECEC);
- filter: progid:DXImageTransform.Microsoft.gradient(startColorStr='#f9f9f9',
-EndColorStr='#ececec');
- color: #33B5E5;
-}
-
-#searchResults .gsc-tabHeader.gsc-tabhActive,
-#searchResults .gsc-tabHeader.gsc-tabhActive:hover,
-#searchResults .gsc-cursor-page.gsc-cursor-current-page,
-#searchResults .gsc-cursor-page.gsc-cursor-current-page:hover {
- color:#fff;
- background-color: #09C;
- background-image: -webkit-gradient(linear, left top, left bottom, from(#2FADDB), to(#09C));
- background-image: -webkit-linear-gradient(top, #2FADDB, #09C);
- background-image: -moz-linear-gradient(top, #2FADDB, #09C);
- background-image: -ms-linear-gradient(top, #2FADDB, #09C);
- background-image: -o-linear-gradient(top, #2FADDB, #09C);
- background-image: linear-gradient(top, #2FADDB, #09C);
- filter: progid:DXImageTransform.Microsoft.gradient(startColorStr='#2faddb', EndColorStr='#09c');
- border: 1px solid #3990AB;
- z-index:100;
-}
-
-
-
-
-
/************ STICKY NAV BAR ******************/
-#header-wrapper {
- background: #f9f9f9;
- margin: 0 -10px 0 -10px;
- padding: 31px 10px 0px 10px;
- position: relative;
-}
-#header-wrapper #nav-x div.wrap {
- max-width: 940px;
- height: 38px;
-}
-#header-wrapper #nav-x ul.nav-x li {
- margin-right: 31px !important;
- margin-top: 5px;
- margin-bottom: 0px;
- height: 30px;
-}
-#header-wrapper #nav-x > div.wrap ul.nav-x li.active {
- color: #669900;
- border-bottom: 3px solid #669900;
-}
-#header-wrapper #nav-x > div.wrap ul.nav-x li.active a {
- color: #669900;
-}
-#header-wrapper #nav-x > div.wrap ul.nav-x a {
- font-size: 14.5px;
-}
-#header-wrapper .developer-console-btn {
- float: right;
- background: #fefefe;
- border-radius: 4px;
- padding: 8px 14px;
- box-shadow: 1px 1px 0px #7a7a7a;
- font-size: 14px;
- margin-top: -6px;
- cursor: pointer;
- color: #464646;
- margin-right: 20px;
-}
-/* not currently used */
-#header-wrapper .shadow {
- width: 1034px;
- height: 4px;
- position: absolute;
- left: 50%;
- margin-left: -517px;
- bottom: -4px;
- background-image: url(../images/header-shadow.png);
-}
-
#context {
clear: both;
padding-top: 14px;
@@ -4158,78 +3208,8 @@
display: none;
}
-/* Sticky Nav overrides */
-.sticky-menu {
- position: fixed;
- width: 940px;
- height: 0px;
- z-index: 51;
- top: 12px;
-}
-#sticky-header {
- display: none;
- padding: 0 10px;
- position: fixed;
- background: #f9f9f9;
- top: 0px;
- left: 0px;
- right: 0px;
- height: 45px;
- box-shadow: 0px 1px 5px rgba(0, 0, 0, 0.1);
- border-bottom: 1px solid #a5c43a;
- z-index: 50;
-}
-#sticky-header.design {
- border-bottom: 1px solid #33b5e5;
-}
-#sticky-header.develop {
- border-bottom: 1px solid #F80;
-}
-#sticky-header.distribute {
- border-bottom: 1px solid #9C0;
-}
-#sticky-header.about {
- border-bottom: 1px solid #9933CC;
-}
-#sticky-header > div {
- overflow: hidden;
- *zoom: 1;
- width: 940px;
- margin: 0 auto;
- clear: both;
- padding-top: 9px;
-}
-#sticky-header > div .logo {
- float: left;
- width: 26px;
- height: 25px;
- background: url(../images/dac_logo.png);
- background-image: -webkit-image-set(url(../images/dac_logo.png) 1x, url(../images/dac_logo@2x.png) 2x);
- z-index: 52;
- position: relative;
-}
-#sticky-header > div .top {
- float: left;
- width: 38px;
- height: 38px;
- position: relative;
- background: url(../images/styles/gototop.png);
- z-index: 52;
-}
-#sticky-header > div .breadcrumb {
- float: left;
- padding: 0 0 0 10px;
- border-left: 1px solid #d2d2d2;
- line-height: 24px;
- font-size: 14px;
- position: relative;
- top: 0px;
- z-index: 52;
-}
-
/* offset the <a name=""> tags to account for sticky nav */
-body.reference a[name],
-div.renderscript a[name] {
+body.reference a[name] {
visibility: hidden;
display: block;
position: relative;
@@ -4237,76 +3217,6 @@
}
-}
-
-
-
-
-
-
-
-/*********** PREVIOUSLY dac-styles.css ***************/
-
-
-#header {
- border-bottom:0;
-}
-
-#header .wrap {
- max-width:940px;
- height:41px;
- border-bottom:1px solid;
- border-color: #ccc;
- position:relative;
-}
-
-.about #header .wrap {
- border-color: #9933CC;
-}
-
-.design #header .wrap {
- border-color: #33b5e5;
-}
-
-.develop #header .wrap {
- border-color: #F80;
-}
-
-.distribute #header .wrap {
- border-color: #9C0;
-}
-
-.logo a {
- float:left;
-}
-
-#header .logo {
- margin-top: -6px;
- margin-left: 0px;
- margin-bottom:0px;
- width: 160px;
- padding-right:10px;
-}
-
-
-#header-wrap .logo.landing-logo {
- width:220px;
- margin:0;
- padding:0;
- margin-bottom:22px;
-}
-#header-wrap .logo.landing-logo img {
- padding:0 0 0 10px;
-}
-
-.search {
- height:25px;
- margin-top: -3px;
- margin-bottom: 0px;
-}
-
-
-
/* Quicknav */
.btn-quicknav {
width:20px;
@@ -4344,17 +3254,6 @@
display:block;
}
-.nav-x li {
- display:block;
- float:left;
- margin-right:45px;
- -webkit-transition: all 0.25s linear;
- -moz-transition: all 0.25s linear;
- -ms-transition: all 0.25s linear;
- -o-transition: all 0.25s linear;
- transition: all 0.25s linear;
-}
-
#header-wrap.quicknav .nav-x li {
min-width:160px;
margin-right:20px;
@@ -4440,105 +3339,6 @@
}
-/* SEARCH AND MORE */
-.search {
- position: absolute;
- width: 50px;
- height:28px;
- display: block;
- margin-top:-3px;
- margin-bottom:7px;
- overflow:hidden;
- z-index:100;
- right:54px;
- -webkit-transition: width 0.4s ease;
- -moz-transition: width 0.4s ease;
- -o-transition: width 0.4s ease;
- transition: width 0.4s ease;
-}
-
-.search #search-btn {
- width:50px;
- height:28px;
- background:url(../images/icon_search.png) no-repeat;
- float:left;
-}
-
-.search-inner {
- width:245px;
-}
-
-.search:hover, .search.active {
- width:245px;
-}
-
-.search .bottom, .search .left, .search .right {
- position: absolute;
- background-color: #a2a2a2
-}
-
-.search .bottom {
- width: 214px;
- height: 1px;
- top: 24px;
- left: 0
-}
-
-.search .left, .search .right {
- height: 5px;
- width: 1px
-}
-
-.search .left {
- top: 22px;
- left: 56px;
- background-color:#CCC;
-}
-
-.search .right {
- top: 22px;
- left: 238px;
- background-color:#CCC;
-}
-
-.search form {
- margin-top: 2px;
- width: 162px;
- float:left;
-}
-
-.search form input {
- color: #2f2f2f;
- font-size: 0.95em;
- width: 178px;
- border: none;
- margin-left: 6px;
- z-index: 1500;
- position: relative;
- background-color: transparent;
- border-bottom:1px solid #CCC;
- padding:0 0 0 4px;
- outline:none;
- height:24px;
-}
-
-.search:hover form input {
- border-bottom:1px solid #33B5E5;
-}
-
-.search:hover .bottom, .search:hover .left, .search:hover .right {
- background-color: #33b5e5;
-}
-
-.search:hover #search-btn {
- background-position: 0 -28px
-}
-
-.search form input:focus {
- color: #222;
- font-weight: bold
-}
-
.moremenu {
float: right;
position: relative;
@@ -4691,9 +3491,9 @@
height:12px;
text-indent:-8000px;
list-style:none;
- margin: 0 2px;
+ margin: 0 3px;
border-radius:6px;
- background-color:#ccc;
+ background-color:#ddd;
cursor:pointer;
-webkit-transition:color .5s ease-in;
-moz-transition:color .5s ease-in;
@@ -4701,13 +3501,13 @@
transition:color .5s ease-in;
}
.slideshow-container .pagination ul li:hover {
- background-color:#999;
+ background-color:#bbb;
}
.slideshow-container .pagination ul li.active {
- background-color:#33b5e5;
+ background-color:#6ab344;
}
.slideshow-container .pagination ul li.active:hover {
- background-color:#33b5e5;
+ background-color:#6ab344;
}
.slideshow-container ul li {
display:inline;
@@ -4716,7 +3516,7 @@
#landing h1 {
- margin:17px 0 20px 0 !important;
+ padding:17px 0 20px 0 !important;
}
a.download-sdk {
@@ -4727,27 +3527,14 @@
padding-bottom:0px;
}
-#nav-x {
- padding-top: 13px;
-}
-
-#nav-x .wrap {
- min-height:32px;
-}
-
-#nav-x .wrap,
#searchResults.wrap {
max-width:940px;
- border-bottom:1px solid #CCC;
+ border-bottom:1px solid #e5e5e5;
}
#searchResults.wrap #leftSearchControl {
min-height:700px
}
-.nav-x {
- margin-left:0;
- margin-bottom:0;
-}
@@ -4817,7 +3604,7 @@
}
.jspDrag {
- background: #bbb;
+ background: #ccc;
position: relative;
top: 0;
left: 0;
@@ -4925,7 +3712,7 @@
}
.slideshow-develop .content-right h2 {
padding:0;
- margin-bottom:10px;
+ padding-bottom:10px;
border:none;
font-size:24px;
}
@@ -5018,7 +3805,7 @@
.feed .feed-container .feed-frame li.playlist-video h5 {
font-size:12px;
line-height:13px;
- margin:0;
+ padding:0;
}
.feed .feed-container .feed-frame li.playlist-video p {
margin:5px 0 0;
@@ -5060,7 +3847,7 @@
display:none;
margin: -1px auto 0;
position: relative;
- width: 940px;
+ max-width: 940px;
height: 0px;
}
#player-frame {
@@ -5072,6 +3859,22 @@
height: 330px;
position: relative;
}
+#player-frame .close {
+ position: absolute;
+ right: 8px;
+ bottom: 4px;
+ width: 16px;
+ height: 16px;
+ margin: 0;
+ text-indent: -1000em;
+ top: 6px;
+ background: url(../images/close.png) no-repeat 0 0;
+ z-index:9999;
+}
+#player-frame .close:hover, #player-frame .close:focus {
+ background-position: -16px 0;
+ cursor:pointer;
+}
@@ -5100,7 +3903,7 @@
margin-bottom:0;
}
.landing-banner h1 {
- margin-top:16px;
+ padding-top:16px;
padding-bottom:24px;
}
.landing-docs,
@@ -5114,7 +3917,7 @@
color:#555;
text-transform:uppercase;
border-bottom:1px solid #CCC;
- margin:0 0 20px;
+ padding:0 0 20px;
}
.landing-docs a {
color:#333 !important;
@@ -5126,7 +3929,7 @@
}
.landing-docs .normal-links a {
- color:#258aaf !important;
+ color:#039BE5 !important;
}
.plusone {
@@ -5155,8 +3958,7 @@
color:#555;
text-transform:uppercase;
border-bottom:none;
- margin:0 0 1em;
- padding:5px 0 0;
+ padding:5px 0 1em;
}
@@ -5233,7 +4035,7 @@
float: left;
width: 100%;
text-align: center;
- color: #09c !important;
+ color: #039BE5 !important;
}
.home-sections ul li a {
font-weight: bold;
@@ -5250,9 +4052,6 @@
.home-sections ul li.last {
margin-right: 0px;
}
-.fullpage #footer {
- margin-top: -40px;
-}
/************ DISTRIBUTE PAGES ******************/
@@ -5267,8 +4066,7 @@
color:#555;
text-transform:uppercase;
border-bottom:1px solid #CCC;
- padding:8px 0 0 1px;
- margin-bottom:14px;
+ padding:8px 0 14px 1px;
clear:both;
}
@@ -5281,1241 +4079,6 @@
clear: both;
}
-.border-img {
- border: 1px solid #CCC;
-}
-
-.center-img {
- margin: auto;
- text-align: center;
-}
-.center-img img {
- margin-bottom: 15px;
-}
-
-.figure img, .border-img {
- margin-bottom: 15px;
-}
-
-/************ RESOURCE CARDS ******************/
-
-/* Resource cards, 12, 13, 16-col */
-
-/* Basic card-styling with shadow */
-.resource-card {
- border-radius: 1px;
- box-shadow: 1px 2px 5px rgba(0, 0, 0, 0.12);
- background: #fefefe;
-}
-
-/* Styling for background image including tinting and section icons in stacks */
-.card-bg {
- display: block;
- position: absolute;
- vertical-align: top;
- width: 100%;
- left: 0;
- top: 0;
- background-size: cover;
- background-repeat: no-repeat;
- background-position: center;
- background-image: url(../images/resource-card-default-android.jpg);
-}
-.card-bg:after {
- content: "";
- display: block;
- height: 100%;
- width: 100%;
- opacity: 1;
- background: rgba(0, 0, 0, 0.2);
- -webkit-transition: opacity 0.5s;
- -moz-transition: opacity 0.5s;
- -o-transition: opacity 0.5s;
- transition: opacity 0.5s;
-}
-.static .card-bg:after {
- display:none;
-}
-.card-bg .card-section-icon {
- position: absolute;
- top: 50%;
- width: 100%;
- margin-top: -35px;
- text-align: center;
- padding-top: 65px;
- z-index: 100;
-}
-.card-bg .card-section-icon .icon {
- position: absolute;
- left: 50%;
- margin-left: -28px;
- top: 0px;
- width: 56px;
- height: 56px;
- background-repeat: no-repeat;
- background-position: 50% 50%;
- background-image: url(../images/stack-icon.png);
-}
-.card-bg .card-section-icon .section {
- text-transform: uppercase;
- color: white;
- font-size: 14px;
-}
-
-.card-info {
- position: absolute;
- -webkit-box-sizing: border-box;
- -moz-box-sizing: border-box;
- box-sizing: border-box;
- top: 0;
- right: 0;
- bottom: 0;
- left: 0;
- overflow: hidden;
- background: #fefefe;
- padding: 4px 12px 6px 12px;
-}
-.card-info .section {
- text-transform: uppercase;
- color: #898989;
- font-size: 12px;
- margin-bottom: 1px;
-}
-.card-info .title {
- color: #363636;
- white-space: nowrap;
- overflow: hidden;
- text-overflow: ellipsis;
- padding-bottom: 5px;
- margin-bottom: -2px;
- font-size: 16px;
-}
-.card-info .description {
- overflow: hidden;
-}
-.card-info .description .text {
- color: #464646;
- font: 13px/15px Roboto Condensed;
- overflow: hidden;
- width:100%;
-}
-.card-info .description .util {
- position: absolute;
- right: 5px;
- bottom: 70px; /*-2px;*/
- opacity: 0;
- -webkit-transition: opacity 0.5s;
- -moz-transition: opacity 0.5s;
- -o-transition: opacity 0.5s;
- transition: opacity 0.5s;
-}
-.card-info.empty-desc .title {
- white-space: normal;
- overflow: visible;
-}
-.card-info.empty-desc .description {
- display: none;
-}
-/* Truncate card summaries at bounding box and
- * and apply ellipsis at lower right */
-.ellipsis {
- overflow: hidden;
- float:right;
- line-height: 15px;
- width:100%;
-}
-.resource-card-6x6 .card-info .description .teddddddxt {
- float:left;
- position:relative;
- margin-left:0;
-}
-.ellipsis:before {
- content:"";
- float: left;
- width: 5px;
- height:100%;
-}
-.ellipsis > *:first-child.text {
- float: right;
- width: 100% !important;
- margin-left: -5px;
-}
-.ellipsis:after {
- content: "\02026";
- height:17px;
- padding-bottom:4px;
-
- box-sizing: content-box;
- -webkit-box-sizing: content-box;
- -moz-box-sizing: content-box;
-
- float: right; position: relative;
- top: -16px; left: 100%;
- width: 4em; margin-left: -4em;
- padding-right: 5px;
-
- background: -webkit-gradient(linear, left top, right top,
- from(rgba(255, 255, 255, 0)), to(white), color-stop(65%, white));
- background: -moz-linear-gradient(to right, rgba(255, 255, 255, 0), white 65%, white);
- background: -o-linear-gradient(to right, rgba(255, 255, 255, 0), white 65%, white);
- background: -ms-linear-gradient(to right, rgba(255, 255, 255, 0), white 65%, white);
- background: linear-gradient(to right, rgba(255, 255, 255, 0), white 65%, white);
-}
-.ellipsis:after {
- font-style: normal; color: #aaa;
- font-size:13px;
- text-align: right;
-}
-
-/* Flow Layout */
-.resource-flow-layout {
- display: inline-block;
-}
-.resource-flow-layout .resource-card, .resource-flow-layout .resource-card-stack {
- float: left;
- position: relative;
-}
-.resource-flow-layout .resource-card-stack > .resource-card {
- margin-right: 0px !important;
-}
-.resource-flow-layout:after {
- content: ".";
- display: block;
- height: 0;
- position:relative;
- clear: both;
- visibility: hidden;
-}
-.resource-card:hover {
- cursor: pointer;
-}
-.static .resource-card:hover {
- cursor: auto;
-}
-.resource-card:hover .card-bg:after {
- opacity: 0;
-}
-/* disabled to make way for fade/ellipsis truncation,
- and the plusone moves up.
-.resource-card:hover .card-info .description .text {
- padding-right: 70px;
-} */
-.resource-card:hover .card-info .description .util {
- opacity: 1;
-}
-
-/* Carousel Layout */
-/* Carousel styles for landing page */
-.resource-carousel-layout {
- margin: 20px 0 20px 0;
- position: relative;
- overflow: hidden;
-}
-.resource-carousel-layout .slideshow-prev, .resource-carousel-layout .slideshow-next {
- display: none;
-}
-.resource-carousel-layout .pagination {
- bottom: 0px;
-}
-.resource-carousel-layout .frame li {
- position: relative;
-}
-.resource-carousel-layout .frame li .card-bg {
- height: 300px;
-}
-.resource-carousel-layout .frame li .card-info {
- padding: 7px 15px 0px 15px;
- top: 300px;
-}
-.resource-carousel-layout .frame li .card-info .section {
- font-size: 13px;
- margin-bottom: 7px;
-}
-.resource-carousel-layout .frame li .card-info .title {
- font-size: 25px;
- margin-bottom: 2px;
-}
-.resource-carousel-layout .frame li .card-info .description {
- font-family: 15px/16px Roboto Condensed, sans-serif;
-}
-.resource-carousel-layout .frame li .card-info .description .text {
- height: 40px;
-}
-.resource-carousel-layout .frame li .card-info .description .util {
- bottom:97px;
- right:4px;
-}
-
-/* Stack Layout */
-.resource-stack-layout {
- display: inline-block;
-}
-.resource-stack-layout .resource-card-stack {
- float: left;
- position: relative;
-}
-.resource-stack-layout .resource-card {
- margin-bottom: 20px;
- display: block;
- position: relative;
-}
-.resource-stack-layout .section-card-menu > .card-info .section, .resource-stack-layout .section-card > .card-info .title {
- /*text-transform: uppercase;*/
- color: #898989;
- font-size: 17px;
- line-height: 24px;
- margin-bottom: 6px;
-}
-.resource-stack-layout .section-card {
- height: 284px;
-}
-.resource-stack-layout .section-card > .card-bg {
- height: 192px;
-}
-.resource-stack-layout .section-card > .card-info {
- padding: 4px 12px 6px 12px;
- top: 192px;
-}
-.resource-stack-layout .section-card > .card-info .section {
- display: none;
-}
-.resource-stack-layout .section-card > .card-info .title {
- font-size: 17px;
- border-bottom: 1px solid #959595;
- padding-bottom: 0px;
-}
-.resource-stack-layout .section-card > .card-info .description {
- font-size: 13px;
- line-height: 15px;
-}
-.resource-stack-layout .section-card > .card-info .description .text {
- height: 30px;
-}
-.resource-stack-layout .related-card {
- height: 90px;
-}
-.resource-stack-layout .related-card > .card-bg {
- left: 0;
- top: 0;
- width: 90px;
- height: 100%;
- position: absolute;
- display: block;
-}
-.resource-stack-layout .related-card > .card-info {
- left: 90px;
- padding: 4px 12px 4px 12px;
-}
-.resource-stack-layout .related-card > .card-info .section {
- font-size: 12px;
- margin-bottom: 1px;
- display: none;
-}
-.resource-stack-layout .related-card > .card-info .title {
- font-size: 16px;
- margin-bottom: -2px;
- white-space: normal;
- overflow: visible;
- text-overflow: ellipsis;
-}
-.resource-stack-layout .related-card > .card-info .title:after {
- content: url(../images/link-out.png);
- display: block;
-}
-.resource-stack-layout .related-card > .card-info .description {
- display: none;
-}
-.resource-stack-layout .section-card-menu {
- /* Flexible height */
- display: block;
- height: auto;
- width: auto;
-}
-.resource-stack-layout .section-card-menu .card-bg {
- height: 155px;
- /* Flexible height */
- position: relative;
- display: inline-block;
- vertical-align: top;
-}
-.resource-stack-layout .section-card-menu .card-info {
- padding: 4px 12px 0px 12px;
- /* Flexible height */
- position: relative;
- left: auto;
- top: auto;
- right: auto;
- bottom: auto;
-}
-.resource-stack-layout .section-card-menu .card-info ul {
- list-style: none;
- margin: 0;
-}
-.resource-stack-layout .section-card-menu .card-info ul li {
- list-style: none;
- margin: 0;
- padding: 15px 0;
- border-top-width: 1px;
- border-top-style: solid;
- border-top-color: #959595;
-}
-.resource-stack-layout .section-card-menu .card-info ul li a, .resource-stack-layout .section-card-menu .card-info ul li a:focus, .resource-stack-layout .section-card-menu .card-info ul li a:link, .resource-stack-layout .section-card-menu .card-info ul li a:visited, .resource-stack-layout .section-card-menu .card-info ul li a:active, .resource-stack-layout .section-card-menu .card-info ul li a:hover {
- color: #363636 !important;
-}
-.resource-stack-layout .section-card-menu .card-info ul li:first-child {
- border-top: none;
-}
-.resource-stack-layout .section-card-menu .card-info ul li:hover .title:after {
- opacity: 1;
- -webkit-transition: opacity 0.5s;
- -moz-transition: opacity 0.5s;
- -o-transition: opacity 0.5s;
- transition: opacity 0.5s;
-}
-.resource-stack-layout .section-card-menu .card-info ul li:hover .description {
- max-height: 30px;
- opacity: 1;
- -webkit-transition: max-height 0.5s, opacity 1s;
- -moz-transition: max-height 0.5s, opacity 1s;
- -o-transition: max-height 0.5s, opacity 1s;
- transition: max-height 0.5s, opacity 1s;
-}
-.resource-stack-layout .section-card-menu .card-info .title {
- font-size: 16px;
- margin-bottom: -2px;
- position: relative;
-}
-.resource-stack-layout .section-card-menu .card-info .title:after {
- background: url(../images/stack-arrow-right.png);
- content: '';
- opacity: 0;
- -webkit-transition: opacity 0.25s;
- -moz-transition: opacity 0.25s;
- -o-transition: opacity 0.25s;
- transition: opacity 0.25s;
- position: absolute;
- right: 0px;
- top: 3px;
- width: 10px;
- height: 15px;
-}
-.resource-stack-layout .section-card-menu .card-info .title.more {
- text-transform: uppercase;
- color: #898989;
- display: inline-block;
-}
-.resource-stack-layout .section-card-menu .card-info .title.more:after {
- background: url(../images/stack-arrow-right.png);
- content: '';
- display: block;
- position: absolute;
- right: -20px;
- top: 3px;
- width: 10px;
- height: 15px;
-}
-.resource-stack-layout .section-card-menu .card-info .description {
- max-height: 0px;
- opacity: 0;
- overflow: hidden;
- font-size: 13px;
- line-height: 15px;
- /* Hover off */
- -webkit-transition: max-height 0.5s, opacity 0.5s;
- -moz-transition: max-height 0.5s, opacity 0.5s;
- -o-transition: max-height 0.5s, opacity 0.5s;
- transition: max-height 0.5s, opacity 0.5s;
-}
-.resource-stack-layout .section-card-menu .card-info .description .text {
- height: 30px;
-}
-.resource-stack-layout:after {
- content: ".";
- display: block;
- height: 0;
- clear: both;
- visibility: hidden;
-}
-
-/* Generate the flow layout styles for a 3-column 16-col span */
-.resource-flow-layout.col-16 {
- margin: 0 -14px 0 0;
- width: 954px;
-}
-.resource-flow-layout.col-16 .resource-card, .resource-flow-layout.col-16 .resource-card-stack {
- margin: 0 14px 20px 0;
-}
-.resource-flow-layout.col-16 .resource-card-row-stack-last {
- margin-bottom: 0px !important;
-}
-.resource-flow-layout.col-16 .resource-card-col-stack-last {
- margin-bottom: 0px !important;
-}
-.resource-flow-layout.col-16 .resource-card-3x6 {
- width: 145px;
- height: 284px;
-}
-.resource-flow-layout.col-16 .resource-card-3x12 {
- width: 145px;
- height: 588px;
-}
-.resource-flow-layout.col-16 .resource-card-3x18 {
- width: 145px;
- height: 892px;
-}
-.resource-flow-layout.col-16 .resource-card-6x6 {
- width: 304px;
- height: 284px;
-}
-.resource-flow-layout.col-16 .resource-card-6x12 {
- width: 304px;
- height: 588px;
-}
-.resource-flow-layout.col-16 .resource-card-6x18 {
- width: 304px;
- height: 892px;
-}
-.resource-flow-layout.col-16 .resource-card-9x6 {
- width: 463px;
- height: 284px;
-}
-.resource-flow-layout.col-16 .resource-card-9x12 {
- width: 463px;
- height: 588px;
-}
-.resource-flow-layout.col-16 .resource-card-9x18 {
- width: 463px;
- height: 892px;
-}
-.resource-flow-layout.col-16 .resource-card-12x6 {
- width: 622px;
- height: 284px;
-}
-.resource-flow-layout.col-16 .resource-card-12x12 {
- width: 622px;
- height: 588px;
-}
-.resource-flow-layout.col-16 .resource-card-12x18 {
- width: 622px;
- height: 892px;
-}
-.resource-flow-layout.col-16 .resource-card-15x6 {
- width: 781px;
- height: 284px;
-}
-.resource-flow-layout.col-16 .resource-card-15x12 {
- width: 781px;
- height: 588px;
-}
-.resource-flow-layout.col-16 .resource-card-15x18 {
- width: 781px;
- height: 892px;
-}
-.resource-flow-layout.col-16 .resource-card-18x6 {
- width: 940px;
- height: 284px;
-}
-.resource-flow-layout.col-16 .resource-card-18x12 {
- width: 940px;
- height: 420px;
-}
-.resource-flow-layout.col-16 .resource-card-18x18 {
- width: 940px;
- height: 892px;
-}
-.resource-flow-layout.col-16 .resource-card-3x2 {
- width: 145px;
- height: 95px;
-}
-.resource-flow-layout.col-16 .resource-card-3x2x3 {
- width: 145px;
- height: 90px;
- margin-bottom: 7px;
-}
-.resource-flow-layout.col-16 .resource-card-3x3 {
- width: 145px;
- height: 142px;
-}
-.resource-flow-layout.col-16 .resource-card-3x3x2 {
- width: 145px;
- height: 138px;
- margin-bottom: 8px;
-}
-.resource-flow-layout.col-16 .resource-card-6x2 {
- width: 304px;
- height: 95px;
-}
-.resource-flow-layout.col-16 .resource-card-6x2x3 {
- width: 304px;
- height: 90px;
- margin-bottom: 7px;
-}
-.resource-flow-layout.col-16 .resource-card-6x3 {
- width: 304px;
- height: 142px;
-}
-.resource-flow-layout.col-16 .resource-card-6x3x2 {
- width: 304px;
- height: 138px;
- margin-bottom: 8px;
-}
-.resource-flow-layout.col-16 .resource-card-9x2 {
- width: 463px;
- height: 95px;
-}
-.resource-flow-layout.col-16 .resource-card-9x2x3 {
- width: 463px;
- height: 90px;
- margin-bottom: 7px;
-}
-.resource-flow-layout.col-16 .resource-card-9x3 {
- width: 463px;
- height: 142px;
-}
-.resource-flow-layout.col-16 .resource-card-9x3x2 {
- width: 463px;
- height: 138px;
- margin-bottom: 8px;
-}
-.resource-flow-layout.col-16 .resource-card-12x2 {
- width: 622px;
- height: 95px;
-}
-.resource-flow-layout.col-16 .resource-card-12x2x3 {
- width: 622px;
- height: 90px;
- margin-bottom: 7px;
-}
-.resource-flow-layout.col-16 .resource-card-12x3 {
- width: 622px;
- height: 142px;
-}
-.resource-flow-layout.col-16 .resource-card-12x3x2 {
- width: 622px;
- height: 138px;
- margin-bottom: 8px;
-}
-.resource-flow-layout.col-16 .resource-card-15x2 {
- width: 781px;
- height: 95px;
-}
-.resource-flow-layout.col-16 .resource-card-15x2x3 {
- width: 781px;
- height: 90px;
- margin-bottom: 7px;
-}
-.resource-flow-layout.col-16 .resource-card-15x3 {
- width: 781px;
- height: 142px;
-}
-.resource-flow-layout.col-16 .resource-card-15x3x2 {
- width: 781px;
- height: 138px;
- margin-bottom: 8px;
-}
-.resource-flow-layout.col-16 .resource-card-18x2 {
- width: 940px;
- height: 95px;
-}
-.resource-flow-layout.col-16 .resource-card-18x2x3 {
- width: 940px;
- height: 90px;
- margin-bottom: 7px;
-}
-.resource-flow-layout.col-16 .resource-card-18x3 {
- width: 940px;
- height: 142px;
-}
-.resource-flow-layout.col-16 .resource-card-18x3x2 {
- width: 940px;
- height: 138px;
- margin-bottom: 8px;
-}
-
-/* Generate the flow layout styles for a 3-column 16-col span */
-.resource-flow-layout.col-12 {
- margin: 0 -14px 0 0;
- width: 714px;
-}
-
-.resource-flow-layout.col-12 .resource-card, .resource-flow-layout.col-12 .resource-card-stack {
- margin: 0 14px 20px 0;
-}
-.resource-flow-layout.col-12 .resource-card-row-stack-last {
- margin-bottom: 0px !important;
-}
-.resource-flow-layout.col-12 .resource-card-col-stack-last {
- margin-bottom: 0px !important;
-}
-.resource-flow-layout.col-12 .resource-card-3x6 {
- width: 105px;
- height: 284px;
-}
-.resource-flow-layout.col-12 .resource-card-3x12 {
- width: 105px;
- height: 588px;
-}
-.resource-flow-layout.col-12 .resource-card-3x18 {
- width: 105px;
- height: 892px;
-}
-.resource-flow-layout.col-12 .resource-card-6x6 {
- width: 224px;
- height: 284px;
-}
-.resource-flow-layout.col-12 .resource-card-6x12 {
- width: 224px;
- height: 588px;
-}
-.resource-flow-layout.col-12 .resource-card-6x18 {
- width: 224px;
- height: 892px;
-}
-.resource-flow-layout.col-12 .resource-card-9x6 {
- width: 343px;
- height: 284px;
-}
-.resource-flow-layout.col-12 .resource-card-9x12 {
- width: 343px;
- height: 588px;
-}
-.resource-flow-layout.col-12 .resource-card-9x18 {
- width: 343px;
- height: 892px;
-}
-.resource-flow-layout.col-12 .resource-card-12x6 {
- width: 462px;
- height: 284px;
-}
-.resource-flow-layout.col-12 .resource-card-12x12 {
- width: 462px;
- height: 588px;
-}
-.resource-flow-layout.col-12 .resource-card-12x18 {
- width: 462px;
- height: 892px;
-}
-.resource-flow-layout.col-12 .resource-card-15x6 {
- width: 581px;
- height: 284px;
-}
-.resource-flow-layout.col-12 .resource-card-15x12 {
- width: 581px;
- height: 588px;
-}
-.resource-flow-layout.col-12 .resource-card-15x18 {
- width: 581px;
- height: 892px;
-}
-.resource-flow-layout.col-12 .resource-card-18x6 {
- width: 700px;
- height: 284px;
-}
-.resource-flow-layout.col-12 .resource-card-18x12 {
- width: 700px;
- height: 420px;
-}
-.resource-flow-layout.col-12 .resource-card-18x18 {
- width: 700px;
- height: 892px;
-}
-.resource-flow-layout.col-12 .resource-card-3x2 {
- width: 105px;
- height: 95px;
-}
-.resource-flow-layout.col-12 .resource-card-3x2x3 {
- width: 105px;
- height: 90px;
- margin-bottom: 7px;
-}
-.resource-flow-layout.col-12 .resource-card-3x3 {
- width: 105px;
- height: 142px;
-}
-.resource-flow-layout.col-12 .resource-card-3x3x2 {
- width: 105px;
- height: 138px;
- margin-bottom: 8px;
-}
-.resource-flow-layout.col-12 .resource-card-6x2 {
- width: 224px;
- height: 95px;
-}
-.resource-flow-layout.col-12 .resource-card-6x2x3 {
- width: 224px;
- height: 90px;
- margin-bottom: 7px;
-}
-.resource-flow-layout.col-12 .resource-card-6x3 {
- width: 224px;
- height: 142px;
-}
-.resource-flow-layout.col-12 .resource-card-6x3x2 {
- width: 224px;
- height: 138px;
- margin-bottom: 8px;
-}
-.resource-flow-layout.col-12 .resource-card-9x2 {
- width: 343px;
- height: 95px;
-}
-.resource-flow-layout.col-12 .resource-card-9x2x3 {
- width: 343px;
- height: 90px;
- margin-bottom: 7px;
-}
-.resource-flow-layout.col-12 .resource-card-9x3 {
- width: 343px;
- height: 142px;
-}
-.resource-flow-layout.col-12 .resource-card-9x3x2 {
- width: 343px;
- height: 138px;
- margin-bottom: 8px;
-}
-.resource-flow-layout.col-12 .resource-card-12x2 {
- width: 462px;
- height: 95px;
-}
-.resource-flow-layout.col-12 .resource-card-12x2x3 {
- width: 462px;
- height: 90px;
- margin-bottom: 7px;
-}
-.resource-flow-layout.col-12 .resource-card-12x3 {
- width: 462px;
- height: 142px;
-}
-.resource-flow-layout.col-12 .resource-card-12x3x2 {
- width: 462px;
- height: 138px;
- margin-bottom: 8px;
-}
-.resource-flow-layout.col-12 .resource-card-15x2 {
- width: 581px;
- height: 95px;
-}
-.resource-flow-layout.col-12 .resource-card-15x2x3 {
- width: 581px;
- height: 90px;
- margin-bottom: 7px;
-}
-.resource-flow-layout.col-12 .resource-card-15x3 {
- width: 581px;
- height: 142px;
-}
-.resource-flow-layout.col-12 .resource-card-15x3x2 {
- width: 581px;
- height: 138px;
- margin-bottom: 8px;
-}
-.resource-flow-layout.col-12 .resource-card-18x2 {
- width: 700px;
- height: 95px;
-}
-.resource-flow-layout.col-12 .resource-card-18x2x3 {
- width: 700px;
- height: 90px;
- margin-bottom: 7px;
-}
-.resource-flow-layout.col-12 .resource-card-18x3 {
- width: 700px;
- height: 142px;
-}
-.resource-flow-layout.col-12 .resource-card-18x3x2 {
- width: 700px;
- height: 138px;
- margin-bottom: 8px;
-}
-
-/* Generate the flow layout styles for a 3-column 13-col span */
-
-.resource-flow-layout.col-13 {
- margin: 0 -14px 0 0;
- width: 774px;
-}
-.resource-flow-layout.col-13 .resource-card, .resource-flow-layout.col-13 .resource-card-stack {
- margin: 0 14px 20px 0;
-}
-.resource-flow-layout.col-13 .resource-card-row-stack-last {
- margin-bottom: 0px !important;
-}
-.resource-flow-layout.col-13 .resource-card-col-stack-last {
- margin-bottom: 0px !important;
-}
-.resource-flow-layout.col-13 .resource-card-3x6 {
- width: 115px;
- height: 284px;
-}
-.resource-flow-layout.col-13 .resource-card-3x12 {
- width: 115px;
- height: 588px;
-}
-.resource-flow-layout.col-13 .resource-card-3x18 {
- width: 115px;
- height: 892px;
-}
-.resource-flow-layout.col-13 .resource-card-6x6 {
- width: 244px;
- height: 284px;
-}
-.resource-flow-layout.col-13 .resource-card-6x12 {
- width: 244px;
- height: 588px;
-}
-.resource-flow-layout.col-13 .resource-card-6x18 {
- width: 244px;
- height: 892px;
-}
-.resource-flow-layout.col-13 .resource-card-9x6 {
- width: 373px;
- height: 284px;
-}
-.resource-flow-layout.col-13 .resource-card-9x12 {
- width: 373px;
- height: 588px;
-}
-.resource-flow-layout.col-13 .resource-card-9x18 {
- width: 373px;
- height: 892px;
-}
-.resource-flow-layout.col-13 .resource-card-12x6 {
- width: 502px;
- height: 284px;
-}
-.resource-flow-layout.col-13 .resource-card-12x12 {
- width: 502px;
- height: 588px;
-}
-.resource-flow-layout.col-13 .resource-card-12x18 {
- width: 502px;
- height: 892px;
-}
-.resource-flow-layout.col-13 .resource-card-15x6 {
- width: 631px;
- height: 284px;
-}
-.resource-flow-layout.col-13 .resource-card-15x12 {
- width: 631px;
- height: 588px;
-}
-.resource-flow-layout.col-13 .resource-card-15x18 {
- width: 631px;
- height: 892px;
-}
-.resource-flow-layout.col-13 .resource-card-18x6 {
- width: 760px;
- height: 284px;
-}
-.resource-flow-layout.col-13 .resource-card-18x12 {
- width: 760px;
- height: 420px;
-}
-.resource-flow-layout.col-13 .resource-card-18x18 {
- width: 760px;
- height: 892px;
-}
-.resource-flow-layout.col-13 .resource-card-3x2 {
- width: 115px;
- height: 95px;
-}
-.resource-flow-layout.col-13 .resource-card-3x2x3 {
- width: 115px;
- height: 90px;
- margin-bottom: 7px;
-}
-.resource-flow-layout.col-13 .resource-card-3x3 {
- width: 115px;
- height: 142px;
-}
-.resource-flow-layout.col-13 .resource-card-3x3x2 {
- width: 115px;
- height: 138px;
- margin-bottom: 8px;
-}
-.resource-flow-layout.col-13 .resource-card-6x2 {
- width: 244px;
- height: 95px;
-}
-.resource-flow-layout.col-13 .resource-card-6x2x3 {
- width: 244px;
- height: 90px;
- margin-bottom: 7px;
-}
-.resource-flow-layout.col-13 .resource-card-6x3 {
- width: 244px;
- height: 142px;
-}
-.resource-flow-layout.col-13 .resource-card-6x3x2 {
- width: 244px;
- height: 138px;
- margin-bottom: 8px;
-}
-.resource-flow-layout.col-13 .resource-card-9x2 {
- width: 373px;
- height: 95px;
-}
-.resource-flow-layout.col-13 .resource-card-9x2x3 {
- width: 373px;
- height: 90px;
- margin-bottom: 7px;
-}
-.resource-flow-layout.col-13 .resource-card-9x3 {
- width: 373px;
- height: 142px;
-}
-.resource-flow-layout.col-13 .resource-card-9x3x2 {
- width: 373px;
- height: 138px;
- margin-bottom: 8px;
-}
-.resource-flow-layout.col-13 .resource-card-12x2 {
- width: 502px;
- height: 95px;
-}
-.resource-flow-layout.col-13 .resource-card-12x2x3 {
- width: 502px;
- height: 90px;
- margin-bottom: 7px;
-}
-.resource-flow-layout.col-13 .resource-card-12x3 {
- width: 502px;
- height: 142px;
-}
-.resource-flow-layout.col-13 .resource-card-12x3x2 {
- width: 502px;
- height: 138px;
- margin-bottom: 8px;
-}
-.resource-flow-layout.col-13 .resource-card-15x2 {
- width: 631px;
- height: 95px;
-}
-.resource-flow-layout.col-13 .resource-card-15x2x3 {
- width: 631px;
- height: 90px;
- margin-bottom: 7px;
-}
-.resource-flow-layout.col-13 .resource-card-15x3 {
- width: 631px;
- height: 142px;
-}
-.resource-flow-layout.col-13 .resource-card-15x3x2 {
- width: 631px;
- height: 138px;
- margin-bottom: 8px;
-}
-.resource-flow-layout.col-13 .resource-card-18x2 {
- width: 760px;
- height: 95px;
-}
-.resource-flow-layout.col-13 .resource-card-18x2x3 {
- width: 760px;
- height: 90px;
- margin-bottom: 7px;
-}
-.resource-flow-layout.col-13 .resource-card-18x3 {
- width: 760px;
- height: 142px;
-}
-.resource-flow-layout.col-13 .resource-card-18x3x2 {
- width: 760px;
- height: 138px;
- margin-bottom: 8px;
-}
-
-/*
- The following are styles for cards in the flowlayout above, styled by the number of rows they span
-*/
-/* Single row items, might be simpler to just apply a class */
-.resource-card-3x6 > .card-bg, .resource-card-6x6 > .card-bg, .resource-card-9x6 > .card-bg, .resource-card-12x6 > .card-bg, .resource-card-15x6 > .card-bg, .resource-card-18x6 > .card-bg {
- height: 192px;
-}
-.resource-card-3x6 > .card-info, .resource-card-6x6 > .card-info, .resource-card-9x6 > .card-info, .resource-card-12x6 > .card-info, .resource-card-15x6 > .card-info, .resource-card-18x6 > .card-info {
- padding: 4px 12px 6px 12px;
- top: 192px;
-}
-.resource-card-3x6 > .card-info .section, .resource-card-6x6 > .card-info .section, .resource-card-9x6 > .card-info .section, .resource-card-12x6 > .card-info .section, .resource-card-15x6 > .card-info .section, .resource-card-18x6 > .card-info .section {
- font-size: 12px;
- margin-bottom: 1px;
-}
-.resource-card-3x6 > .card-info .title, .resource-card-6x6 > .card-info .title, .resource-card-9x6 > .card-info .title, .resource-card-12x6 > .card-info .title, .resource-card-15x6 > .card-info .title, .resource-card-18x6 > .card-info .title {
- font-size: 16px;
- margin-bottom: -2px;
-}
-.resource-card-3x6 > .card-info .description, .resource-card-6x6 > .card-info .description, .resource-card-9x6 > .card-info .description, .resource-card-12x6 > .card-info .description, .resource-card-15x6 > .card-info .description, .resource-card-18x6 > .card-info .description {
- font-size: 13px;
- line-height: 15px;
-}
-.resource-card-3x6 > .card-info .description .text, .resource-card-6x6 > .card-info .description .text, .resource-card-9x6 > .card-info .description .text, .resource-card-12x6 > .card-info .description .text, .resource-card-15x6 > .card-info .description .text, .resource-card-18x6 > .card-info .description .text {
- height: 30px;
-}
-
-/* Double row items */
-.resource-card-3x12 > .card-bg, .resource-card-6x12 > .card-bg, .resource-card-9x12 > .card-bg, .resource-card-12x12 > .card-bg, .resource-card-15x12 > .card-bg, .resource-card-18x12 > .card-bg {
- height: 320px;
-}
-.resource-card-3x12 > .card-info, .resource-card-6x12 > .card-info, .resource-card-9x12 > .card-info, .resource-card-12x12 > .card-info, .resource-card-15x12 > .card-info, .resource-card-18x12 > .card-info {
- padding: 4px 12px 6px 12px;
- top: 320px;
-}
-.resource-card-3x12 > .card-info .section, .resource-card-6x12 > .card-info .section, .resource-card-9x12 > .card-info .section, .resource-card-12x12 > .card-info .section, .resource-card-15x12 > .card-info .section, .resource-card-18x12 > .card-info .section {
- font-size: 12px;
- margin-bottom: 1px;
-}
-.resource-card-3x12 > .card-info .title, .resource-card-6x12 > .card-info .title, .resource-card-9x12 > .card-info .title, .resource-card-12x12 > .card-info .title, .resource-card-15x12 > .card-info .title, .resource-card-18x12 > .card-info .title {
- font-size: 16px;
- margin-bottom: -2px;
- white-space: normal;
-}
-.resource-card-3x12 > .card-info .description, .resource-card-6x12 > .card-info .description, .resource-card-9x12 > .card-info .description, .resource-card-12x12 > .card-info .description, .resource-card-15x12 > .card-info .description, .resource-card-18x12 > .card-info .description {
- font-size: 13px;
- line-height: 15px;
-}
-
-/* 1/3 row items */
-.resource-card-3x2 > .card-bg, .resource-card-6x2 > .card-bg, .resource-card-9x2 > .card-bg, .resource-card-12x2 > .card-bg, .resource-card-15x2 > .card-bg, .resource-card-18x2 > .card-bg {
- left: 0;
- top: 0;
- width: 90px;
- height: 100%;
- position: absolute;
- display: block;
-}
-.resource-card-3x2 > .card-info, .resource-card-6x2 > .card-info, .resource-card-9x2 > .card-info, .resource-card-12x2 > .card-info, .resource-card-15x2 > .card-info, .resource-card-18x2 > .card-info {
- left: 90px;
- padding: 4px 12px 4px 12px;
- height: 80px;
- overflow: hidden;
-}
-.resource-card-3x2 > .card-info .section, .resource-card-6x2 > .card-info .section, .resource-card-6x3 > .card-info .section, .resource-card-9x2 > .card-info .section, .resource-card-12x2 > .card-info .section, .resource-card-15x2 > .card-info .section, .resource-card-18x2 > .card-info .section {
- font-size: 12px;
- margin-bottom: 1px;
- /* display: none; */
-}
-.resource-card-3x2 > .card-info .title, .resource-card-6x2 > .card-info .title, .resource-card-9x2 > .card-info .title, .resource-card-12x2 > .card-info .title, .resource-card-15x2 > .card-info .title, .resource-card-18x2 > .card-info .title {
- font-size: 16px;
- margin-bottom: -2px;
- white-space: normal;
- overflow: visible;
- text-overflow: ellipsis;
-}
-.resource-card-3x2 > .card-info .title:after, .resource-card-6x2 > .card-info .title:after, .resource-card-9x2 > .card-info .title:after, .resource-card-12x2 > .card-info .title:after, .resource-card-15x2 > .card-info .title:after, .resource-card-18x2 > .card-info .title:after {
- /* content: url(../images/link-out.png); */
- display: block;
-}
-.resource-card-3x2 > .card-info .description, .resource-card-6x2 > .card-info .description, .resource-card-9x2 > .card-info .description, .resource-card-12x2 > .card-info .description, .resource-card-15x2 > .card-info .description, .resource-card-18x2 > .card-info .description {
- display: none;
-}
-
-
-/* Override to show the description instead of the content section */
-.no-section .resource-card-3x2 > .card-info .section,
-.no-section .resource-card-6x2 > .card-info .section {
- display: none;
-}
-.no-section .resource-card-3x2 > .card-info .description,
-.no-section .resource-card-6x2 > .card-info .description {
- display: block;
-}
-
-/* 1/2 row items */
-.resource-card-3x3 > .card-bg, .resource-card-6x3 > .card-bg, .resource-card-9x3 > .card-bg, .resource-card-12x3 > .card-bg, .resource-card-15x3 > .card-bg, .resource-card-18x3 > .card-bg {
- left: 0;
- top: 0;
- width: 90px;
- height: 100%;
- position: absolute;
- display: block;
-}
-.resource-card-3x3 > .card-info, .resource-card-6x3 > .card-info, .resource-card-9x3 > .card-info, .resource-card-12x3 > .card-info, .resource-card-15x3 > .card-info, .resource-card-18x3 > .card-info {
- left: 90px;
- padding: 4px 12px 0px 12px;
-}
-.resource-card-3x3 > .card-info .section, .resource-card-6x3 > .card-info .section, .resource-card-9x3 > .card-info .section, .resource-card-12x3 > .card-info .section, .resource-card-15x3 > .card-info .section, .resource-card-18x3 > .card-info .section {
- font-size: 12px;
- margin-bottom: 1px;
- display: none;
-}
-.resource-card-3x3 > .card-info .title, .resource-card-6x3 > .card-info .title, .resource-card-9x3 > .card-info .title, .resource-card-12x3 > .card-info .title, .resource-card-15x3 > .card-info .title, .resource-card-18x3 > .card-info .title {
- font-size: 16px;
- margin-bottom: -2px;
- white-space: normal;
- overflow: visible;
-}
-.resource-card-3x3 > .card-info .description .text, .resource-card-6x3 > .card-info .description .text, .resource-card-9x3 > .card-info .description .text, .resource-card-12x3 > .card-info .description .text, .resource-card-15x3 > .card-info .description .text, .resource-card-18x3 > .card-info .description .text {
- font-size: 12px;
- line-height: 15px;
- padding-right: 0px !important;
- height: 80px;
-}
-.resource-card-3x3 > .card-info .description .util, .resource-card-6x3 > .card-info .description .util, .resource-card-9x3 > .card-info .description .util, .resource-card-12x3 > .card-info .description .util, .resource-card-15x3 > .card-info .description .util, .resource-card-18x3 > .card-info .description .util {
- display: none;
-}
-/* placement of plusone */
-.resource-card-6x12 > .card-info .description .util, .resource-card-9x12 > .card-info .description .util, .resource-card-12x12 > .card-info .description .util, .resource-card-15x12 > .card-info .description .util {
- bottom:2px;
-}
-.resource-card-18x12 > .card-info .description .util {
- bottom:2px;
-}
-/* Overrides for col-16 6x6 cards linking to local content on landing pages.
- Suppresses "section" and puts the title above a hairline rule. */
-.landing .card-info .section, .resource-flow-layout.col-16.landing .resource-card-9x6 .card-info .section {
- display:none;
-}
-.landing .card-info .title {
- color: #898989;
- font-size: 17px;
- line-height: 24px;
- margin-bottom: 6px;
- border-bottom: 1px solid #959595;
- padding-bottom: 0px;
-}
-.landing .card-info .description {
- font-size: 13px;
- line-height: 15px;
-}
-.landing .card-info .description .text {
-height:30px;
-}
-.landing .resource-card-6x6 > .card-info .description .util, .landing .resource-card-9x6 > .card-info .description .util {
- bottom:2px;
-}
-/*
- Generate a resource stack layout for a 3 column widget spanning 16 grid cols
-*/
-.resource-stack-layout.col-16 {
- margin: 0 -14px 0 0;
- width: 954px;
-}
-.resource-stack-layout.col-16 .resource-card-stack {
- margin: 0 14px 0 0;
- width: 304px;
-}
-
-/* Example of card menu tinting */
-.resource-widget[data-section=distribute\/tools] .section-card-menu
-.card-bg:after {
- background: rgba(126, 55, 148, 0.4) !important;
-}
-.resource-widget[data-section=distribute\/tools] .section-card-menu
-.card-section-icon .icon {
- background-color: #7e3794 !important;
-}
-.resource-widget[data-section=distribute\/tools] .section-card-menu
-.card-info ul li {
- border-top-color: #7e3794 !important;
-}
-
-/* tinting for stacks */
-
-div.jd-descr > .resource-widget[data-section=distribute\/tools]
-.section-card-menu .card-info ul li {
- border-top-color: #7e3794 !important;
-}
-
-
/**
* UTILITIES
@@ -6542,11 +4105,13 @@
*/
.landing-h1 {
- font-weight: 100;
- font-size: 60px;
- line-height: 78px;
+ color: #44555d;
+ font-weight: 300;
+ font-size: 56px;
+ line-height: 80px;
text-align: center;
letter-spacing: -1px;
+ padding-bottom: 6px;
}
.landing-pre-h1 {
@@ -6557,11 +4122,11 @@
text-align: center;
letter-spacing: -1px;
text-transform: uppercase;
-
}
.landing-h1.hero {
text-align: left;
+ color: #fff;
}
.landing-h2 {
@@ -6572,10 +4137,10 @@
}
.landing-subhead {
- color: #999999;
+ color: #78868d;
font-size: 20px;
- line-height: 28px;
- font-weight:300;
+ font-weight: 300;
+ line-height: 32px;
text-align: center;
}
.landing-subhead.hero {
@@ -6612,23 +4177,21 @@
* LAYOUT
*/
-#body-content,
-.fullpage,
-#jd-content,
-.jd-descr,
-.landing-body-content {
- height: 100%;
-}
-
.landing-section {
- padding: 80px 10px 80px;
- width: 100%;
- margin-left: -10px;
+ background: #eceff1;
+ clear: both;
+ padding: 80px 20px 80px;
+ margin: 0 -20px;
text-rendering: optimizeLegibility;
}
-#extending-android-to-wearables {
- padding-top: 30px;
+@media (max-width: 719px) {
+ .landing-section {
+ margin-left: -10px;
+ margin-right: -10px;
+ padding-left: 10px;
+ padding-right: 10px;
+ }
}
.landing-short-section {
@@ -6636,7 +4199,7 @@
}
.landing-gray-background {
- background-color: #e9e9e9;
+ background-color: #b0bec5;
}
.landing-white-background {
@@ -6648,24 +4211,19 @@
background-color: hsl(8, 70%, 54%);
}
-.landing-subhead-red {
+.landing-red-background .landing-h1 {
+ color: white;
+}
+
+.landing-red-background .landing-subhead {
color: hsl(8, 71%, 84%);
text-align: left;
}
-.landing-subhead-red p {
- margin-top: 20px;
-}
-
-.landing-hero-container {
- height: 100%;
-}
-
.preview-hero {
- height: calc(100% - 110px);
+ height: calc(100vh - 128px);
min-height: 504px;
- margin-top: -5px;
padding-top: 0;
padding-bottom: 0;
background-image: url(../../preview/images/hero.jpg);
@@ -6677,9 +4235,8 @@
}
.wear-hero {
- height: calc(100% - 110px);
+ height: calc(100vh - 128px);
min-height: 504px;
- margin-top: -5px;
padding-top: 0;
padding-bottom: 0;
background-image: url(../../wear/images/hero.jpg);
@@ -6691,9 +4248,8 @@
}
.tv-hero {
- height: calc(100% - 110px);
+ height: calc(100vh - 128px);
min-height: 504px;
- margin-top: -5px;
padding-top: 0;
padding-bottom: 0;
background-image: url(../../tv/images/hero.jpg);
@@ -6705,9 +4261,8 @@
}
.auto-hero {
- height: calc(100% - 110px);
+ height: calc(100vh - 128px);
min-height: 504px;
- margin-top: -5px;
padding-top: 0;
padding-bottom: 0;
background-image: url(../../auto/images/hero.jpg);
@@ -6720,16 +4275,16 @@
.landing-hero-scrim {
background: black;
- opacity: .2;
- position: absolute;
- width: 100%;
height: 100%;
- margin-left: -10px;
+ left: 0;
+ position: absolute;
+ opacity: .2;
+ width: 100%;
}
.landing-hero-wrap {
margin: 0 auto;
- width: 940px;
+ max-width: 940px;
clear: both;
height: 100%;
position: relative;
@@ -6748,56 +4303,6 @@
line-height: 24px;
}
-.landing-button {
- white-space: nowrap;
- display: inline-block;
- padding: 16px 32px;
- font-size: 18px;
- font-weight: 500;
- line-height: 24px;
- cursor: pointer;
- color: white;
- -webkit-user-select: none;
- -moz-user-select: none;
- -o-user-select: none;
- user-select: none;
- -webkit-transition: .2s background-color ease-in-out;
- -moz-transition: .2s background-color ease-in-out;
- -o-transition: .2s background-color ease-in-out;
- transition: .2s background-color ease-in-out;
-}
-
-.landing-primary {
- background-color: hsl(8, 70%, 44%);
- color: #f8f8f8;
-}
-
-.landing-button.landing-primary:hover {
- background-color: hsl(8, 70%, 36%);
-}
-
-.landing-button.landing-primary:active {
- background-color: hsl(8, 70%, 30%);
-}
-
-.landing-button.landing-secondary {
- background-color: #2faddb;
-}
-
-.landing-button.landing-secondary:hover {
- background-color: #09c;
-}
-
-.landing-button.landing-secondary:active {
- background-color: #3990ab;
-}
-
-a.landing-button,
-a.landing-button:hover,
-a.landing-button:visited {
- color: white !important;
-}
-
.landing-video-link {
white-space: nowrap;
display: inline-block;
@@ -6916,17 +4421,6 @@
margin-bottom: 20px;
}
-.col-3-wide {
- display: inline;
- float: left;
- margin-left: 10px;
- margin-right: 10px;
-}
-
-.col-3-wide {
- width: 302px;
-}
-
/**
* ANIMATION
*/
@@ -6953,86 +4447,6 @@
}
-
-/**
- * VIDEO
- */
-
-#video-container {
- display:none;
- position:fixed;
- top:0;
- left:0;
- width:100%;
- height:100%;
- background-color:rgba(0,0,0,0.8);
- z-index:9999;
-}
-
-#video-frame {
- width:940px;
- height:100%;
- margin:72px auto;
- display:none;
- position:relative;
-}
-
-.video-close {
- cursor: pointer;
- position: absolute;
- right: -49px;
- top: -49px;
- pointer-events: all;
-}
-
-#icon-video-close {
- background-image: url("../images/close-white.png");
- background-image: -webkit-image-set(url(../images/close-white.png) 1x, url(../images/close-white_2x.png) 2x);
- background-repeat: no-repeat;
- background-position: 0 0;
- background-size: 36px 36px;
- height: 36px;
- width: 36px;
- display:block;
-}
-
-#icon-video-close:hover {
- background-image: url("../images/close-grey.png");
- background-image: -webkit-image-set(url(../images/close-grey.png) 1x, url(../images/close-grey_2x.png) 2x);
-}
-
-/* Preload the hover images */
-a.video-shadowbox-button.white:after {
- display:none;
- content:url("../images/close-grey.png") url("../images/close-grey_2x.png");
-}
-
-a.video-shadowbox-button.white {
- background-image: url("../images/play-circle-white.png");
- background-image: -webkit-image-set(url(../images/play-circle-white.png) 1x, url(../images/play-circle-white_2x.png) 2x);
- background-size: 36px 36px;
- background-repeat: no-repeat;
- background-position: right;
- padding: 16px 42px 16px 8px;
- font-size: 18px;
- font-weight: 500;
- line-height: 24px;
- color: #fff;
- text-decoration:none;
-}
-
-a.video-shadowbox-button.white:hover {
- color:#bababa !important;
- background-image: url("../images/play-circle-grey.png");
- background-image: -webkit-image-set(url(../images/play-circle-grey.png) 1x, url(../images/play-circle-grey_2x.png) 2x);
-}
-
-/* Preload the hover images */
-a.video-shadowbox-button.white:after {
- display:none;
- content:url("../images/play-circle-grey.png") url("../images/play-circle-grey_2x.png");
-}
-
/******************
Styles for d.a.c/index:
*******************/
@@ -7041,8 +4455,7 @@
/* Generic full screen carousel styling to be used across pages. */
.fullscreen-carousel {
- margin: 0 -10px;
- width: 100%;
+ margin: 0 -20px;
overflow: hidden;
position: relative;
}
@@ -7074,14 +4487,13 @@
font-size: 60px;
line-height: 68px;
letter-spacing: -1px;
- margin-top: 0;
+ padding-top: 0;
}
.fullscreen-carousel .hero p {
font-weight: 300;
font-size: 18px;
line-height: 24px;
- -webkit-font-smoothing: antialiased;
}
.fullscreen-carousel .hero .hero-bg {
@@ -7214,82 +4626,6 @@
margin-bottom: 26px;
}
-
-
-
-
-/*
- Styles for the entity link used in the actions bar and in the cta of
- the resources that appear in the tab carousel.
-*/
-.actions-bar a:after,
-.resource .cta:after {
- content: '›';
- font-weight: 400;
- font-size: 22px;
- left: 5px;
- line-height: 1;
- position: relative;
- top: 1px;
- transition: left 190ms ease-out;
-}
-
-.actions-bar a:hover:after,
-.resource .cta:hover:after {
- left: 10px;
-}
-
-
-
-
-/*
- Styles for the actions bar.
-*/
-.actions-bar {
- background: #9acd00;
- margin: 0 -10px;
- text-align: center;
-}
-
-.actions-bar .actions {
- padding: 30px 0 30px;
- text-align: justify;
- font-size: 0.1px;
- line-height: 0.1px;
- margin: 0 10px 0 0;
-}
-
-.actions-bar .actions:after {
- content: '';
- width: 100%;
- display: inline-block;
-}
-
-.actions-bar .actions > div {
- display: inline-block;
-}
-
-.actions-bar a {
- font-size: 21px;
- line-height: 27px;
- color: #fff;
- font-weight: 300;
- -webkit-font-smoothing: antialiased;
-}
-
-.actions-bar a:after {
- top: 0px;
- font-size: 22px;
-}
-
-.actions-bar a:hover {
- color: #fff !important;
-}
-
-
-
-
-
/*
Specific styles for new home page layout of the carousels.
*/
@@ -7450,3 +4786,5134 @@
.resource-card-6x2 > .card-bg.helpouts-card-bg:after {
display:none;
}
+
+#tb li:before, #qv li:before {
+ background-position: 0px -196px;
+ height: 24px;
+ width: 24px;
+ content: '';
+ left: -8px;
+ opacity: .7;
+ position: absolute;
+ top: -4px;
+}
+
+/* CHANGE EXISTING SELECTOR FOR ANDROID M HERO ONLY
+ REMOVE THE BELOW STYLES WHEN THE ANDROID M CAROUSEL
+ GRAPHIC ON THE MAIN LANDING IS TAKEN DOWN */
+.dac-hero.mprev {
+ background-color: #fff;
+ background-position: 50% 53%;
+ background-size: cover;
+ background-image: url(../../assets/images/home/android_m_hero_1200.jpg);
+ box-sizing: border-box;
+ font-size: 16px;
+ min-height: 550px;
+ padding-top: 88px;
+}
+.dac-hero.dac-darken.mprev::before {
+ background: rgba(0, 0, 0, 0.3);
+ bottom: 0;
+ content: '';
+ display: block;
+ left: 0;
+ position: absolute;
+ right: 0;
+ top: 0;
+}
+
+.dac-hero.dac-darken.mprev::before {
+ background: -webkit-linear-gradient(top, rgba(0, 0, 0, .05), rgba(0, 0, 0, .05), #000 950px);
+ background: linear-gradient(to bottom, rgba(0, 0, 0, .05), rgba(0, 0, 0, 0.05), #000 950px);
+}
+
+@media (max-width: 719px) {
+ .dac-hero.dac-darken.mprev {
+ background-size: auto 600px;
+ background-position: 55% 0;
+ background-repeat: no-repeat;
+ }
+
+ .dac-hero-figure.mprev {
+ height: 10px;
+ margin: 15px 0;
+ }
+}
+
+@media (max-width: 719px) {
+ .dac-hero.dac-darken.mprev {
+ background-size: auto 600px;
+ background-position: 55% 0;
+ background-repeat: no-repeat;
+ }
+
+ .dac-hero-figure.mprev {
+ height: 10px;
+ margin: 15px 0;
+ }
+}
+
+@media (max-width: 1200px) {
+ .dac-hero.dac-darken.mprev {
+ background-size: auto 700px;
+ background-position: 55% 0;
+ background-repeat: no-repeat;
+ }
+
+ .dac-hero-cta.mprev {
+ white-space:nowrap;
+ }
+}
+
+@charset "UTF-8";
+/**
+ * Fades out an element.
+ * Applies visibility hidden when the transition is finished.
+ *
+ * Use opacity: 1; to show the element.
+ */
+.dac-visible-mobile-block, .dac-mobile-only,
+.dac-visible-mobile-inline,
+.dac-visible-mobile-inline-block,
+.dac-visible-tablet-block,
+.dac-visible-tablet-inline,
+.dac-visible-tablet-inline-block,
+.dac-visible-desktop-block,
+.dac-visible-desktop-inline,
+.dac-visible-desktop-inline-block {
+ display: none !important;
+}
+
+@media (max-width: 719px) {
+ .dac-hidden-mobile {
+ display: none !important;
+ }
+
+ .dac-visible-mobile-block, .dac-mobile-only {
+ display: block !important;
+ }
+
+ .dac-visible-mobile-inline {
+ display: inline !important;
+ }
+
+ .dac-visible-mobile-inline-block {
+ display: inline-block !important;
+ }
+}
+
+@media (min-width: 720px) and (max-width: 979px) {
+ .dac-hidden-tablet {
+ display: none !important;
+ }
+
+ .dac-visible-tablet-block {
+ display: block !important;
+ }
+
+ .dac-visible-tablet-inline {
+ display: inline !important;
+ }
+
+ .dac-visible-tablet-inline-block {
+ display: inline-block !important;
+ }
+}
+
+@media (min-width: 980px) {
+ .dac-hidden-desktop {
+ display: none !important;
+ }
+
+ .dac-visible-desktop-block {
+ display: block !important;
+ }
+
+ .dac-visible-desktop-inline {
+ display: inline !important;
+ }
+
+ .dac-visible-desktop-inline-block {
+ display: inline-block !important;
+ }
+}
+
+.dac-offset-parent {
+ position: relative !important;
+}
+
+/**
+ * Hide from browsers/screenreaders on all sizes.
+ */
+.dac-hidden {
+ display: none !important;
+}
+
+/**
+ * Break strings when their length exceeds the width of their container.
+ */
+.dac-text-break {
+ word-wrap: break-word !important;
+}
+
+/**
+ * Horizontal text alignment
+ */
+.dac-text-center {
+ text-align: center !important;
+}
+
+.dac-text-left {
+ text-align: left !important;
+}
+
+.dac-text-right {
+ text-align: right !important;
+}
+
+/**
+ * Prevent whitespace wrapping
+ */
+.dac-text-no-wrap {
+ white-space: nowrap !important;
+}
+
+/**
+ * Prevent text from wrapping onto multiple lines, instead truncate with an ellipsis.
+ */
+.dac-text-truncate {
+ max-width: 100%;
+ overflow: hidden !important;
+ text-overflow: ellipsis !important;
+ white-space: nowrap !important;
+ word-wrap: normal !important;
+}
+
+/**
+ * Floats
+ */
+.dac-float-left {
+ float: left !important;
+}
+
+.dac-float-right {
+ float: right !important;
+}
+
+/**
+ * New block formatting context
+ *
+ * This affords some useful properties to the element. It won't wrap under
+ * floats. Will also contain any floated children.
+ * N.B. This will clip overflow. Use the alternative method below if this is
+ * problematic.
+ */
+.dac-nbfc {
+ overflow: hidden !important; }
+
+/**
+ * New block formatting context (alternative)
+ *
+ * Alternative method when overflow must not be clipped.
+ *
+ * N.B. This breaks down in some browsers when elements within this element
+ * exceed its width.
+ */
+.dac-nbfc-alt {
+ display: table-cell !important;
+ width: 10000px !important; }
+
+/* New CSS */
+/************ RESOURCE CARDS ******************/
+/* Basic card-styling with shadow */
+.resource-card {
+ background: #fff;
+ box-shadow: 0px 1px 3px 0px rgba(0, 0, 0, 0.21);
+ display: block;
+ position: relative; }
+
+/* Play button is only visible on 6by6 cards */
+.play-button {
+ background-color: #000;
+ border-radius: 50%;
+ box-sizing: border-box;
+ display: none;
+ height: 70px;
+ line-height: 65px;
+ padding-left: 4px;
+ position: absolute;
+ opacity: .6;
+ text-align: center;
+ -webkit-transition: opacity .5s;
+ transition: opacity .5s;
+ width: 70px;
+ z-index: 1; }
+ .resource-card-6x2 .play-button {
+ display: block;
+ left: 10px;
+ top: 15px;
+ -webkit-transform: scale(0.73);
+ -ms-transform: scale(0.73);
+ transform: scale(0.73); }
+ .resource-card-6x6 .play-button {
+ display: block;
+ left: 50%;
+ margin-left: -35px;
+ top: 50px; }
+
+/* Styling for background image including tinting and section icons in stacks */
+.card-bg {
+ bottom: 131px;
+ display: block;
+ position: absolute;
+ vertical-align: top;
+ width: 100%;
+ left: 0;
+ top: 0;
+ background-size: cover;
+ background-repeat: no-repeat;
+ background-position: center;
+ background-image: url(../images/resource-card-default-android.jpg); }
+ .card-bg:after {
+ content: "";
+ display: block;
+ height: 100%;
+ width: 100%;
+ opacity: 1;
+ background: rgba(0, 0, 0, 0.05);
+ -webkit-transition: opacity 0.5s;
+ transition: opacity 0.5s; }
+ .static .card-bg:after {
+ display: none; }
+ .card-bg .card-section-icon {
+ position: absolute;
+ top: 50%;
+ width: 100%;
+ margin-top: -35px;
+ text-align: center;
+ padding-top: 65px;
+ z-index: 100; }
+ .card-bg .card-section-icon .icon {
+ position: absolute;
+ left: 50%;
+ margin-left: -28px;
+ top: 0px;
+ width: 56px;
+ height: 56px;
+ background-repeat: no-repeat;
+ background-position: 50% 50%;
+ background-image: url(../images/stack-icon.png); }
+ .card-bg .card-section-icon .section {
+ text-transform: uppercase;
+ color: white;
+ font-size: 14px; }
+
+.card-info {
+ position: absolute;
+ box-sizing: border-box;
+ height: 131px;
+ right: 0;
+ bottom: 0;
+ left: 0;
+ overflow: hidden;
+ background: #fefefe;
+ padding: 6px 12px; }
+ .card-info .section {
+ color: #898989;
+ font-size: 11px;
+ font-weight: 700;
+ letter-spacing: .3px;
+ line-height: 20px;
+ text-transform: uppercase; }
+ .card-info .title {
+ color: #333;
+ font-size: 18px;
+ font-weight: 500;
+ line-height: 23px;
+ margin-bottom: 7px;
+ max-height: 46px;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ white-space: normal; }
+ .card-info .description {
+ overflow: hidden; }
+ .card-info .description .text {
+ color: #666;
+ font-size: 14px;
+ height: 60px;
+ line-height: 20px;
+ overflow: hidden;
+ width: 100%; }
+ .card-info .description .util {
+ position: absolute;
+ right: 5px;
+ bottom: 70px;
+ opacity: 0;
+ -webkit-transition: opacity 0.5s;
+ transition: opacity 0.5s; }
+ .card-info.empty-desc .title {
+ white-space: normal;
+ overflow: visible; }
+ .card-info.empty-desc .description {
+ display: none; }
+
+/* Truncate card summaries at bounding box and
+ * and apply ellipsis at lower right */
+.ellipsis {
+ overflow: hidden;
+ float: right;
+ line-height: 15px;
+ width: 100%; }
+ .ellipsis:before {
+ content: "";
+ float: left;
+ width: 5px;
+ height: 100%; }
+ .ellipsis > *:first-child.text {
+ float: right;
+ width: 100% !important;
+ margin-left: -5px; }
+ .ellipsis:after {
+ content: "\02026";
+ height: 17px;
+ padding-bottom: 4px;
+ box-sizing: content-box;
+ float: right;
+ position: relative;
+ top: -16px;
+ left: 100%;
+ width: 4em;
+ margin-left: -4em;
+ padding-right: 5px;
+ background: -webkit-gradient(linear, left top, right top, from(rgba(255, 255, 255, 0)), to(white), color-stop(65%, white));
+ background: -webkit-linear-gradient(left, rgba(255, 255, 255, 0), white 65%, white);
+ background: linear-gradient(to right, rgba(255, 255, 255, 0), white 65%, white); }
+ .ellipsis:after {
+ font-style: normal;
+ color: #aaa;
+ font-size: 13px;
+ text-align: right; }
+
+.resource-card:hover {
+ cursor: pointer; }
+ .static .resource-card:hover {
+ cursor: auto; }
+ .resource-card:hover .card-bg:after {
+ opacity: 0; }
+ .resource-card:hover .play-button {
+ opacity: .3; }
+ .resource-card:hover .card-info .description .util {
+ opacity: 1; }
+
+/* Carousel Layout */
+/* Carousel styles for landing page */
+.resource-carousel-layout {
+ height: 531px;
+ margin: 20px 0 20px 0;
+ padding: 0 !important;
+ position: relative;
+ overflow: hidden; }
+ .resource-carousel-layout .slideshow-prev, .resource-carousel-layout .slideshow-next {
+ display: none; }
+ .resource-carousel-layout .pagination {
+ bottom: 97px;
+ left: auto;
+ padding-right: 10px;
+ right: 0;
+ text-align: right;
+ width: 16.66666667%; }
+ .resource-carousel-layout .pagination ul li {
+ text-indent: 8000px; }
+ .resource-carousel-layout .frame li {
+ position: relative; }
+ .resource-carousel-layout .frame li .card-bg {
+ bottom: 131px; }
+ .resource-carousel-layout .frame li .card-info {
+ height: 131px;
+ padding: 6px 12px;
+ top: auto; }
+ .resource-carousel-layout .frame li .card-info .title {
+ font-size: 28px;
+ font-weight: 400;
+ line-height: 32px; }
+ .resource-carousel-layout .frame li .card-info .description .text {
+ height: 40px; }
+ .resource-carousel-layout .frame li .card-info .description .util {
+ bottom: 97px;
+ right: 4px; }
+
+/* Stack Layout */
+.resource-stack-layout {
+ display: inline-block;
+ padding: 0; }
+ .resource-stack-layout .section-card-menu > .card-info .section, .resource-stack-layout .section-card > .card-info .title {
+ /*text-transform: uppercase;*/
+ color: #898989;
+ font-size: 17px;
+ line-height: 23px;
+ margin-bottom: 6px; }
+ .resource-stack-layout .section-card {
+ height: 284px; }
+ .resource-stack-layout .section-card > .card-bg {
+ height: 192px; }
+ .resource-stack-layout .section-card > .card-info {
+ padding: 4px 12px 6px 12px;
+ top: 192px; }
+ .resource-stack-layout .section-card > .card-info .section {
+ display: none; }
+ .resource-stack-layout .section-card > .card-info .title {
+ font-size: 17px;
+ border-bottom: 1px solid #959595;
+ padding-bottom: 0px; }
+ .resource-stack-layout .section-card > .card-info .description {
+ font-size: 13px;
+ line-height: 15px; }
+ .resource-stack-layout .section-card > .card-info .description .text {
+ height: 30px; }
+ .resource-stack-layout .related-card {
+ height: 90px; }
+ .resource-stack-layout .related-card > .card-bg {
+ left: 0;
+ top: 0;
+ width: 90px;
+ height: 100%;
+ position: absolute;
+ display: block; }
+ .resource-stack-layout .related-card > .card-info {
+ left: 90px;
+ padding: 4px 12px 4px 12px; }
+ .resource-stack-layout .related-card > .card-info .section {
+ font-size: 12px;
+ margin-bottom: 1px;
+ display: none; }
+ .resource-stack-layout .related-card > .card-info .title {
+ font-size: 16px;
+ margin-bottom: -2px;
+ white-space: normal;
+ overflow: visible;
+ text-overflow: ellipsis; }
+ .resource-stack-layout .related-card > .card-info .title:after {
+ content: url(../images/link-out.png);
+ display: block; }
+ .resource-stack-layout .related-card > .card-info .description {
+ display: none; }
+ .resource-stack-layout .section-card-menu {
+ /* Flexible height */
+ display: block;
+ height: auto;
+ width: auto; }
+ .resource-stack-layout .section-card-menu .card-bg {
+ height: 155px;
+ /* Flexible height */
+ position: relative;
+ display: inline-block;
+ vertical-align: top; }
+ .resource-stack-layout .section-card-menu .card-info {
+ padding: 4px 12px 0px 12px;
+ /* Flexible height */
+ position: relative;
+ left: auto;
+ top: auto;
+ right: auto;
+ bottom: auto; }
+ .resource-stack-layout .section-card-menu .card-info ul {
+ list-style: none;
+ margin: 0; }
+ .resource-stack-layout .section-card-menu .card-info ul li {
+ list-style: none;
+ margin: 0;
+ padding: 15px 0;
+ border-top-width: 1px;
+ border-top-style: solid;
+ border-top-color: #959595; }
+ .resource-stack-layout .section-card-menu .card-info ul li a, .resource-stack-layout .section-card-menu .card-info ul li a:focus, .resource-stack-layout .section-card-menu .card-info ul li a:hover {
+ color: #333 !important; }
+ .resource-stack-layout .section-card-menu .card-info ul li:first-child {
+ border-top: none; }
+ .resource-stack-layout .section-card-menu .card-info ul li:hover .title:after {
+ opacity: 1;
+ -webkit-transition: opacity 0.5s;
+ transition: opacity 0.5s; }
+ .resource-stack-layout .section-card-menu .card-info ul li:hover .description {
+ max-height: 30px;
+ opacity: 1;
+ -webkit-transition: max-height 0.5s, opacity 1s;
+ transition: max-height 0.5s, opacity 1s; }
+ .resource-stack-layout .section-card-menu .card-info .title {
+ font-size: 16px;
+ margin-bottom: -2px;
+ position: relative; }
+ .resource-stack-layout .section-card-menu .card-info .title:after {
+ background: url(../images/stack-arrow-right.png);
+ content: '';
+ opacity: 0;
+ -webkit-transition: opacity 0.25s;
+ transition: opacity 0.25s;
+ position: absolute;
+ right: 0px;
+ top: 3px;
+ width: 10px;
+ height: 15px; }
+ .resource-stack-layout .section-card-menu .card-info .title.more {
+ text-transform: uppercase;
+ color: #898989;
+ display: inline-block; }
+ .resource-stack-layout .section-card-menu .card-info .title.more:after {
+ background: url(../images/stack-arrow-right.png);
+ content: '';
+ display: block;
+ position: absolute;
+ right: -20px;
+ top: 3px;
+ width: 10px;
+ height: 15px; }
+ .resource-stack-layout .section-card-menu .card-info .description {
+ max-height: 0px;
+ opacity: 0;
+ overflow: hidden;
+ font-size: 13px;
+ line-height: 15px;
+ /* Hover off */
+ -webkit-transition: max-height 0.5s, opacity 0.5s;
+ transition: max-height 0.5s, opacity 0.5s; }
+ .resource-stack-layout .section-card-menu .card-info .description .text {
+ height: 30px; }
+ .resource-stack-layout:after {
+ content: ".";
+ display: block;
+ height: 0;
+ clear: both;
+ visibility: hidden; }
+
+.resource-card, .resource-card-stack {
+ margin-bottom: 20px; }
+
+.resource-card-row-stack-last {
+ margin-bottom: 0px !important; }
+
+.resource-card-col-stack-last {
+ margin-bottom: 0px !important; }
+
+.resource-card-3x6 {
+ height: 300px; }
+
+.resource-card-3x12 {
+ height: 620px; }
+
+.resource-card-3x18 {
+ height: 940px; }
+
+.resource-card-6x6 {
+ height: 300px; }
+
+.resource-card-6x12 {
+ height: 620px; }
+
+.resource-card-6x18 {
+ height: 940px; }
+
+.resource-card-9x6 {
+ height: 300px; }
+
+.resource-card-9x12 {
+ height: 620px; }
+
+.resource-card-9x18 {
+ height: 940px; }
+
+.resource-card-12x6 {
+ height: 300px; }
+
+.resource-card-12x12 {
+ height: 620px; }
+
+.resource-card-12x18 {
+ height: 940px; }
+
+.resource-card-15x6 {
+ height: 300px; }
+
+.resource-card-15x12 {
+ height: 620px; }
+
+.resource-card-15x18 {
+ height: 940px; }
+
+.resource-card-18x6 {
+ height: 300px; }
+
+.resource-card-18x12 {
+ height: 620px; }
+
+.resource-card-18x18 {
+ height: 940px; }
+
+.resource-card-3x2 {
+ height: 100px; }
+
+.resource-card-3x2x3 {
+ height: 90px;
+ margin-bottom: 15px; }
+
+.resource-card-3x3 {
+ height: 150px; }
+
+.resource-card-3x3x2 {
+ height: 142px;
+ margin-bottom: 16px; }
+
+.resource-card-6x2 {
+ height: 100px; }
+
+.resource-card-6x2x3 {
+ height: 90px;
+ margin-bottom: 15px; }
+
+.resource-card-6x3 {
+ height: 150px; }
+
+.resource-card-6x3x2 {
+ height: 142px;
+ margin-bottom: 16px; }
+
+.resource-card-9x2 {
+ height: 100px; }
+
+.resource-card-9x2x3 {
+ height: 90px;
+ margin-bottom: 15px; }
+
+.resource-card-9x3 {
+ height: 150px; }
+
+.resource-card-9x3x2 {
+ height: 142px;
+ margin-bottom: 16px; }
+
+.resource-card-12x2 {
+ height: 100px; }
+
+.resource-card-12x2x3 {
+ height: 90px;
+ margin-bottom: 15px; }
+
+.resource-card-12x3 {
+ height: 150px; }
+
+.resource-card-12x3x2 {
+ height: 142px;
+ margin-bottom: 16px; }
+
+.resource-card-15x2 {
+ height: 100px; }
+
+.resource-card-15x2x3 {
+ height: 90px;
+ margin-bottom: 15px; }
+
+.resource-card-15x3 {
+ height: 150px; }
+
+.resource-card-15x3x2 {
+ height: 142px;
+ margin-bottom: 16px; }
+
+.resource-card-18x2 {
+ height: 100px; }
+
+.resource-card-18x2x3 {
+ height: 90px;
+ margin-bottom: 15px; }
+
+.resource-card-18x3 {
+ height: 150px; }
+
+.resource-card-18x3x2 {
+ height: 142px;
+ margin-bottom: 16px; }
+
+/*
+ The following are styles for cards in the flowlayout above, styled by the number of rows they span
+*/
+/* Single row, 2 column items. */
+.resource-card-9x6 {
+ height: 390px; }
+
+/* Double row, 1 column items. Eg full width video thumbnails. */
+.resource-card-18x12 {
+ height: 558px; }
+
+/* 1/3 row items */
+.resource-card-3x2 > .card-bg, .resource-card-6x2 > .card-bg, .resource-card-9x2 > .card-bg, .resource-card-12x2 > .card-bg, .resource-card-15x2 > .card-bg, .resource-card-18x2 > .card-bg {
+ left: 0;
+ top: 0;
+ width: 90px;
+ height: 100%;
+ position: absolute;
+ display: block; }
+
+.resource-card-3x2 > .card-info, .resource-card-6x2 > .card-info, .resource-card-9x2 > .card-info, .resource-card-12x2 > .card-info, .resource-card-15x2 > .card-info, .resource-card-18x2 > .card-info {
+ height: 100%;
+ left: 90px;
+ padding: 6px 12px;
+ overflow: hidden; }
+ .resource-card-3x2 > .card-info .title, .resource-card-6x2 > .card-info .title, .resource-card-9x2 > .card-info .title, .resource-card-12x2 > .card-info .title, .resource-card-15x2 > .card-info .title, .resource-card-18x2 > .card-info .title {
+ max-height: 69px;
+ white-space: normal; }
+ .resource-card-3x2 > .card-info .description, .resource-card-6x2 > .card-info .description, .resource-card-9x2 > .card-info .description, .resource-card-12x2 > .card-info .description, .resource-card-15x2 > .card-info .description, .resource-card-18x2 > .card-info .description {
+ display: none; }
+ .resource-card-3x2 > .card-info .text, .resource-card-6x2 > .card-info .text, .resource-card-9x2 > .card-info .text, .resource-card-12x2 > .card-info .text, .resource-card-15x2 > .card-info .text, .resource-card-18x2 > .card-info .text {
+ height: auto; }
+
+/* Override to show the description instead of the content section */
+.no-section .resource-card-3x2 > .card-info .section,
+.no-section .resource-card-6x2 > .card-info .section {
+ display: none; }
+
+.no-section .resource-card-3x2 > .card-info .description,
+.no-section .resource-card-6x2 > .card-info .description {
+ display: block; }
+
+/* 1/2 row items */
+.resource-card-3x3, .resource-card-6x3, .resource-card-9x3, .resource-card-12x3, .resource-card-15x3, .resource-card-18x3 {
+ height: 160px; }
+ .resource-card-3x3 > .card-bg, .resource-card-6x3 > .card-bg, .resource-card-9x3 > .card-bg, .resource-card-12x3 > .card-bg, .resource-card-15x3 > .card-bg, .resource-card-18x3 > .card-bg {
+ left: 0;
+ top: 0;
+ width: 90px;
+ height: 100%;
+ position: absolute;
+ display: block; }
+ .resource-card-3x3 > .card-info, .resource-card-6x3 > .card-info, .resource-card-9x3 > .card-info, .resource-card-12x3 > .card-info, .resource-card-15x3 > .card-info, .resource-card-18x3 > .card-info {
+ height: 100%;
+ left: 90px;
+ padding: 6px 12px; }
+ .resource-card-3x3 > .card-info .section, .resource-card-6x3 > .card-info .section, .resource-card-9x3 > .card-info .section, .resource-card-12x3 > .card-info .section, .resource-card-15x3 > .card-info .section, .resource-card-18x3 > .card-info .section {
+ display: none; }
+ .resource-card-3x3 > .card-info .title, .resource-card-6x3 > .card-info .title, .resource-card-9x3 > .card-info .title, .resource-card-12x3 > .card-info .title, .resource-card-15x3 > .card-info .title, .resource-card-18x3 > .card-info .title {
+ max-height: 92px;
+ white-space: normal; }
+ .resource-card-3x3 > .card-info .text, .resource-card-6x3 > .card-info .text, .resource-card-9x3 > .card-info .text, .resource-card-12x3 > .card-info .text, .resource-card-15x3 > .card-info .text, .resource-card-18x3 > .card-info .text {
+ height: auto; }
+ .resource-card-3x3 > .card-info .util, .resource-card-6x3 > .card-info .util, .resource-card-9x3 > .card-info .util, .resource-card-12x3 > .card-info .util, .resource-card-15x3 > .card-info .util, .resource-card-18x3 > .card-info .util {
+ display: none; }
+
+/* placement of plusone */
+.resource-card-6x12 > .card-info .description .util, .resource-card-9x12 > .card-info .description .util, .resource-card-12x12 > .card-info .description .util, .resource-card-15x12 > .card-info .description .util {
+ bottom: 2px; }
+
+.resource-card-18x12 > .card-info .description .util {
+ bottom: 2px; }
+
+/* Overrides for col-16 6x6 cards linking to local content on landing pages.
+ Suppresses "section". */
+.landing .card-info .section {
+ display: none; }
+
+/*
+ Generate a resource stack layout for a 3 column widget spanning 16 grid cols
+*/
+.resource-stack-layout.col-16 {
+ margin: 0 -14px 0 0;
+ width: 954px; }
+ .resource-stack-layout.col-16 .resource-card-stack {
+ margin: 0 14px 0 0;
+ width: 304px; }
+
+/* Example of card menu tinting */
+.resource-widget[data-section=distribute\/tools] .section-card-menu .card-bg:after {
+ background: rgba(126, 55, 148, 0.4) !important; }
+
+.resource-widget[data-section=distribute\/tools] .section-card-menu .card-section-icon .icon {
+ background-color: #7e3794 !important; }
+
+.resource-widget[data-section=distribute\/tools] .section-card-menu .card-info ul li {
+ border-top-color: #7e3794 !important; }
+
+/* tinting for stacks */
+div.jd-descr > .resource-widget[data-section=distribute\/tools]
+.section-card-menu .card-info ul li {
+ border-top-color: #7e3794 !important; }
+
+/* Show more/less */
+.dac-show-more,
+.dac-show-less {
+ display: none !important; }
+
+.dac-has-more .dac-show-more {
+ display: inline-block !important; }
+
+.dac-has-less .dac-show-less {
+ display: inline-block !important; }
+
+.dac-fab, .dac-button-social, .button, .landing-button,
+.dac-button {
+ background: transparent;
+ border: 0;
+ border-radius: 3px;
+ box-sizing: border-box;
+ color: currentColor;
+ cursor: pointer;
+ display: inline-block;
+ font-weight: 500;
+ font-size: 14px;
+ font-style: inherit;
+ font-variant: inherit;
+ font-family: inherit;
+ letter-spacing: .5px;
+ line-height: 24px;
+ margin: 6px 16px 6px 0;
+ min-width: 88px;
+ outline: 0;
+ padding: 6px 12px;
+ position: relative;
+ text-align: center;
+ text-decoration: none;
+ text-transform: uppercase;
+ -webkit-transition: box-shadow 0.4s cubic-bezier(0.25, 0.8, 0.25, 1), background-color 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
+ transition: box-shadow 0.4s cubic-bezier(0.25, 0.8, 0.25, 1), background-color 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
+ -webkit-user-select: none;
+ -moz-user-select: none;
+ -ms-user-select: none;
+ user-select: none;
+ white-space: nowrap; }
+
+.button, .landing-button,
+.dac-button.dac-raised {
+ background-color: #FAFAFA;
+ box-shadow: 0 2px 5px rgba(0, 0, 0, 0.26); }
+
+.dac-button.dac-raised.dac-primary, .landing-secondary, .button {
+ background-color: #039bef; }
+ .dac-button.dac-raised.dac-primary:hover, .landing-secondary:hover, .button:hover {
+ background-color: #0288d1; }
+ .dac-button.dac-raised.dac-primary:active, .landing-secondary:active, .button:active {
+ background-color: #0277bd; }
+ .dac-button.dac-raised.dac-primary.disabled, .button.disabled {
+ background-color: #bbb; }
+
+.dac-button.dac-raised.dac-red, .landing-primary {
+ background-color: #bf3722; }
+ .dac-button.dac-raised.dac-red:hover, .landing-primary:hover {
+ background-color: #9c2d1c; }
+ .dac-button.dac-raised.dac-red:active, .landing-primary:active {
+ background-color: #822517; }
+
+.dac-button.dac-raised.dac-green, .landing-button.green {
+ background-color: #90c653; }
+ .dac-button.dac-raised.dac-green:hover, .landing-button.green:hover {
+ background-color: #79b03b; }
+ .dac-button.dac-raised.dac-green:active, .landing-button.green:active {
+ background-color: #699933; }
+
+.dac-button.dac-raised.dac-primary, .landing-secondary, .button,
+.dac-button.dac-raised.dac-red,
+.landing-primary,
+.dac-button.dac-raised.dac-green,
+.landing-button.green {
+ color: #fff; }
+
+.dac-button.dac-large, .landing-button {
+ padding: 12px 24px; }
+
+.dac-fab, .dac-button-social {
+ background: #fff;
+ box-shadow: 0 2px 5px rgba(0, 0, 0, 0.26);
+ border-radius: 50%;
+ height: 36px;
+ line-height: 36px;
+ margin: 0;
+ min-width: 0;
+ overflow: hidden;
+ padding: 0;
+ vertical-align: middle;
+ width: 36px; }
+ .dac-fab:hover, .dac-button-social:hover,
+ a:hover > .dac-fab,
+ a:hover > .dac-button-social {
+ box-shadow: 0 3px 8px rgba(0, 0, 0, 0.26); }
+ .dac-fab > .dac-sprite, .dac-button-social > .dac-sprite, .dac-fab > .dac-modal-header-close:before, .dac-button-social > .dac-modal-header-close:before, .paging-links .dac-fab > .prev-page-link:before, .paging-links .dac-button-social > .prev-page-link:before, .paging-links .dac-fab > .next-page-link:before, .paging-links .dac-button-social > .next-page-link:before, .paging-links .dac-fab > .next-class-link:before, .paging-links .dac-button-social > .next-class-link:before, .paging-links .dac-fab > .start-class-link:after, .paging-links .dac-button-social > .start-class-link:after {
+ margin-top: -2px; }
+ .dac-fab.dac-primary, .dac-primary.dac-button-social {
+ background: #00c7a0; }
+ .dac-fab.dac-large, .dac-large.dac-button-social {
+ height: 54px;
+ line-height: 54px;
+ width: 54px; }
+
+.dac-button-social {
+ background: #ccc;
+ box-shadow: none;
+ position: relative;
+ overflow: hidden; }
+ .dac-button-social::after {
+ background: rgba(0, 0, 0, 0.2);
+ border-radius: 50%;
+ bottom: 0;
+ content: '';
+ display: block;
+ left: 0;
+ opacity: 0;
+ position: absolute;
+ right: 0;
+ top: 0;
+ -webkit-transition: opacity .3s;
+ transition: opacity .3s; }
+ .dac-button-social:hover {
+ box-shadow: none; }
+ .dac-button-social:active::after {
+ opacity: 1; }
+ .dac-button-social:focus.dac-rss, .dac-button-social:hover.dac-rss {
+ background: #ff9800; }
+ .dac-button-social:focus.dac-youtube, .dac-button-social:hover.dac-youtube {
+ background: #f44336; }
+ .dac-button-social:focus.dac-gplus, .dac-button-social:hover.dac-gplus {
+ background: #f44336; }
+ .dac-button-social:focus.dac-twitter, .dac-button-social:hover.dac-twitter {
+ background: #55acee; }
+
+.dac-action {
+ display: inline-block;
+ margin: 0 16px; }
+ .dac-action-link {
+ color: inherit;
+ font-size: 24px;
+ font-weight: 300;
+ line-height: 50px;
+ -webkit-transition: opacity .3s;
+ transition: opacity .3s; }
+ .dac-action-link:hover {
+ color: inherit;
+ opacity: .54; }
+ .dac-action-sprite {
+ margin-left: -12px;
+ margin-right: -8px; }
+ .dac-actions {
+ list-style-type: none;
+ margin: 0;
+ padding-bottom: 24px;
+ padding-top: 24px;
+ text-align: center; }
+ @media (max-width: 719px) {
+ .dac-actions {
+ text-align: left; } }
+ @media (max-width: 719px) {
+ .dac-action {
+ display: block;
+ margin: 0; } }
+
+.dac-scroll-button {
+ height: 54px;
+ line-height: 54px;
+ margin: 0;
+ position: absolute;
+ right: 0;
+ top: -27px;
+ width: 54px;
+ z-index: 1; }
+ @media (max-width: 719px) {
+ .dac-scroll-button {
+ display: none; } }
+
+/* Footer component */
+.dac-footer {
+ background-color: #fff;
+ border-top: 1px solid #f0f0f0;
+ clear: both;
+ color: #999;
+ font-size: 12px;
+ margin-top: 96px;
+ padding-bottom: 20px;
+ position: relative;
+ /* Modifier for landing pages, to snuggle closer to sections. */ }
+ .dac-footer a {
+ color: #999; }
+ .dac-footer p {
+ margin: 7px 0 0; }
+ .dac-footer-main {
+ padding: 30px 0; }
+ .dac-footer-reachout {
+ text-align: right; }
+ .dac-footer-contact, .dac-footer-social {
+ display: inline-block; }
+ .dac-footer .dac-footer-getnews,
+ .dac-footer .dac-footer-contact-link {
+ color: #000;
+ cursor: pointer;
+ font-size: 20px;
+ font-weight: 300;
+ margin: 8px 0;
+ vertical-align: middle; }
+ .dac-footer .dac-footer-contact-link,
+ .dac-footer .dac-footer-social-link {
+ margin-left: 16px;
+ margin-right: 0; }
+ .dac-footer-getnews > .dac-fab, .dac-footer-getnews > .dac-button-social {
+ margin-left: 4px; }
+ .dac-footer-separator {
+ background: #f0f0f0;
+ margin: 0 0 12px; }
+ .dac-footer-links a + a:before {
+ content: '|';
+ cursor: default;
+ margin: 0 10px 0 8px; }
+ .dac-footer .locales {
+ float: right;
+ margin: 0; }
+ .dac-footer .locales select {
+ background-color: #f0f0f0;
+ border-radius: 3px;
+ font-size: 12px;
+ height: auto;
+ margin-top: -2px;
+ padding: 8px 12px;
+ width: 146px; }
+ .dac-footer.dac-landing {
+ margin-top: 0;
+ border-top: 0; }
+ @media (max-width: 719px) {
+ .dac-footer-reachout {
+ text-align: left; }
+ .dac-footer-social {
+ display: block; }
+ .dac-footer-social-link, .dac-footer-contact-link {
+ display: inline-block; }
+ .dac-footer .dac-footer-contact-link,
+ .dac-footer .dac-footer-social-link {
+ margin-left: 0;
+ margin-right: 16px; }
+ .dac-footer .locales {
+ display: block;
+ float: none;
+ margin-top: 15px; } }
+
+/* =============================================================================
+ Columns
+ ========================================================================== */
+.wrap {
+ margin: 0 auto;
+ max-width: 940px;
+ clear: both; }
+ .dac-fullscreen-mode .wrap {
+ max-width: none; }
+
+.dac-full-screen-mode .dac-search-open .wrap {
+ max-width: 940px;
+}
+
+.cols {
+ margin-left: -10px;
+ margin-right: -10px;
+ /**
+ * For modern browsers
+ * 1. The space content is one way to avoid an Opera bug when the
+ * contenteditable attribute is included anywhere else in the document.
+ * Otherwise it causes space to appear at the top and bottom of elements
+ * that are clearfixed.
+ * 2. The use of `table` rather than `block` is only necessary if using
+ * `:before` to contain the top-margins of child elements.
+ */ }
+ .cols:before, .cols:after {
+ content: ' ';
+ /* 1 */
+ display: table;
+ /* 2 */ }
+ .cols:after {
+ clear: both; }
+
+[class*=col-] {
+ box-sizing: border-box;
+ float: left;
+ min-height: 1px;
+ padding-left: 10px;
+ padding-right: 10px;
+ position: relative; }
+
+.col-1 {
+ width: 6.25%; }
+
+.col-2 {
+ width: 12.5%; }
+
+.col-3 {
+ width: 18.75%; }
+
+.col-4 {
+ width: 25%; }
+
+.col-5 {
+ width: 31.25%; }
+
+.col-6 {
+ width: 37.5%; }
+
+.col-7 {
+ width: 43.75%; }
+
+.col-8 {
+ width: 50%; }
+
+.col-9 {
+ width: 56.25%; }
+
+.col-10 {
+ width: 62.5%; }
+
+.col-11 {
+ width: 68.75%; }
+
+.col-12 {
+ width: 75%; }
+
+.col-13 {
+ width: 81.25%; }
+
+.col-14 {
+ width: 87.5%; }
+
+.col-15 {
+ width: 93.75%; }
+
+.col-16 {
+ width: 100%; }
+
+.col-13 .col-1 {
+ width: 7.69230769%; }
+
+.col-13 .col-2 {
+ width: 15.38461538%; }
+
+.col-13 .col-3 {
+ width: 23.07692308%; }
+
+.col-13 .col-4 {
+ width: 30.76923077%; }
+
+.col-13 .col-5 {
+ width: 38.46153846%; }
+
+.col-13 .col-6 {
+ width: 46.15384615%; }
+
+.col-13 .col-7 {
+ width: 53.84615385%; }
+
+.col-13 .col-8 {
+ width: 61.53846154%; }
+
+.col-13 .col-9 {
+ width: 69.23076923%; }
+
+.col-13 .col-10 {
+ width: 76.92307692%; }
+
+.col-13 .col-11 {
+ width: 84.61538462%; }
+
+.col-13 .col-12 {
+ width: 92.30769231%; }
+
+.col-13 .col-13 {
+ width: 100%; }
+
+.col-12 .col-1 {
+ width: 8.33333333%; }
+
+.col-12 .col-2 {
+ width: 16.66666667%; }
+
+.col-12 .col-3 {
+ width: 25%; }
+
+.col-12 .col-4 {
+ width: 33.33333333%; }
+
+.col-12 .col-5 {
+ width: 41.66666667%; }
+
+.col-12 .col-6 {
+ width: 50%; }
+
+.col-12 .col-7 {
+ width: 58.33333333%; }
+
+.col-12 .col-8 {
+ width: 66.66666667%; }
+
+.col-12 .col-9 {
+ width: 75%; }
+
+.col-12 .col-10 {
+ width: 83.33333333%; }
+
+.col-12 .col-11 {
+ width: 91.66666667%; }
+
+.col-12 .col-12 {
+ width: 100%; }
+
+.col-1of1, .col-2of2, .col-3of3, .col-4of4, .col-5of5, .col-6of6, .col-8of8, .col-10of10, .col-12of12, .col-16of16 {
+ width: 100%; }
+
+.col-1of2, .col-2of4, .col-3of6, .col-4of8, .col-5of10, .col-6of12, .col-8of16 {
+ width: 50%; }
+
+.col-1of3, .col-2of6, .col-4of12 {
+ width: 33.33333333%; }
+
+.col-2of3, .col-4of6, .col-8of12 {
+ width: 66.66666667%; }
+
+.col-1of4, .col-2of8, .col-3of12, .col-4of16 {
+ width: 25%; }
+
+.col-3of4, .col-6of8, .col-9of12, .col-12of16 {
+ width: 75%; }
+
+.col-1of5, .col-2of10 {
+ width: 20%; }
+
+.col-2of5, .col-4of10 {
+ width: 40%; }
+
+.col-3of5, .col-6of10 {
+ width: 60%; }
+
+.col-4of5, .col-8of10 {
+ width: 80%; }
+
+.col-1of6, .col-2of12 {
+ width: 16.66666667%; }
+
+.col-5of6, .col-10of12 {
+ width: 83.33333333%; }
+
+.col-1of8, .col-2of16 {
+ width: 12.5%; }
+
+.col-3of8, .col-6of16 {
+ width: 37.5%; }
+
+.col-5of8, .col-10of16 {
+ width: 62.5%; }
+
+.col-7of8, .col-14of16 {
+ width: 87.5%; }
+
+.col-1of10 {
+ width: 10%; }
+
+.col-3of10 {
+ width: 30%; }
+
+.col-7of10 {
+ width: 70%; }
+
+.col-9of10 {
+ width: 90%; }
+
+.col-1of12 {
+ width: 8.33333333%; }
+
+.col-5of12 {
+ width: 41.66666667%; }
+
+.col-7of12 {
+ width: 58.33333333%; }
+
+.col-11of12 {
+ width: 91.66666667%; }
+
+.col-1of16 {
+ width: 6.25%; }
+
+.col-3of16 {
+ width: 18.75%; }
+
+.col-5of16 {
+ width: 31.25%; }
+
+.col-7of16 {
+ width: 43.75%; }
+
+.col-9of16 {
+ width: 56.25%; }
+
+.col-11of16 {
+ width: 68.75%; }
+
+.col-13of16 {
+ width: 81.25%; }
+
+.col-15of16 {
+ width: 93.75%; }
+
+.col-pull-1of1, .col-pull-2of2, .col-pull-3of3, .col-pull-4of4, .col-pull-5of5, .col-pull-6of6, .col-pull-8of8, .col-pull-10of10, .col-pull-12of12, .col-pull-16of16 {
+ left: -100%; }
+
+.col-pull-1of2, .col-pull-2of4, .col-pull-3of6, .col-pull-4of8, .col-pull-5of10, .col-pull-6of12, .col-pull-8of16 {
+ left: -50%; }
+
+.col-pull-1of3, .col-pull-2of6, .col-pull-4of12 {
+ left: -33.33333333%; }
+
+.col-pull-2of3, .col-pull-4of6, .col-pull-8of12 {
+ left: -66.66666667%; }
+
+.col-pull-1of4, .col-pull-2of8, .col-pull-3of12, .col-pull-4of16 {
+ left: -25%; }
+
+.col-pull-3of4, .col-pull-6of8, .col-pull-9of12, .col-pull-12of16 {
+ left: -75%; }
+
+.col-pull-1of5, .col-pull-2of10 {
+ left: -20%; }
+
+.col-pull-2of5, .col-pull-4of10 {
+ left: -40%; }
+
+.col-pull-3of5, .col-pull-6of10 {
+ left: -60%; }
+
+.col-pull-4of5, .col-pull-8of10 {
+ left: -80%; }
+
+.col-pull-1of6, .col-pull-2of12 {
+ left: -16.66666667%; }
+
+.col-pull-5of6, .col-pull-10of12 {
+ left: -83.33333333%; }
+
+.col-pull-1of8, .col-pull-2of16 {
+ left: -12.5%; }
+
+.col-pull-3of8, .col-pull-6of16 {
+ left: -37.5%; }
+
+.col-pull-5of8, .col-pull-10of16 {
+ left: -62.5%; }
+
+.col-pull-7of8, .col-pull-14of16 {
+ left: -87.5%; }
+
+.col-pull-1of10 {
+ left: -10%; }
+
+.col-pull-3of10 {
+ left: -30%; }
+
+.col-pull-7of10 {
+ left: -70%; }
+
+.col-pull-9of10 {
+ left: -90%; }
+
+.col-pull-1of12 {
+ left: -8.33333333%; }
+
+.col-pull-5of12 {
+ left: -41.66666667%; }
+
+.col-pull-7of12 {
+ left: -58.33333333%; }
+
+.col-pull-11of12 {
+ left: -91.66666667%; }
+
+.col-pull-1of16 {
+ left: -6.25%; }
+
+.col-pull-3of16 {
+ left: -18.75%; }
+
+.col-pull-5of16 {
+ left: -31.25%; }
+
+.col-pull-7of16 {
+ left: -43.75%; }
+
+.col-pull-9of16 {
+ left: -56.25%; }
+
+.col-pull-11of16 {
+ left: -68.75%; }
+
+.col-pull-13of16 {
+ left: -81.25%; }
+
+.col-pull-15of16 {
+ left: -93.75%; }
+
+.col-push-1of1, .col-push-2of2, .col-push-3of3, .col-push-4of4, .col-push-5of5, .col-push-6of6, .col-push-8of8, .col-push-10of10, .col-push-12of12, .col-push-16of16 {
+ left: 100%; }
+
+.col-push-1of2, .col-push-2of4, .col-push-3of6, .col-push-4of8, .col-push-5of10, .col-push-6of12, .col-push-8of16 {
+ left: 50%; }
+
+.col-push-1of3, .col-push-2of6, .col-push-4of12 {
+ left: 33.33333333%; }
+
+.col-push-2of3, .col-push-4of6, .col-push-8of12 {
+ left: 66.66666667%; }
+
+.col-push-1of4, .col-push-2of8, .col-push-3of12, .col-push-4of16 {
+ left: 25%; }
+
+.col-push-3of4, .col-push-6of8, .col-push-9of12, .col-push-12of16 {
+ left: 75%; }
+
+.col-push-1of5, .col-push-2of10 {
+ left: 20%; }
+
+.col-push-2of5, .col-push-4of10 {
+ left: 40%; }
+
+.col-push-3of5, .col-push-6of10 {
+ left: 60%; }
+
+.col-push-4of5, .col-push-8of10 {
+ left: 80%; }
+
+.col-push-1of6, .col-push-2of12 {
+ left: 16.66666667%; }
+
+.col-push-5of6, .col-push-10of12 {
+ left: 83.33333333%; }
+
+.col-push-1of8, .col-push-2of16 {
+ left: 12.5%; }
+
+.col-push-3of8, .col-push-6of16 {
+ left: 37.5%; }
+
+.col-push-5of8, .col-push-10of16 {
+ left: 62.5%; }
+
+.col-push-7of8, .col-push-14of16 {
+ left: 87.5%; }
+
+.col-push-1of10 {
+ left: 10%; }
+
+.col-push-3of10 {
+ left: 30%; }
+
+.col-push-7of10 {
+ left: 70%; }
+
+.col-push-9of10 {
+ left: 90%; }
+
+.col-push-1of12 {
+ left: 8.33333333%; }
+
+.col-push-5of12 {
+ left: 41.66666667%; }
+
+.col-push-7of12 {
+ left: 58.33333333%; }
+
+.col-push-11of12 {
+ left: 91.66666667%; }
+
+.col-push-1of16 {
+ left: 6.25%; }
+
+.col-push-3of16 {
+ left: 18.75%; }
+
+.col-push-5of16 {
+ left: 31.25%; }
+
+.col-push-7of16 {
+ left: 43.75%; }
+
+.col-push-9of16 {
+ left: 56.25%; }
+
+.col-push-11of16 {
+ left: 68.75%; }
+
+.col-push-13of16 {
+ left: 81.25%; }
+
+.col-push-15of16 {
+ left: 93.75%; }
+
+@media (max-width: 959px) and (min-width: 720px) {
+ .col-tablet-1of1, .col-tablet-2of2, .col-tablet-3of3, .col-tablet-4of4, .col-tablet-5of5, .col-tablet-6of6, .col-tablet-8of8, .col-tablet-10of10, .col-tablet-12of12, .col-tablet-16of16 {
+ width: 100%; }
+ .col-tablet-1of2, .col-tablet-2of4, .col-tablet-3of6, .col-tablet-4of8, .col-tablet-5of10, .col-tablet-6of12, .col-tablet-8of16 {
+ width: 50%; }
+ .col-tablet-1of3, .col-tablet-2of6, .col-tablet-4of12 {
+ width: 33.33333333%; }
+ .col-tablet-2of3, .col-tablet-4of6, .col-tablet-8of12 {
+ width: 66.66666667%; }
+ .col-tablet-1of4, .col-tablet-2of8, .col-tablet-3of12, .col-tablet-4of16 {
+ width: 25%; }
+ .col-tablet-3of4, .col-tablet-6of8, .col-tablet-9of12, .col-tablet-12of16 {
+ width: 75%; }
+ .col-tablet-1of5, .col-tablet-2of10 {
+ width: 20%; }
+ .col-tablet-2of5, .col-tablet-4of10 {
+ width: 40%; }
+ .col-tablet-3of5, .col-tablet-6of10 {
+ width: 60%; }
+ .col-tablet-4of5, .col-tablet-8of10 {
+ width: 80%; }
+ .col-tablet-1of6, .col-tablet-2of12 {
+ width: 16.66666667%; }
+ .col-tablet-5of6, .col-tablet-10of12 {
+ width: 83.33333333%; }
+ .col-tablet-1of8, .col-tablet-2of16 {
+ width: 12.5%; }
+ .col-tablet-3of8, .col-tablet-6of16 {
+ width: 37.5%; }
+ .col-tablet-5of8, .col-tablet-10of16 {
+ width: 62.5%; }
+ .col-tablet-7of8, .col-tablet-14of16 {
+ width: 87.5%; }
+ .col-tablet-1of10 {
+ width: 10%; }
+ .col-tablet-3of10 {
+ width: 30%; }
+ .col-tablet-7of10 {
+ width: 70%; }
+ .col-tablet-9of10 {
+ width: 90%; }
+ .col-tablet-1of12 {
+ width: 8.33333333%; }
+ .col-tablet-5of12 {
+ width: 41.66666667%; }
+ .col-tablet-7of12 {
+ width: 58.33333333%; }
+ .col-tablet-11of12 {
+ width: 91.66666667%; }
+ .col-tablet-1of16 {
+ width: 6.25%; }
+ .col-tablet-3of16 {
+ width: 18.75%; }
+ .col-tablet-5of16 {
+ width: 31.25%; }
+ .col-tablet-7of16 {
+ width: 43.75%; }
+ .col-tablet-9of16 {
+ width: 56.25%; }
+ .col-tablet-11of16 {
+ width: 68.75%; }
+ .col-tablet-13of16 {
+ width: 81.25%; }
+ .col-tablet-15of16 {
+ width: 93.75%; }
+ .col-tablet-pull-1of1, .col-tablet-pull-2of2, .col-tablet-pull-3of3, .col-tablet-pull-4of4, .col-tablet-pull-5of5, .col-tablet-pull-6of6, .col-tablet-pull-8of8, .col-tablet-pull-10of10, .col-tablet-pull-12of12, .col-tablet-pull-16of16 {
+ left: -100%; }
+ .col-tablet-pull-1of2, .col-tablet-pull-2of4, .col-tablet-pull-3of6, .col-tablet-pull-4of8, .col-tablet-pull-5of10, .col-tablet-pull-6of12, .col-tablet-pull-8of16 {
+ left: -50%; }
+ .col-tablet-pull-1of3, .col-tablet-pull-2of6, .col-tablet-pull-4of12 {
+ left: -33.33333333%; }
+ .col-tablet-pull-2of3, .col-tablet-pull-4of6, .col-tablet-pull-8of12 {
+ left: -66.66666667%; }
+ .col-tablet-pull-1of4, .col-tablet-pull-2of8, .col-tablet-pull-3of12, .col-tablet-pull-4of16 {
+ left: -25%; }
+ .col-tablet-pull-3of4, .col-tablet-pull-6of8, .col-tablet-pull-9of12, .col-tablet-pull-12of16 {
+ left: -75%; }
+ .col-tablet-pull-1of5, .col-tablet-pull-2of10 {
+ left: -20%; }
+ .col-tablet-pull-2of5, .col-tablet-pull-4of10 {
+ left: -40%; }
+ .col-tablet-pull-3of5, .col-tablet-pull-6of10 {
+ left: -60%; }
+ .col-tablet-pull-4of5, .col-tablet-pull-8of10 {
+ left: -80%; }
+ .col-tablet-pull-1of6, .col-tablet-pull-2of12 {
+ left: -16.66666667%; }
+ .col-tablet-pull-5of6, .col-tablet-pull-10of12 {
+ left: -83.33333333%; }
+ .col-tablet-pull-1of8, .col-tablet-pull-2of16 {
+ left: -12.5%; }
+ .col-tablet-pull-3of8, .col-tablet-pull-6of16 {
+ left: -37.5%; }
+ .col-tablet-pull-5of8, .col-tablet-pull-10of16 {
+ left: -62.5%; }
+ .col-tablet-pull-7of8, .col-tablet-pull-14of16 {
+ left: -87.5%; }
+ .col-tablet-pull-1of10 {
+ left: -10%; }
+ .col-tablet-pull-3of10 {
+ left: -30%; }
+ .col-tablet-pull-7of10 {
+ left: -70%; }
+ .col-tablet-pull-9of10 {
+ left: -90%; }
+ .col-tablet-pull-1of12 {
+ left: -8.33333333%; }
+ .col-tablet-pull-5of12 {
+ left: -41.66666667%; }
+ .col-tablet-pull-7of12 {
+ left: -58.33333333%; }
+ .col-tablet-pull-11of12 {
+ left: -91.66666667%; }
+ .col-tablet-pull-1of16 {
+ left: -6.25%; }
+ .col-tablet-pull-3of16 {
+ left: -18.75%; }
+ .col-tablet-pull-5of16 {
+ left: -31.25%; }
+ .col-tablet-pull-7of16 {
+ left: -43.75%; }
+ .col-tablet-pull-9of16 {
+ left: -56.25%; }
+ .col-tablet-pull-11of16 {
+ left: -68.75%; }
+ .col-tablet-pull-13of16 {
+ left: -81.25%; }
+ .col-tablet-pull-15of16 {
+ left: -93.75%; }
+ .col-tablet-push-1of1, .col-tablet-push-2of2, .col-tablet-push-3of3, .col-tablet-push-4of4, .col-tablet-push-5of5, .col-tablet-push-6of6, .col-tablet-push-8of8, .col-tablet-push-10of10, .col-tablet-push-12of12, .col-tablet-push-16of16 {
+ left: 100%; }
+ .col-tablet-push-1of2, .col-tablet-push-2of4, .col-tablet-push-3of6, .col-tablet-push-4of8, .col-tablet-push-5of10, .col-tablet-push-6of12, .col-tablet-push-8of16 {
+ left: 50%; }
+ .col-tablet-push-1of3, .col-tablet-push-2of6, .col-tablet-push-4of12 {
+ left: 33.33333333%; }
+ .col-tablet-push-2of3, .col-tablet-push-4of6, .col-tablet-push-8of12 {
+ left: 66.66666667%; }
+ .col-tablet-push-1of4, .col-tablet-push-2of8, .col-tablet-push-3of12, .col-tablet-push-4of16 {
+ left: 25%; }
+ .col-tablet-push-3of4, .col-tablet-push-6of8, .col-tablet-push-9of12, .col-tablet-push-12of16 {
+ left: 75%; }
+ .col-tablet-push-1of5, .col-tablet-push-2of10 {
+ left: 20%; }
+ .col-tablet-push-2of5, .col-tablet-push-4of10 {
+ left: 40%; }
+ .col-tablet-push-3of5, .col-tablet-push-6of10 {
+ left: 60%; }
+ .col-tablet-push-4of5, .col-tablet-push-8of10 {
+ left: 80%; }
+ .col-tablet-push-1of6, .col-tablet-push-2of12 {
+ left: 16.66666667%; }
+ .col-tablet-push-5of6, .col-tablet-push-10of12 {
+ left: 83.33333333%; }
+ .col-tablet-push-1of8, .col-tablet-push-2of16 {
+ left: 12.5%; }
+ .col-tablet-push-3of8, .col-tablet-push-6of16 {
+ left: 37.5%; }
+ .col-tablet-push-5of8, .col-tablet-push-10of16 {
+ left: 62.5%; }
+ .col-tablet-push-7of8, .col-tablet-push-14of16 {
+ left: 87.5%; }
+ .col-tablet-push-1of10 {
+ left: 10%; }
+ .col-tablet-push-3of10 {
+ left: 30%; }
+ .col-tablet-push-7of10 {
+ left: 70%; }
+ .col-tablet-push-9of10 {
+ left: 90%; }
+ .col-tablet-push-1of12 {
+ left: 8.33333333%; }
+ .col-tablet-push-5of12 {
+ left: 41.66666667%; }
+ .col-tablet-push-7of12 {
+ left: 58.33333333%; }
+ .col-tablet-push-11of12 {
+ left: 91.66666667%; }
+ .col-tablet-push-1of16 {
+ left: 6.25%; }
+ .col-tablet-push-3of16 {
+ left: 18.75%; }
+ .col-tablet-push-5of16 {
+ left: 31.25%; }
+ .col-tablet-push-7of16 {
+ left: 43.75%; }
+ .col-tablet-push-9of16 {
+ left: 56.25%; }
+ .col-tablet-push-11of16 {
+ left: 68.75%; }
+ .col-tablet-push-13of16 {
+ left: 81.25%; }
+ .col-tablet-push-15of16 {
+ left: 93.75%; } }
+
+.col-3-wide {
+ width: 33.3333333333%; }
+
+@media (max-width: 719px) {
+ /* Remove .col-12 and .col-13 backward compatibility support as soon as it's been removed. */
+[class*=col-],
+ .col-12 [class*=col-],
+ .col-13 [class*=col-] {
+ float: none;
+ left: 0;
+ width: auto;
+} }
+
+/**
+ * Fades out an element.
+ * Applies visibility hidden when the transition is finished.
+ *
+ * Use opacity: 1; to show the element.
+ */
+/* Header component */
+.dac-header {
+ box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.07);
+ box-sizing: border-box;
+ background: #6ab344;
+ height: 64px;
+ margin: 0;
+ left: 0;
+ position: fixed;
+ right: 0;
+ top: 0;
+ -webkit-transition: background 200ms;
+ transition: background 200ms;
+ z-index: 61;
+}
+
+.dac-ndk {
+ background: #00bcd4;
+}
+
+.dac-studio {
+ background: #424242;
+}
+
+.dac-search-mode .dac-header {
+ background: #b0bec5;
+ -webkit-transition: background 200ms;
+ transition: background 200ms;
+}
+
+.dac-search-mode .dac-header-logo,
+ .dac-search-mode .dac-header-console-btn {
+ opacity: 0;
+ visibility: hidden;
+ -webkit-transition: visibility 0s linear 200ms, opacity 200ms linear;
+ transition: visibility 0s linear 200ms, opacity 200ms linear;
+}
+
+.dac-header-logo {
+ display: block;
+ font-size: 20px;
+ font-weight: 400;
+ float: left;
+ letter-spacing: .3px;
+ line-height: 36px;
+ opacity: 1;
+ padding: 13px 48px 15px 0;
+}
+
+.dac-header-logo, .dac-header-logo:hover, .dac-header-logo:focus {
+ color: #fff;
+}
+
+@media (min-width: 980px) {
+ .dac-header-logo {
+ border-right: 1px solid rgba(0, 0, 0, 0.1);
+ }
+}
+
+@media (min-width: 720px) and (max-width: 979px) {
+ .dac-header-logo {
+ padding-right: 10px;
+ }
+}
+
+.dac-header-logo-image {
+ margin-right: 5px;
+ vertical-align: top;
+}
+
+.dac-header-tabs {
+ list-style: none;
+ margin: 0 10px;
+ display: none;
+ opacity: 1;
+ -webkit-transition: opacity 200ms linear 200ms;
+ transition: opacity 200ms linear 200ms;
+}
+
+@media (min-width: 720px) and (max-width: 979px) {
+ .dac-header-tabs {
+ display: inline-block;
+ }
+}
+
+@media (min-width: 980px) {
+ .dac-header-tabs {
+ display: inline-block;
+ }
+}
+
+.dac-header-tabs li {
+ display: inline-block;
+}
+
+.dac-header-tab {
+ display: inline-block;
+ line-height: 64px;
+ height: 64px;
+ padding: 0 9px;
+ color: #fff;
+ color: rgba(255, 255, 255, 0.7);
+ font-size: 14px;
+ text-transform: uppercase;
+ font-weight: 500;
+}
+
+.dac-header-tab:hover {
+ color: #fff;
+}
+
+.dac-header-tab.selected {
+ border-bottom: 4px solid #fff;
+ height: 60px;
+ color: #fff;
+}
+
+.dac-search-mode .dac-header-tabs {
+ opacity: 0;
+ -webkit-transition: opacity 0ms linear 0ms;
+ transition: opacity 0ms linear 0ms;
+}
+
+.dac-header-console-btn {
+ border-radius: 3px;
+ box-shadow: 0 1px 4px 0 rgba(0, 0, 0, 0.2);
+ float: right;
+ font-size: 14px;
+ font-weight: 500;
+ line-height: 28px;
+ margin: 13px 13px 12px 24px;
+ opacity: 1;
+ padding: 4px 10px;
+ position: relative;
+ text-transform: uppercase;
+ -webkit-transition: box-shadow .2s;
+ transition: box-shadow .2s;
+ z-index: 60;
+}
+
+@media (min-width: 720px) and (max-width: 979px) {
+ .dac-header-console-btn {
+ display: none;
+ }
+}
+
+.dac-header-console-btn > .dac-sprite, .dac-header-console-btn > .dac-modal-header-close:before, .paging-links .dac-header-console-btn > .prev-page-link:before, .paging-links .dac-header-console-btn > .next-page-link:before, .paging-links .dac-header-console-btn > .next-class-link:before, .paging-links .dac-header-console-btn > .start-class-link:after {
+ margin-right: 5px;
+}
+
+.dac-header-console-btn, .dac-header-console-btn:hover, .dac-header-console-btn:focus {
+ color: #fff;
+}
+
+.dac-header-console-btn:hover {
+ box-shadow: 0 2px 8px 0 rgba(0, 0, 0, 0.3);
+}
+
+.dac-header-console-btn:focus {
+ background: rgba(63, 81, 181, 0.1);
+ outline: 0;
+}
+
+.dac-studio .dac-header-console-btn {
+ color:#fff;
+ background:rgba(255, 255, 255, 0.3);
+}
+.dac-studio .dac-header-console-btn:hover {
+ background:rgba(255, 255, 255, 0.5);
+}
+.dac-studio .dac-header-console-btn:focus {
+ background:rgba(255, 255, 255, 0.7);
+ color:#000;
+}
+
+@media (max-width: 719px) {
+ .dac-header {
+ text-align: center;
+ }
+
+ .dac-header-logo {
+ border-right: 0;
+ display: inline-block;
+ margin-right: 0;
+ float: none;
+ padding-left: 0;
+ padding-right: 0;
+ }
+
+ .dac-header-console-btn {
+ display: none;
+ }
+}
+
+/* Header Breadcrumbs component */
+.dac-header-crumbs {
+ list-style-type: none;
+ margin: 23px 0 -13px 0;
+ display: inline-block;
+}
+
+.dac-header-crumbs.dac-has-content {
+ opacity: 1;
+}
+
+.dac-header-crumbs-item {
+ float: left;
+ position: relative;
+ margin: 0;
+ padding: 0;
+}
+
+.dac-header-crumbs-item i, .dac-header-crumbs-item .dac-nav-link-forward {
+ display: none;
+}
+
+.dac-header-crumbs-item:before {
+ content: '';
+ background: transparent url(../images/styles/disclosure_right.png) no-repeat scroll 50% 50%;
+ width: 10px;
+ height: 10px;
+ display: inline-block;
+ position: absolute;
+ top: 12px;
+ left: -15px;
+}
+
+.dac-header-crumbs-item:first-child:before {
+ content: none;
+}
+
+.dac-header-crumbs-link {
+ display: block;
+ font-size: 16px;
+ line-height: 32px;
+ padding: 0 20px 0 0;
+}
+
+.dac-header-crumbs-link, .dac-header-crumbs-link:hover, .dac-header-crumbs-link:focus {
+ color: #666;
+}
+
+.dac-header-crumbs-link:focus {
+ outline: 0;
+ text-decoration: underline;
+}
+
+.dac-header-crumbs-link.current {
+ font-weight: 400;
+}
+
+/* Header site search component */
+.dac-header-search {
+ bottom: 64px;
+ position: absolute;
+ right: 220px;
+ top: 0;
+ width: 238px;
+ -webkit-transition: width 300ms, right 100ms, margin 100ms;
+ transition: width 300ms, right 100ms, margin 100ms;
+}
+
+.dac-header-search-inner {
+ margin: 0 auto;
+ max-width: 940px;
+ position: relative;
+ width: 100%;
+}
+
+@media (min-width: 980px) {
+ .dac-header-search-inner::after {
+ background: -webkit-linear-gradient(right, #6ab344, rgba(106, 179, 68, 0));
+ background: linear-gradient(to left, #6ab344, rgba(106, 179, 68, 0));
+ content: '';
+ display: block;
+ height: 64px;
+ position: absolute;
+ right: 100%;
+ top: 0;
+ -webkit-transition: opacity 200ms, -webkit-transform 300ms;
+ transition: opacity 200ms, transform 300ms;
+ -webkit-transform-origin: right center;
+ -ms-transform-origin: right center;
+ transform-origin: right center;
+ width: 64px;
+ }
+ .dac-studio .dac-header-search-inner::after {
+ background: -webkit-linear-gradient(right, #424242, rgba(66, 66, 66, 0));
+ background: linear-gradient(to left, #424242, rgba(66, 66, 66, 0));
+ }
+
+ .dac-search-mode .dac-header-search-inner::after {
+ opacity: 0;
+ -webkit-transform: scaleX(0);
+ -ms-transform: scaleX(0);
+ transform: scaleX(0);
+ }
+}
+
+.dac-header-search-icon {
+ left: 8px;
+ pointer-events: none;
+ position: absolute;
+ top: 18px;
+}
+
+.dac-header-search-input {
+ background: #77be53;
+ border-radius: 3px;
+ border: none;
+ box-sizing: border-box;
+ color: #fff;
+ font-size: 14px;
+ font-weight: 600;
+ margin: 13px 0;
+ padding: 9px 36px 10px;
+ -webkit-transition: background 200ms, color 200ms;
+ transition: background 200ms, color 200ms;
+ width: 100%;
+}
+
+.dac-studio .dac-header-search {
+ right:150px;
+}
+.dac-studio .dac-header-search-input {
+ background: rgba(255, 255, 255, 0.3);
+}
+
+.dac-header-search-close, .dac-header-search-clear {
+ background: none;
+ border: none;
+ cursor: pointer;
+ font-size: 0;
+ outline: none;
+ position: absolute;
+ margin: 0;
+}
+
+.dac-header-search-clear {
+ display: inline-block;
+ opacity: .4;
+ padding: 8px;
+ top: 15px;
+ right: 0;
+}
+
+.dac-header-search-clear:hover, .dac-header-search-clear:focus {
+ opacity: .8;
+}
+
+.dac-header-search-close {
+ left: -45px;
+ top: 20px;
+ -webkit-transform: translateX(45px);
+ -ms-transform: translateX(45px);
+ transform: translateX(45px);
+ visibility: hidden;
+}
+
+.dac-header-search ::-webkit-input-placeholder {
+ color: #fff;
+ font-weight: 300;
+ -webkit-transition: color 200ms;
+ transition: color 200ms;
+}
+
+.dac-header-search :-moz-placeholder {
+ color: #fff;
+ font-weight: 300;
+ transition: color 200ms;
+}
+
+.dac-header-search ::-moz-placeholder {
+ color: #fff;
+ font-weight: 300;
+ transition: color 200ms;
+}
+
+.dac-header-search :-ms-input-placeholder {
+ color: #fff;
+ font-weight: 300;
+ transition: color 200ms;
+}
+
+.dac-header-search-input:focus {
+ outline: 0;
+}
+
+.dac-search-mode .dac-header-search {
+ width: 940px;
+ right: 50%;
+ margin-right: -470px;
+}
+
+.dac-search-mode .dac-header-search .dac-header-search-input::after {
+ background: -webkit-linear-gradient(right, #b0bec5, rgba(176, 190, 197, 0));
+ background: linear-gradient(to left, #b0bec5, rgba(176, 190, 197, 0));
+}
+
+.dac-search-mode .dac-header-search .dac-header-search-close {
+ -webkit-transition: -webkit-transform 200ms ease-out 300ms;
+ transition: transform 200ms ease-out 300ms;
+ -webkit-transform: translateX(0);
+ -ms-transform: translateX(0);
+ transform: translateX(0);
+ visibility: visible;
+}
+
+.dac-search-mode .dac-header-search .dac-header-search-icon {
+ left: 23px;
+}
+
+.dac-search-mode .dac-header-search .dac-header-search-input {
+ background: #fff;
+ border-radius: 0;
+ font-size: 18px;
+ color: #666;
+ padding-left: 55px;
+ margin-top: 11px;
+}
+
+.dac-search-mode .dac-header-search ::-webkit-input-placeholder {
+ color: #505050;
+}
+
+.dac-search-mode .dac-header-search :-moz-placeholder {
+ color: #505050;
+}
+
+.dac-search-mode .dac-header-search ::-moz-placeholder {
+ color: #505050;
+}
+
+.dac-search-mode .dac-header-search :-ms-input-placeholder {
+ color: #505050;
+}
+
+@media (min-width: 720px) and (max-width: 979px) {
+ .dac-header-search {
+ right: 20px;
+ width: 200px;
+ -webkit-transition: left 200ms, right 200ms, width 200ms;
+ transition: left 200ms, right 200ms, width 200ms;
+ }
+
+ .dac-search-mode .dac-header-search {
+ left: 60px;
+ right: 0;
+ width: 100%;
+ }
+
+ .dac-search-mode .dac-header-search .dac-header-search-inner {
+ margin: 0;
+ width: calc(100% - 60px - 10px);
+ }
+
+ .dac-header-search-close {
+ left: -42px;
+ }
+}
+
+@media (max-width: 719px) {
+ .dac-header-search {
+ bottom: 0;
+ border-radius: 0;
+ border-left: 1px solid rgba(0, 0, 0, 0.1);
+ cursor: pointer;
+ left: calc(100% - 64px);
+ margin: 0;
+ overflow: hidden;
+ padding-left: 10px;
+ padding-right: 10px;
+ position: absolute;
+ right: 0;
+ top: 0;
+ }
+
+ .dac-header-search-input {
+ background: none;
+ cursor: pointer;
+ opacity: 0;
+ }
+
+ .dac-search-mode .dac-header-search {
+ background: #b0bec5;
+ cursor: default;
+ overflow: visible;
+ left: 60px;
+ right: 0;
+ width: 100%;
+ -webkit-transition: left 200ms, right 200ms, width 200ms;
+ transition: left 200ms, right 200ms, width 200ms;
+ padding: 0;
+ border: none;
+ }
+
+ .dac-search-mode .dac-header-search .dac-header-search-inner {
+ margin: 0;
+ width: calc(100% - 60px - 10px);
+ }
+
+ .dac-search-mode .dac-header-search .dac-header-search-input {
+ opacity: 1;
+ }
+}
+
+.highlighted em {
+ color: #333;
+ font-style: normal;
+ font-weight: 700;
+}
+
+.card-info .title.highlighted {
+ color: #666;
+}
+
+/* Main navigation component */
+.dac-nav-sidebar {
+ background: #f5f8fa;
+ border-right: 1px solid rgba(0, 0, 0, 0.1);
+ bottom: 0;
+ left: 0;
+ overflow: hidden;
+ padding: 0;
+ position: fixed;
+ top: 64px;
+ -webkit-transform: translate(-100%, 0);
+ -ms-transform: translate(-100%, 0);
+ transform: translate(-100%, 0);
+ width: 250px;
+ z-index: 60;
+}
+
+.dac-nav-animating .dac-nav-sidebar {
+ -webkit-transition: -webkit-transform .3s;
+ transition: transform .3s;
+}
+
+.dac-nav-open .dac-nav-sidebar {
+ -webkit-transform: translate(0, 0);
+ -ms-transform: translate(0, 0);
+ transform: translate(0, 0);
+}
+
+.dac-search-mode .dac-nav-sidebar {
+ -webkit-transition: -webkit-transform .3s;
+ transition: transform .3s;
+ -webkit-transform: translate(-100%, 0);
+ -ms-transform: translate(-100%, 0);
+ transform: translate(-100%, 0);
+}
+
+.dac-nav .dac-swap-section {
+ -webkit-transition-duration: .3s;
+ transition-duration: .3s;
+}
+
+.dac-nav-back {
+ margin-top: -3px;
+ margin-right: 10px;
+}
+
+.dac-nav-fullscreen {
+ background: transparent;
+ border: none;
+ bottom: 100%;
+ cursor: pointer;
+ display: none;
+ opacity: .8;
+ outline: none;
+ padding: 20px 15px;
+ position: absolute;
+ right: 0;
+}
+
+@media (min-width: 980px) {
+ .dac-nav-fullscreen {
+ display: inline-block;
+ }
+}
+
+.dac-nav-fullscreen:hover {
+ opacity: 1;
+}
+
+.dac-nav-sub-slider {
+ cursor: pointer;
+ opacity: .5;
+ position: absolute;
+ right: 7px;
+ top: 5px;
+}
+
+.dac-nav-back-button {
+ background: #546e7a;
+ border-bottom: 1px solid rgba(0, 0, 0, 0.1);
+ display: block;
+ font-weight: 500;
+ font-size: 18px;
+ left: 0;
+ margin: 0;
+ padding: 20px;
+ position: absolute !important;
+ right: 0;
+ top: 0;
+ z-index: 1;
+}
+
+.dac-nav-back-button, .dac-nav-back-button:hover, .dac-nav-back-button:active {
+ color: rgba(255, 255, 255, 0.7);
+}
+
+.dac-nav-back-button > .dac-sprite, .dac-nav-back-button > .dac-modal-header-close:before, .paging-links .dac-nav-back-button > .prev-page-link:before, .paging-links .dac-nav-back-button > .next-page-link:before, .paging-links .dac-nav-back-button > .next-class-link:before, .paging-links .dac-nav-back-button > .start-class-link:after {
+ opacity: .7;
+}
+
+.dac-nav-logo {
+ font-size: 20px;
+ font-weight: 300;
+ letter-spacing: .3px;
+ line-height: 36px;
+ margin: 0;
+ padding: 14px 24px;
+}
+
+.dac-nav-logo, .dac-nav-logo:hover, .dac-nav-logo:focus {
+ color: #444;
+}
+
+.dac-nav-list {
+ bottom: 0;
+ left: 0;
+ list-style-type: none;
+ margin: 0;
+ -webkit-overflow-scrolling: touch;
+ overflow-y: scroll;
+ padding: 16px 0;
+ position: absolute !important;
+ right: 0;
+ top: 0 !important;
+ scrollbar-face-color: #b7baba;
+ scrollbar-track-color: #e5e8e9;
+}
+
+.dac-nav-list::-webkit-scrollbar {
+ width: 4px;
+ height: 4px;
+}
+
+.dac-nav-list::-webkit-scrollbar-thumb {
+ background: #b7baba;
+}
+
+.dac-nav-list::-webkit-scrollbar-track {
+ background: #e5e8e9;
+}
+
+.dac-nav-secondary {
+ margin: 0;
+}
+
+.dac-nav-item {
+ list-style-type: none;
+ margin: 0 0 10px;
+ position: relative;
+}
+
+.dac-nav-secondary .dac-nav-item {
+ margin-bottom: 0;
+}
+
+.dac-nav-head {
+ display: block;
+ font-size: 16px;
+ font-weight: 300;
+ letter-spacing: .24px;
+ line-height: 32px;
+ margin-bottom: 20px;
+ margin-top: 0;
+}
+
+.dac-nav-dimmer {
+ background: #000;
+ display: block;
+ height: 100%;
+ left: 0;
+ opacity: 0;
+ position: fixed;
+ top: 0;
+ -webkit-transform: translateZ(0);
+ transform: translateZ(0);
+ visibility: hidden;
+ width: 100%;
+ z-index: 60;
+}
+
+.dac-nav-animating .dac-nav-dimmer {
+ -webkit-transition: visibility 0s linear .3s, opacity .3s linear;
+ transition: visibility 0s linear .3s, opacity .3s linear;
+}
+
+.dac-nav-open .dac-nav-dimmer {
+ opacity: .8;
+ -webkit-transition-delay: 0s;
+ transition-delay: 0s;
+ visibility: visible;
+}
+
+@media (min-width: 980px) {
+ .dac-nav-dimmer {
+ display: none;
+ }
+}
+
+.dac-nav-hamburger {
+ display: inline-block;
+ float: left;
+ height: 15px;
+ padding: 22px 20px;
+ width: 18px;
+}
+
+@media (max-width: 719px) {
+ .dac-nav-hamburger {
+ border-right: 1px solid rgba(0, 0, 0, 0.1);
+ left: 0;
+ padding-bottom: 27px;
+ position: absolute;
+ top: 0;
+ }
+}
+
+.dac-nav-hamburger-top, .dac-nav-hamburger-mid, .dac-nav-hamburger-bot {
+ background: rgba(0, 0, 0, 0.4);
+ display: block;
+ height: 2px;
+ margin: 3px 0 0;
+ opacity: .5;
+ width: 100%;
+}
+
+.dac-studio .dac-nav-hamburger-top,
+.dac-studio .dac-nav-hamburger-mid,
+.dac-studio .dac-nav-hamburger-bot {
+ background: rgba(256, 256, 256, 0.4);
+}
+
+.dac-nav-animating .dac-nav-hamburger-top, .dac-nav-animating .dac-nav-hamburger-mid, .dac-nav-animating .dac-nav-hamburger-bot {
+ -webkit-transition: opacity .3s;
+ transition: opacity .3s;
+}
+
+@media (max-width: 719px) {
+ .dac-nav-hamburger-top, .dac-nav-hamburger-mid, .dac-nav-hamburger-bot {
+ background: #fff;
+ opacity: 1;
+ }
+}
+
+.dac-nav-open .dac-nav-hamburger-top,
+ .dac-nav-open .dac-nav-hamburger-mid,
+ .dac-nav-open .dac-nav-hamburger-bot {
+ opacity: 1;
+}
+
+.dac-search-mode .dac-nav-hamburger {
+ opacity: 0;
+ visibility: hidden;
+ -webkit-transition: visibility 0s linear 200ms, opacity 200ms linear;
+ transition: visibility 0s linear 200ms, opacity 200ms linear;
+}
+
+.dac-nav-link {
+ color: #444;
+ display: block;
+ font-size: 18px;
+ font-weight: 500;
+ letter-spacing: .24px;
+ padding: 5px 20px;
+ -webkit-transition: background-color 0.35s cubic-bezier(0.35, 0, 0.25, 1);
+ transition: background-color 0.35s cubic-bezier(0.35, 0, 0.25, 1);
+}
+
+.dac-nav-link:hover, .dac-nav-link:focus {
+ color: rgba(68, 68, 68, 0.7);
+}
+
+.dac-nav-link:focus {
+ background: rgba(63, 81, 181, 0.1);
+ outline: 0;
+}
+
+.dac-nav-secondary .dac-nav-link {
+ font-size: 12px;
+ font-weight: 400;
+ padding-left: 40px;
+}
+
+.dac-nav-link.selected {
+ background: rgba(63, 81, 181, 0.1);
+ color: #039bef;
+ position: relative;
+}
+
+.dac-nav-link-forward {
+ background: #546E7A;
+ color: #fff;
+ cursor: pointer;
+ display: inline-block;
+ line-height: 34px;
+ padding: 0;
+ position: absolute;
+ right: 0;
+ top: 0;
+ text-align: center;
+ width: 34px;
+}
+
+.dac-nav-link-forward > .dac-nav-forward {
+ opacity: .7;
+ vertical-align: -3px;
+}
+
+.dac-nav-sub {
+ bottom: 0;
+ left: 0;
+ position: absolute !important;
+ top: 65px !important;
+ right: 0;
+ z-index: 1;
+}
+
+#body-content {
+ padding-top: 64px;
+}
+
+.dac-nav-animating #body-content {
+ -webkit-transition: padding .3s;
+ transition: padding .3s;
+}
+
+@media (min-width: 980px) {
+ .dac-nav-open #body-content {
+ padding-left: 250px;
+ }
+}
+
+.dac-nav-open {
+ overflow: hidden;
+}
+
+@media (min-width: 980px) {
+ .dac-nav-open {
+ overflow: visible;
+ }
+}
+
+#devdoc-nav {
+ height: 100%;
+}
+
+.dac-reference-nav {
+ height: calc(100% - 36px);
+ overflow: hidden;
+ position: relative;
+}
+
+.dac-reference-nav ul,
+ .dac-reference-nav li {
+ margin: 0;
+ list-style-type: none;
+}
+
+.dac-reference-nav-list {
+ bottom: 0;
+ overflow: hidden;
+ overflow-y: scroll;
+ left: 0;
+ padding: 10px;
+ padding-left: 20px;
+ position: absolute;
+ right: 0;
+ top: 0;
+ scrollbar-face-color: #9da4a7;
+ scrollbar-track-color: #c4cdd1;
+}
+
+.dac-reference-nav-list::-webkit-scrollbar {
+ width: 4px;
+ height: 4px;
+}
+
+.dac-reference-nav-list::-webkit-scrollbar-thumb {
+ background: #9da4a7;
+}
+
+.dac-reference-nav-list::-webkit-scrollbar-track {
+ background: #c4cdd1;
+}
+
+.dac-reference-nav-resources {
+ display: none;
+ padding: 0 0 0 13px;
+}
+
+.dac-reference-nav-resource, .dac-reference-nav-toggle {
+ color: #505050;
+ cursor: pointer;
+ display: block;
+ font-size: 13px;
+ line-height: 1;
+ overflow: hidden;
+ margin: 0;
+ padding: 3px 0;
+ position: relative;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+}
+
+.dac-reference-nav-toggle {
+ margin-left: -12px;
+ padding-left: 12px;
+}
+
+.selected > .dac-reference-nav-resource {
+ color: #039bef;
+ font-weight: 600;
+}
+
+.dac-reference-nav-toggle::before {
+ background: transparent url(../images/styles/disclosure_up.png) no-repeat center center;
+ content: '';
+ display: block;
+ height: 19px;
+ left: 0;
+ position: absolute;
+ top: 0;
+ width: 8px;
+}
+
+.dac-reference-nav-toggle.dac-closed::before {
+ -webkit-transform: scaleY(-1);
+ -ms-transform: scaleY(-1);
+ transform: scaleY(-1);
+}
+
+/* nav */
+#nav {
+ background: #cfd8dc;
+ bottom: 0;
+ left: 0;
+ margin: 0;
+ -webkit-overflow-scrolling: touch;
+ overflow-y: scroll;
+ position: absolute !important;
+ right: 0;
+ top: 0 !important;
+ padding: 10px;
+ scrollbar-face-color: #9da4a7;
+ scrollbar-track-color: #c4cdd1;
+ /* section header links */
+ /* nested nav headers */
+}
+
+#nav::-webkit-scrollbar {
+ width: 4px;
+ height: 4px;
+}
+
+#nav::-webkit-scrollbar-thumb {
+ background: #9da4a7;
+}
+
+#nav::-webkit-scrollbar-track {
+ background: #c4cdd1;
+}
+
+#nav li {
+ font-size: 12px;
+ line-height: 18px;
+ list-style-type: none;
+ margin: 0;
+ padding: 0;
+}
+
+#nav a {
+ color: #505050;
+ text-decoration: none;
+ word-wrap: break-word;
+}
+
+#nav .nav-section-header {
+ padding: 0 30px 0 0;
+ position: relative;
+ -webkit-transition: background-color .1s;
+ transition: background-color .1s;
+}
+
+#nav .nav-section-header.empty {
+ padding: 0;
+}
+
+#nav .nav-section-header.empty::after {
+ display: none;
+}
+
+#nav .nav-section-header:after {
+ background: transparent url(../images/styles/disclosure_down.png) no-repeat scroll 50% 50%;
+ content: '';
+ height: 34px;
+ display: block;
+ position: absolute;
+ right: 0;
+ top: 1px;
+ width: 34px;
+}
+
+#nav li.selected a {
+ color: #0288D1;
+}
+
+#nav li.selected ul li a {
+ color: #505050;
+}
+
+#nav li.expanded .nav-section-header {
+ background: #bac2c6;
+}
+
+#nav li.expanded .nav-section-header.empty {
+ background: none;
+}
+
+#nav li.expanded li .nav-section-header {
+ background: none;
+}
+
+#nav li.expanded li ul {
+ padding: 0 10px;
+}
+
+#nav li.expanded > .nav-section-header:after {
+ content: '';
+ background: transparent url(../images/styles/disclosure_up.png) no-repeat scroll 50% 50%;
+ width: 34px;
+ height: 34px;
+}
+
+#nav li.expanded li ul.tree-list-children {
+ padding: 0;
+}
+
+#nav li.expanded li ul.tree-list-children .tree-list-children {
+ padding: 0 0 0 10px;
+}
+
+#nav .nav-section .nav-section .nav-section-header {
+ /* no white line between second level sections */
+ margin-bottom: 0;
+}
+
+#nav > li > div > a {
+ display: block;
+ font-weight: 700;
+ padding: 10px;
+}
+
+#nav .nav-section .nav-section {
+ position: relative;
+ padding: 0;
+ margin: 0;
+}
+
+#nav .nav-section li a {
+ /* first gen child (2nd level li) */
+ display: block;
+ font-weight: 700;
+ text-transform: none;
+ padding: 10px;
+}
+
+#nav .nav-section li li a {
+ /* second gen child (3rd level li) */
+ font-weight: 400;
+ padding: 6px 6px 6px 10px;
+}
+
+#nav li span.tree-list-subtitle {
+ display: inline-block;
+ color: #555;
+ font-size: 12px;
+ padding: 10px;
+ text-transform: uppercase;
+}
+
+#nav li span.tree-list-subtitle:before {
+ content: '—';
+}
+
+#nav li span.tree-list-subtitle:after {
+ content: '—';
+}
+
+#nav li span.tree-list-subtitle.package {
+ padding-top: 15px;
+ cursor: default;
+}
+
+#nav li span.tree-list-subtitle.package:before {
+ content: '';
+}
+
+#nav li span.tree-list-subtitle.package:after {
+ content: '';
+}
+
+#nav li ul.tree-list-children.classes {
+ padding-left: 10px;
+}
+
+#nav li ul {
+ display: none;
+ overflow: hidden;
+ margin: 0;
+}
+
+#nav li ul.animate-height-in {
+ -webkit-transition: height 0.25s ease-in;
+ transition: height 0.25s ease-in;
+}
+
+#nav li ul.animate-height-out {
+ -webkit-transition: height 0.25s ease-out;
+ transition: height 0.25s ease-out;
+}
+
+#nav li ul li {
+ padding: 0;
+}
+
+#nav li li li {
+ padding: 0;
+}
+
+#nav li ul > li {
+ padding: 0;
+}
+
+#nav li ul > li:last-child {
+ padding-bottom: 5px;
+}
+
+#nav li ul.tree-list-children > li:last-child {
+ padding-bottom: 0;
+}
+
+#nav li.expanded ul > li {
+ background: #c4cdd1;
+}
+
+#nav li.expanded ul > li li {
+ background: inherit;
+}
+
+#nav li ul.tree-list-children ul {
+ display: block;
+}
+
+#nav.samples-nav li li li a {
+ padding-top: 3px;
+ padding-bottom: 3px;
+}
+
+#nav.samples-nav li li ul > li:last-child {
+ padding-bottom: 3px;
+}
+
+/* Hero carousel */
+.dac-hero {
+ background-color: #fff;
+ background-position: 50% 30%;
+ background-size: cover;
+ box-sizing: border-box;
+ font-size: 16px;
+ min-height: 550px;
+ padding-top: 88px;
+}
+
+.dac-hero.dac-darken::before {
+ background: rgba(0, 0, 0, 0.3);
+ bottom: 0;
+ content: '';
+ display: block;
+ left: 0;
+ position: absolute;
+ right: 0;
+ top: 0;
+}
+
+@media (max-width: 719px) {
+ .dac-hero.dac-darken::before {
+ background: -webkit-linear-gradient(top, rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.9) 80%);
+ background: linear-gradient(to bottom, rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.9) 80%);
+ }
+}
+
+.dac-hero.dac-darken .dac-hero-content {
+ position: relative;
+}
+
+@media (max-width: 719px) {
+ .dac-hero {
+ padding-bottom: 20px;
+ padding-top: 20px;
+ }
+}
+
+.dac-hero-tag {
+ font-size: 11px;
+ font-weight: 700;
+ letter-spacing: .07em;
+ margin-bottom: 2px;
+ text-transform: uppercase;
+}
+
+.dac-hero-title {
+ margin: 0 0 14px;
+}
+
+@media (max-width: 719px) {
+ .dac-hero-title {
+ font-size: 28px;
+ line-height: 35px;
+ }
+}
+
+.dac-hero-description {
+ margin-bottom: 16px;
+}
+
+@media (max-width: 719px) {
+ .dac-hero-description {
+ font-size: 14px;
+ }
+}
+
+.dac-hero-cta {
+ display: inline-block;
+ line-height: 40px;
+ margin-right: 20px;
+ -webkit-transition: opacity .3s;
+ transition: opacity .3s;
+}
+
+.dac-hero-cta:hover {
+ color: currentColor;
+ opacity: .54;
+}
+
+.dac-hero-cta .dac-sprite, .dac-hero-cta .dac-modal-header-close:before, .dac-hero-cta .paging-links .prev-page-link:before, .paging-links .dac-hero-cta .prev-page-link:before, .dac-hero-cta .paging-links .next-page-link:before, .paging-links .dac-hero-cta .next-page-link:before, .dac-hero-cta .paging-links .next-class-link:before, .paging-links .dac-hero-cta .next-class-link:before, .dac-hero-cta .paging-links .start-class-link:after, .paging-links .dac-hero-cta .start-class-link:after {
+ margin-left: -8px;
+}
+
+@media (max-width: 719px) {
+ .dac-hero-cta {
+ line-height: 28px;
+ }
+}
+
+.dac-hero-figure {
+ text-align: center;
+}
+
+/* Android Studio download page */
+section#features {
+ padding-top:0;
+}
+.wrap.feature {
+ margin:80px auto;
+}
+.dac-section-links.feature-more {
+ margin-top:-20px;
+}
+.dac-toggle-content .wrap.feature {
+ margin-top:0;
+}
+
+@media (max-width: 719px) {
+ .dac-hero-figure {
+ height: 150px;
+ margin: 15px 0;
+ }
+
+ .dac-hero-figure img {
+ max-height: 150px;
+ }
+
+ /* Android Studio download page */
+ .feature .dac-hero-figure,
+ .feature .dac-hero-figure img {
+ height:auto;
+ max-height:none;
+ }
+ .feature .dac-hero-figure img {
+ width:90%;
+ margin:0 auto;
+ }
+}
+
+.dac-hero-carousel {
+ height: 550px;
+ position: relative;
+}
+
+.dac-hero-carousel > .dac-hero {
+ bottom: 0;
+ left: 0;
+ position: absolute;
+ right: 0;
+ top: 0;
+ will-change: opacity;
+}
+
+.dac-hero-carousel > .dac-hero,
+ .dac-hero-carousel > .dac-hero .wrap {
+ opacity: 0;
+}
+
+.dac-hero-carousel > .dac-hero.active {
+ opacity: 1;
+ -webkit-transition: opacity .5s;
+ transition: opacity .5s;
+ z-index: 1;
+}
+
+.dac-hero-carousel > .dac-hero.active .wrap {
+ opacity: 1;
+ -webkit-transition: opacity .5s .5s;
+ transition: opacity .5s .5s;
+}
+
+.dac-hero-carousel > .dac-hero.out,
+ .dac-hero-carousel > .dac-hero.out .wrap {
+ -webkit-transition: opacity 0s .5s;
+ transition: opacity 0s .5s;
+ opacity: 0;
+}
+
+.dac-hero-carousel-action {
+ bottom: 0;
+ display: block;
+ left: 0;
+ position: absolute;
+ right: 0;
+ top: 0;
+ z-index: 1;
+}
+
+.dac-hero-carousel .dac-hero-cta {
+ position: relative;
+ z-index: 1;
+}
+
+.dac-hero-carousel-pagination {
+ bottom: 33px;
+ left: 0;
+ position: absolute;
+ right: 0;
+}
+
+@media (max-width: 719px) {
+ .dac-hero-carousel-pagination {
+ text-align: center;
+ bottom: 20px;
+ }
+}
+
+.dac-hero-carousel-pagination .dac-pagination-item {
+ position: relative;
+ z-index: 1;
+}
+
+.dac-pagination {
+ list-style: none;
+ margin: 0 -6px;
+}
+
+.dac-pagination-item {
+ background-clip: content-box;
+ background-color: rgba(153, 153, 153, 0.4);
+ border-radius: 50%;
+ cursor: pointer;
+ display: inline-block;
+ height: 14px;
+ overflow: hidden;
+ padding: 6px;
+ pointer-events: all;
+ text-indent: 100%;
+ -webkit-transition: background-color .1s ease-in;
+ transition: background-color .1s ease-in;
+ white-space: nowrap;
+ width: 14px;
+ will-change: background-color;
+}
+
+.dac-pagination-item:hover {
+ background-color: rgba(153, 153, 153, 0.6);
+}
+
+.dac-pagination-item.active, .dac-pagination-item.active:hover {
+ background-color: #6ab344;
+}
+
+.dac-invert .dac-pagination-item {
+ background-color: rgba(204, 204, 204, 0.2);
+}
+
+.dac-invert .dac-pagination-item:hover {
+ background-color: rgba(153, 153, 153, 0.4);
+}
+
+@media (max-width: 719px) {
+ .dac-pagination-item {
+ height: 12px;
+ width: 12px;
+ }
+}
+
+/* Form component */
+.dac-form {
+ color: #505050;
+ font-size: 16px;
+ /* Modal Responsive */
+}
+
+.dac-form a {
+ color: #000;
+}
+
+.dac-form-aside {
+ display: inline-block;
+ font-size: 12px;
+ margin-top: 0;
+}
+
+.dac-form-required {
+ color: #ef4300;
+}
+
+.dac-form-fieldset {
+ padding: 0;
+}
+
+.dac-form-legend {
+ display: block;
+ color: #333;
+ font-weight: 500;
+ margin: 20px 0 12px;
+ padding: 0;
+ width: 100%;
+}
+
+.dac-form-legend > .dac-form-required {
+ float: right;
+ margin-top: 3px;
+}
+
+.dac-form-input {
+ border: 0 solid #e3e3e3;
+ border-bottom-width: 1px;
+ display: block;
+ outline: 0;
+ padding: 1px 0 8px;
+ -webkit-transition: border-color .2s;
+ transition: border-color .2s;
+ width: 100%;
+}
+
+.dac-form-input-group {
+ position: relative;
+}
+
+.dac-form-input-group > .dac-form-required {
+ display: block;
+ bottom: 3px;
+ position: absolute;
+ right: 0;
+}
+
+.dac-form-input:focus {
+ border-bottom-color: #09f;
+}
+
+.dac-form-floatlabel {
+ display: block;
+ cursor: text;
+ margin-top: 5px;
+ pointer-events: none;
+ -webkit-transform-origin: 0 100%;
+ -ms-transform-origin: 0 100%;
+ transform-origin: 0 100%;
+ -webkit-transform: translate3d(0, 22px, 0) scale(1);
+ transform: translate3d(0, 22px, 0) scale(1);
+ -webkit-transition: -webkit-transform .2s;
+ transition: transform .2s;
+}
+
+.dac-focused > .dac-form-floatlabel,
+ .dac-has-value > .dac-form-floatlabel {
+ cursor: default;
+ -webkit-transform: translate3d(0, 0, 0) scale(0.75);
+ transform: translate3d(0, 0, 0) scale(0.75);
+}
+
+.dac-form-radio, .dac-form-checkbox {
+ opacity: 0;
+ position: absolute;
+ visibility: hidden;
+}
+
+.dac-form-radio-group, .dac-form-checkbox-group {
+ display: table;
+}
+
+.dac-form-radio-group + .dac-form-radio-group, .dac-form-checkbox-group + .dac-form-radio-group, .dac-form-radio-group + .dac-form-checkbox-group, .dac-form-checkbox-group + .dac-form-checkbox-group {
+ margin-top: 10px;
+}
+
+.dac-form-radio-button, .dac-form-checkbox-button {
+ box-sizing: border-box;
+ cursor: pointer;
+ display: table-cell;
+ float: left;
+ height: 18px;
+ margin: 2px 10px 0 0;
+ position: relative;
+ width: 18px;
+}
+
+.dac-form-radio-button::after, .dac-form-radio-button::before, .dac-form-checkbox-button::after, .dac-form-checkbox-button::before {
+ box-sizing: border-box;
+ content: '';
+ display: block;
+ position: absolute;
+}
+
+.dac-form-radio-button::after, .dac-form-radio-button::before {
+ border-radius: 50%;
+ height: 100%;
+ width: 100%;
+}
+
+.dac-form-radio-button::before {
+ background: rgba(0, 0, 0, 0.7);
+ -webkit-transform: translateZ(0) scale(0);
+ transform: translateZ(0) scale(0);
+ -webkit-transition: -webkit-transform .3s;
+ transition: transform .3s;
+}
+
+.dac-form-radio-button::after {
+ border: 2px solid rgba(0, 0, 0, 0.7);
+}
+
+.dac-form-radio:checked + .dac-form-radio-button::before {
+ -webkit-transform: translateZ(0) scale(0.5);
+ transform: translateZ(0) scale(0.5);
+}
+
+.dac-form-radio:focus + .dac-form-radio-button::after {
+ border: 2px solid #09f;
+}
+
+.dac-form-checkbox-button::before {
+ border: 1px solid #6c6e6f;
+ border-radius: 3px;
+ height: 100%;
+ -webkit-transition: background .1s ease-out, box-shadow .3s ease-out;
+ transition: background .1s ease-out, box-shadow .3s ease-out;
+ width: 100%;
+}
+
+.dac-form-checkbox-button::after {
+ border-bottom: 2px solid #fff;
+ border-left: 2px solid #fff;
+ bottom: 7px;
+ height: 7px;
+ left: 3px;
+ -webkit-transform: rotate(-45deg);
+ -ms-transform: rotate(-45deg);
+ transform: rotate(-45deg);
+ width: 12px;
+}
+
+.dac-form-checkbox:checked + .dac-form-checkbox-button::before {
+ background: #6c6e6f;
+ -webkit-transition-timing-function: ease-in;
+ transition-timing-function: ease-in;
+}
+
+.dac-form-checkbox:focus + .dac-form-checkbox-button::before,
+ .dac-form-checkbox:active + .dac-form-checkbox-button::before {
+ box-shadow: 0 0 0 4px rgba(0, 0, 0, 0.05);
+}
+
+.dac-form-label {
+ cursor: pointer;
+ -webkit-user-select: none;
+ -moz-user-select: none;
+ -ms-user-select: none;
+ user-select: none;
+}
+
+@media (max-width: 719px) {
+ .dac-form-legend {
+ margin-bottom: 0;
+ }
+}
+
+/* Filter Resources Component*/
+.dac-filter {
+ color: #505050;
+ margin-bottom: 20px;
+ position: relative;
+}
+
+.dac-filter.dac-filter-section {
+ margin-top: -45px;
+ text-align: right;
+}
+
+@media (max-width: 719px) {
+ .dac-filter.dac-filter-section {
+ margin-top: 0;
+ text-align: left;
+ }
+}
+
+.dac-filter-title {
+ color: #666;
+ cursor: default;
+ display: inline-block;
+ font-size: 12px;
+ font-weight: 500;
+ line-height: 24px;
+ margin: 0;
+ text-transform: uppercase;
+}
+
+@media (max-width: 719px) {
+ .dac-filter-title {
+ margin-bottom: 20px;
+ }
+}
+
+.dac-filter-message {
+ color: #78868d;
+ font-size: 18px;
+ margin: 0 10px 10px;
+}
+
+.dac-filter-count {
+ background: #6ab344;
+ border-radius: 50%;
+ color: #fff;
+ display: inline-block;
+ font-size: 12px;
+ font-weight: 600;
+ height: 24px;
+ text-align: center;
+ width: 24px;
+}
+
+.dac-filter-count.dac-disabled {
+ visibility: hidden;
+}
+
+.dac-filter-chip {
+ background: #bfc7cb;
+ border-radius: 15px;
+ color: #333;
+ cursor: default;
+ display: inline-block;
+ line-height: 21px;
+ margin: 0 10px 10px 0;
+ padding: 4px 26px 4px 10px;
+ position: relative;
+}
+
+.dac-filter-chip-close {
+ background-color: transparent;
+ border: none;
+ cursor: pointer;
+ outline: 0;
+ padding: 3px;
+ position: absolute;
+ right: 5px;
+ top: 5px;
+}
+
+.dac-filter-chip-close-icon {
+ opacity: .7;
+ margin-top: -2px;
+ -webkit-transform: scale(0.57142857);
+ -ms-transform: scale(0.57142857);
+ transform: scale(0.57142857);
+}
+
+.dac-filter-chip-close:hover > .dac-filter-chip-close-icon {
+ opacity: 1;
+}
+
+.dac-filter-chips {
+ border-top: 1px solid rgba(0, 0, 0, 0.1);
+ margin: 0;
+ list-style-type: none;
+ padding: 10px 0 0;
+ position: relative;
+ text-align: left;
+}
+
+.dac-filter-item {
+ box-sizing: border-box;
+ float: left;
+ margin-bottom: 20px;
+ padding: 0 10px;
+ width: 33.33333333%;
+}
+
+@media (min-width: 720px) and (max-width: 979px) {
+ .dac-filter-item {
+ width: 50%;
+ }
+}
+
+@media (max-width: 719px) {
+ .dac-filter-item {
+ width: 100%;
+ }
+}
+
+/* Media component */
+.dac-media {
+ display: table;
+ width: 100%;
+}
+
+.dac-media-body, .dac-media-figure {
+ display: table-cell;
+ vertical-align: top;
+}
+
+.dac-media-figure {
+ padding: 0;
+}
+
+.dac-media-body {
+ width: 100%;
+}
+
+.dac-swap {
+ overflow: hidden;
+ position: relative;
+}
+
+.dac-swap-section {
+ left: 0;
+ opacity: 0;
+ position: absolute;
+ top: 0;
+ width: 100%;
+ -webkit-transition: opacity 1s, -webkit-transform .5s;
+ transition: opacity 1s, transform .5s;
+}
+
+.dac-swap-section.dac-no-anim {
+ -webkit-transition: none;
+ transition: none;
+}
+
+.dac-swap-section.dac-up {
+ -webkit-transform: translateY(-100%);
+ -ms-transform: translateY(-100%);
+ transform: translateY(-100%);
+}
+
+.dac-swap-section.dac-down {
+ -webkit-transform: translateY(100%);
+ -ms-transform: translateY(100%);
+ transform: translateY(100%);
+}
+
+.dac-swap-section.dac-left {
+ -webkit-transform: translateX(-100%);
+ -ms-transform: translateX(-100%);
+ transform: translateX(-100%);
+}
+
+.dac-swap-section.dac-right {
+ -webkit-transform: translateX(100%);
+ -ms-transform: translateX(100%);
+ transform: translateX(100%);
+}
+
+.dac-swap-section.dac-active {
+ opacity: 1;
+ position: relative;
+ -webkit-transform: translate(0, 0);
+ -ms-transform: translate(0, 0);
+ transform: translate(0, 0);
+ width: auto;
+}
+
+/* Modal component */
+.dac-modal {
+ opacity: 0;
+ visibility: hidden;
+ -webkit-transition: visibility 0s linear 300ms, opacity 300ms linear;
+ transition: visibility 0s linear 300ms, opacity 300ms linear;
+ background: rgba(0, 0, 0, 0.8);
+ bottom: 0;
+ left: 0;
+ overflow-x: hidden;
+ overflow-y: auto;
+ position: fixed;
+ right: 0;
+ top: 0;
+ z-index: 70;
+}
+
+.dac-modal.dac-active {
+ opacity: 1;
+ -webkit-transition-delay: 0s;
+ transition-delay: 0s;
+ visibility: visible;
+}
+
+.dac-modal-open {
+ overflow: hidden;
+}
+
+.dac-modal-container {
+ -webkit-box-align: center;
+ -webkit-align-items: center;
+ -ms-flex-align: center;
+ align-items: center;
+ display: -webkit-box;
+ display: -webkit-flex;
+ display: -ms-flexbox;
+ display: flex;
+ -webkit-filter: drop-shadow(0 5px 15px rgba(0, 0, 0, 0.4));
+ filter: drop-shadow(0 5px 15px rgba(0, 0, 0, 0.4));
+ -webkit-box-pack: center;
+ -webkit-justify-content: center;
+ -ms-flex-pack: center;
+ justify-content: center;
+ min-height: 100%;
+ width: 100%;
+}
+
+.dac-modal-window {
+ background: #fff;
+ box-sizing: border-box;
+ margin: 20px auto;
+ -webkit-transition: -webkit-transform .3s;
+ transition: transform .3s;
+ -webkit-transform: translate3d(0, -30px, 0);
+ transform: translate3d(0, -30px, 0);
+ width: 960px;
+}
+
+.dac-modal.dac-active .dac-modal-window {
+ -webkit-transform: translate3d(0, 0, 0);
+ transform: translate3d(0, 0, 0);
+}
+
+.dac-modal-header {
+ background: #00695c;
+ padding: 35px 35px 30px;
+ position: relative;
+}
+
+.dac-has-small-header .dac-modal-header {
+ padding: 10px 20px;
+}
+
+.dac-modal-header-actions {
+ padding: 8px;
+ position: absolute;
+ right: 5px;
+ top: 5px;
+}
+
+.dac-modal-header-open, .dac-modal-header-close {
+ background: none;
+ border: none;
+ cursor: pointer;
+ line-height: 0;
+ outline: 0;
+ opacity: .7;
+ -webkit-transition: background-color .3s;
+ transition: background-color .3s;
+}
+
+.dac-modal-header-open:active, .dac-modal-header-close:active {
+ background: rgba(255, 255, 255, 0.2);
+}
+
+.dac-modal-header-close:before {
+ content: '';
+ top: -1px;
+ position: relative;
+}
+
+.dac-modal-header-open {
+ margin: 10px;
+}
+
+.dac-modal-header-title {
+ color: #fff;
+ font-size: 24px;
+ font-weight: 300;
+ line-height: 32px;
+ padding: 0 150px 0 0;
+}
+
+.dac-has-small-header .dac-modal-header-title {
+ font-size: 16px;
+ font-weight: 500;
+}
+
+.dac-modal-header-subtitle {
+ bottom: 0;
+ color: #fff;
+ display: inline-block;
+ font: inherit;
+ font-size: 14px;
+ margin: 0;
+ opacity: .8;
+ position: absolute;
+ right: 0;
+}
+
+.dac-modal-content {
+ padding: 12px 35px;
+}
+
+.dac-modal-action {
+ margin: 0;
+}
+
+.dac-modal-footer {
+ padding: 24px 35px;
+}
+
+@media (max-width: 1000px) {
+ .dac-modal-window {
+ margin: 20px;
+ width: auto;
+ }
+
+ .dac-modal-container {
+ z-index: auto;
+ }
+}
+
+@media (max-width: 719px) {
+ .dac-modal-window {
+ margin: 10px;
+ }
+
+ .dac-modal-header {
+ padding: 35px 10px 10px;
+ }
+
+ .dac-modal-header-title {
+ font-size: 16px;
+ line-height: 24px;
+ padding: 0;
+ }
+
+ .dac-modal-header-subtitle {
+ display: block;
+ margin: 0;
+ position: static;
+ text-align: right;
+ }
+
+ .dac-modal-header-actions {
+ top: 1px;
+ }
+
+ .dac-modal-content {
+ padding: 10px;
+ }
+
+ .dac-modal-footer {
+ border-top: 1px solid #e3e3e3;
+ padding: 35px 10px;
+ }
+}
+
+.newsletter .dac-modal-footer {
+ padding-top: 0;
+ text-align: right;
+}
+
+.newsletter-checkboxes {
+ padding-top: 20px;
+}
+
+.newsletter-success-message {
+ font-size: 32px;
+ line-height: 1.4;
+ padding: 40px 30px;
+ text-align: center;
+}
+
+@media (max-width: 719px) {
+ .newsletter-success-message {
+ font-size: 16px;
+ padding: 12px 0 0;
+ }
+}
+
+@media (min-width: 720px) {
+ .newsletter-checkboxes {
+ padding-top: 46px;
+ }
+
+ .newsletter-leftCol {
+ padding-right: 40px;
+ }
+
+ .newsletter-rightCol {
+ padding-left: 40px;
+ }
+}
+
+@media (max-width: 719px) {
+ .newsletter .dac-modal-footer {
+ margin-top: 30px;
+ padding: 30px 10px;
+ text-align: center;
+ }
+}
+
+.dac-blog-reader {
+ padding: 50px 90px;
+}
+
+.dac-blog-reader-title {
+ color: #333;
+ font-size: 45px;
+ font-weight: 300;
+ line-height: 1.2;
+ padding: 10px 0;
+}
+
+.dac-blog-reader-date {
+ color: #b8b8b8;
+ font-size: 12px;
+ font-weight: 600;
+ line-height: 1;
+ text-transform: uppercase;
+}
+
+.dac-blog-reader-text > p:first-child i {
+ display: inline-block;
+ margin-bottom: 40px;
+}
+
+.dac-blog-reader-text li {
+ margin-bottom: 0;
+}
+
+.dac-blog-reader-text iframe {
+ margin-left: auto !important;
+ margin-right: auto !important;
+ max-width: 100%;
+}
+
+@media (max-width: 719px) {
+ .dac-blog-reader {
+ padding: 30px 20px;
+ }
+}
+
+.dac-custom-search {
+ background: #fff;
+ margin: 0 -10px;
+ padding: 20px 10px;
+ z-index: 1;
+}
+
+.dac-custom-search .dac-fab, .dac-custom-search .dac-button-social {
+ top: -48px;
+}
+
+.dac-custom-search-section-title {
+ color: #505050;
+}
+
+.dac-custom-search-entry {
+ margin-bottom: 36px;
+ margin-top: 24px;
+ margin-left:10px;
+}
+
+.dac-custom-search-entry.cols:after {
+ clear: none; }
+
+.dac-custom-search-image-wrapper {
+ float: left;
+ position: relative;
+}
+
+.dac-custom-search-image {
+ background-size: cover;
+ height: 112px;
+ width:150px;
+ margin-right:15px;
+}
+
+.dac-custom-search-text-wrapper {
+ position: relative;
+}
+
+.dac-custom-search-title {
+ color: #333;
+ font-size: 14px;
+ font-weight: 700;
+ line-height: 24px;
+ padding: 0;
+ clear:none;
+}
+
+.dac-custom-search-title a {
+ color: inherit;
+}
+
+.dac-custom-search-section {
+ color: #999;
+ font-size: 16px;
+ font-variant: small-caps;
+ font-weight: 700;
+ margin: -5px 0 0 0;
+}
+
+.dac-custom-search-snippet {
+ color: #666;
+ margin: 0;
+}
+
+.dac-custom-search-link {
+ font-weight: 500;
+ word-wrap: break-word;
+ width: 100%;
+}
+
+.dac-custom-search-load-more {
+ background: none;
+ border: none;
+ color: #333;
+ cursor: pointer;
+ display: block;
+ font-size: 14px;
+ font-weight: 700;
+ margin: 75px auto;
+ outline: none;
+ padding: 10px;
+}
+
+.dac-custom-search-load-more:hover {
+ opacity: 0.7;
+}
+
+.dac-custom-search-no-results {
+ color: #999;
+}
+
+.dac-search-hero {
+ font-size: 16px;
+ padding: 50px 0 14px 0;
+}
+
+.dac-search-results {
+ opacity: 0;
+ visibility: hidden;
+ -webkit-transition: visibility 0s linear 300ms, opacity 300ms linear;
+ transition: visibility 0s linear 300ms, opacity 300ms linear;
+ background-color: #fff;
+ bottom: 0;
+ left: 0;
+ overflow-y: auto;
+ padding: 0 10px;
+ position: fixed;
+ right: 0;
+ -webkit-transition: opacity 100ms;
+ transition: opacity 100ms;
+ top: 64px;
+ z-index: 50;
+}
+
+.dac-nav-animating .dac-search-results {
+ -webkit-transition: opacity 100ms, padding .3s;
+ transition: opacity 100ms, padding .3s;
+}
+
+.dac-search-results * {
+ box-sizing: border-box;
+}
+
+.dac-search-open .dac-search-results {
+ opacity: 1;
+ visibility: visible;
+}
+
+.dac-search-results-content {
+ background: #eceff1;
+ margin: 0 -10px;
+ padding: 0 10px;
+}
+
+.dac-search-results-for {
+ margin-bottom: -5px;
+ overflow: hidden;
+ padding-top: 5px;
+}
+
+.dac-search-results-for span {
+ color: #039bef;
+}
+
+.dac-search-mode .dac-search-results-for {
+ display: none;
+}
+
+.dac-search-results-history {
+ background: #eceff1;
+ min-height: 100%;
+ margin: 0 -10px;
+ padding: 0 10px;
+}
+
+.dac-search-results-hero {
+ padding-top: 20px;
+}
+
+.dac-search-results-metadata {
+ padding-bottom: 40px;
+}
+
+#dac-search-results-reference {
+ float:right;
+ z-index:999;
+}
+
+@media (max-width: 719px) {
+ #dac-search-results-reference {
+ float:none;
+ }
+}
+
+.dac-search-results-reference {
+ background: white;
+ box-shadow: 0px 1px 3px 0px rgba(0, 0, 0, 0.21);
+ margin: 0 0 20px 0;
+ overflow: hidden;
+ padding: 6px 0 4px;
+}
+
+.dac-search-results-reference .namespace {
+ color: #666;
+}
+
+.dac-search-results-reference.is-expanded {
+ height: auto;
+}
+
+.dac-search-results-reference-header {
+ color: #999;
+ font-size: 16px;
+ font-variant: small-caps;
+ font-weight: 700;
+ margin: 0;
+ padding: 18px 12px 0;
+ text-transform: lowercase;
+}
+
+.dac-search-results-reference-header:first-child {
+ padding-top: 0;
+}
+
+.dac-search-results-reference-entry {
+ margin: 0;
+}
+
+.dac-search-results-reference-entry a {
+ color: #333;
+ display: block;
+ font-size: 0.81em;
+ line-height: 1.5em;
+ padding: 0 12px 5px 12px;
+ width: 100%;
+ white-space: nowrap;
+}
+
+ul.dac-search-results-reference {
+list-style: none;
+}
+
+ul.dac-search-results-reference li[data-toggle="show-more"] {
+ cursor:pointer;
+}
+
+ul.dac-search-results-reference.is-expanded li[data-toggle="show-more"] {
+ display:none;
+}
+
+.dac-search-results-reference-entry a:hover {
+ background-color: #eceff1;
+}
+
+.dac-search-results-reference-entry em {
+ font-style: normal;
+ font-weight: 700;
+}
+
+.dac-search-results-reference-entry-empty {
+ color: #999;
+ font-size: 0.81em;
+ margin: 0;
+ padding: 2px 12px 14px;
+}
+
+.dac-search-results-resources {
+ margin: 0;
+}
+
+.dac-search-results-resources .resource-card {
+ border-right: 2px solid #999;
+}
+
+.dac-search-results-resources .resource-card-about {
+ border-right: 2px solid #6ab344;
+}
+
+.dac-search-results-resources .resource-card-about .section {
+ color: #6ab344;
+}
+
+.dac-search-results-resources .resource-card-develop {
+ border-right: 2px solid #ff7043;
+}
+
+.dac-search-results-resources .resource-card-develop .section {
+ color: #ff7043;
+}
+
+.dac-search-results-resources .resource-card-design {
+ border-right: 2px solid #00bcd4;
+}
+
+.dac-search-results-resources .resource-card-design .section {
+ color: #00bcd4;
+}
+
+.dac-search-results-resources .resource-card-distribute {
+ border-right: 2px solid #afb42b;
+}
+
+.dac-search-results-resources .resource-card-distribute .section {
+ color: #afb42b;
+}
+
+@media (max-width: 719px) {
+ .dac-search-results-reference.no-results {
+ display: none;
+ }
+}
+
+@media (min-width: 980px) {
+ .dac-nav-open.dac-search-open .dac-search-results {
+ padding-left: 260px;
+ }
+
+ .dac-search-mode.dac-search-open .dac-search-results {
+ padding-left: 10px;
+ }
+}
+
+.dac-selected {
+ color: #039bef !important;
+}
+
+.dac-selected em {
+ color: #039bef;
+}
+
+.resource-card.dac-selected {
+ box-shadow: 0px 1px 10px 0px rgba(3, 155, 239, 0.7);
+}
+
+.resource-card.dac-selected em {
+ color: #333;
+}
+
+.dac-expand, .dac-section {
+ margin-left: -20px;
+ margin-right: -20px;
+ padding-left: 20px;
+ padding-right: 20px;
+}
+
+@media (max-width: 719px) {
+ .dac-expand, .dac-section {
+ margin-left: -10px;
+ margin-right: -10px;
+ padding-left: 10px;
+ padding-right: 10px;
+ }
+}
+
+.dac-invert {
+ color: #b3b3b3;
+ color: rgba(255, 255, 255, 0.7);
+}
+
+.dac-invert h1, .dac-invert h2, .dac-invert h3 {
+ color: #fff;
+}
+
+.dac-light.dac-hero, .dac-light.dac-section {
+ background-color: #eceff1;
+}
+
+.dac-gray.dac-hero, .dac-gray.dac-section {
+ background-color: #d8dfe2;
+}
+
+.dac-gray-dark.dac-hero, .dac-gray-dark.dac-section {
+ background-color: #b0bec5;
+}
+
+.dac-dark.dac-hero, .dac-dark.dac-section {
+ background-color: #37474f;
+}
+
+.dac-red.dac-hero, .dac-red.dac-section {
+ background-color: #dc4d38;
+}
+
+.dac-hero-cta, .dac-section-title, .dac-section-links {
+ color: #212121;
+ color: rgba(0, 0, 0, 0.87);
+}
+
+.dac-invert .dac-hero-cta, .dac-invert .dac-section-title, .dac-invert .dac-section-links {
+ color: white;
+}
+
+.dac-hero-cta .dac-sprite, .dac-section-title .dac-sprite, .dac-section-links .dac-sprite, .dac-hero-cta .dac-modal-header-close:before, .dac-section-title .dac-modal-header-close:before, .dac-section-links .dac-modal-header-close:before, .dac-hero-cta .paging-links .prev-page-link:before, .paging-links .dac-hero-cta .prev-page-link:before, .dac-section-title .paging-links .prev-page-link:before, .paging-links .dac-section-title .prev-page-link:before, .dac-section-links .paging-links .prev-page-link:before, .paging-links .dac-section-links .prev-page-link:before, .dac-hero-cta .paging-links .next-page-link:before, .paging-links .dac-hero-cta .next-page-link:before, .dac-section-title .paging-links .next-page-link:before, .paging-links .dac-section-title .next-page-link:before, .dac-section-links .paging-links .next-page-link:before, .paging-links .dac-section-links .next-page-link:before, .dac-hero-cta .paging-links .next-class-link:before, .paging-links .dac-hero-cta .next-class-link:before, .dac-section-title .paging-links .next-class-link:before, .paging-links .dac-section-title .next-class-link:before, .dac-section-links .paging-links .next-class-link:before, .paging-links .dac-section-links .next-class-link:before, .dac-hero-cta .paging-links .start-class-link:after, .paging-links .dac-hero-cta .start-class-link:after, .dac-section-title .paging-links .start-class-link:after, .paging-links .dac-section-title .start-class-link:after, .dac-section-links .paging-links .start-class-link:after, .paging-links .dac-section-links .start-class-link:after {
+ opacity: .87;
+}
+
+.dac-invert .dac-hero-cta .dac-sprite, .dac-invert .dac-section-title .dac-sprite, .dac-invert .dac-section-links .dac-sprite, .dac-invert .dac-hero-cta .dac-modal-header-close:before, .dac-invert .dac-section-title .dac-modal-header-close:before, .dac-invert .dac-section-links .dac-modal-header-close:before, .dac-invert .dac-hero-cta .paging-links .prev-page-link:before, .paging-links .dac-invert .dac-hero-cta .prev-page-link:before, .dac-invert .dac-section-title .paging-links .prev-page-link:before, .paging-links .dac-invert .dac-section-title .prev-page-link:before, .dac-invert .dac-section-links .paging-links .prev-page-link:before, .paging-links .dac-invert .dac-section-links .prev-page-link:before, .dac-invert .dac-hero-cta .paging-links .next-page-link:before, .paging-links .dac-invert .dac-hero-cta .next-page-link:before, .dac-invert .dac-section-title .paging-links .next-page-link:before, .paging-links .dac-invert .dac-section-title .next-page-link:before, .dac-invert .dac-section-links .paging-links .next-page-link:before, .paging-links .dac-invert .dac-section-links .next-page-link:before, .dac-invert .dac-hero-cta .paging-links .next-class-link:before, .paging-links .dac-invert .dac-hero-cta .next-class-link:before, .dac-invert .dac-section-title .paging-links .next-class-link:before, .paging-links .dac-invert .dac-section-title .next-class-link:before, .dac-invert .dac-section-links .paging-links .next-class-link:before, .paging-links .dac-invert .dac-section-links .next-class-link:before, .dac-invert .dac-hero-cta .paging-links .start-class-link:after, .paging-links .dac-invert .dac-hero-cta .start-class-link:after, .dac-invert .dac-section-title .paging-links .start-class-link:after, .paging-links .dac-invert .dac-section-title .start-class-link:after, .dac-invert .dac-section-links .paging-links .start-class-link:after, .paging-links .dac-invert .dac-section-links .start-class-link:after {
+ opacity: 1;
+}
+
+.dac-hero-tag, .dac-hero-description, .dac-section-subtitle {
+ color: #757575;
+ color: rgba(0, 0, 0, 0.54);
+}
+
+.dac-invert .dac-hero-tag, .dac-invert .dac-hero-description, .dac-invert .dac-section-subtitle {
+ color: #b3b3b3;
+ color: rgba(255, 255, 255, 0.7);
+}
+
+.dac-section {
+ background-position: 50% 50%;
+ background-size: cover;
+ padding-bottom: 84px;
+ padding-top: 84px;
+ position: relative;
+}
+
+@media (max-width: 719px) {
+ .dac-section {
+ padding-bottom: 52px;
+ padding-top: 52px;
+ }
+}
+
+.dac-section.dac-small {
+ padding-bottom: 32px;
+ padding-top: 32px;
+}
+
+.dac-section.dac-slim {
+ padding-bottom: 0;
+ padding-top: 0;
+}
+
+.dac-section-title {
+ text-align: center;
+ padding-bottom: 40px;
+ padding-top: 0;
+}
+
+.dac-section-subtitle {
+ font-size: 16px;
+ padding-bottom: 40px;
+ margin-top: -24px;
+ text-align: center;
+}
+
+.dac-section-links {
+ font-size: 16px;
+ list-style: none;
+ line-height: 40px;
+ margin: 16px 0 0;
+ text-align: center;
+}
+
+@media (max-width: 719px) {
+ .dac-section-links {
+ margin-left: -8px;
+ text-align: left;
+ }
+}
+
+.dac-section-link {
+ cursor: pointer;
+ display: inline-block;
+ margin: 0 32px;
+ -webkit-transition: opacity .3s;
+ transition: opacity .3s;
+}
+
+.dac-section-link:hover {
+ opacity: .54;
+}
+
+@media (max-width: 719px) {
+ .dac-section-link {
+ display: block;
+ margin: 0;
+ }
+}
+
+.dac-section-link a {
+ color: inherit;
+}
+
+/*
+SCSS variables are information about icon's compiled state, stored under its original file name
+
+.icon-home {
+ width: $icon-home-width;
+}
+
+The large array-like variables contain all information about a single icon
+$icon-home: x y offset_x offset_y width height total_width total_height image_path;
+
+At the bottom of this section, we provide information about the spritesheet itself
+$spritesheet: width height image $spritesheet-sprites;
+*/
+.dac-sprite, .dac-modal-header-close:before, .paging-links .prev-page-link:before, .paging-links .next-page-link:before, .paging-links .next-class-link:before, .paging-links .start-class-link:after, .Video-button--picture-in-picture, .Video-button--close, a.video-shadowbox-button.white::after, #tb li:before,
+#qv li:before {
+ background-image: url(/assets/images/sprite.png);
+ display: inline-block;
+ vertical-align: middle; }
+ @media (-webkit-min-device-pixel-ratio: 1.5), (min-resolution: 1.5dppx), (min-resolution: 144px) {
+ .dac-sprite, .dac-modal-header-close:before, .paging-links .prev-page-link:before, .paging-links .next-page-link:before, .paging-links .next-class-link:before, .paging-links .start-class-link:after, .Video-button--picture-in-picture, .Video-button--close, a.video-shadowbox-button.white::after, #tb li:before,
+ #qv li:before {
+ background-image: url(/assets/images/sprite@2x.png);
+ background-size: 36px 883px; } }
+
+.dac-sprite.dac-auto-chevron, .dac-auto-chevron.dac-modal-header-close:before, .paging-links .dac-auto-chevron.prev-page-link:before, .paging-links .dac-auto-chevron.next-page-link:before, .paging-links .dac-auto-chevron.next-class-link:before, .paging-links .dac-auto-chevron.start-class-link:after {
+ background-position: 0px -669px;
+ height: 24px;
+ width: 24px;
+ vertical-align: -6px; }
+ .dac-invert .dac-sprite.dac-auto-chevron, .dac-invert .dac-auto-chevron.dac-modal-header-close:before, .dac-invert .paging-links .dac-auto-chevron.prev-page-link:before, .paging-links .dac-invert .dac-auto-chevron.prev-page-link:before, .dac-invert .paging-links .dac-auto-chevron.next-page-link:before, .paging-links .dac-invert .dac-auto-chevron.next-page-link:before, .dac-invert .paging-links .dac-auto-chevron.next-class-link:before, .paging-links .dac-invert .dac-auto-chevron.next-class-link:before, .dac-invert .paging-links .dac-auto-chevron.start-class-link:after, .paging-links .dac-invert .dac-auto-chevron.start-class-link:after {
+ background-position: 0px -513px;
+ height: 24px;
+ width: 24px; }
+
+.dac-sprite.dac-auto-chevron-large, .dac-auto-chevron-large.dac-modal-header-close:before, .paging-links .dac-auto-chevron-large.prev-page-link:before, .paging-links .dac-auto-chevron-large.next-page-link:before, .paging-links .dac-auto-chevron-large.next-class-link:before, .paging-links .dac-auto-chevron-large.start-class-link:after {
+ background-position: 0px -695px;
+ height: 36px;
+ width: 36px;
+ vertical-align: -10px; }
+ .dac-invert .dac-sprite.dac-auto-chevron-large, .dac-invert .dac-auto-chevron-large.dac-modal-header-close:before, .dac-invert .paging-links .dac-auto-chevron-large.prev-page-link:before, .paging-links .dac-invert .dac-auto-chevron-large.prev-page-link:before, .dac-invert .paging-links .dac-auto-chevron-large.next-page-link:before, .paging-links .dac-invert .dac-auto-chevron-large.next-page-link:before, .dac-invert .paging-links .dac-auto-chevron-large.next-class-link:before, .paging-links .dac-invert .dac-auto-chevron-large.next-class-link:before, .dac-invert .paging-links .dac-auto-chevron-large.start-class-link:after, .paging-links .dac-invert .dac-auto-chevron-large.start-class-link:after {
+ background-position: 0px -771px;
+ height: 36px;
+ width: 36px; }
+
+.dac-sprite.dac-auto-unfold-less, .dac-auto-unfold-less.dac-modal-header-close:before, .paging-links .dac-auto-unfold-less.prev-page-link:before, .paging-links .dac-auto-unfold-less.next-page-link:before, .paging-links .dac-auto-unfold-less.next-class-link:before, .paging-links .dac-auto-unfold-less.start-class-link:after {
+ background-position: 0px -487px;
+ height: 24px;
+ width: 24px;
+ vertical-align: -6px; }
+ .dac-invert .dac-sprite.dac-auto-unfold-less, .dac-invert .dac-auto-unfold-less.dac-modal-header-close:before, .dac-invert .paging-links .dac-auto-unfold-less.prev-page-link:before, .paging-links .dac-invert .dac-auto-unfold-less.prev-page-link:before, .dac-invert .paging-links .dac-auto-unfold-less.next-page-link:before, .paging-links .dac-invert .dac-auto-unfold-less.next-page-link:before, .dac-invert .paging-links .dac-auto-unfold-less.next-class-link:before, .paging-links .dac-invert .dac-auto-unfold-less.next-class-link:before, .dac-invert .paging-links .dac-auto-unfold-less.start-class-link:after, .paging-links .dac-invert .dac-auto-unfold-less.start-class-link:after {
+ background-position: 0px -565px;
+ height: 24px;
+ width: 24px; }
+
+.dac-sprite.dac-auto-unfold-more, .dac-auto-unfold-more.dac-modal-header-close:before, .paging-links .dac-auto-unfold-more.prev-page-link:before, .paging-links .dac-auto-unfold-more.next-page-link:before, .paging-links .dac-auto-unfold-more.next-class-link:before, .paging-links .dac-auto-unfold-more.start-class-link:after {
+ background-position: 0px -539px;
+ height: 24px;
+ width: 24px;
+ vertical-align: -6px; }
+ .dac-invert .dac-sprite.dac-auto-unfold-more, .dac-invert .dac-auto-unfold-more.dac-modal-header-close:before, .dac-invert .paging-links .dac-auto-unfold-more.prev-page-link:before, .paging-links .dac-invert .dac-auto-unfold-more.prev-page-link:before, .dac-invert .paging-links .dac-auto-unfold-more.next-page-link:before, .paging-links .dac-invert .dac-auto-unfold-more.next-page-link:before, .dac-invert .paging-links .dac-auto-unfold-more.next-class-link:before, .paging-links .dac-invert .dac-auto-unfold-more.next-class-link:before, .dac-invert .paging-links .dac-auto-unfold-more.start-class-link:after, .paging-links .dac-invert .dac-auto-unfold-more.start-class-link:after {
+ background-position: 0px -305px;
+ height: 24px;
+ width: 24px; }
+
+.dac-sprite.dac-arrow-down-gray, .dac-arrow-down-gray.dac-modal-header-close:before, .paging-links .dac-arrow-down-gray.prev-page-link:before, .paging-links .dac-arrow-down-gray.next-page-link:before, .paging-links .dac-arrow-down-gray.next-class-link:before, .paging-links .dac-arrow-down-gray.start-class-link:after {
+ background-position: 0px 0px;
+ height: 11px;
+ width: 19px; }
+
+.dac-sprite.dac-arrow-right, .dac-arrow-right.dac-modal-header-close:before, .paging-links .dac-arrow-right.prev-page-link:before, .paging-links .dac-arrow-right.next-page-link:before, .paging-links .dac-arrow-right.next-class-link:before, .paging-links .dac-arrow-right.start-class-link:after {
+ background-position: 0px -215px;
+ height: 18px;
+ width: 11px; }
+
+.dac-sprite.dac-back-arrow, .dac-back-arrow.dac-modal-header-close:before, .paging-links .dac-back-arrow.prev-page-link:before, .paging-links .dac-back-arrow.next-page-link:before, .paging-links .dac-back-arrow.next-class-link:before, .paging-links .dac-back-arrow.start-class-link:after {
+ background-position: 0px -123px;
+ height: 16px;
+ width: 16px; }
+
+.dac-sprite.dac-chevron-large-right-black, .dac-chevron-large-right-black.dac-modal-header-close:before, .paging-links .dac-chevron-large-right-black.prev-page-link:before, .paging-links .dac-chevron-large-right-black.next-page-link:before, .paging-links .dac-chevron-large-right-black.next-class-link:before, .paging-links .dac-chevron-large-right-black.start-class-link:after {
+ background-position: 0px -695px;
+ height: 36px;
+ width: 36px; }
+
+.dac-sprite.dac-chevron-large-right-white, .dac-chevron-large-right-white.dac-modal-header-close:before, .paging-links .dac-chevron-large-right-white.prev-page-link:before, .paging-links .dac-chevron-large-right-white.next-page-link:before, .paging-links .dac-chevron-large-right-white.next-class-link:before, .paging-links .dac-chevron-large-right-white.start-class-link:after {
+ background-position: 0px -771px;
+ height: 36px;
+ width: 36px; }
+
+.dac-sprite.dac-chevron-right-black, .dac-chevron-right-black.dac-modal-header-close:before, .paging-links .dac-chevron-right-black.prev-page-link:before, .paging-links .dac-chevron-right-black.next-page-link:before, .paging-links .dac-chevron-right-black.next-class-link:before, .paging-links .dac-chevron-right-black.start-class-link:after {
+ background-position: 0px -669px;
+ height: 24px;
+ width: 24px; }
+
+.dac-sprite.dac-chevron-right-white, .dac-chevron-right-white.dac-modal-header-close:before, .paging-links .dac-chevron-right-white.prev-page-link:before, .paging-links .dac-chevron-right-white.next-page-link:before, .paging-links .dac-chevron-right-white.next-class-link:before, .paging-links .dac-chevron-right-white.start-class-link:after {
+ background-position: 0px -513px;
+ height: 24px;
+ width: 24px; }
+
+.dac-sprite.dac-close-black, .dac-close-black.dac-modal-header-close:before, .paging-links .dac-close-black.prev-page-link:before, .paging-links .dac-close-black.next-page-link:before, .paging-links .dac-close-black.next-class-link:before, .paging-links .dac-close-black.start-class-link:after {
+ background-position: 0px -89px;
+ height: 14px;
+ width: 14px; }
+
+.dac-sprite.dac-close-video-white, .dac-modal-header-close:before, .paging-links .dac-close-video-white.prev-page-link:before, .paging-links .prev-page-link.dac-modal-header-close:before, .paging-links .dac-close-video-white.next-page-link:before, .paging-links .next-page-link.dac-modal-header-close:before, .paging-links .dac-close-video-white.next-class-link:before, .paging-links .next-class-link.dac-modal-header-close:before, .paging-links .dac-close-video-white.start-class-link:after {
+ background-position: 0px -435px;
+ height: 24px;
+ width: 24px; }
+
+.dac-sprite.dac-close, .dac-close.dac-modal-header-close:before, .paging-links .dac-close.prev-page-link:before, .paging-links .dac-close.next-page-link:before, .paging-links .dac-close.next-class-link:before, .paging-links .dac-close.start-class-link:after {
+ background-position: 0px -27px;
+ height: 12px;
+ width: 12px; }
+
+.dac-sprite.dac-enlarge-video-white, .dac-enlarge-video-white.dac-modal-header-close:before, .paging-links .dac-enlarge-video-white.prev-page-link:before, .paging-links .dac-enlarge-video-white.next-page-link:before, .paging-links .dac-enlarge-video-white.next-class-link:before, .paging-links .dac-enlarge-video-white.start-class-link:after {
+ background-position: 0px -409px;
+ height: 24px;
+ width: 24px; }
+
+.dac-sprite.dac-expand-less-black, .dac-expand-less-black.dac-modal-header-close:before, .paging-links .dac-expand-less-black.prev-page-link:before, .paging-links .dac-expand-less-black.next-page-link:before, .paging-links .dac-expand-less-black.next-class-link:before, .paging-links .dac-expand-less-black.start-class-link:after {
+ background-position: 0px -383px;
+ height: 24px;
+ width: 24px; }
+
+.dac-sprite.dac-expand-more-black, .dac-expand-more-black.dac-modal-header-close:before, .paging-links .dac-expand-more-black.prev-page-link:before, .paging-links .dac-expand-more-black.next-page-link:before, .paging-links .dac-expand-more-black.next-class-link:before, .paging-links .dac-expand-more-black.start-class-link:after {
+ background-position: 0px -357px;
+ height: 24px;
+ width: 24px; }
+
+.dac-sprite.dac-fullscreen-exit, .dac-fullscreen-exit.dac-modal-header-close:before, .paging-links .dac-fullscreen-exit.prev-page-link:before, .paging-links .dac-fullscreen-exit.next-page-link:before, .paging-links .dac-fullscreen-exit.next-class-link:before, .paging-links .dac-fullscreen-exit.start-class-link:after {
+ background-position: 0px -331px;
+ height: 24px;
+ width: 24px; }
+
+.dac-sprite.dac-fullscreen, .dac-fullscreen.dac-modal-header-close:before, .paging-links .dac-fullscreen.prev-page-link:before, .paging-links .dac-fullscreen.next-page-link:before, .paging-links .dac-fullscreen.next-class-link:before, .paging-links .dac-fullscreen.start-class-link:after {
+ background-position: 0px -279px;
+ height: 24px;
+ width: 24px; }
+
+.dac-sprite.dac-google-play, .dac-google-play.dac-modal-header-close:before, .paging-links .dac-google-play.prev-page-link:before, .paging-links .dac-google-play.next-page-link:before, .paging-links .dac-google-play.next-class-link:before, .paging-links .dac-google-play.start-class-link:after {
+ background-position: 0px -235px;
+ height: 20px;
+ width: 17px; }
+
+.dac-sprite.dac-gplus, .dac-gplus.dac-modal-header-close:before, .paging-links .dac-gplus.prev-page-link:before, .paging-links .dac-gplus.next-page-link:before, .paging-links .dac-gplus.next-class-link:before, .paging-links .dac-gplus.start-class-link:after {
+ background-position: 0px -809px;
+ height: 36px;
+ width: 36px; }
+
+.dac-sprite.dac-mail, .dac-mail.dac-modal-header-close:before, .paging-links .dac-mail.prev-page-link:before, .paging-links .dac-mail.next-page-link:before, .paging-links .dac-mail.next-class-link:before, .paging-links .dac-mail.start-class-link:after {
+ background-position: 0px -13px;
+ height: 12px;
+ width: 16px; }
+
+.dac-sprite.dac-nav-back-blue, .dac-nav-back-blue.dac-modal-header-close:before, .paging-links .prev-page-link:before, .paging-links .dac-nav-back-blue.next-page-link:before, .paging-links .dac-nav-back-blue.next-class-link:before, .paging-links .dac-nav-back-blue.start-class-link:after {
+ background-position: 0px -105px;
+ height: 16px;
+ width: 16px; }
+
+.dac-sprite.dac-nav-back, .dac-nav-back.dac-modal-header-close:before, .paging-links .dac-nav-back.prev-page-link:before, .paging-links .dac-nav-back.next-page-link:before, .paging-links .dac-nav-back.next-class-link:before, .paging-links .dac-nav-back.start-class-link:after {
+ background-position: 0px -177px;
+ height: 16px;
+ width: 16px; }
+
+.dac-sprite.dac-nav-forward-blue, .dac-nav-forward-blue.dac-modal-header-close:before, .paging-links .dac-nav-forward-blue.prev-page-link:before, .paging-links .next-page-link:before, .paging-links .next-class-link:before, .paging-links .start-class-link:after {
+ background-position: 0px -159px;
+ height: 16px;
+ width: 16px; }
+
+.dac-sprite.dac-nav-forward, .dac-nav-forward.dac-modal-header-close:before, .paging-links .dac-nav-forward.prev-page-link:before, .paging-links .dac-nav-forward.next-page-link:before, .paging-links .dac-nav-forward.next-class-link:before, .paging-links .dac-nav-forward.start-class-link:after {
+ background-position: 0px -141px;
+ height: 16px;
+ width: 16px; }
+
+.dac-sprite.dac-open-in-new, .dac-open-in-new.dac-modal-header-close:before, .paging-links .dac-open-in-new.prev-page-link:before, .paging-links .dac-open-in-new.next-page-link:before, .paging-links .dac-open-in-new.next-class-link:before, .paging-links .dac-open-in-new.start-class-link:after {
+ background-position: 0px -195px;
+ height: 18px;
+ width: 18px; }
+
+.dac-sprite.dac-picture-in-picture-white, .dac-picture-in-picture-white.dac-modal-header-close:before, .paging-links .dac-picture-in-picture-white.prev-page-link:before, .paging-links .dac-picture-in-picture-white.next-page-link:before, .paging-links .dac-picture-in-picture-white.next-class-link:before, .paging-links .dac-picture-in-picture-white.start-class-link:after {
+ background-position: 0px -461px;
+ height: 24px;
+ width: 24px; }
+
+.dac-sprite.dac-play-circle-grey, .dac-play-circle-grey.dac-modal-header-close:before, .paging-links .dac-play-circle-grey.prev-page-link:before, .paging-links .dac-play-circle-grey.next-page-link:before, .paging-links .dac-play-circle-grey.next-class-link:before, .paging-links .dac-play-circle-grey.start-class-link:after {
+ background-position: 0px -733px;
+ height: 36px;
+ width: 36px; }
+
+.dac-sprite.dac-play-circle-white, .dac-play-circle-white.dac-modal-header-close:before, .paging-links .dac-play-circle-white.prev-page-link:before, .paging-links .dac-play-circle-white.next-page-link:before, .paging-links .dac-play-circle-white.next-class-link:before, .paging-links .dac-play-circle-white.start-class-link:after {
+ background-position: 0px -847px;
+ height: 36px;
+ width: 36px; }
+
+.dac-sprite.dac-play-white, .dac-play-white.dac-modal-header-close:before, .paging-links .dac-play-white.prev-page-link:before, .paging-links .dac-play-white.next-page-link:before, .paging-links .dac-play-white.next-class-link:before, .paging-links .dac-play-white.start-class-link:after {
+ background-position: 0px -257px;
+ height: 20px;
+ width: 16px; }
+
+.dac-sprite.dac-rss, .dac-rss.dac-modal-header-close:before, .paging-links .dac-rss.prev-page-link:before, .paging-links .dac-rss.next-page-link:before, .paging-links .dac-rss.next-class-link:before, .paging-links .dac-rss.start-class-link:after {
+ background-position: 0px -41px;
+ height: 14px;
+ width: 14px; }
+
+.dac-sprite.dac-search-white, .dac-search-white.dac-modal-header-close:before, .paging-links .dac-search-white.prev-page-link:before, .paging-links .dac-search-white.next-page-link:before, .paging-links .dac-search-white.next-class-link:before, .paging-links .dac-search-white.start-class-link:after {
+ background-position: 0px -591px;
+ height: 24px;
+ width: 24px; }
+
+.dac-sprite.dac-search, .dac-search.dac-modal-header-close:before, .paging-links .dac-search.prev-page-link:before, .paging-links .dac-search.next-page-link:before, .paging-links .dac-search.next-class-link:before, .paging-links .dac-search.start-class-link:after {
+ background-position: 0px -617px;
+ height: 24px;
+ width: 24px; }
+
+.dac-sprite.dac-star-outline, .dac-star-outline.dac-modal-header-close:before, .paging-links .dac-star-outline.prev-page-link:before, .paging-links .dac-star-outline.next-page-link:before, .paging-links .dac-star-outline.next-class-link:before, .paging-links .dac-star-outline.start-class-link:after {
+ background-position: 0px -643px;
+ height: 24px;
+ width: 24px; }
+
+.dac-sprite.dac-twitter, .dac-twitter.dac-modal-header-close:before, .paging-links .dac-twitter.prev-page-link:before, .paging-links .dac-twitter.next-page-link:before, .paging-links .dac-twitter.next-class-link:before, .paging-links .dac-twitter.start-class-link:after {
+ background-position: 0px -73px;
+ height: 14px;
+ width: 16px; }
+
+.dac-sprite.dac-unfold-less-white, .dac-unfold-less-white.dac-modal-header-close:before, .paging-links .dac-unfold-less-white.prev-page-link:before, .paging-links .dac-unfold-less-white.next-page-link:before, .paging-links .dac-unfold-less-white.next-class-link:before, .paging-links .dac-unfold-less-white.start-class-link:after {
+ background-position: 0px -565px;
+ height: 24px;
+ width: 24px; }
+
+.dac-sprite.dac-unfold-less, .dac-unfold-less.dac-modal-header-close:before, .paging-links .dac-unfold-less.prev-page-link:before, .paging-links .dac-unfold-less.next-page-link:before, .paging-links .dac-unfold-less.next-class-link:before, .paging-links .dac-unfold-less.start-class-link:after {
+ background-position: 0px -487px;
+ height: 24px;
+ width: 24px; }
+
+.dac-sprite.dac-unfold-more-white, .dac-unfold-more-white.dac-modal-header-close:before, .paging-links .dac-unfold-more-white.prev-page-link:before, .paging-links .dac-unfold-more-white.next-page-link:before, .paging-links .dac-unfold-more-white.next-class-link:before, .paging-links .dac-unfold-more-white.start-class-link:after {
+ background-position: 0px -305px;
+ height: 24px;
+ width: 24px; }
+
+.dac-sprite.dac-unfold-more, .dac-unfold-more.dac-modal-header-close:before, .paging-links .dac-unfold-more.prev-page-link:before, .paging-links .dac-unfold-more.next-page-link:before, .paging-links .dac-unfold-more.next-class-link:before, .paging-links .dac-unfold-more.start-class-link:after {
+ background-position: 0px -539px;
+ height: 24px;
+ width: 24px; }
+
+.dac-sprite.dac-youtube, .dac-youtube.dac-modal-header-close:before, .paging-links .dac-youtube.prev-page-link:before, .paging-links .dac-youtube.next-page-link:before, .paging-links .dac-youtube.next-class-link:before, .paging-links .dac-youtube.start-class-link:after {
+ background-position: 0px -57px;
+ height: 14px;
+ width: 18px; }
+
+/* Toast Component */
+.dac-toast {
+ background: #ffebc3;
+ border-top: 1px solid #e5d4a1;
+ display: none;
+ color: rgba(0, 0, 0, 0.87);
+ line-height: 1.4;
+ padding: 10px; }
+ .dac-toast.dac-visible {
+ display: block; }
+ .dac-toast-wrap {
+ box-sizing: border-box;
+ margin: 0 auto;
+ max-width: 940px;
+ padding-right: 20px;
+ position: relative; }
+ .dac-toast-close-btn {
+ background-color: transparent;
+ border: none;
+ border-radius: 0;
+ cursor: pointer;
+ opacity: .4;
+ padding: 0;
+ position: absolute;
+ right: 0;
+ top: 1px; }
+ .dac-toast-close-btn:hover, .dac-toast-close-btn:focus, .dac-toast-close-btn:active {
+ outline: none;
+ opacity: 1; }
+ .dac-toast-group {
+ bottom: 0;
+ left: 0;
+ position: fixed;
+ right: 0;
+ z-index: 60; }
+ .dac-toast.dac-danger {
+ background-color: #ffccbc;
+ border-top-color: #e5b7a9; }
+ .dac-toast.dac-success {
+ background-color: #cdedc8;
+ border-top-color: #c6d5b4; }
+
+.dac-tab-item {
+ box-sizing: border-box;
+ cursor: pointer;
+ display: table-cell;
+ margin: 0;
+ padding: 8px 12px;
+ position: relative;
+ text-align: left; }
+ @media (max-width: 719px) {
+ .dac-tab-item {
+ padding-right: 12px;
+ text-align: center;
+ width: 33.33333333%; } }
+
+.dac-tab-title {
+ color: #333;
+ display: inline-block;
+ font-size: 16px;
+ font-weight: 500;
+ margin: 0; }
+
+.dac-tab-arrow {
+ margin-top: -2px; }
+ @media (max-width: 719px) {
+ .dac-tab-arrow {
+ position: absolute;
+ visibility: hidden; } }
+
+.dac-tab-bar {
+ display: inline-block;
+ list-style-type: none;
+ margin: 0 0 0 12px;
+ vertical-align: middle;
+ overflow: hidden; }
+ @media (max-width: 719px) {
+ .dac-tab-bar {
+ display: table;
+ margin-left: 0;
+ width: 100%; } }
+
+.dac-tab-views {
+ list-style-type: none;
+ margin: 0; }
+
+.dac-tab-view {
+ background: #fff;
+ display: none;
+ overflow: hidden;
+ margin: 0 0 10px;
+ padding: 20px 10px 0;
+ text-align: left; }
+
+.dac-tab-item.dac-active {
+ background: #fff; }
+
+.dac-tab-item.dac-active .dac-tab-arrow {
+ -webkit-transform: scaleY(-1);
+ -ms-transform: scaleY(-1);
+ transform: scaleY(-1); }
+
+.dac-tab-view.dac-active {
+ display: block; }
+
+.dac-toggle-expand {
+ cursor: pointer;
+ display: inline-block; }
+
+.dac-toggle-collapse {
+ cursor: pointer;
+ display: none; }
+
+.dac-toggle.is-expanded .dac-toggle-expand {
+ display: none; }
+
+.dac-toggle.is-expanded .dac-toggle-collapse {
+ display: inline-block; }
+
+.dac-toggle-content {
+ clear: left;
+ overflow: hidden;
+ max-height: 0;
+ -webkit-transition: .3s max-height;
+ transition: .3s max-height; }
+
+.dac-toggle.is-expanded .dac-toggle-content {
+ max-height: none; }
+
+.dac-toggle.dac-mobile .dac-toggle-content {
+ max-height: none; }
+
+@media (max-width: 719px) {
+ .dac-toggle.dac-mobile .dac-toggle-content {
+ max-height: 0; }
+ .dac-toggle.is-expanded .dac-toggle-content {
+ max-height: none; } }
+
+/**
+ * Fades out an element.
+ * Applies visibility hidden when the transition is finished.
+ *
+ * Use opacity: 1; to show the element.
+ */
+.dac-visible-mobile-block, .dac-mobile-only,
+.dac-visible-mobile-inline,
+.dac-visible-mobile-inline-block,
+.dac-visible-tablet-block,
+.dac-visible-tablet-inline,
+.dac-visible-tablet-inline-block,
+.dac-visible-desktop-block,
+.dac-visible-desktop-inline,
+.dac-visible-desktop-inline-block {
+ display: none !important; }
+
+@media (max-width: 719px) {
+ .dac-hidden-mobile {
+ display: none !important; }
+ .dac-visible-mobile-block, .dac-mobile-only {
+ display: block !important; }
+ .dac-visible-mobile-inline {
+ display: inline !important; }
+ .dac-visible-mobile-inline-block {
+ display: inline-block !important; } }
+
+@media (min-width: 720px) and (max-width: 979px) {
+ .dac-hidden-tablet {
+ display: none !important; }
+ .dac-visible-tablet-block {
+ display: block !important; }
+ .dac-visible-tablet-inline {
+ display: inline !important; }
+ .dac-visible-tablet-inline-block {
+ display: inline-block !important; } }
+
+@media (min-width: 980px) {
+ .dac-hidden-desktop {
+ display: none !important; }
+ .dac-visible-desktop-block {
+ display: block !important; }
+ .dac-visible-desktop-inline {
+ display: inline !important; }
+ .dac-visible-desktop-inline-block {
+ display: inline-block !important; } }
+
+.dac-offset-parent {
+ position: relative !important; }
+
+/**
+ * Hide from browsers/screenreaders on all sizes.
+ */
+.dac-hidden {
+ display: none !important; }
+
+/**
+ * Break strings when their length exceeds the width of their container.
+ */
+.dac-text-break {
+ word-wrap: break-word !important; }
+
+/**
+ * Horizontal text alignment
+ */
+.dac-text-center {
+ text-align: center !important; }
+
+.dac-text-left {
+ text-align: left !important; }
+
+.dac-text-right {
+ text-align: right !important; }
+
+/**
+ * Prevent whitespace wrapping
+ */
+.dac-text-no-wrap {
+ white-space: nowrap !important; }
+
+/**
+ * Prevent text from wrapping onto multiple lines, instead truncate with an ellipsis.
+ */
+.dac-text-truncate {
+ max-width: 100%;
+ overflow: hidden !important;
+ text-overflow: ellipsis !important;
+ white-space: nowrap !important;
+ word-wrap: normal !important; }
+
+/**
+ * Floats
+ */
+.dac-float-left {
+ float: left !important; }
+
+.dac-float-right {
+ float: right !important; }
+
+/**
+ * New block formatting context
+ *
+ * This affords some useful properties to the element. It won't wrap under
+ * floats. Will also contain any floated children.
+ * N.B. This will clip overflow. Use the alternative method below if this is
+ * problematic.
+ */
+.dac-nbfc {
+ overflow: hidden !important;
+}
+
+/**
+ * New block formatting context (alternative)
+ *
+ * Alternative method when overflow must not be clipped.
+ *
+ * N.B. This breaks down in some browsers when elements within this element
+ * exceed its width.
+ */
+.dac-nbfc-alt {
+ display: table-cell !important;
+ width: 10000px !important;
+}
+
+.Video {
+ display: none;
+}
+
+.Video-overlay {
+ background-color: rgba(0, 0, 0, 0.8);
+ width: 100%;
+ height: 100%;
+ position: fixed;
+ top: 0;
+ left: 0;
+ z-index: 9999;
+}
+
+.Video-container {
+ width: 90vw;
+ height: 50.625vw;
+ max-height: calc(90vh - 29.25px);
+ max-width: calc(160vh - 52px);
+ margin: auto;
+ position: fixed;
+ top: -52px;
+ right: 0;
+ bottom: 0;
+ left: 0;
+ z-index: 9999;
+}
+
+@media (min-width: 1422.22222222px) and (min-height: 800px) {
+ .Video-container {
+ width: 1280px;
+ height: 720px;
+ }
+}
+
+.Video-controls {
+ background: #28655F;
+ height: 52px;
+ margin: 0 auto;
+ position: relative;
+ box-shadow: 2px 3px 12px 0px rgba(0, 0, 0, 0.4);
+}
+
+.Video-frame {
+ position: relative;
+ height: 100%;
+ background: black;
+ box-shadow: 2px 3px 12px 0px rgba(0, 0, 0, 0.4);
+}
+
+.Video-loading {
+ color: rgba(255, 255, 255, 0.35);
+ font-size: 16px;
+ position: absolute;
+ top: 50%;
+ left: 50%;
+ -webkit-transform: translate(-50%, -50%);
+ -ms-transform: translate(-50%, -50%);
+ transform: translate(-50%, -50%);
+}
+
+#youTubePlayer {
+ max-height: 720px;
+ position: absolute;
+ top: 0;
+ right: 0;
+ bottom: 0;
+ left: 0;
+ width: 100%;
+ height: 100%;
+}
+
+.Video-button {
+ background-color: transparent;
+ border: none;
+ display: inline-block;
+ height: 100%;
+ width: 52px;
+ outline: none;
+ cursor: pointer;
+ -webkit-transition: opacity 200ms;
+ transition: opacity 200ms;
+}
+
+.Video-button:hover {
+ opacity: 0.8;
+}
+
+.Video-button--picture-in-picture {
+ background-position: 0px -461px;
+ height: 24px;
+ width: 24px;
+ display: none;
+ position: absolute;
+ right: 64px;
+ top: 14px;
+}
+
+.Video-button--close {
+ background-position: 0px -435px;
+ height: 24px;
+ width: 24px;
+ position: absolute;
+ right: 14px;
+ top: 14px;
+}
+
+@media (min-width: 720px) {
+ .Video--picture-in-picture .Video-overlay {
+ display: none;
+ }
+
+ .Video--picture-in-picture .Video-container {
+ top: auto;
+ left: auto;
+ bottom: 20px;
+ right: 20px;
+ width: 40%;
+ max-width: 420px;
+ height: auto;
+ }
+
+ .Video--picture-in-picture .Video-button--picture-in-picture {
+ background-position: 0px -409px;
+ height: 24px;
+ width: 24px;
+ }
+
+ .Video--picture-in-picture .Video-frame {
+ padding-bottom: 56.25%;
+ }
+
+ .Video-button--picture-in-picture {
+ display: inline-block;
+ }
+}
+
+a.video-shadowbox-button.white {
+ padding: 16px 42px 16px 8px;
+ font-size: 18px;
+ font-weight: 500;
+ line-height: 24px;
+ color: #fff;
+ text-decoration: none;
+}
+
+a.video-shadowbox-button.white::after {
+ content: '';
+ background-position: 0px -847px;
+ height: 36px;
+ width: 36px;
+}
+
+a.video-shadowbox-button.white:hover {
+ color: #bababa !important;
+}
+
+a.video-shadowbox-button.white:hover::after {
+ background-position: 0px -733px;
+ height: 36px;
+ width: 36px;
+}
+
+#video-frame, #video-container {
+ display: none;
+}
+
+@media (max-width: 720px) {
+ .wide-table {
+ overflow-x: auto;
+ }
+
+ .wide-table table {
+ display: inline-table;
+ margin-right: 0;
+ }
+}
+
+/* New CSS that isn't part of a component */
+.paging-links {
+ box-shadow: 0px 2px 6px 0px rgba(0, 0, 0, 0.2);
+ margin: 30px 0;
+ padding: 0 40px;
+ /* Start class link doesn't have a caption */ }
+
+.paging-links .start-class-link, .paging-links .next-class-link, .paging-links .prev-page-link, .paging-links .next-page-link {
+ font-size: 20px;
+ font-weight: 500;
+ display: inline-block;
+ width: calc(50% - 2px);
+ position: relative;
+ padding: 46px 0 36px 0;
+}
+
+@media (max-width: 719px) {
+ .paging-links .start-class-link, .paging-links .next-class-link, .paging-links .prev-page-link, .paging-links .next-page-link {
+ width: 100%;
+ }
+}
+
+.paging-links .start-class-link {
+ padding: 36px 0;
+}
+
+.paging-links .start-class-link, .paging-links .next-class-link {
+ text-align: center;
+ width: 100%;
+}
+
+.paging-links .prev-page-link .page-link-caption {
+ left: 0;
+}
+
+.paging-links .prev-page-link:before {
+ content: '';
+ left: -24px;
+ position: absolute;
+ bottom: 41px;
+}
+
+@media (max-width: 719px) {
+ .paging-links .prev-page-link {
+ display: none;
+ }
+}
+
+.paging-links .next-page-link, .paging-links .next-class-link {
+ text-align: right;
+}
+
+.paging-links .next-page-link .page-link-caption, .paging-links .next-class-link .page-link-caption {
+ right: 0;
+}
+
+.paging-links .next-page-link:before, .paging-links .next-class-link:before {
+ content: '';
+ right: -24px;
+ position: absolute;
+ bottom: 41px;
+}
+
+.paging-links .start-class-link:after {
+ content: '';
+ right: -12px;
+ position: relative;
+ bottom: 3px;
+}
+
+.paging-links .page-link-caption {
+ position: absolute;
+ top: 26px;
+ font-size: 14px;
+ font-weight: 700;
+ opacity: 0.54;
+}
+
+#tb li:before,
+#qv li:before {
+ background-position: 0px -669px;
+ height: 24px;
+ width: 24px;
+ content: '';
+ left: -8px;
+ opacity: .7;
+ position: absolute;
+ top: -4px;
+}
+
+/** CSS Fixes for DevSite (akassay@) */
+.dac-button-social,
+.dac-fab:not('.dac-scroll-button') {
+ position: relative;
+}
+
+.dac-button-social .dac-sprite,
+.dac-fab .dac-sprite,
+.play-button .dac-sprite {
+ margin-top: -7px;
+ position: relative;
+ top: 50%;
+}
+
+.dac-fab .dac-sprite.dac-arrow-down-gray {
+ margin-top: -3px;
+}
+
+.dac-button-social .dac-sprite.dac-gplus {
+ margin-top: -17px;
+}
+
+.play-button .dac-sprite {
+ margin-top: -10px;
+}
+
+.dac-nav-link-forward {
+ padding: 9px 0;
+}
diff --git a/tools/droiddoc/templates-sdk-dev/assets/css/fullscreen.css b/tools/droiddoc/templates-sdk-dev/assets/css/fullscreen.css
index 7912e34..0f108e0 100644
--- a/tools/droiddoc/templates-sdk-dev/assets/css/fullscreen.css
+++ b/tools/droiddoc/templates-sdk-dev/assets/css/fullscreen.css
@@ -14,195 +14,7 @@
*/
@media screen, projection, print {
-.full {
- padding: 2.5em 0;
- border-top: solid 1px #ddd;
- border-bottom: solid 1px #ddd;
- background: #f7f7f7;
+ .wrap {
+ max-width: none;
+ }
}
-.wrap {
- margin: 0 auto;
- width: 100%;
- min-width:600px;
- clear: both;
-}
-.cols {
- height: 1%;
- margin: 0 -1.533742331288343558282%;
- width: 103.06748466257669%}
-*+html .cols {
- margin-bottom: 20px;
-}
-.cols:after {
- clear: both;
- content: ' ';
- display: block;
- height: 0;
- visibility: hidden;
-}
-.col-1, .col-2, .col-3, .col-4, .col-5, .col-6, .col-7, .col-8, .col-9, .col-10, .col-11, .col-12,
-.col-13, .col-14, .col-15, .col-16 {
- float: left;
- margin: 0 1.063829787234% 20px 1.063829787234%;
-}
-* html .col-1, * html .col-2, * html .col-3, * html .col-4, * html .col-5, * html .col-6, * html
-.col-7, * html .col-8, * html .col-9, * html .col-10, * html .col-11, * html .col-12, * html
-.col-13, * html .col-14, * html .col-15, * html .col-16 {
- margin: 0;
- margin: 0 1.063829787234% 20px 1.063829787234%;
-}
-[dir='rtl'] .col-1, [dir='rtl'] .col-2, [dir='rtl'] .col-3, [dir='rtl'] .col-4, [dir='rtl'] .col-5,
-[dir='rtl'] .col-6, [dir='rtl'] .col-7, [dir='rtl'] .col-8, [dir='rtl'] .col-9, [dir='rtl'] .col-10,
-[dir='rtl'] .col-11, [dir='rtl'] .col-12 {
- float: right;
-}
-.col-1 {
- width: 4.16666666666667%;
-}
-.col-2 {
- width: 10.4166666666667%;
-}
-.col-3 {
- width: 16.6666666666667%;
-}
-.col-4 {
- width: 22.9166666666667%;
-}
-.col-5 {
- width: 29.1666666666667%;
-}
-.col-6 {
- width: 35.4166666666667%;
-}
-.col-7 {
- width: 41.6666666666667%;
-}
-.col-8 {
- width: 47.9166666666667%;
-}
-.col-9 {
- width: 55.3333333333333%;
-}
-.col-10 {
- width: 60.4166666666667%;
-}
-.col-11 {
- width: 66.6666666666667%;
-}
-.col-12 {
- width: 72.9166666666667%;
-}
-.col-13 {
- width: 79.1666666666667%;
-}
-.col-14 {
- width: 85.4166666666667%;
-}
-.col-15 {
- width: 91.6666666666667%;
-}
-.col-16 {
- width: 97.9166666666667%;
-}
-
-
-
-
-
-
-
-#header .col-1,
-#nav-x .col-1 { width: 40px }
-#header .col-2,
-#nav-x .col-2 { width: 100px }
-#header .col-3,
-#nav-x .col-3 { width: 160px }
-#header .col-4,
-#nav-x .col-4 { width: 220px }
-#header .col-5,
-#nav-x .col-5 { width: 280px }
-#header .col-6,
-#nav-x .col-6 { width: 340px }
-#header .col-7,
-#nav-x .col-7 { width: 400px }
-#header .col-8,
-#nav-x .col-8 { width: 460px }
-#header .col-9,
-#nav-x .col-9 { width: 520px }
-#header .col-10,
-#nav-x .col-10 { width: 580px }
-#header .col-11,
-#nav-x .col-11 { width: 640px }
-#header .col-12,
-#nav-x .col-12 { width: 700px }
-#header .col-13,
-#nav-x .col-13 { width: 760px }
-#header .col-14,
-#nav-x .col-14 { width: 820px }
-#header .col-15,
-#nav-x .col-15 { width: 880px }
-#header .col-16,
-#nav-x .col-16 { width: 940px }
-
-
-
-body {
- padding:0 20px;
-}
-#header,
-#searchResults,
-#nav-x {
- margin:0;
-}
-#body-content {
- margin:0;
-}
-#body-content > .col-12 {
- width:77.9804965%;
- margin:0 0 0 0.97%; /* this percentage chosen to make IE9 happy */
-}
-#side-nav {
- width: 19.9804965%;
- margin:0 1.063829787234% 0 0;
-}
-
-#header .wrap {
- max-width: 100%;
-}
-
-#header-wrapper #nav-x div.wrap,
-#searchResults.wrap {
- max-width:100%;
-}
-
-.nav-x {
- margin:-2px 0 0 0;
-}
-
-#devdoc-nav.fixed,
-#devdoc-nav.fixed a.totop {
- left:20px; /* !important ... for IE i think */
-}
-
-#sticky-header {
- padding: 0 20px;
-}
-
-#sticky-header > div {
- width: 100%;
-}
-
-.sticky-menu {
- width:100%;
- left:-20px;
-}
-
-.col-right {
- margin-right:0px;
-}
-
-@media screen and (max-width:772px) {
-.col-5, .col-6, .col-7 {
- clear: both;
- width: 97.0238096%}
-}
\ No newline at end of file
diff --git a/tools/droiddoc/templates-sdk-dev/assets/images/android_logo.png b/tools/droiddoc/templates-sdk-dev/assets/images/android_logo.png
new file mode 100644
index 0000000..53f59c6
--- /dev/null
+++ b/tools/droiddoc/templates-sdk-dev/assets/images/android_logo.png
Binary files differ
diff --git a/tools/droiddoc/templates-sdk-dev/assets/images/android_logo@2x.png b/tools/droiddoc/templates-sdk-dev/assets/images/android_logo@2x.png
new file mode 100644
index 0000000..85b9211
--- /dev/null
+++ b/tools/droiddoc/templates-sdk-dev/assets/images/android_logo@2x.png
Binary files differ
diff --git a/tools/droiddoc/templates-sdk-dev/assets/images/android_logo_ndk.png b/tools/droiddoc/templates-sdk-dev/assets/images/android_logo_ndk.png
new file mode 100644
index 0000000..3f39f4d
--- /dev/null
+++ b/tools/droiddoc/templates-sdk-dev/assets/images/android_logo_ndk.png
Binary files differ
diff --git a/tools/droiddoc/templates-sdk-dev/assets/images/android_logo_ndk@2x.png b/tools/droiddoc/templates-sdk-dev/assets/images/android_logo_ndk@2x.png
new file mode 100644
index 0000000..8081ac5
--- /dev/null
+++ b/tools/droiddoc/templates-sdk-dev/assets/images/android_logo_ndk@2x.png
Binary files differ
diff --git a/tools/droiddoc/templates-sdk-dev/assets/images/home/android_m_hero_1200.jpg b/tools/droiddoc/templates-sdk-dev/assets/images/home/android_m_hero_1200.jpg
new file mode 100644
index 0000000..6b79295
--- /dev/null
+++ b/tools/droiddoc/templates-sdk-dev/assets/images/home/android_m_hero_1200.jpg
Binary files differ
diff --git a/tools/droiddoc/templates-sdk-dev/assets/images/play-circle-grey.png b/tools/droiddoc/templates-sdk-dev/assets/images/play-circle-grey.png
deleted file mode 100644
index 5e7e7ba..0000000
--- a/tools/droiddoc/templates-sdk-dev/assets/images/play-circle-grey.png
+++ /dev/null
Binary files differ
diff --git a/tools/droiddoc/templates-sdk-dev/assets/images/play-circle-grey_2x.png b/tools/droiddoc/templates-sdk-dev/assets/images/play-circle-grey_2x.png
deleted file mode 100644
index 3e01635..0000000
--- a/tools/droiddoc/templates-sdk-dev/assets/images/play-circle-grey_2x.png
+++ /dev/null
Binary files differ
diff --git a/tools/droiddoc/templates-sdk-dev/assets/images/play-circle-white.png b/tools/droiddoc/templates-sdk-dev/assets/images/play-circle-white.png
deleted file mode 100644
index 017d846..0000000
--- a/tools/droiddoc/templates-sdk-dev/assets/images/play-circle-white.png
+++ /dev/null
Binary files differ
diff --git a/tools/droiddoc/templates-sdk-dev/assets/images/play-circle-white_2x.png b/tools/droiddoc/templates-sdk-dev/assets/images/play-circle-white_2x.png
deleted file mode 100644
index e48c1fd..0000000
--- a/tools/droiddoc/templates-sdk-dev/assets/images/play-circle-white_2x.png
+++ /dev/null
Binary files differ
diff --git a/tools/droiddoc/templates-sdk-dev/assets/images/resource-card-default-android.jpg b/tools/droiddoc/templates-sdk-dev/assets/images/resource-card-default-android.jpg
index 8050744..398030f 100644
--- a/tools/droiddoc/templates-sdk-dev/assets/images/resource-card-default-android.jpg
+++ b/tools/droiddoc/templates-sdk-dev/assets/images/resource-card-default-android.jpg
Binary files differ
diff --git a/tools/droiddoc/templates-sdk-dev/assets/images/sprite-2x.png b/tools/droiddoc/templates-sdk-dev/assets/images/sprite-2x.png
new file mode 100644
index 0000000..185b7e8
--- /dev/null
+++ b/tools/droiddoc/templates-sdk-dev/assets/images/sprite-2x.png
Binary files differ
diff --git a/tools/droiddoc/templates-sdk-dev/assets/images/sprite.png b/tools/droiddoc/templates-sdk-dev/assets/images/sprite.png
new file mode 100644
index 0000000..562b23c
--- /dev/null
+++ b/tools/droiddoc/templates-sdk-dev/assets/images/sprite.png
Binary files differ
diff --git a/tools/droiddoc/templates-sdk-dev/assets/images/sprite@2x.png b/tools/droiddoc/templates-sdk-dev/assets/images/sprite@2x.png
new file mode 100644
index 0000000..2019e02
--- /dev/null
+++ b/tools/droiddoc/templates-sdk-dev/assets/images/sprite@2x.png
Binary files differ
diff --git a/tools/droiddoc/templates-sdk-dev/assets/images/styles/notice-designers-material.png b/tools/droiddoc/templates-sdk-dev/assets/images/styles/notice-designers-material.png
deleted file mode 100644
index 1fb22a2..0000000
--- a/tools/droiddoc/templates-sdk-dev/assets/images/styles/notice-designers-material.png
+++ /dev/null
Binary files differ
diff --git a/tools/droiddoc/templates-sdk-dev/assets/images/styles/notice-designers-material@2x.png b/tools/droiddoc/templates-sdk-dev/assets/images/styles/notice-designers-material@2x.png
deleted file mode 100644
index bc2f74b..0000000
--- a/tools/droiddoc/templates-sdk-dev/assets/images/styles/notice-designers-material@2x.png
+++ /dev/null
Binary files differ
diff --git a/tools/droiddoc/templates-sdk-dev/assets/js/android_3p-bundle.js b/tools/droiddoc/templates-sdk-dev/assets/js/android_3p-bundle.js
index a67b5b0..70d6c2f 100644
--- a/tools/droiddoc/templates-sdk-dev/assets/js/android_3p-bundle.js
+++ b/tools/droiddoc/templates-sdk-dev/assets/js/android_3p-bundle.js
@@ -2763,4 +2763,10 @@
* https://github.com/jquery/jquery-ui
* Includes: jquery.effects.transfer.js
* Copyright (c) 2012 AUTHORS.txt; Licensed MIT, GPL */
-(function(a,b){a.effects.transfer=function(b){return this.queue(function(){var c=a(this),d=a(b.options.to),e=d.offset(),f={top:e.top,left:e.left,height:d.innerHeight(),width:d.innerWidth()},g=c.offset(),h=a('<div class="ui-effects-transfer"></div>').appendTo(document.body).addClass(b.options.className).css({top:g.top,left:g.left,height:c.innerHeight(),width:c.innerWidth(),position:"absolute"}).animate(f,b.duration,b.options.easing,function(){h.remove(),b.callback&&b.callback.apply(c[0],arguments),c.dequeue()})})}})(jQuery);;
\ No newline at end of file
+(function(a,b){a.effects.transfer=function(b){return this.queue(function(){var c=a(this),d=a(b.options.to),e=d.offset(),f={top:e.top,left:e.left,height:d.innerHeight(),width:d.innerWidth()},g=c.offset(),h=a('<div class="ui-effects-transfer"></div>').appendTo(document.body).addClass(b.options.className).css({top:g.top,left:g.left,height:c.innerHeight(),width:c.innerWidth(),position:"absolute"}).animate(f,b.duration,b.options.easing,function(){h.remove(),b.callback&&b.callback.apply(c[0],arguments),c.dequeue()})})}})(jQuery);;
+/*! (c) 2012 Airbnb, Inc.
+*
+* polyglot.js 0.4.3 may be freely distributed under the terms of the BSD
+* license. For all licensing information, details, and documention:
+* http://airbnb.github.com/polyglot.js */
+(function(e,t){typeof define=="function"&&define.amd?define([],function(){return t(e)}):typeof exports=="object"?module.exports=t(e):e.Polyglot=t(e)})(this,function(e){"use strict";function t(e){e=e||{},this.phrases={},this.extend(e.phrases||{}),this.currentLocale=e.locale||"en",this.allowMissing=!!e.allowMissing,this.warn=e.warn||c}function s(e){var t,n,r,i={};for(t in e)if(e.hasOwnProperty(t)){n=e[t];for(r in n)i[n[r]]=t}return i}function o(e){var t=/^\s+|\s+$/g;return e.replace(t,"")}function u(e,t,r){var i,s,u;return r!=null&&e?(s=e.split(n),u=s[f(t,r)]||s[0],i=o(u)):i=e,i}function a(e){var t=s(i);return t[e]||t.en}function f(e,t){return r[a(e)](t)}function l(e,t){for(var n in t)n!=="_"&&t.hasOwnProperty(n)&&(e=e.replace(new RegExp("%\\{"+n+"\\}","g"),t[n]));return e}function c(t){e.console&&e.console.warn&&e.console.warn("WARNING: "+t)}function h(e){var t={};for(var n in e)t[n]=e[n];return t}t.VERSION="0.4.3",t.prototype.locale=function(e){return e&&(this.currentLocale=e),this.currentLocale},t.prototype.extend=function(e,t){var n;for(var r in e)e.hasOwnProperty(r)&&(n=e[r],t&&(r=t+"."+r),typeof n=="object"?this.extend(n,r):this.phrases[r]=n)},t.prototype.clear=function(){this.phrases={}},t.prototype.replace=function(e){this.clear(),this.extend(e)},t.prototype.t=function(e,t){var n,r;return t=t==null?{}:t,typeof t=="number"&&(t={smart_count:t}),typeof this.phrases[e]=="string"?n=this.phrases[e]:typeof t._=="string"?n=t._:this.allowMissing?n=e:(this.warn('Missing translation for key: "'+e+'"'),r=e),typeof n=="string"&&(t=h(t),r=u(n,this.currentLocale,t.smart_count),r=l(r,t)),r},t.prototype.has=function(e){return e in this.phrases};var n="||||",r={chinese:function(e){return 0},german:function(e){return e!==1?1:0},french:function(e){return e>1?1:0},russian:function(e){return e%10===1&&e%100!==11?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2},czech:function(e){return e===1?0:e>=2&&e<=4?1:2},polish:function(e){return e===1?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2},icelandic:function(e){return e%10!==1||e%100===11?1:0}},i={chinese:["fa","id","ja","ko","lo","ms","th","tr","zh"],german:["da","de","en","es","fi","el","he","hu","it","nl","no","pt","sv"],french:["fr","tl","pt-br"],russian:["hr","ru"],czech:["cs"],polish:["pl"],icelandic:["is"]};return t});
diff --git a/tools/droiddoc/templates-sdk-dev/assets/js/docs.js b/tools/droiddoc/templates-sdk-dev/assets/js/docs.js
index 7f4be4e..9afed71 100644
--- a/tools/droiddoc/templates-sdk-dev/assets/js/docs.js
+++ b/tools/droiddoc/templates-sdk-dev/assets/js/docs.js
@@ -1,16 +1,9 @@
-var classesNav;
-var devdocNav;
-var sidenav;
var cookie_namespace = 'android_developer';
-var NAV_PREF_TREE = "tree";
-var NAV_PREF_PANELS = "panels";
-var nav_pref;
var isMobile = false; // true if mobile, so we can adjust some layout
var mPagePath; // initialized in ready() function
var basePath = getBaseUri(location.pathname);
-var SITE_ROOT = toRoot + basePath.substring(1,basePath.indexOf("/",1));
-var GOOGLE_DATA; // combined data for google service apis, used for search suggest
+var SITE_ROOT = toRoot + basePath.substring(1, basePath.indexOf("/", 1));
// Ensure that all ajax getScript() requests allow caching
$.ajaxSetup({
@@ -21,133 +14,12 @@
$(document).ready(function() {
- // show lang dialog if the URL includes /intl/
- //if (location.pathname.substring(0,6) == "/intl/") {
- // var lang = location.pathname.split('/')[2];
- // if (lang != getLangPref()) {
- // $("#langMessage a.yes").attr("onclick","changeLangPref('" + lang
- // + "', true); $('#langMessage').hide(); return false;");
- // $("#langMessage .lang." + lang).show();
- // $("#langMessage").show();
- // }
- //}
-
- // load json file for JD doc search suggestions
- $.getScript(toRoot + 'jd_lists_unified.js');
- // load json file for Android API search suggestions
- $.getScript(toRoot + 'reference/lists.js');
- // load json files for Google services API suggestions
- $.getScript(toRoot + 'reference/gcm_lists.js', function(data, textStatus, jqxhr) {
- // once the GCM json (GCM_DATA) is loaded, load the GMS json (GMS_DATA) and merge the data
- if(jqxhr.status === 200) {
- $.getScript(toRoot + 'reference/gms_lists.js', function(data, textStatus, jqxhr) {
- if(jqxhr.status === 200) {
- // combine GCM and GMS data
- GOOGLE_DATA = GMS_DATA;
- var start = GOOGLE_DATA.length;
- for (var i=0; i<GCM_DATA.length; i++) {
- GOOGLE_DATA.push({id:start+i, label:GCM_DATA[i].label,
- link:GCM_DATA[i].link, type:GCM_DATA[i].type});
- }
- }
- });
- }
- });
-
- // setup keyboard listener for search shortcut
- $('body').keyup(function(event) {
- if (event.which == 191) {
- $('#search_autocomplete').focus();
- }
- });
-
- // init the fullscreen toggle click event
- $('#nav-swap .fullscreen').click(function(){
- if ($(this).hasClass('disabled')) {
- toggleFullscreen(true);
- } else {
- toggleFullscreen(false);
- }
- });
-
- // initialize the divs with custom scrollbars
- $('.scroll-pane').jScrollPane( {verticalGutter:0} );
-
- // add HRs below all H2s (except for a few other h2 variants)
- $('h2').not('#qv h2')
- .not('#tb h2')
- .not('.sidebox h2')
- .not('#devdoc-nav h2')
- .not('h2.norule').css({marginBottom:0})
- .after('<hr/>');
-
- // set up the search close button
- $('.search .close').click(function() {
- $searchInput = $('#search_autocomplete');
- $searchInput.attr('value', '');
- $(this).addClass("hide");
- $("#search-container").removeClass('active');
- $("#search_autocomplete").blur();
- search_focus_changed($searchInput.get(), false);
- hideResults();
- });
-
- // Set up quicknav
- var quicknav_open = false;
- $("#btn-quicknav").click(function() {
- if (quicknav_open) {
- $(this).removeClass('active');
- quicknav_open = false;
- collapse();
- } else {
- $(this).addClass('active');
- quicknav_open = true;
- expand();
- }
- })
-
- var expand = function() {
- $('#header-wrap').addClass('quicknav');
- $('#quicknav').stop().show().animate({opacity:'1'});
- }
-
- var collapse = function() {
- $('#quicknav').stop().animate({opacity:'0'}, 100, function() {
- $(this).hide();
- $('#header-wrap').removeClass('quicknav');
- });
- }
-
-
- //Set up search
- $("#search_autocomplete").focus(function() {
- $("#search-container").addClass('active');
- })
- $("#search-container").mouseover(function() {
- $("#search-container").addClass('active');
- $("#search_autocomplete").focus();
- })
- $("#search-container").mouseout(function() {
- if ($("#search_autocomplete").is(":focus")) return;
- if ($("#search_autocomplete").val() == '') {
- setTimeout(function(){
- $("#search-container").removeClass('active');
- $("#search_autocomplete").blur();
- },250);
- }
- })
- $("#search_autocomplete").blur(function() {
- if ($("#search_autocomplete").val() == '') {
- $("#search-container").removeClass('active');
- }
- })
-
-
// prep nav expandos
- var pagePath = document.location.pathname;
+ var pagePath = devsite ?
+ location.href.replace(location.hash, '') : document.location.pathname;
// account for intl docs by removing the intl/*/ path
if (pagePath.indexOf("/intl/") == 0) {
- pagePath = pagePath.substr(pagePath.indexOf("/",6)); // start after intl/ to get last /
+ pagePath = pagePath.substr(pagePath.indexOf("/", 6)); // start after intl/ to get last /
}
if (pagePath.indexOf(SITE_ROOT) == 0) {
@@ -178,82 +50,10 @@
// Otherwise the page path is already an absolute URL
}
- // Highlight the header tabs...
- // highlight Design tab
- if ($("body").hasClass("design")) {
- $("#header li.design a").addClass("selected");
- $("#sticky-header").addClass("design");
-
- // highlight About tabs
- } else if ($("body").hasClass("about")) {
- var rootDir = pagePathOriginal.substring(1,pagePathOriginal.indexOf('/', 1));
- if (rootDir == "about") {
- $("#nav-x li.about a").addClass("selected");
- } else if (rootDir == "wear") {
- $("#nav-x li.wear a").addClass("selected");
- } else if (rootDir == "tv") {
- $("#nav-x li.tv a").addClass("selected");
- } else if (rootDir == "auto") {
- $("#nav-x li.auto a").addClass("selected");
- }
- // highlight Develop tab
- } else if ($("body").hasClass("develop") || $("body").hasClass("google")) {
- $("#header li.develop a").addClass("selected");
- $("#sticky-header").addClass("develop");
- // In Develop docs, also highlight appropriate sub-tab
- var rootDir = pagePathOriginal.substring(1,pagePathOriginal.indexOf('/', 1));
- if (rootDir == "training") {
- $("#nav-x li.training a").addClass("selected");
- } else if (rootDir == "guide") {
- $("#nav-x li.guide a").addClass("selected");
- } else if (rootDir == "reference") {
- // If the root is reference, but page is also part of Google Services, select Google
- if ($("body").hasClass("google")) {
- $("#nav-x li.google a").addClass("selected");
- } else {
- $("#nav-x li.reference a").addClass("selected");
- }
- } else if ((rootDir == "tools") || (rootDir == "sdk")) {
- $("#nav-x li.tools a").addClass("selected");
- } else if ($("body").hasClass("google")) {
- $("#nav-x li.google a").addClass("selected");
- } else if ($("body").hasClass("samples")) {
- $("#nav-x li.samples a").addClass("selected");
- }
-
- // highlight Distribute tab
- } else if ($("body").hasClass("distribute")) {
- $("#header li.distribute a").addClass("selected");
- $("#sticky-header").addClass("distribute");
-
- var baseFrag = pagePathOriginal.indexOf('/', 1) + 1;
- var secondFrag = pagePathOriginal.substring(baseFrag, pagePathOriginal.indexOf('/', baseFrag));
- if (secondFrag == "users") {
- $("#nav-x li.users a").addClass("selected");
- } else if (secondFrag == "engage") {
- $("#nav-x li.engage a").addClass("selected");
- } else if (secondFrag == "monetize") {
- $("#nav-x li.monetize a").addClass("selected");
- } else if (secondFrag == "analyze") {
- $("#nav-x li.analyze a").addClass("selected");
- } else if (secondFrag == "tools") {
- $("#nav-x li.disttools a").addClass("selected");
- } else if (secondFrag == "stories") {
- $("#nav-x li.stories a").addClass("selected");
- } else if (secondFrag == "essentials") {
- $("#nav-x li.essentials a").addClass("selected");
- } else if (secondFrag == "googleplay") {
- $("#nav-x li.googleplay a").addClass("selected");
- }
- } else if ($("body").hasClass("about")) {
- $("#sticky-header").addClass("about");
- }
-
// set global variable so we can highlight the sidenav a bit later (such as for google reference)
// and highlight the sidenav
mPagePath = pagePath;
highlightSidenav();
- buildBreadcrumbs();
// set up prev/next links if they exist
var $selNavLink = $('#nav').find('a[href="' + pagePath + '"]');
@@ -282,8 +82,8 @@
// except if cross boundaries aren't allowed, and we're at the top of a section already
// (and there's another parent)
- if (!crossBoundaries && $parentListItem.hasClass('nav-section')
- && $selListItem.hasClass('nav-section')) {
+ if (!crossBoundaries && $parentListItem.hasClass('nav-section') &&
+ $selListItem.hasClass('nav-section')) {
$prevLink = [];
}
}
@@ -298,7 +98,7 @@
$nextLink = $selListItem.find('ul:eq(0)').find('a:eq(0)');
// if there aren't any children, go to the next section (required for About pages)
- if($nextLink.length == 0) {
+ if ($nextLink.length == 0) {
$nextLink = $selListItem.next('li').find('a');
} else if ($('.topic-start-link').length) {
// as long as there's a child link and there is a "topic start link" (we're on a landing)
@@ -322,7 +122,7 @@
$nextLink = $selListItem.parents('li:eq(1)').next('li.nav-section').find('a:eq(0)');
if ($nextLink.length == 0) {
// if that doesn't work, we're at the end of the list, so disable NEXT link
- $('.next-page-link').attr('href','').addClass("disabled")
+ $('.next-page-link').attr('href', '').addClass("disabled")
.click(function() { return false; });
// and completely hide the one in the footer
$('.content-footer .next-page-link').hide();
@@ -341,22 +141,27 @@
}
} else if (isCrossingBoundary && !$('body.design').length) { // Design always crosses boundaries
$('.content-footer.next-class').show();
- $('.next-page-link').attr('href','')
+ $('.next-page-link').attr('href', '')
.removeClass("hide").addClass("disabled")
.click(function() { return false; });
// and completely hide the one in the footer
$('.content-footer .next-page-link').hide();
+ $('.content-footer .prev-page-link').hide();
+
if ($nextLink.length) {
- $('.next-class-link').attr('href',$nextLink.attr('href'))
- .removeClass("hide")
- .append(": " + $nextLink.html());
+ $('.next-class-link').attr('href', $nextLink.attr('href'))
+ .removeClass("hide");
+
+ $('.content-footer .next-class-link').append($nextLink.html());
+
$('.next-class-link').find('.new').empty();
}
} else {
$('.next-page-link').attr('href', $nextLink.attr('href'))
.removeClass("hide");
- // for the footer link, also add the next page title
- $('.content-footer .next-page-link').append(": " + $nextLink.html());
+ // for the footer link, also add the previous and next page titles
+ $('.content-footer .prev-page-link').append($prevLink.html());
+ $('.content-footer .next-page-link').append($nextLink.html());
}
if (!startClass && $prevLink.length) {
@@ -370,8 +175,6 @@
}
-
-
// Set up the course landing pages for Training with class names and descriptions
if ($('body.trainingcourse').length) {
var $classLinks = $selListItem.find('ul li a').not('#nav .nav-section .nav-section ul a');
@@ -392,14 +195,13 @@
var $olClasses = $('<ol class="class-list"></ol>');
var $liClass;
- var $imgIcon;
var $h2Title;
var $pSummary;
var $olLessons;
var $liLesson;
$classLinks.each(function(index) {
- $liClass = $('<li></li>');
- $h2Title = $('<a class="title" href="'+$(this).attr('href')+'"><h2>' + $(this).html()+'</h2><span></span></a>');
+ $liClass = $('<li class="clearfix"></li>');
+ $h2Title = $('<a class="title" href="' + $(this).attr('href') + '"><h2 class="norule">' + $(this).html() + '</h2><span></span></a>');
$pSummary = $('<p class="description">' + $classDescriptions[index] + '</p>');
$olLessons = $('<ol class="lesson-list"></ol>');
@@ -407,57 +209,24 @@
$lessons = $(this).closest('li').find('ul li a');
if ($lessons.length) {
- $imgIcon = $('<img src="'+toRoot+'assets/images/resource-tutorial.png" '
- + ' width="64" height="64" alt=""/>');
$lessons.each(function(index) {
- $olLessons.append('<li><a href="'+$(this).attr('href')+'">' + $(this).html()+'</a></li>');
+ $olLessons.append('<li><a href="' + $(this).attr('href') + '">' + $(this).html() + '</a></li>');
});
} else {
- $imgIcon = $('<img src="'+toRoot+'assets/images/resource-article.png" '
- + ' width="64" height="64" alt=""/>');
$pSummary.addClass('article');
}
- $liClass.append($h2Title).append($imgIcon).append($pSummary).append($olLessons);
+ $liClass.append($h2Title).append($pSummary).append($olLessons);
$olClasses.append($liClass);
});
- $('.jd-descr').append($olClasses);
+ $('#classes').append($olClasses);
}
// Set up expand/collapse behavior
initExpandableNavItems("#nav");
-
- $(".scroll-pane").scroll(function(event) {
- event.preventDefault();
- return false;
- });
-
- /* Resize nav height when window height changes */
- $(window).resize(function() {
- if ($('#side-nav').length == 0) return;
- var stylesheet = $('link[rel="stylesheet"][class="fullscreen"]');
- setNavBarLeftPos(); // do this even if sidenav isn't fixed because it could become fixed
- // make sidenav behave when resizing the window and side-scolling is a concern
- if (sticky) {
- if ((stylesheet.attr("disabled") == "disabled") || stylesheet.length == 0) {
- updateSideNavPosition();
- } else {
- updateSidenavFullscreenWidth();
- }
- }
- resizeNav();
- });
-
-
- var navBarLeftPos;
- if ($('#devdoc-nav').length) {
- setNavBarLeftPos();
- }
-
-
// Set up play-on-hover <video> tags.
- $('video.play-on-hover').bind('click', function(){
+ $('video.play-on-hover').bind('click', function() {
$(this).get(0).load(); // in case the video isn't seekable
$(this).get(0).play();
});
@@ -495,234 +264,41 @@
$('h2').click(function() {
var id = $(this).attr('id');
if (id) {
- document.location.hash = id;
+ if (history && history.replaceState) {
+ // Change url without scrolling.
+ history.replaceState({}, '', '#' + id);
+ } else {
+ document.location.hash = id;
+ }
}
});
//Loads the +1 button
- var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
- po.src = 'https://apis.google.com/js/plusone.js';
- var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
-
-
- // Revise the sidenav widths to make room for the scrollbar
- // which avoids the visible width from changing each time the bar appears
- var $sidenav = $("#side-nav");
- var sidenav_width = parseInt($sidenav.innerWidth());
-
- $("#devdoc-nav #nav").css("width", sidenav_width - 4 + "px"); // 4px is scrollbar width
-
-
- $(".scroll-pane").removeAttr("tabindex"); // get rid of tabindex added by jscroller
-
- if ($(".scroll-pane").length > 1) {
- // Check if there's a user preference for the panel heights
- var cookieHeight = readCookie("reference_height");
- if (cookieHeight) {
- restoreHeight(cookieHeight);
- }
- }
-
- // Resize once loading is finished
- resizeNav();
- // Check if there's an anchor that we need to scroll into view.
- // A delay is needed, because some browsers do not immediately scroll down to the anchor
- window.setTimeout(offsetScrollForSticky, 100);
-
- /* init the language selector based on user cookie for lang */
- loadLangPref();
- changeNavLang(getLangPref());
-
- /* setup event handlers to ensure the overflow menu is visible while picking lang */
- $("#language select")
- .mousedown(function() {
- $("div.morehover").addClass("hover"); })
- .blur(function() {
- $("div.morehover").removeClass("hover"); });
-
- /* some global variable setup */
- resizePackagesNav = $("#resize-packages-nav");
- classesNav = $("#classes-nav");
- devdocNav = $("#devdoc-nav");
-
- var cookiePath = "";
- if (location.href.indexOf("/reference/") != -1) {
- cookiePath = "reference_";
- } else if (location.href.indexOf("/guide/") != -1) {
- cookiePath = "guide_";
- } else if (location.href.indexOf("/tools/") != -1) {
- cookiePath = "tools_";
- } else if (location.href.indexOf("/training/") != -1) {
- cookiePath = "training_";
- } else if (location.href.indexOf("/design/") != -1) {
- cookiePath = "design_";
- } else if (location.href.indexOf("/distribute/") != -1) {
- cookiePath = "distribute_";
- }
-
-
- /* setup shadowbox for any videos that want it */
- var $videoLinks = $("a.video-shadowbox-button, a.notice-developers-video");
- if ($videoLinks.length) {
- // if there's at least one, add the shadowbox HTML to the body
- $('body').prepend(
-'<div id="video-container">'+
- '<div id="video-frame">'+
- '<div class="video-close">'+
- '<span id="icon-video-close" onclick="closeVideo()"> </span>'+
- '</div>'+
- '<div id="youTubePlayer"></div>'+
- '</div>'+
-'</div>');
-
- // loads the IFrame Player API code asynchronously.
- $.getScript("https://www.youtube.com/iframe_api");
-
- $videoLinks.each(function() {
- var videoId = $(this).attr('href').split('?v=')[1];
- $(this).click(function(event) {
- event.preventDefault();
- startYouTubePlayer(videoId);
- });
- });
- }
+ //var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
+ //po.src = 'https://apis.google.com/js/plusone.js';
+ //var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
});
// END of the onload event
-
-var youTubePlayer;
-function onYouTubeIframeAPIReady() {
-}
-
-/* Returns the height the shadowbox video should be. It's based on the current
- height of the "video-frame" element, which is 100% height for the window.
- Then minus the margin so the video isn't actually the full window height. */
-function getVideoHeight() {
- var frameHeight = $("#video-frame").height();
- var marginTop = $("#video-frame").css('margin-top').split('px')[0];
- return frameHeight - (marginTop * 2);
-}
-
-var mPlayerPaused = false;
-
-function startYouTubePlayer(videoId) {
- $("#video-container").show();
- $("#video-frame").show();
- mPlayerPaused = false;
-
- // compute the size of the player so it's centered in window
- var maxWidth = 940; // the width of the web site content
- var videoAspect = .5625; // based on 1280x720 resolution
- var maxHeight = maxWidth * videoAspect;
- var videoHeight = getVideoHeight();
- var videoWidth = videoHeight / videoAspect;
- if (videoWidth > maxWidth) {
- videoWidth = maxWidth;
- videoHeight = maxHeight;
- }
- $("#video-frame").css('width', videoWidth);
-
- // check if we've already created this player
- if (youTubePlayer == null) {
- // check if there's a start time specified
- var idAndHash = videoId.split("#");
- var startTime = 0;
- if (idAndHash.length > 1) {
- startTime = idAndHash[1].split("t=")[1] != undefined ? idAndHash[1].split("t=")[1] : 0;
- }
- // enable localized player
- var lang = getLangPref();
- var captionsOn = lang == 'en' ? 0 : 1;
-
- youTubePlayer = new YT.Player('youTubePlayer', {
- height: videoHeight,
- width: videoWidth,
- videoId: idAndHash[0],
- playerVars: {start: startTime, hl: lang, cc_load_policy: captionsOn},
- events: {
- 'onReady': onPlayerReady,
- 'onStateChange': onPlayerStateChange
- }
- });
- } else {
- // reset the size in case the user adjusted the window since last play
- youTubePlayer.setSize(videoWidth, videoHeight);
- // if a video different from the one already playing was requested, cue it up
- if (videoId != youTubePlayer.getVideoUrl().split('?v=')[1].split('&')[0].split('%')[0]) {
- youTubePlayer.cueVideoById(videoId);
- }
- youTubePlayer.playVideo();
- }
-}
-
-function onPlayerReady(event) {
- event.target.playVideo();
- mPlayerPaused = false;
-}
-
-function closeVideo() {
- try {
- youTubePlayer.pauseVideo();
- } catch(e) {
- }
- $("#video-container").fadeOut(200);
-}
-
-/* Track youtube playback for analytics */
-function onPlayerStateChange(event) {
- // Video starts, send the video ID
- if (event.data == YT.PlayerState.PLAYING) {
- if (mPlayerPaused) {
- ga('send', 'event', 'Videos', 'Resume',
- youTubePlayer.getVideoUrl().split('?v=')[1].split('&')[0].split('%')[0]);
- } else {
- // track the start playing event so we know from which page the video was selected
- ga('send', 'event', 'Videos', 'Start: ' +
- youTubePlayer.getVideoUrl().split('?v=')[1].split('&')[0].split('%')[0],
- 'on: ' + document.location.href);
- }
- mPlayerPaused = false;
- }
- // Video paused, send video ID and video elapsed time
- if (event.data == YT.PlayerState.PAUSED) {
- ga('send', 'event', 'Videos', 'Paused',
- youTubePlayer.getVideoUrl().split('?v=')[1].split('&')[0].split('%')[0],
- youTubePlayer.getCurrentTime());
- mPlayerPaused = true;
- }
- // Video finished, send video ID and video elapsed time
- if (event.data == YT.PlayerState.ENDED) {
- ga('send', 'event', 'Videos', 'Finished',
- youTubePlayer.getVideoUrl().split('?v=')[1].split('&')[0].split('%')[0],
- youTubePlayer.getCurrentTime());
- mPlayerPaused = true;
- }
-}
-
-
-
function initExpandableNavItems(rootTag) {
$(rootTag + ' li.nav-section .nav-section-header').click(function() {
var section = $(this).closest('li.nav-section');
if (section.hasClass('expanded')) {
- /* hide me and descendants */
+ /* hide me and descendants */
section.find('ul').slideUp(250, function() {
// remove 'expanded' class from my section and any children
section.closest('li').removeClass('expanded');
$('li.nav-section', section).removeClass('expanded');
- resizeNav();
});
} else {
- /* show me */
+ /* show me */
// first hide all other siblings
var $others = $('li.nav-section.expanded', $(this).closest('ul')).not('.sticky');
$others.removeClass('expanded').children('ul').slideUp(250);
// now expand me
section.closest('li').addClass('expanded');
- section.children('ul').slideDown(250, function() {
- resizeNav();
- });
+ section.children('ul').slideDown(250);
}
});
@@ -735,28 +311,6 @@
});
}
-
-/** Create the list of breadcrumb links in the sticky header */
-function buildBreadcrumbs() {
- var $breadcrumbUl = $("#sticky-header ul.breadcrumb");
- // Add the secondary horizontal nav item, if provided
- var $selectedSecondNav = $("div#nav-x ul.nav-x a.selected").clone().removeClass("selected");
- if ($selectedSecondNav.length) {
- $breadcrumbUl.prepend($("<li>").append($selectedSecondNav))
- }
- // Add the primary horizontal nav
- var $selectedFirstNav = $("div#header-wrap ul.nav-x a.selected").clone().removeClass("selected");
- // If there's no header nav item, use the logo link and title from alt text
- if ($selectedFirstNav.length < 1) {
- $selectedFirstNav = $("<a>")
- .attr('href', $("div#header .logo a").attr('href'))
- .text($("div#header .logo img").attr('alt'));
- }
- $breadcrumbUl.prepend($("<li>").append($selectedFirstNav));
-}
-
-
-
/** Highlight the current page in sidenav, expanding children as appropriate */
function highlightSidenav() {
// if something is already highlighted, undo it. This is for dynamic navigation (Samples index)
@@ -772,6 +326,8 @@
}
var $selListItem;
+ var breadcrumb = [];
+
if ($selNavLink.length) {
// Find this page's <li> in sidenav and set selected
$selListItem = $selNavLink.closest('li');
@@ -781,8 +337,20 @@
$selNavLink.parents('li.nav-section').each(function() {
$(this).addClass('expanded');
$(this).children('ul').show();
+
+ var link = $(this).find('a').first();
+
+ if (!$(this).is($selListItem)) {
+ breadcrumb.unshift(link)
+ }
});
+
+ $('#nav').scrollIntoView($selNavLink);
}
+
+ breadcrumb.forEach(function(link) {
+ link.dacCrumbs();
+ });
}
function unHighlightSidenav() {
@@ -790,56 +358,6 @@
$('ul#nav li.nav-section.expanded').removeClass('expanded').children('ul').hide();
}
-function toggleFullscreen(enable) {
- var delay = 20;
- var enabled = true;
- var stylesheet = $('link[rel="stylesheet"][class="fullscreen"]');
- if (enable) {
- // Currently NOT USING fullscreen; enable fullscreen
- stylesheet.removeAttr('disabled');
- $('#nav-swap .fullscreen').removeClass('disabled');
- $('#devdoc-nav').css({left:''});
- setTimeout(updateSidenavFullscreenWidth,delay); // need to wait a moment for css to switch
- enabled = true;
- } else {
- // Currently USING fullscreen; disable fullscreen
- stylesheet.attr('disabled', 'disabled');
- $('#nav-swap .fullscreen').addClass('disabled');
- setTimeout(updateSidenavFixedWidth,delay); // need to wait a moment for css to switch
- enabled = false;
- }
- writeCookie("fullscreen", enabled, null);
- setNavBarLeftPos();
- resizeNav(delay);
- updateSideNavPosition();
- setTimeout(initSidenavHeightResize,delay);
-}
-
-
-function setNavBarLeftPos() {
- navBarLeftPos = $('#body-content').offset().left;
-}
-
-
-function updateSideNavPosition() {
- var newLeft = $(window).scrollLeft() - navBarLeftPos;
- $('#devdoc-nav').css({left: -newLeft});
- $('#devdoc-nav .totop').css({left: -(newLeft - parseInt($('#side-nav').css('margin-left')))});
-}
-
-// TODO: use $(document).ready instead
-function addLoadEvent(newfun) {
- var current = window.onload;
- if (typeof window.onload != 'function') {
- window.onload = newfun;
- } else {
- window.onload = function() {
- current();
- newfun();
- }
- }
-}
-
var agent = navigator['userAgent'].toLowerCase();
// If a mobile phone, set flag and do mobile setup
if ((agent.indexOf("mobile") != -1) || // android, iphone, ipod
@@ -849,192 +367,23 @@
isMobile = true;
}
-
$(document).ready(function() {
$("pre:not(.no-pretty-print)").addClass("prettyprint");
prettyPrint();
});
-
-
-
-/* ######### RESIZE THE SIDENAV HEIGHT ########## */
-
-function resizeNav(delay) {
- var $nav = $("#devdoc-nav");
- var $window = $(window);
- var navHeight;
-
- // Get the height of entire window and the total header height.
- // Then figure out based on scroll position whether the header is visible
- var windowHeight = $window.height();
- var scrollTop = $window.scrollTop();
- var headerHeight = $('#header-wrapper').outerHeight();
- var headerVisible = scrollTop < stickyTop;
-
- // get the height of space between nav and top of window.
- // Could be either margin or top position, depending on whether the nav is fixed.
- var topMargin = (parseInt($nav.css('margin-top')) || parseInt($nav.css('top'))) + 1;
- // add 1 for the #side-nav bottom margin
-
- // Depending on whether the header is visible, set the side nav's height.
- if (headerVisible) {
- // The sidenav height grows as the header goes off screen
- navHeight = windowHeight - (headerHeight - scrollTop) - topMargin;
- } else {
- // Once header is off screen, the nav height is almost full window height
- navHeight = windowHeight - topMargin;
- }
-
-
-
- $scrollPanes = $(".scroll-pane");
- if ($scrollPanes.length > 1) {
- // subtract the height of the api level widget and nav swapper from the available nav height
- navHeight -= ($('#api-nav-header').outerHeight(true) + $('#nav-swap').outerHeight(true));
-
- $("#swapper").css({height:navHeight + "px"});
- if ($("#nav-tree").is(":visible")) {
- $("#nav-tree").css({height:navHeight});
- }
-
- var classesHeight = navHeight - parseInt($("#resize-packages-nav").css("height")) - 10 + "px";
- //subtract 10px to account for drag bar
-
- // if the window becomes small enough to make the class panel height 0,
- // then the package panel should begin to shrink
- if (parseInt(classesHeight) <= 0) {
- $("#resize-packages-nav").css({height:navHeight - 10}); //subtract 10px for drag bar
- $("#packages-nav").css({height:navHeight - 10});
- }
-
- $("#classes-nav").css({'height':classesHeight, 'margin-top':'10px'});
- $("#classes-nav .jspContainer").css({height:classesHeight});
-
-
- } else {
- $nav.height(navHeight);
- }
-
- if (delay) {
- updateFromResize = true;
- delayedReInitScrollbars(delay);
- } else {
- reInitScrollbars();
- }
-
-}
-
-var updateScrollbars = false;
-var updateFromResize = false;
-
-/* Re-initialize the scrollbars to account for changed nav size.
- * This method postpones the actual update by a 1/4 second in order to optimize the
- * scroll performance while the header is still visible, because re-initializing the
- * scroll panes is an intensive process.
- */
-function delayedReInitScrollbars(delay) {
- // If we're scheduled for an update, but have received another resize request
- // before the scheduled resize has occured, just ignore the new request
- // (and wait for the scheduled one).
- if (updateScrollbars && updateFromResize) {
- updateFromResize = false;
- return;
- }
-
- // We're scheduled for an update and the update request came from this method's setTimeout
- if (updateScrollbars && !updateFromResize) {
- reInitScrollbars();
- updateScrollbars = false;
- } else {
- updateScrollbars = true;
- updateFromResize = false;
- setTimeout('delayedReInitScrollbars()',delay);
- }
-}
-
-/* Re-initialize the scrollbars to account for changed nav size. */
-function reInitScrollbars() {
- var pane = $(".scroll-pane").each(function(){
- var api = $(this).data('jsp');
- if (!api) { setTimeout(reInitScrollbars,300); return;}
- api.reinitialise( {verticalGutter:0} );
- });
- $(".scroll-pane").removeAttr("tabindex"); // get rid of tabindex added by jscroller
-}
-
-
-/* Resize the height of the nav panels in the reference,
- * and save the new size to a cookie */
-function saveNavPanels() {
- var basePath = getBaseUri(location.pathname);
- var section = basePath.substring(1,basePath.indexOf("/",1));
- writeCookie("height", resizePackagesNav.css("height"), section);
-}
-
-
-
-function restoreHeight(packageHeight) {
- $("#resize-packages-nav").height(packageHeight);
- $("#packages-nav").height(packageHeight);
- // var classesHeight = navHeight - packageHeight;
- // $("#classes-nav").css({height:classesHeight});
- // $("#classes-nav .jspContainer").css({height:classesHeight});
-}
-
-
-
-/* ######### END RESIZE THE SIDENAV HEIGHT ########## */
-
-
-
-
-
-/** Scroll the jScrollPane to make the currently selected item visible
- This is called when the page finished loading. */
-function scrollIntoView(nav) {
- var $nav = $("#"+nav);
- var element = $nav.jScrollPane({/* ...settings... */});
- var api = element.data('jsp');
-
- if ($nav.is(':visible')) {
- var $selected = $(".selected", $nav);
- if ($selected.length == 0) {
- // If no selected item found, exit
- return;
- }
- // get the selected item's offset from its container nav by measuring the item's offset
- // relative to the document then subtract the container nav's offset relative to the document
- var selectedOffset = $selected.offset().top - $nav.offset().top;
- if (selectedOffset > $nav.height() * .8) { // multiply nav height by .8 so we move up the item
- // if it's more than 80% down the nav
- // scroll the item up by an amount equal to 80% the container nav's height
- api.scrollTo(0, selectedOffset - ($nav.height() * .8), false);
- }
- }
-}
-
-
-
-
-
-
/* Show popup dialogs */
function showDialog(id) {
- $dialog = $("#"+id);
+ $dialog = $("#" + id);
$dialog.prepend('<div class="box-border"><div class="top"> <div class="left"></div> <div class="right"></div></div><div class="bottom"> <div class="left"></div> <div class="right"></div> </div> </div>');
$dialog.wrapInner('<div/>');
$dialog.removeClass("hide");
}
-
-
-
-
/* ######### COOKIES! ########## */
function readCookie(cookie) {
- var myCookie = cookie_namespace+"_"+cookie+"=";
+ var myCookie = cookie_namespace + "_" + cookie + "=";
if (document.cookie) {
var index = document.cookie.indexOf(myCookie);
if (index != -1) {
@@ -1051,104 +400,16 @@
}
function writeCookie(cookie, val, section) {
- if (val==undefined) return;
- section = section == null ? "_" : "_"+section+"_";
- var age = 2*365*24*60*60; // set max-age to 2 years
- var cookieValue = cookie_namespace + section + cookie + "=" + val
- + "; max-age=" + age +"; path=/";
+ if (val == undefined) return;
+ section = section == null ? "_" : "_" + section + "_";
+ var age = 2 * 365 * 24 * 60 * 60; // set max-age to 2 years
+ var cookieValue = cookie_namespace + section + cookie + "=" + val +
+ "; max-age=" + age + "; path=/";
document.cookie = cookieValue;
}
/* ######### END COOKIES! ########## */
-
-var sticky = false;
-var stickyTop;
-var prevScrollLeft = 0; // used to compare current position to previous position of horiz scroll
-/* Sets the vertical scoll position at which the sticky bar should appear.
- This method is called to reset the position when search results appear or hide */
-function setStickyTop() {
- stickyTop = $('#header-wrapper').outerHeight() - $('#sticky-header').outerHeight();
-}
-
-/*
- * Displays sticky nav bar on pages when dac header scrolls out of view
- */
-$(window).scroll(function(event) {
-
- setStickyTop();
- var hiding = false;
- var $stickyEl = $('#sticky-header');
- var $menuEl = $('.menu-container');
- // Exit if there's no sidenav
- if ($('#side-nav').length == 0) return;
- // Exit if the mouse target is a DIV, because that means the event is coming
- // from a scrollable div and so there's no need to make adjustments to our layout
- if ($(event.target).nodeName == "DIV") {
- return;
- }
-
- var top = $(window).scrollTop();
- // we set the navbar fixed when the scroll position is beyond the height of the site header...
- var shouldBeSticky = top >= stickyTop;
- // ... except if the document content is shorter than the sidenav height.
- // (this is necessary to avoid crazy behavior on OSX Lion due to overscroll bouncing)
- if ($("#doc-col").height() < $("#side-nav").height()) {
- shouldBeSticky = false;
- }
- // Account for horizontal scroll
- var scrollLeft = $(window).scrollLeft();
- // When the sidenav is fixed and user scrolls horizontally, reposition the sidenav to match
- if (sticky && (scrollLeft != prevScrollLeft)) {
- updateSideNavPosition();
- prevScrollLeft = scrollLeft;
- }
-
- // Don't continue if the header is sufficently far away
- // (to avoid intensive resizing that slows scrolling)
- if (sticky == shouldBeSticky) {
- return;
- }
-
- // If sticky header visible and position is now near top, hide sticky
- if (sticky && !shouldBeSticky) {
- sticky = false;
- hiding = true;
- // make the sidenav static again
- $('#devdoc-nav')
- .removeClass('fixed')
- .css({'width':'auto','margin':''})
- .prependTo('#side-nav');
- // delay hide the sticky
- $menuEl.removeClass('sticky-menu');
- $stickyEl.fadeOut(250);
- hiding = false;
-
- // update the sidenaav position for side scrolling
- updateSideNavPosition();
- } else if (!sticky && shouldBeSticky) {
- sticky = true;
- $stickyEl.fadeIn(10);
- $menuEl.addClass('sticky-menu');
-
- // make the sidenav fixed
- var width = $('#devdoc-nav').width();
- $('#devdoc-nav')
- .addClass('fixed')
- .css({'width':width+'px'})
- .prependTo('#body-content');
-
- // update the sidenaav position for side scrolling
- updateSideNavPosition();
-
- } else if (hiding && top < 15) {
- $menuEl.removeClass('sticky-menu');
- $stickyEl.hide();
- hiding = false;
- }
- resizeNav(250); // pass true in order to delay the scrollbar re-initialization for performance
-});
-
/*
* Manages secion card states and nav resize to conclude loading
*/
@@ -1158,7 +419,7 @@
// Stack hover states
$('.section-card-menu').each(function(index, el) {
var height = $(el).height();
- $(el).css({height:height+'px', position:'relative'});
+ $(el).css({height:height + 'px', position:'relative'});
var $cardInfo = $(el).find('.card-info');
$cardInfo.css({position: 'absolute', bottom:'0px', left:'0px', right:'0px', overflow:'visible'});
@@ -1168,25 +429,8 @@
})();
-
-
-
-
-
-
-
-
-
-
-
-
-
/* MISC LIBRARY FUNCTIONS */
-
-
-
-
function toggle(obj, slide) {
var ul = $("ul:first", obj);
var li = ul.parent();
@@ -1207,7 +451,6 @@
}
}
-
function buildToggleLists() {
$(".toggle-list").each(
function(i) {
@@ -1216,12 +459,10 @@
});
}
-
-
function hideNestedItems(list, toggle) {
$list = $(list);
// hide nested lists
- if($list.hasClass('showing')) {
+ if ($list.hasClass('showing')) {
$("li ol", $list).hide('fast');
$list.removeClass('showing');
// show nested lists
@@ -1229,207 +470,47 @@
$("li ol", $list).show('fast');
$list.addClass('showing');
}
- $(".more,.less",$(toggle)).toggle();
+ $(".more,.less", $(toggle)).toggle();
}
-
/* Call this to add listeners to a <select> element for Studio/Eclipse/Other docs */
function setupIdeDocToggle() {
- $( "select.ide" ).change(function() {
+ $("select.ide").change(function() {
var selected = $(this).find("option:selected").attr("value");
$(".select-ide").hide();
- $(".select-ide."+selected).show();
+ $(".select-ide." + selected).show();
$("select.ide").val(selected);
});
}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-/* REFERENCE NAV SWAP */
-
-
-function getNavPref() {
- var v = readCookie('reference_nav');
- if (v != NAV_PREF_TREE) {
- v = NAV_PREF_PANELS;
- }
- return v;
-}
-
-function chooseDefaultNav() {
- nav_pref = getNavPref();
- if (nav_pref == NAV_PREF_TREE) {
- $("#nav-panels").toggle();
- $("#panel-link").toggle();
- $("#nav-tree").toggle();
- $("#tree-link").toggle();
- }
-}
-
-function swapNav() {
- if (nav_pref == NAV_PREF_TREE) {
- nav_pref = NAV_PREF_PANELS;
- } else {
- nav_pref = NAV_PREF_TREE;
- init_default_navtree(toRoot);
- }
- writeCookie("nav", nav_pref, "reference");
-
- $("#nav-panels").toggle();
- $("#panel-link").toggle();
- $("#nav-tree").toggle();
- $("#tree-link").toggle();
-
- resizeNav();
-
- // Gross nasty hack to make tree view show up upon first swap by setting height manually
- $("#nav-tree .jspContainer:visible")
- .css({'height':$("#nav-tree .jspContainer .jspPane").height() +'px'});
- // Another nasty hack to make the scrollbar appear now that we have height
- resizeNav();
-
- if ($("#nav-tree").is(':visible')) {
- scrollIntoView("nav-tree");
- } else {
- scrollIntoView("packages-nav");
- scrollIntoView("classes-nav");
- }
-}
-
-
-
-/* ############################################ */
-/* ########## LOCALIZATION ############ */
-/* ############################################ */
-
-function getBaseUri(uri) {
- var intlUrl = (uri.substring(0,6) == "/intl/");
- if (intlUrl) {
- base = uri.substring(uri.indexOf('intl/')+5,uri.length);
- base = base.substring(base.indexOf('/')+1, base.length);
- //alert("intl, returning base url: /" + base);
- return ("/" + base);
- } else {
- //alert("not intl, returning uri as found.");
- return uri;
- }
-}
-
-function requestAppendHL(uri) {
-//append "?hl=<lang> to an outgoing request (such as to blog)
- var lang = getLangPref();
- if (lang) {
- var q = 'hl=' + lang;
- uri += '?' + q;
- window.location = uri;
- return false;
- } else {
- return true;
- }
-}
-
-
-function changeNavLang(lang) {
- var $links = $("#devdoc-nav,#header,#nav-x,.training-nav-top,.content-footer").find("a["+lang+"-lang]");
- $links.each(function(i){ // for each link with a translation
- var $link = $(this);
- if (lang != "en") { // No need to worry about English, because a language change invokes new request
- // put the desired language from the attribute as the text
- $link.text($link.attr(lang+"-lang"))
- }
- });
-}
-
-function changeLangPref(lang, submit) {
- writeCookie("pref_lang", lang, null);
-
- // ####### TODO: Remove this condition once we're stable on devsite #######
- // This condition is only needed if we still need to support legacy GAE server
- if (devsite) {
- // Switch language when on Devsite server
- if (submit) {
- $("#setlang").submit();
- }
- } else {
- // Switch language when on legacy GAE server
- if (submit) {
- window.location = getBaseUri(location.pathname);
- }
- }
-}
-
-function loadLangPref() {
- var lang = readCookie("pref_lang");
- if (lang != 0) {
- $("#language").find("option[value='"+lang+"']").attr("selected",true);
- }
-}
-
-function getLangPref() {
- var lang = $("#language").find(":selected").attr("value");
- if (!lang) {
- lang = readCookie("pref_lang");
- }
- return (lang != 0) ? lang : 'en';
-}
-
-/* ########## END LOCALIZATION ############ */
-
-
-
-
-
-
/* Used to hide and reveal supplemental content, such as long code samples.
See the companion CSS in android-developer-docs.css */
function toggleContent(obj) {
var div = $(obj).closest(".toggle-content");
- var toggleMe = $(".toggle-content-toggleme:eq(0)",div);
+ var toggleMe = $(".toggle-content-toggleme:eq(0)", div);
if (div.hasClass("closed")) { // if it's closed, open it
toggleMe.slideDown();
$(".toggle-content-text:eq(0)", obj).toggle();
div.removeClass("closed").addClass("open");
- $(".toggle-content-img:eq(0)", div).attr("title", "hide").attr("src", toRoot
- + "assets/images/triangle-opened.png");
+ $(".toggle-content-img:eq(0)", div).attr("title", "hide").attr("src", toRoot +
+ "assets/images/triangle-opened.png");
} else { // if it's open, close it
toggleMe.slideUp('fast', function() { // Wait until the animation is done before closing arrow
$(".toggle-content-text:eq(0)", obj).toggle();
div.removeClass("open").addClass("closed");
div.find(".toggle-content").removeClass("open").addClass("closed")
.find(".toggle-content-toggleme").hide();
- $(".toggle-content-img", div).attr("title", "show").attr("src", toRoot
- + "assets/images/triangle-closed.png");
+ $(".toggle-content-img", div).attr("title", "show").attr("src", toRoot +
+ "assets/images/triangle-closed.png");
});
}
return false;
}
-
/* New version of expandable content */
-function toggleExpandable(link,id) {
- if($(id).is(':visible')) {
+function toggleExpandable(link, id) {
+ if ($(id).is(':visible')) {
$(id).slideUp();
$(link).removeClass('expanded');
} else {
@@ -1443,10 +524,6 @@
$(ids).prev('h4').find('a.expandable').removeClass('expanded');
}
-
-
-
-
/*
* Slideshow 1.0
* Used on /index.html and /develop/index.html for carousel
@@ -1486,169 +563,164 @@
*
*/
- (function($) {
- $.fn.dacSlideshow = function(o) {
+(function($) {
+ $.fn.dacSlideshow = function(o) {
- //Options - see above
- o = $.extend({
- btnPrev: null,
- btnNext: null,
- btnPause: null,
- auto: true,
- speed: 500,
- autoTime: 12000,
- easing: null,
- start: 0,
- scroll: 1,
- pagination: true
+ //Options - see above
+ o = $.extend({
+ btnPrev: null,
+ btnNext: null,
+ btnPause: null,
+ auto: true,
+ speed: 500,
+ autoTime: 12000,
+ easing: null,
+ start: 0,
+ scroll: 1,
+ pagination: true
- }, o || {});
+ }, o || {});
- //Set up a carousel for each
- return this.each(function() {
+ //Set up a carousel for each
+ return this.each(function() {
- var running = false;
- var animCss = o.vertical ? "top" : "left";
- var sizeCss = o.vertical ? "height" : "width";
- var div = $(this);
- var ul = $("ul", div);
- var tLi = $("li", ul);
- var tl = tLi.size();
- var timer = null;
+ var running = false;
+ var animCss = o.vertical ? "top" : "left";
+ var sizeCss = o.vertical ? "height" : "width";
+ var div = $(this);
+ var ul = $("ul", div);
+ var tLi = $("li", ul);
+ var tl = tLi.size();
+ var timer = null;
- var li = $("li", ul);
- var itemLength = li.size();
- var curr = o.start;
+ var li = $("li", ul);
+ var itemLength = li.size();
+ var curr = o.start;
- li.css({float: o.vertical ? "none" : "left"});
- ul.css({margin: "0", padding: "0", position: "relative", "list-style-type": "none", "z-index": "1"});
- div.css({position: "relative", "z-index": "2", left: "0px"});
+ li.css({float: o.vertical ? "none" : "left"});
+ ul.css({margin: "0", padding: "0", position: "relative", "list-style-type": "none", "z-index": "1"});
+ div.css({position: "relative", "z-index": "2", left: "0px"});
- var liSize = o.vertical ? height(li) : width(li);
- var ulSize = liSize * itemLength;
- var divSize = liSize;
+ var liSize = o.vertical ? height(li) : width(li);
+ var ulSize = liSize * itemLength;
+ var divSize = liSize;
- li.css({width: li.width(), height: li.height()});
- ul.css(sizeCss, ulSize+"px").css(animCss, -(curr*liSize));
+ li.css({width: li.width(), height: li.height()});
+ ul.css(sizeCss, ulSize + "px").css(animCss, -(curr * liSize));
- div.css(sizeCss, divSize+"px");
+ div.css(sizeCss, divSize + "px");
- //Pagination
- if (o.pagination) {
- var pagination = $("<div class='pagination'></div>");
- var pag_ul = $("<ul></ul>");
- if (tl > 1) {
- for (var i=0;i<tl;i++) {
- var li = $("<li>"+i+"</li>");
- pag_ul.append(li);
- if (i==o.start) li.addClass('active');
- li.click(function() {
- go(parseInt($(this).text()));
- })
- }
- pagination.append(pag_ul);
- div.append(pagination);
- }
- }
+ //Pagination
+ if (o.pagination) {
+ var pagination = $("<div class='pagination'></div>");
+ var pag_ul = $("<ul></ul>");
+ if (tl > 1) {
+ for (var i = 0; i < tl; i++) {
+ var li = $("<li>" + i + "</li>");
+ pag_ul.append(li);
+ if (i == o.start) li.addClass('active');
+ li.click(function() {
+ go(parseInt($(this).text()));
+ })
+ }
+ pagination.append(pag_ul);
+ div.append(pagination);
+ }
+ }
- //Previous button
- if(o.btnPrev)
+ //Previous button
+ if (o.btnPrev)
$(o.btnPrev).click(function(e) {
- e.preventDefault();
- return go(curr-o.scroll);
+ e.preventDefault();
+ return go(curr - o.scroll);
});
- //Next button
- if(o.btnNext)
+ //Next button
+ if (o.btnNext)
$(o.btnNext).click(function(e) {
- e.preventDefault();
- return go(curr+o.scroll);
+ e.preventDefault();
+ return go(curr + o.scroll);
});
- //Pause button
- if(o.btnPause)
+ //Pause button
+ if (o.btnPause)
$(o.btnPause).click(function(e) {
- e.preventDefault();
- if ($(this).hasClass('paused')) {
- startRotateTimer();
- } else {
- pauseRotateTimer();
- }
+ e.preventDefault();
+ if ($(this).hasClass('paused')) {
+ startRotateTimer();
+ } else {
+ pauseRotateTimer();
+ }
});
- //Auto rotation
- if(o.auto) startRotateTimer();
+ //Auto rotation
+ if (o.auto) startRotateTimer();
- function startRotateTimer() {
- clearInterval(timer);
- timer = setInterval(function() {
- if (curr == tl-1) {
- go(0);
- } else {
- go(curr+o.scroll);
- }
- }, o.autoTime);
- $(o.btnPause).removeClass('paused');
- }
+ function startRotateTimer() {
+ clearInterval(timer);
+ timer = setInterval(function() {
+ if (curr == tl - 1) {
+ go(0);
+ } else {
+ go(curr + o.scroll);
+ }
+ }, o.autoTime);
+ $(o.btnPause).removeClass('paused');
+ }
- function pauseRotateTimer() {
- clearInterval(timer);
- $(o.btnPause).addClass('paused');
- }
+ function pauseRotateTimer() {
+ clearInterval(timer);
+ $(o.btnPause).addClass('paused');
+ }
- //Go to an item
- function go(to) {
- if(!running) {
+ //Go to an item
+ function go(to) {
+ if (!running) {
- if(to<0) {
- to = itemLength-1;
- } else if (to>itemLength-1) {
- to = 0;
- }
- curr = to;
+ if (to < 0) {
+ to = itemLength - 1;
+ } else if (to > itemLength - 1) {
+ to = 0;
+ }
+ curr = to;
- running = true;
+ running = true;
- ul.animate(
- animCss == "left" ? { left: -(curr*liSize) } : { top: -(curr*liSize) } , o.speed, o.easing,
+ ul.animate(
+ animCss == "left" ? {left: -(curr * liSize)} : {top: -(curr * liSize)} , o.speed, o.easing,
function() {
- running = false;
+ running = false;
}
);
- $(o.btnPrev + "," + o.btnNext).removeClass("disabled");
- $( (curr-o.scroll<0 && o.btnPrev)
- ||
- (curr+o.scroll > itemLength && o.btnNext)
- ||
- []
- ).addClass("disabled");
+ $(o.btnPrev + "," + o.btnNext).removeClass("disabled");
+ $((curr - o.scroll < 0 && o.btnPrev) ||
+ (curr + o.scroll > itemLength && o.btnNext) ||
+ []
+ ).addClass("disabled");
+ var nav_items = $('li', pagination);
+ nav_items.removeClass('active');
+ nav_items.eq(to).addClass('active');
- var nav_items = $('li', pagination);
- nav_items.removeClass('active');
- nav_items.eq(to).addClass('active');
+ }
+ if (o.auto) startRotateTimer();
+ return false;
+ };
+ });
+ };
+ function css(el, prop) {
+ return parseInt($.css(el[0], prop)) || 0;
+ };
+ function width(el) {
+ return el[0].offsetWidth + css(el, 'marginLeft') + css(el, 'marginRight');
+ };
+ function height(el) {
+ return el[0].offsetHeight + css(el, 'marginTop') + css(el, 'marginBottom');
+ };
- }
- if(o.auto) startRotateTimer();
- return false;
- };
- });
- };
-
- function css(el, prop) {
- return parseInt($.css(el[0], prop)) || 0;
- };
- function width(el) {
- return el[0].offsetWidth + css(el, 'marginLeft') + css(el, 'marginRight');
- };
- function height(el) {
- return el[0].offsetHeight + css(el, 'marginTop') + css(el, 'marginBottom');
- };
-
- })(jQuery);
-
+})(jQuery);
/*
* dacSlideshow 1.0
@@ -1687,1099 +759,68 @@
* pagination: whether or not to include dotted pagination
*
*/
- (function($) {
- $.fn.dacTabbedList = function(o) {
+(function($) {
+ $.fn.dacTabbedList = function(o) {
- //Options - see above
- o = $.extend({
- speed : 250,
- easing: null,
- nav_id: null,
- frame_id: null
- }, o || {});
+ //Options - see above
+ o = $.extend({
+ speed : 250,
+ easing: null,
+ nav_id: null,
+ frame_id: null
+ }, o || {});
- //Set up a carousel for each
- return this.each(function() {
+ //Set up a carousel for each
+ return this.each(function() {
- var curr = 0;
- var running = false;
- var animCss = "margin-left";
- var sizeCss = "width";
- var div = $(this);
+ var curr = 0;
+ var running = false;
+ var animCss = "margin-left";
+ var sizeCss = "width";
+ var div = $(this);
- var nav = $(o.nav_id, div);
- var nav_li = $("li", nav);
- var nav_size = nav_li.size();
- var frame = div.find(o.frame_id);
- var content_width = $(frame).find('ul').width();
- //Buttons
- $(nav_li).click(function(e) {
+ var nav = $(o.nav_id, div);
+ var nav_li = $("li", nav);
+ var nav_size = nav_li.size();
+ var frame = div.find(o.frame_id);
+ var content_width = $(frame).find('ul').width();
+ //Buttons
+ $(nav_li).click(function(e) {
go($(nav_li).index($(this)));
})
- //Go to an item
- function go(to) {
- if(!running) {
- curr = to;
- running = true;
+ //Go to an item
+ function go(to) {
+ if (!running) {
+ curr = to;
+ running = true;
- frame.animate({ 'margin-left' : -(curr*content_width) }, o.speed, o.easing,
+ frame.animate({'margin-left' : -(curr * content_width)}, o.speed, o.easing,
function() {
- running = false;
+ running = false;
}
);
+ nav_li.removeClass('active');
+ nav_li.eq(to).addClass('active');
- nav_li.removeClass('active');
- nav_li.eq(to).addClass('active');
-
-
- }
- return false;
- };
- });
- };
-
- function css(el, prop) {
- return parseInt($.css(el[0], prop)) || 0;
- };
- function width(el) {
- return el[0].offsetWidth + css(el, 'marginLeft') + css(el, 'marginRight');
- };
- function height(el) {
- return el[0].offsetHeight + css(el, 'marginTop') + css(el, 'marginBottom');
- };
-
- })(jQuery);
-
-
-
-
-
-/* ######################################################## */
-/* ################ SEARCH SUGGESTIONS ################## */
-/* ######################################################## */
-
-
-
-var gSelectedIndex = -1; // the index position of currently highlighted suggestion
-var gSelectedColumn = -1; // which column of suggestion lists is currently focused
-
-var gMatches = new Array();
-var gLastText = "";
-var gInitialized = false;
-var ROW_COUNT_FRAMEWORK = 20; // max number of results in list
-var gListLength = 0;
-
-
-var gGoogleMatches = new Array();
-var ROW_COUNT_GOOGLE = 15; // max number of results in list
-var gGoogleListLength = 0;
-
-var gDocsMatches = new Array();
-var ROW_COUNT_DOCS = 100; // max number of results in list
-var gDocsListLength = 0;
-
-function onSuggestionClick(link) {
- // When user clicks a suggested document, track it
- ga('send', 'event', 'Suggestion Click', 'clicked: ' + $(link).attr('href'),
- 'query: ' + $("#search_autocomplete").val().toLowerCase());
-}
-
-function set_item_selected($li, selected)
-{
- if (selected) {
- $li.attr('class','jd-autocomplete jd-selected');
- } else {
- $li.attr('class','jd-autocomplete');
- }
-}
-
-function set_item_values(toroot, $li, match)
-{
- var $link = $('a',$li);
- $link.html(match.__hilabel || match.label);
- $link.attr('href',toroot + match.link);
-}
-
-function set_item_values_jd(toroot, $li, match)
-{
- var $link = $('a',$li);
- $link.html(match.title);
- $link.attr('href',toroot + match.url);
-}
-
-function new_suggestion($list) {
- var $li = $("<li class='jd-autocomplete'></li>");
- $list.append($li);
-
- $li.mousedown(function() {
- window.location = this.firstChild.getAttribute("href");
- });
- $li.mouseover(function() {
- $('.search_filtered_wrapper li').removeClass('jd-selected');
- $(this).addClass('jd-selected');
- gSelectedColumn = $(".search_filtered:visible").index($(this).closest('.search_filtered'));
- gSelectedIndex = $("li", $(".search_filtered:visible")[gSelectedColumn]).index(this);
- });
- $li.append("<a onclick='onSuggestionClick(this)'></a>");
- $li.attr('class','show-item');
- return $li;
-}
-
-function sync_selection_table(toroot)
-{
- var $li; //list item jquery object
- var i; //list item iterator
-
- // if there are NO results at all, hide all columns
- if (!(gMatches.length > 0) && !(gGoogleMatches.length > 0) && !(gDocsMatches.length > 0)) {
- $('.suggest-card').hide(300);
- return;
- }
-
- // if there are api results
- if ((gMatches.length > 0) || (gGoogleMatches.length > 0)) {
- // reveal suggestion list
- $('.suggest-card.dummy').show();
- $('.suggest-card.reference').show();
- var listIndex = 0; // list index position
-
- // reset the lists
- $(".search_filtered_wrapper.reference li").remove();
-
- // ########### ANDROID RESULTS #############
- if (gMatches.length > 0) {
-
- // determine android results to show
- gListLength = gMatches.length < ROW_COUNT_FRAMEWORK ?
- gMatches.length : ROW_COUNT_FRAMEWORK;
- for (i=0; i<gListLength; i++) {
- var $li = new_suggestion($(".suggest-card.reference ul"));
- set_item_values(toroot, $li, gMatches[i]);
- set_item_selected($li, i == gSelectedIndex);
- }
- }
-
- // ########### GOOGLE RESULTS #############
- if (gGoogleMatches.length > 0) {
- // show header for list
- $(".suggest-card.reference ul").append("<li class='header'>in Google Services:</li>");
-
- // determine google results to show
- gGoogleListLength = gGoogleMatches.length < ROW_COUNT_GOOGLE ? gGoogleMatches.length : ROW_COUNT_GOOGLE;
- for (i=0; i<gGoogleListLength; i++) {
- var $li = new_suggestion($(".suggest-card.reference ul"));
- set_item_values(toroot, $li, gGoogleMatches[i]);
- set_item_selected($li, i == gSelectedIndex);
- }
- }
- } else {
- $('.suggest-card.reference').hide();
- $('.suggest-card.dummy').hide();
- }
-
- // ########### JD DOC RESULTS #############
- if (gDocsMatches.length > 0) {
- // reset the lists
- $(".search_filtered_wrapper.docs li").remove();
-
- // determine google results to show
- // NOTE: The order of the conditions below for the sugg.type MUST BE SPECIFIC:
- // The order must match the reverse order that each section appears as a card in
- // the suggestion UI... this may be only for the "develop" grouped items though.
- gDocsListLength = gDocsMatches.length < ROW_COUNT_DOCS ? gDocsMatches.length : ROW_COUNT_DOCS;
- for (i=0; i<gDocsListLength; i++) {
- var sugg = gDocsMatches[i];
- var $li;
- if (sugg.type == "design") {
- $li = new_suggestion($(".suggest-card.design ul"));
- } else
- if (sugg.type == "distribute") {
- $li = new_suggestion($(".suggest-card.distribute ul"));
- } else
- if (sugg.type == "samples") {
- $li = new_suggestion($(".suggest-card.develop .child-card.samples"));
- } else
- if (sugg.type == "training") {
- $li = new_suggestion($(".suggest-card.develop .child-card.training"));
- } else
- if (sugg.type == "about"||"guide"||"tools"||"google") {
- $li = new_suggestion($(".suggest-card.develop .child-card.guides"));
- } else {
- continue;
- }
-
- set_item_values_jd(toroot, $li, sugg);
- set_item_selected($li, i == gSelectedIndex);
- }
-
- // add heading and show or hide card
- if ($(".suggest-card.design li").length > 0) {
- $(".suggest-card.design ul").prepend("<li class='header'>Design:</li>");
- $(".suggest-card.design").show(300);
- } else {
- $('.suggest-card.design').hide(300);
- }
- if ($(".suggest-card.distribute li").length > 0) {
- $(".suggest-card.distribute ul").prepend("<li class='header'>Distribute:</li>");
- $(".suggest-card.distribute").show(300);
- } else {
- $('.suggest-card.distribute').hide(300);
- }
- if ($(".child-card.guides li").length > 0) {
- $(".child-card.guides").prepend("<li class='header'>Guides:</li>");
- $(".child-card.guides li").appendTo(".suggest-card.develop ul");
- }
- if ($(".child-card.training li").length > 0) {
- $(".child-card.training").prepend("<li class='header'>Training:</li>");
- $(".child-card.training li").appendTo(".suggest-card.develop ul");
- }
- if ($(".child-card.samples li").length > 0) {
- $(".child-card.samples").prepend("<li class='header'>Samples:</li>");
- $(".child-card.samples li").appendTo(".suggest-card.develop ul");
- }
-
- if ($(".suggest-card.develop li").length > 0) {
- $(".suggest-card.develop").show(300);
- } else {
- $('.suggest-card.develop').hide(300);
- }
-
- } else {
- $('.search_filtered_wrapper.docs .suggest-card:not(.dummy)').hide(300);
- }
-}
-
-/** Called by the search input's onkeydown and onkeyup events.
- * Handles navigation with keyboard arrows, Enter key to invoke search,
- * otherwise invokes search suggestions on key-up event.
- * @param e The JS event
- * @param kd True if the event is key-down
- * @param toroot A string for the site's root path
- * @returns True if the event should bubble up
- */
-function search_changed(e, kd, toroot)
-{
- var currentLang = getLangPref();
- var search = document.getElementById("search_autocomplete");
- var text = search.value.replace(/(^ +)|( +$)/g, '');
- // get the ul hosting the currently selected item
- gSelectedColumn = gSelectedColumn >= 0 ? gSelectedColumn : 0;
- var $columns = $(".search_filtered_wrapper").find(".search_filtered:visible");
- var $selectedUl = $columns[gSelectedColumn];
-
- // show/hide the close button
- if (text != '') {
- $(".search .close").removeClass("hide");
- } else {
- $(".search .close").addClass("hide");
- }
- // 27 = esc
- if (e.keyCode == 27) {
- // close all search results
- if (kd) $('.search .close').trigger('click');
- return true;
- }
- // 13 = enter
- else if (e.keyCode == 13) {
- if (gSelectedIndex < 0) {
- $('.suggest-card').hide();
- if ($("#searchResults").is(":hidden") && (search.value != "")) {
- // if results aren't showing (and text not empty), return true to allow search to execute
- $('body,html').animate({scrollTop:0}, '500', 'swing');
- return true;
- } else {
- // otherwise, results are already showing, so allow ajax to auto refresh the results
- // and ignore this Enter press to avoid the reload.
- return false;
- }
- } else if (kd && gSelectedIndex >= 0) {
- // click the link corresponding to selected item
- $("a",$("li",$selectedUl)[gSelectedIndex]).get()[0].click();
- return false;
- }
- }
- // If Google results are showing, return true to allow ajax search to execute
- else if ($("#searchResults").is(":visible")) {
- // Also, if search_results is scrolled out of view, scroll to top to make results visible
- if ((sticky ) && (search.value != "")) {
- $('body,html').animate({scrollTop:0}, '500', 'swing');
- }
- return true;
- }
- // 38 UP ARROW
- else if (kd && (e.keyCode == 38)) {
- // if the next item is a header, skip it
- if ($($("li", $selectedUl)[gSelectedIndex-1]).hasClass("header")) {
- gSelectedIndex--;
- }
- if (gSelectedIndex >= 0) {
- $('li', $selectedUl).removeClass('jd-selected');
- gSelectedIndex--;
- $('li:nth-child('+(gSelectedIndex+1)+')', $selectedUl).addClass('jd-selected');
- // If user reaches top, reset selected column
- if (gSelectedIndex < 0) {
- gSelectedColumn = -1;
- }
}
return false;
- }
- // 40 DOWN ARROW
- else if (kd && (e.keyCode == 40)) {
- // if the next item is a header, skip it
- if ($($("li", $selectedUl)[gSelectedIndex+1]).hasClass("header")) {
- gSelectedIndex++;
- }
- if ((gSelectedIndex < $("li", $selectedUl).length-1) ||
- ($($("li", $selectedUl)[gSelectedIndex+1]).hasClass("header"))) {
- $('li', $selectedUl).removeClass('jd-selected');
- gSelectedIndex++;
- $('li:nth-child('+(gSelectedIndex+1)+')', $selectedUl).addClass('jd-selected');
- }
- return false;
- }
- // Consider left/right arrow navigation
- // NOTE: Order of suggest columns are reverse order (index position 0 is on right)
- else if (kd && $columns.length > 1 && gSelectedColumn >= 0) {
- // 37 LEFT ARROW
- // go left only if current column is not left-most column (last column)
- if (e.keyCode == 37 && gSelectedColumn < $columns.length - 1) {
- $('li', $selectedUl).removeClass('jd-selected');
- gSelectedColumn++;
- $selectedUl = $columns[gSelectedColumn];
- // keep or reset the selected item to last item as appropriate
- gSelectedIndex = gSelectedIndex >
- $("li", $selectedUl).length-1 ?
- $("li", $selectedUl).length-1 : gSelectedIndex;
- // if the corresponding item is a header, move down
- if ($($("li", $selectedUl)[gSelectedIndex]).hasClass("header")) {
- gSelectedIndex++;
- }
- // set item selected
- $('li:nth-child('+(gSelectedIndex+1)+')', $selectedUl).addClass('jd-selected');
- return false;
- }
- // 39 RIGHT ARROW
- // go right only if current column is not the right-most column (first column)
- else if (e.keyCode == 39 && gSelectedColumn > 0) {
- $('li', $selectedUl).removeClass('jd-selected');
- gSelectedColumn--;
- $selectedUl = $columns[gSelectedColumn];
- // keep or reset the selected item to last item as appropriate
- gSelectedIndex = gSelectedIndex >
- $("li", $selectedUl).length-1 ?
- $("li", $selectedUl).length-1 : gSelectedIndex;
- // if the corresponding item is a header, move down
- if ($($("li", $selectedUl)[gSelectedIndex]).hasClass("header")) {
- gSelectedIndex++;
- }
- // set item selected
- $('li:nth-child('+(gSelectedIndex+1)+')', $selectedUl).addClass('jd-selected');
- return false;
- }
- }
-
- // if key-up event and not arrow down/up/left/right,
- // read the search query and add suggestions to gMatches
- else if (!kd && (e.keyCode != 40)
- && (e.keyCode != 38)
- && (e.keyCode != 37)
- && (e.keyCode != 39)) {
- gSelectedIndex = -1;
- gMatches = new Array();
- matchedCount = 0;
- gGoogleMatches = new Array();
- matchedCountGoogle = 0;
- gDocsMatches = new Array();
- matchedCountDocs = 0;
-
- // Search for Android matches
- for (var i=0; i<DATA.length; i++) {
- var s = DATA[i];
- if (text.length != 0 &&
- s.label.toLowerCase().indexOf(text.toLowerCase()) != -1) {
- gMatches[matchedCount] = s;
- matchedCount++;
- }
- }
- rank_autocomplete_api_results(text, gMatches);
- for (var i=0; i<gMatches.length; i++) {
- var s = gMatches[i];
- }
-
-
- // Search for Google matches
- for (var i=0; i<GOOGLE_DATA.length; i++) {
- var s = GOOGLE_DATA[i];
- if (text.length != 0 &&
- s.label.toLowerCase().indexOf(text.toLowerCase()) != -1) {
- gGoogleMatches[matchedCountGoogle] = s;
- matchedCountGoogle++;
- }
- }
- rank_autocomplete_api_results(text, gGoogleMatches);
- for (var i=0; i<gGoogleMatches.length; i++) {
- var s = gGoogleMatches[i];
- }
-
- highlight_autocomplete_result_labels(text);
-
-
-
- // Search for matching JD docs
- if (text.length >= 2) {
- // Regex to match only the beginning of a word
- var textRegex = new RegExp("\\b" + text.toLowerCase(), "g");
-
-
- // Search for Training classes
- for (var i=0; i<TRAINING_RESOURCES.length; i++) {
- // current search comparison, with counters for tag and title,
- // used later to improve ranking
- var s = TRAINING_RESOURCES[i];
- s.matched_tag = 0;
- s.matched_title = 0;
- var matched = false;
-
- // Check if query matches any tags; work backwards toward 1 to assist ranking
- for (var j = s.keywords.length - 1; j >= 0; j--) {
- // it matches a tag
- if (s.keywords[j].toLowerCase().match(textRegex)) {
- matched = true;
- s.matched_tag = j + 1; // add 1 to index position
- }
- }
- // Don't consider doc title for lessons (only for class landing pages),
- // unless the lesson has a tag that already matches
- if ((s.lang == currentLang) &&
- (!(s.type == "training" && s.url.indexOf("index.html") == -1) || matched)) {
- // it matches the doc title
- if (s.title.toLowerCase().match(textRegex)) {
- matched = true;
- s.matched_title = 1;
- }
- }
- if (matched) {
- gDocsMatches[matchedCountDocs] = s;
- matchedCountDocs++;
- }
- }
-
-
- // Search for API Guides
- for (var i=0; i<GUIDE_RESOURCES.length; i++) {
- // current search comparison, with counters for tag and title,
- // used later to improve ranking
- var s = GUIDE_RESOURCES[i];
- s.matched_tag = 0;
- s.matched_title = 0;
- var matched = false;
-
- // Check if query matches any tags; work backwards toward 1 to assist ranking
- for (var j = s.keywords.length - 1; j >= 0; j--) {
- // it matches a tag
- if (s.keywords[j].toLowerCase().match(textRegex)) {
- matched = true;
- s.matched_tag = j + 1; // add 1 to index position
- }
- }
- // Check if query matches the doc title, but only for current language
- if (s.lang == currentLang) {
- // if query matches the doc title
- if (s.title.toLowerCase().match(textRegex)) {
- matched = true;
- s.matched_title = 1;
- }
- }
- if (matched) {
- gDocsMatches[matchedCountDocs] = s;
- matchedCountDocs++;
- }
- }
-
-
- // Search for Tools Guides
- for (var i=0; i<TOOLS_RESOURCES.length; i++) {
- // current search comparison, with counters for tag and title,
- // used later to improve ranking
- var s = TOOLS_RESOURCES[i];
- s.matched_tag = 0;
- s.matched_title = 0;
- var matched = false;
-
- // Check if query matches any tags; work backwards toward 1 to assist ranking
- for (var j = s.keywords.length - 1; j >= 0; j--) {
- // it matches a tag
- if (s.keywords[j].toLowerCase().match(textRegex)) {
- matched = true;
- s.matched_tag = j + 1; // add 1 to index position
- }
- }
- // Check if query matches the doc title, but only for current language
- if (s.lang == currentLang) {
- // if query matches the doc title
- if (s.title.toLowerCase().match(textRegex)) {
- matched = true;
- s.matched_title = 1;
- }
- }
- if (matched) {
- gDocsMatches[matchedCountDocs] = s;
- matchedCountDocs++;
- }
- }
-
-
- // Search for About docs
- for (var i=0; i<ABOUT_RESOURCES.length; i++) {
- // current search comparison, with counters for tag and title,
- // used later to improve ranking
- var s = ABOUT_RESOURCES[i];
- s.matched_tag = 0;
- s.matched_title = 0;
- var matched = false;
-
- // Check if query matches any tags; work backwards toward 1 to assist ranking
- for (var j = s.keywords.length - 1; j >= 0; j--) {
- // it matches a tag
- if (s.keywords[j].toLowerCase().match(textRegex)) {
- matched = true;
- s.matched_tag = j + 1; // add 1 to index position
- }
- }
- // Check if query matches the doc title, but only for current language
- if (s.lang == currentLang) {
- // if query matches the doc title
- if (s.title.toLowerCase().match(textRegex)) {
- matched = true;
- s.matched_title = 1;
- }
- }
- if (matched) {
- gDocsMatches[matchedCountDocs] = s;
- matchedCountDocs++;
- }
- }
-
-
- // Search for Design guides
- for (var i=0; i<DESIGN_RESOURCES.length; i++) {
- // current search comparison, with counters for tag and title,
- // used later to improve ranking
- var s = DESIGN_RESOURCES[i];
- s.matched_tag = 0;
- s.matched_title = 0;
- var matched = false;
-
- // Check if query matches any tags; work backwards toward 1 to assist ranking
- for (var j = s.keywords.length - 1; j >= 0; j--) {
- // it matches a tag
- if (s.keywords[j].toLowerCase().match(textRegex)) {
- matched = true;
- s.matched_tag = j + 1; // add 1 to index position
- }
- }
- // Check if query matches the doc title, but only for current language
- if (s.lang == currentLang) {
- // if query matches the doc title
- if (s.title.toLowerCase().match(textRegex)) {
- matched = true;
- s.matched_title = 1;
- }
- }
- if (matched) {
- gDocsMatches[matchedCountDocs] = s;
- matchedCountDocs++;
- }
- }
-
-
- // Search for Distribute guides
- for (var i=0; i<DISTRIBUTE_RESOURCES.length; i++) {
- // current search comparison, with counters for tag and title,
- // used later to improve ranking
- var s = DISTRIBUTE_RESOURCES[i];
- s.matched_tag = 0;
- s.matched_title = 0;
- var matched = false;
-
- // Check if query matches any tags; work backwards toward 1 to assist ranking
- for (var j = s.keywords.length - 1; j >= 0; j--) {
- // it matches a tag
- if (s.keywords[j].toLowerCase().match(textRegex)) {
- matched = true;
- s.matched_tag = j + 1; // add 1 to index position
- }
- }
- // Check if query matches the doc title, but only for current language
- if (s.lang == currentLang) {
- // if query matches the doc title
- if (s.title.toLowerCase().match(textRegex)) {
- matched = true;
- s.matched_title = 1;
- }
- }
- if (matched) {
- gDocsMatches[matchedCountDocs] = s;
- matchedCountDocs++;
- }
- }
-
-
- // Search for Google guides
- for (var i=0; i<GOOGLE_RESOURCES.length; i++) {
- // current search comparison, with counters for tag and title,
- // used later to improve ranking
- var s = GOOGLE_RESOURCES[i];
- s.matched_tag = 0;
- s.matched_title = 0;
- var matched = false;
-
- // Check if query matches any tags; work backwards toward 1 to assist ranking
- for (var j = s.keywords.length - 1; j >= 0; j--) {
- // it matches a tag
- if (s.keywords[j].toLowerCase().match(textRegex)) {
- matched = true;
- s.matched_tag = j + 1; // add 1 to index position
- }
- }
- // Check if query matches the doc title, but only for current language
- if (s.lang == currentLang) {
- // if query matches the doc title
- if (s.title.toLowerCase().match(textRegex)) {
- matched = true;
- s.matched_title = 1;
- }
- }
- if (matched) {
- gDocsMatches[matchedCountDocs] = s;
- matchedCountDocs++;
- }
- }
-
-
- // Search for Samples
- for (var i=0; i<SAMPLES_RESOURCES.length; i++) {
- // current search comparison, with counters for tag and title,
- // used later to improve ranking
- var s = SAMPLES_RESOURCES[i];
- s.matched_tag = 0;
- s.matched_title = 0;
- var matched = false;
- // Check if query matches any tags; work backwards toward 1 to assist ranking
- for (var j = s.keywords.length - 1; j >= 0; j--) {
- // it matches a tag
- if (s.keywords[j].toLowerCase().match(textRegex)) {
- matched = true;
- s.matched_tag = j + 1; // add 1 to index position
- }
- }
- // Check if query matches the doc title, but only for current language
- if (s.lang == currentLang) {
- // if query matches the doc title.t
- if (s.title.toLowerCase().match(textRegex)) {
- matched = true;
- s.matched_title = 1;
- }
- }
- if (matched) {
- gDocsMatches[matchedCountDocs] = s;
- matchedCountDocs++;
- }
- }
-
- // Rank/sort all the matched pages
- rank_autocomplete_doc_results(text, gDocsMatches);
- }
-
- // draw the suggestions
- sync_selection_table(toroot);
- return true; // allow the event to bubble up to the search api
- }
-}
-
-/* Order the jd doc result list based on match quality */
-function rank_autocomplete_doc_results(query, matches) {
- query = query || '';
- if (!matches || !matches.length)
- return;
-
- var _resultScoreFn = function(match) {
- var score = 1.0;
-
- // if the query matched a tag
- if (match.matched_tag > 0) {
- // multiply score by factor relative to position in tags list (max of 3)
- score *= 3 / match.matched_tag;
-
- // if it also matched the title
- if (match.matched_title > 0) {
- score *= 2;
- }
- } else if (match.matched_title > 0) {
- score *= 3;
- }
-
- return score;
- };
-
- for (var i=0; i<matches.length; i++) {
- matches[i].__resultScore = _resultScoreFn(matches[i]);
- }
-
- matches.sort(function(a,b){
- var n = b.__resultScore - a.__resultScore;
- if (n == 0) // lexicographical sort if scores are the same
- n = (a.label < b.label) ? -1 : 1;
- return n;
+ };
});
-}
+ };
-/* Order the result list based on match quality */
-function rank_autocomplete_api_results(query, matches) {
- query = query || '';
- if (!matches || !matches.length)
- return;
+ function css(el, prop) {
+ return parseInt($.css(el[0], prop)) || 0;
+ };
+ function width(el) {
+ return el[0].offsetWidth + css(el, 'marginLeft') + css(el, 'marginRight');
+ };
+ function height(el) {
+ return el[0].offsetHeight + css(el, 'marginTop') + css(el, 'marginBottom');
+ };
- // helper function that gets the last occurence index of the given regex
- // in the given string, or -1 if not found
- var _lastSearch = function(s, re) {
- if (s == '')
- return -1;
- var l = -1;
- var tmp;
- while ((tmp = s.search(re)) >= 0) {
- if (l < 0) l = 0;
- l += tmp;
- s = s.substr(tmp + 1);
- }
- return l;
- };
-
- // helper function that counts the occurrences of a given character in
- // a given string
- var _countChar = function(s, c) {
- var n = 0;
- for (var i=0; i<s.length; i++)
- if (s.charAt(i) == c) ++n;
- return n;
- };
-
- var queryLower = query.toLowerCase();
- var queryAlnum = (queryLower.match(/\w+/) || [''])[0];
- var partPrefixAlnumRE = new RegExp('\\b' + queryAlnum);
- var partExactAlnumRE = new RegExp('\\b' + queryAlnum + '\\b');
-
- var _resultScoreFn = function(result) {
- // scores are calculated based on exact and prefix matches,
- // and then number of path separators (dots) from the last
- // match (i.e. favoring classes and deep package names)
- var score = 1.0;
- var labelLower = result.label.toLowerCase();
- var t;
- t = _lastSearch(labelLower, partExactAlnumRE);
- if (t >= 0) {
- // exact part match
- var partsAfter = _countChar(labelLower.substr(t + 1), '.');
- score *= 200 / (partsAfter + 1);
- } else {
- t = _lastSearch(labelLower, partPrefixAlnumRE);
- if (t >= 0) {
- // part prefix match
- var partsAfter = _countChar(labelLower.substr(t + 1), '.');
- score *= 20 / (partsAfter + 1);
- }
- }
-
- return score;
- };
-
- for (var i=0; i<matches.length; i++) {
- // if the API is deprecated, default score is 0; otherwise, perform scoring
- if (matches[i].deprecated == "true") {
- matches[i].__resultScore = 0;
- } else {
- matches[i].__resultScore = _resultScoreFn(matches[i]);
- }
- }
-
- matches.sort(function(a,b){
- var n = b.__resultScore - a.__resultScore;
- if (n == 0) // lexicographical sort if scores are the same
- n = (a.label < b.label) ? -1 : 1;
- return n;
- });
-}
-
-/* Add emphasis to part of string that matches query */
-function highlight_autocomplete_result_labels(query) {
- query = query || '';
- if ((!gMatches || !gMatches.length) && (!gGoogleMatches || !gGoogleMatches.length))
- return;
-
- var queryLower = query.toLowerCase();
- var queryAlnumDot = (queryLower.match(/[\w\.]+/) || [''])[0];
- var queryRE = new RegExp(
- '(' + queryAlnumDot.replace(/\./g, '\\.') + ')', 'ig');
- for (var i=0; i<gMatches.length; i++) {
- gMatches[i].__hilabel = gMatches[i].label.replace(
- queryRE, '<b>$1</b>');
- }
- for (var i=0; i<gGoogleMatches.length; i++) {
- gGoogleMatches[i].__hilabel = gGoogleMatches[i].label.replace(
- queryRE, '<b>$1</b>');
- }
-}
-
-function search_focus_changed(obj, focused)
-{
- if (!focused) {
- if(obj.value == ""){
- $(".search .close").addClass("hide");
- }
- $(".suggest-card").hide();
- }
-}
-
-function submit_search() {
- var query = document.getElementById('search_autocomplete').value;
- location.hash = 'q=' + query;
- loadSearchResults();
- $("#searchResults").slideDown('slow', setStickyTop);
- return false;
-}
-
-
-function hideResults() {
- $("#searchResults").slideUp('fast', setStickyTop);
- $(".search .close").addClass("hide");
- location.hash = '';
-
- $("#search_autocomplete").val("").blur();
-
- // reset the ajax search callback to nothing, so results don't appear unless ENTER
- searchControl.setSearchStartingCallback(this, function(control, searcher, query) {});
-
- // forcefully regain key-up event control (previously jacked by search api)
- $("#search_autocomplete").keyup(function(event) {
- return search_changed(event, false, toRoot);
- });
-
- return false;
-}
-
-
-
-/* ########################################################## */
-/* ################ CUSTOM SEARCH ENGINE ################## */
-/* ########################################################## */
-
-var searchControl;
-google.load('search', '1', {"callback" : function() {
- searchControl = new google.search.SearchControl();
- } });
-
-function loadSearchResults() {
- document.getElementById("search_autocomplete").style.color = "#000";
-
- searchControl = new google.search.SearchControl();
-
- // use our existing search form and use tabs when multiple searchers are used
- drawOptions = new google.search.DrawOptions();
- drawOptions.setDrawMode(google.search.SearchControl.DRAW_MODE_TABBED);
- drawOptions.setInput(document.getElementById("search_autocomplete"));
-
- // configure search result options
- searchOptions = new google.search.SearcherOptions();
- searchOptions.setExpandMode(GSearchControl.EXPAND_MODE_OPEN);
-
- // configure each of the searchers, for each tab
- devSiteSearcher = new google.search.WebSearch();
- devSiteSearcher.setUserDefinedLabel("All");
- devSiteSearcher.setSiteRestriction("001482626316274216503:zu90b7s047u");
-
- designSearcher = new google.search.WebSearch();
- designSearcher.setUserDefinedLabel("Design");
- designSearcher.setSiteRestriction("http://developer.android.com/design/");
-
- trainingSearcher = new google.search.WebSearch();
- trainingSearcher.setUserDefinedLabel("Training");
- trainingSearcher.setSiteRestriction("http://developer.android.com/training/");
-
- guidesSearcher = new google.search.WebSearch();
- guidesSearcher.setUserDefinedLabel("Guides");
- guidesSearcher.setSiteRestriction("http://developer.android.com/guide/");
-
- referenceSearcher = new google.search.WebSearch();
- referenceSearcher.setUserDefinedLabel("Reference");
- referenceSearcher.setSiteRestriction("http://developer.android.com/reference/");
-
- googleSearcher = new google.search.WebSearch();
- googleSearcher.setUserDefinedLabel("Google Services");
- googleSearcher.setSiteRestriction("http://developer.android.com/google/");
-
- blogSearcher = new google.search.WebSearch();
- blogSearcher.setUserDefinedLabel("Blog");
- blogSearcher.setSiteRestriction("http://android-developers.blogspot.com");
-
- // add each searcher to the search control
- searchControl.addSearcher(devSiteSearcher, searchOptions);
- searchControl.addSearcher(designSearcher, searchOptions);
- searchControl.addSearcher(trainingSearcher, searchOptions);
- searchControl.addSearcher(guidesSearcher, searchOptions);
- searchControl.addSearcher(referenceSearcher, searchOptions);
- searchControl.addSearcher(googleSearcher, searchOptions);
- searchControl.addSearcher(blogSearcher, searchOptions);
-
- // configure result options
- searchControl.setResultSetSize(google.search.Search.LARGE_RESULTSET);
- searchControl.setLinkTarget(google.search.Search.LINK_TARGET_SELF);
- searchControl.setTimeoutInterval(google.search.SearchControl.TIMEOUT_SHORT);
- searchControl.setNoResultsString(google.search.SearchControl.NO_RESULTS_DEFAULT_STRING);
-
- // upon ajax search, refresh the url and search title
- searchControl.setSearchStartingCallback(this, function(control, searcher, query) {
- updateResultTitle(query);
- var query = document.getElementById('search_autocomplete').value;
- location.hash = 'q=' + query;
- });
-
- // once search results load, set up click listeners
- searchControl.setSearchCompleteCallback(this, function(control, searcher, query) {
- addResultClickListeners();
- });
-
- // draw the search results box
- searchControl.draw(document.getElementById("leftSearchControl"), drawOptions);
-
- // get query and execute the search
- searchControl.execute(decodeURI(getQuery(location.hash)));
-
- document.getElementById("search_autocomplete").focus();
- addTabListeners();
-}
-// End of loadSearchResults
-
-
-google.setOnLoadCallback(function(){
- if (location.hash.indexOf("q=") == -1) {
- // if there's no query in the url, don't search and make sure results are hidden
- $('#searchResults').hide();
- return;
- } else {
- // first time loading search results for this page
- $('#searchResults').slideDown('slow', setStickyTop);
- $(".search .close").removeClass("hide");
- loadSearchResults();
- }
-}, true);
-
-/* Adjust the scroll position to account for sticky header, only if the hash matches an id.
- This does not handle <a name=""> tags. Some CSS fixes those, but only for reference docs. */
-function offsetScrollForSticky() {
- // Ignore if there's no search bar (some special pages have no header)
- if ($("#search-container").length < 1) return;
-
- var hash = escape(location.hash.substr(1));
- var $matchingElement = $("#"+hash);
- // Sanity check that there's an element with that ID on the page
- if ($matchingElement.length) {
- // If the position of the target element is near the top of the page (<20px, where we expect it
- // to be because we need to move it down 60px to become in view), then move it down 60px
- if (Math.abs($matchingElement.offset().top - $(window).scrollTop()) < 20) {
- $(window).scrollTop($(window).scrollTop() - 60);
- }
- }
-}
-
-// when an event on the browser history occurs (back, forward, load) requery hash and do search
-$(window).hashchange( function(){
- // Ignore if there's no search bar (some special pages have no header)
- if ($("#search-container").length < 1) return;
-
- // If the hash isn't a search query or there's an error in the query,
- // then adjust the scroll position to account for sticky header, then exit.
- if ((location.hash.indexOf("q=") == -1) || (query == "undefined")) {
- // If the results pane is open, close it.
- if (!$("#searchResults").is(":hidden")) {
- hideResults();
- }
- offsetScrollForSticky();
- return;
- }
-
- // Otherwise, we have a search to do
- var query = decodeURI(getQuery(location.hash));
- searchControl.execute(query);
- $('#searchResults').slideDown('slow', setStickyTop);
- $("#search_autocomplete").focus();
- $(".search .close").removeClass("hide");
-
- updateResultTitle(query);
-});
-
-function updateResultTitle(query) {
- $("#searchTitle").html("Results for <em>" + escapeHTML(query) + "</em>");
-}
-
-// forcefully regain key-up event control (previously jacked by search api)
-$("#search_autocomplete").keyup(function(event) {
- return search_changed(event, false, toRoot);
-});
-
-// add event listeners to each tab so we can track the browser history
-function addTabListeners() {
- var tabHeaders = $(".gsc-tabHeader");
- for (var i = 0; i < tabHeaders.length; i++) {
- $(tabHeaders[i]).attr("id",i).click(function() {
- /*
- // make a copy of the page numbers for the search left pane
- setTimeout(function() {
- // remove any residual page numbers
- $('#searchResults .gsc-tabsArea .gsc-cursor-box.gs-bidi-start-align').remove();
- // move the page numbers to the left position; make a clone,
- // because the element is drawn to the DOM only once
- // and because we're going to remove it (previous line),
- // we need it to be available to move again as the user navigates
- $('#searchResults .gsc-webResult .gsc-cursor-box.gs-bidi-start-align:visible')
- .clone().appendTo('#searchResults .gsc-tabsArea');
- }, 200);
- */
- });
- }
- setTimeout(function(){$(tabHeaders[0]).click()},200);
-}
-
-// add analytics tracking events to each result link
-function addResultClickListeners() {
- $("#searchResults a.gs-title").each(function(index, link) {
- // When user clicks enter for Google search results, track it
- $(link).click(function() {
- ga('send', 'event', 'Google Click', 'clicked: ' + $(this).attr('href'),
- 'query: ' + $("#search_autocomplete").val().toLowerCase());
- });
- });
-}
-
-
-function getQuery(hash) {
- var queryParts = hash.split('=');
- return queryParts[1];
-}
-
-/* returns the given string with all HTML brackets converted to entities
- TODO: move this to the site's JS library */
-function escapeHTML(string) {
- return string.replace(/</g,"<")
- .replace(/>/g,">");
-}
-
-
-
-
-
-
+})(jQuery);
/* ######################################################## */
/* ################# JAVADOC REFERENCE ################### */
@@ -2787,14 +828,13 @@
/* Initialize some droiddoc stuff, but only if we're in the reference */
if (location.pathname.indexOf("/reference") == 0) {
- if(!(location.pathname.indexOf("/reference-gms/packages.html") == 0)
- && !(location.pathname.indexOf("/reference-gcm/packages.html") == 0)
- && !(location.pathname.indexOf("/reference/com/google") == 0)) {
+ if (!(location.pathname.indexOf("/reference-gms/packages.html") == 0) &&
+ !(location.pathname.indexOf("/reference-gcm/packages.html") == 0) &&
+ !(location.pathname.indexOf("/reference/com/google") == 0)) {
$(document).ready(function() {
// init available apis based on user pref
changeApiLevel();
- initSidenavHeightResize()
- });
+ });
}
}
@@ -2802,45 +842,6 @@
var minLevel = 1;
var maxLevel = 1;
-/******* SIDENAV DIMENSIONS ************/
-
- function initSidenavHeightResize() {
- // Change the drag bar size to nicely fit the scrollbar positions
- var $dragBar = $(".ui-resizable-s");
- $dragBar.css({'width': $dragBar.parent().width() - 5 + "px"});
-
- $( "#resize-packages-nav" ).resizable({
- containment: "#nav-panels",
- handles: "s",
- alsoResize: "#packages-nav",
- resize: function(event, ui) { resizeNav(); }, /* resize the nav while dragging */
- stop: function(event, ui) { saveNavPanels(); } /* once stopped, save the sizes to cookie */
- });
-
- }
-
-function updateSidenavFixedWidth() {
- if (!sticky) return;
- $('#devdoc-nav').css({
- 'width' : $('#side-nav').css('width'),
- 'margin' : $('#side-nav').css('margin')
- });
- $('#devdoc-nav a.totop').css({'display':'block','width':$("#nav").innerWidth()+'px'});
-
- initSidenavHeightResize();
-}
-
-function updateSidenavFullscreenWidth() {
- if (!sticky) return;
- $('#devdoc-nav').css({
- 'width' : $('#side-nav').css('width'),
- 'margin' : $('#side-nav').css('margin')
- });
- $('#devdoc-nav .totop').css({'left': 'inherit'});
-
- initSidenavHeightResize();
-}
-
function buildApiLevelSelector() {
maxLevel = SINCE_DATA.length;
var userApiLevel = parseInt(readCookie(API_LEVEL_COOKIE));
@@ -2854,15 +855,15 @@
minLevel = maxLevel;
}
var select = $("#apiLevelSelector").html("").change(changeApiLevel);
- for (var i = maxLevel-1; i >= 0; i--) {
- var option = $("<option />").attr("value",""+SINCE_DATA[i]).append(""+SINCE_DATA[i]);
- // if (SINCE_DATA[i] < minLevel) option.addClass("absent"); // always false for strings (codenames)
+ for (var i = maxLevel - 1; i >= 0; i--) {
+ var option = $("<option />").attr("value", "" + SINCE_DATA[i]).append("" + SINCE_DATA[i]);
+ // if (SINCE_DATA[i] < minLevel) option.addClass("absent"); // always false for strings (codenames)
select.append(option);
}
// get the DOM element and use setAttribute cuz IE6 fails when using jquery .attr('selected',true)
- var selectedLevelItem = $("#apiLevelSelector option[value='"+userApiLevel+"']").get(0);
- selectedLevelItem.setAttribute('selected',true);
+ var selectedLevelItem = $("#apiLevelSelector option[value='" + userApiLevel + "']").get(0);
+ selectedLevelItem.setAttribute('selected', true);
}
function changeApiLevel() {
@@ -2875,30 +876,29 @@
writeCookie(API_LEVEL_COOKIE, selectedLevel, null);
if (selectedLevel < minLevel) {
- var thing = ($("#jd-header").html().indexOf("package") != -1) ? "package" : "class";
- $("#naMessage").show().html("<div><p><strong>This " + thing
- + " requires API level " + minLevel + " or higher.</strong></p>"
- + "<p>This document is hidden because your selected API level for the documentation is "
- + selectedLevel + ". You can change the documentation API level with the selector "
- + "above the left navigation.</p>"
- + "<p>For more information about specifying the API level your app requires, "
- + "read <a href='" + toRoot + "training/basics/supporting-devices/platforms.html'"
- + ">Supporting Different Platform Versions</a>.</p>"
- + "<input type='button' value='OK, make this page visible' "
- + "title='Change the API level to " + minLevel + "' "
- + "onclick='$(\"#apiLevelSelector\").val(\"" + minLevel + "\");changeApiLevel();' />"
- + "</div>");
+ $("#naMessage").show().html("<div><p><strong>This API" +
+ " requires API level " + minLevel + " or higher.</strong></p>" +
+ "<p>This document is hidden because your selected API level for the documentation is " +
+ selectedLevel + ". You can change the documentation API level with the selector " +
+ "above the left navigation.</p>" +
+ "<p>For more information about specifying the API level your app requires, " +
+ "read <a href='" + toRoot + "training/basics/supporting-devices/platforms.html'" +
+ ">Supporting Different Platform Versions</a>.</p>" +
+ "<input type='button' value='OK, make this page visible' " +
+ "title='Change the API level to " + minLevel + "' " +
+ "onclick='$(\"#apiLevelSelector\").val(\"" + minLevel + "\");changeApiLevel();' />" +
+ "</div>");
} else {
$("#naMessage").hide();
}
}
function toggleVisisbleApis(selectedLevel, context) {
- var apis = $(".api",context);
+ var apis = $(".api", context);
apis.each(function(i) {
var obj = $(this);
var className = obj.attr("class");
- var apiLevelIndex = className.lastIndexOf("-")+1;
+ var apiLevelIndex = className.lastIndexOf("-") + 1;
var apiLevelEndIndex = className.indexOf(" ", apiLevelIndex);
apiLevelEndIndex = apiLevelEndIndex != -1 ? apiLevelEndIndex : className.length;
var apiLevel = className.substring(apiLevelIndex, apiLevelEndIndex);
@@ -2911,241 +911,30 @@
var selectedLevelNum = parseInt(selectedLevel)
var apiLevelNum = parseInt(apiLevel);
if (isNaN(apiLevelNum)) {
- apiLevelNum = maxLevel;
+ apiLevelNum = maxLevel;
}
// Grey things out that aren't available and give a tooltip title
if (apiLevelNum > selectedLevelNum) {
- obj.addClass("absent").attr("title","Requires API Level \""
- + apiLevel + "\" or higher. To reveal, change the target API level "
- + "above the left navigation.");
- }
- else obj.removeClass("absent").removeAttr("title");
+ obj.addClass("absent").attr("title", "Requires API Level \"" +
+ apiLevel + "\" or higher. To reveal, change the target API level " +
+ "above the left navigation.");
+ } else obj.removeClass("absent").removeAttr("title");
});
}
-
-
-
/* ################# SIDENAV TREE VIEW ################### */
-
-function new_node(me, mom, text, link, children_data, api_level)
-{
- var node = new Object();
- node.children = Array();
- node.children_data = children_data;
- node.depth = mom.depth + 1;
-
- node.li = document.createElement("li");
- mom.get_children_ul().appendChild(node.li);
-
- node.label_div = document.createElement("div");
- node.label_div.className = "label";
- if (api_level != null) {
- $(node.label_div).addClass("api");
- $(node.label_div).addClass("api-level-"+api_level);
- }
- node.li.appendChild(node.label_div);
-
- if (children_data != null) {
- node.expand_toggle = document.createElement("a");
- node.expand_toggle.href = "javascript:void(0)";
- node.expand_toggle.onclick = function() {
- if (node.expanded) {
- $(node.get_children_ul()).slideUp("fast");
- node.plus_img.src = me.toroot + "assets/images/triangle-closed-small.png";
- node.expanded = false;
- } else {
- expand_node(me, node);
- }
- };
- node.label_div.appendChild(node.expand_toggle);
-
- node.plus_img = document.createElement("img");
- node.plus_img.src = me.toroot + "assets/images/triangle-closed-small.png";
- node.plus_img.className = "plus";
- node.plus_img.width = "8";
- node.plus_img.border = "0";
- node.expand_toggle.appendChild(node.plus_img);
-
- node.expanded = false;
- }
-
- var a = document.createElement("a");
- node.label_div.appendChild(a);
- node.label = document.createTextNode(text);
- a.appendChild(node.label);
- if (link) {
- a.href = me.toroot + link;
- } else {
- if (children_data != null) {
- a.className = "nolink";
- a.href = "javascript:void(0)";
- a.onclick = node.expand_toggle.onclick;
- // This next line shouldn't be necessary. I'll buy a beer for the first
- // person who figures out how to remove this line and have the link
- // toggle shut on the first try. --joeo@android.com
- node.expanded = false;
- }
- }
-
-
- node.children_ul = null;
- node.get_children_ul = function() {
- if (!node.children_ul) {
- node.children_ul = document.createElement("ul");
- node.children_ul.className = "children_ul";
- node.children_ul.style.display = "none";
- node.li.appendChild(node.children_ul);
- }
- return node.children_ul;
- };
-
- return node;
-}
-
-
-
-
-function expand_node(me, node)
-{
- if (node.children_data && !node.expanded) {
- if (node.children_visited) {
- $(node.get_children_ul()).slideDown("fast");
- } else {
- get_node(me, node);
- if ($(node.label_div).hasClass("absent")) {
- $(node.get_children_ul()).addClass("absent");
- }
- $(node.get_children_ul()).slideDown("fast");
- }
- node.plus_img.src = me.toroot + "assets/images/triangle-opened-small.png";
- node.expanded = true;
-
- // perform api level toggling because new nodes are new to the DOM
- var selectedLevel = $("#apiLevelSelector option:selected").val();
- toggleVisisbleApis(selectedLevel, "#side-nav");
- }
-}
-
-function get_node(me, mom)
-{
- mom.children_visited = true;
- for (var i in mom.children_data) {
- var node_data = mom.children_data[i];
- mom.children[i] = new_node(me, mom, node_data[0], node_data[1],
- node_data[2], node_data[3]);
- }
-}
-
-function this_page_relative(toroot)
-{
- var full = document.location.pathname;
- var file = "";
- if (toroot.substr(0, 1) == "/") {
- if (full.substr(0, toroot.length) == toroot) {
- return full.substr(toroot.length);
- } else {
- // the file isn't under toroot. Fail.
- return null;
- }
- } else {
- if (toroot != "./") {
- toroot = "./" + toroot;
- }
- do {
- if (toroot.substr(toroot.length-3, 3) == "../" || toroot == "./") {
- var pos = full.lastIndexOf("/");
- file = full.substr(pos) + file;
- full = full.substr(0, pos);
- toroot = toroot.substr(0, toroot.length-3);
- }
- } while (toroot != "" && toroot != "/");
- return file.substr(1);
- }
-}
-
-function find_page(url, data)
-{
- var nodes = data;
- var result = null;
- for (var i in nodes) {
- var d = nodes[i];
- if (d[1] == url) {
- return new Array(i);
- }
- else if (d[2] != null) {
- result = find_page(url, d[2]);
- if (result != null) {
- return (new Array(i).concat(result));
- }
- }
- }
- return null;
-}
-
-function init_default_navtree(toroot) {
- // load json file for navtree data
- $.getScript(toRoot + 'navtree_data.js', function(data, textStatus, jqxhr) {
- // when the file is loaded, initialize the tree
- if(jqxhr.status === 200) {
- init_navtree("tree-list", toroot, NAVTREE_DATA);
- }
- });
-
- // perform api level toggling because because the whole tree is new to the DOM
- var selectedLevel = $("#apiLevelSelector option:selected").val();
- toggleVisisbleApis(selectedLevel, "#side-nav");
-}
-
-function init_navtree(navtree_id, toroot, root_nodes)
-{
- var me = new Object();
- me.toroot = toroot;
- me.node = new Object();
-
- me.node.li = document.getElementById(navtree_id);
- me.node.children_data = root_nodes;
- me.node.children = new Array();
- me.node.children_ul = document.createElement("ul");
- me.node.get_children_ul = function() { return me.node.children_ul; };
- //me.node.children_ul.className = "children_ul";
- me.node.li.appendChild(me.node.children_ul);
- me.node.depth = 0;
-
- get_node(me, me.node);
-
- me.this_page = this_page_relative(toroot);
- me.breadcrumbs = find_page(me.this_page, root_nodes);
- if (me.breadcrumbs != null && me.breadcrumbs.length != 0) {
- var mom = me.node;
- for (var i in me.breadcrumbs) {
- var j = me.breadcrumbs[i];
- mom = mom.children[j];
- expand_node(me, mom);
- }
- mom.label_div.className = mom.label_div.className + " selected";
- addLoadEvent(function() {
- scrollIntoView("nav-tree");
- });
- }
-}
-
-
-
-
-
-
-
-
/* TODO: eliminate redundancy with non-google functions */
-function init_google_navtree(navtree_id, toroot, root_nodes)
-{
+function init_google_navtree(navtree_id, toroot, root_nodes) {
var me = new Object();
me.toroot = toroot;
me.node = new Object();
me.node.li = document.getElementById(navtree_id);
+ if (!me.node.li) {
+ return;
+ }
+
me.node.children_data = root_nodes;
me.node.children = new Array();
me.node.children_ul = document.createElement("ul");
@@ -3157,8 +946,7 @@
get_google_node(me, me.node);
}
-function new_google_node(me, mom, text, link, children_data, api_level)
-{
+function new_google_node(me, mom, text, link, children_data, api_level) {
var node = new Object();
var child;
node.children = Array();
@@ -3176,28 +964,25 @@
mom.get_children_ul().appendChild(node.li);
-
- if(link) {
+ if (link) {
child = document.createElement("a");
- }
- else {
+ } else {
child = document.createElement("span");
child.className = "tree-list-subtitle";
}
if (children_data != null) {
- node.li.className="nav-section";
+ node.li.className = "nav-section";
node.label_div = document.createElement("div");
node.label_div.className = "nav-section-header-ref";
node.li.appendChild(node.label_div);
get_google_node(me, node);
node.label_div.appendChild(child);
- }
- else {
+ } else {
node.li.appendChild(child);
}
- if(link) {
+ if (link) {
child.href = me.toroot + link;
}
node.label = document.createTextNode(text);
@@ -3208,27 +993,21 @@
return node;
}
-function get_google_node(me, mom)
-{
+function get_google_node(me, mom) {
mom.children_visited = true;
var linkText;
for (var i in mom.children_data) {
var node_data = mom.children_data[i];
linkText = node_data[0];
- if(linkText.match("^"+"com.google.android")=="com.google.android"){
+ if (linkText.match("^" + "com.google.android") == "com.google.android") {
linkText = linkText.substr(19, linkText.length);
}
- mom.children[i] = new_google_node(me, mom, linkText, node_data[1],
- node_data[2], node_data[3]);
+ mom.children[i] = new_google_node(me, mom, linkText, node_data[1],
+ node_data[2], node_data[3]);
}
}
-
-
-
-
-
/****** NEW version of script to build google and sample navs dynamically ******/
// TODO: update Google reference docs to tolerate this new implementation
@@ -3238,9 +1017,8 @@
var NODE_TAGS = 3;
var NODE_CHILDREN = 4;
-function init_google_navtree2(navtree_id, data)
-{
- var $containerUl = $("#"+navtree_id);
+function init_google_navtree2(navtree_id, data) {
+ var $containerUl = $("#" + navtree_id);
for (var i in data) {
var node_data = data[i];
$containerUl.append(new_google_node2(node_data));
@@ -3249,23 +1027,22 @@
// Make all third-generation list items 'sticky' to prevent them from collapsing
$containerUl.find('li li li.nav-section').addClass('sticky');
- initExpandableNavItems("#"+navtree_id);
+ initExpandableNavItems("#" + navtree_id);
}
-function new_google_node2(node_data)
-{
+function new_google_node2(node_data) {
var linkText = node_data[NODE_NAME];
- if(linkText.match("^"+"com.google.android")=="com.google.android"){
+ if (linkText.match("^" + "com.google.android") == "com.google.android") {
linkText = linkText.substr(19, linkText.length);
}
var $li = $('<li>');
var $a;
if (node_data[NODE_HREF] != null) {
- $a = $('<a href="' + toRoot + node_data[NODE_HREF] + '" title="' + linkText + '" >'
- + linkText + '</a>');
+ $a = $('<a href="' + toRoot + node_data[NODE_HREF] + '" title="' + linkText + '" >' +
+ linkText + '</a>');
} else {
- $a = $('<a href="#" onclick="return false;" title="' + linkText + '" >'
- + linkText + '/</a>');
+ $a = $('<a href="#" onclick="return false;" title="' + linkText + '" >' +
+ linkText + '/</a>');
}
var $childUl = $('<ul>');
if (node_data[NODE_CHILDREN] != null) {
@@ -3284,16 +1061,6 @@
return $li;
}
-
-
-
-
-
-
-
-
-
-
function showGoogleRefTree() {
init_default_google_navtree(toRoot);
init_default_gcm_navtree(toRoot);
@@ -3302,49 +1069,22 @@
function init_default_google_navtree(toroot) {
// load json file for navtree data
$.getScript(toRoot + 'gms_navtree_data.js', function(data, textStatus, jqxhr) {
- // when the file is loaded, initialize the tree
- if(jqxhr.status === 200) {
- init_google_navtree("gms-tree-list", toroot, GMS_NAVTREE_DATA);
- highlightSidenav();
- resizeNav();
- }
+ // when the file is loaded, initialize the tree
+ if (jqxhr.status === 200) {
+ init_google_navtree("gms-tree-list", toroot, GMS_NAVTREE_DATA);
+ highlightSidenav();
+ }
});
}
function init_default_gcm_navtree(toroot) {
// load json file for navtree data
$.getScript(toRoot + 'gcm_navtree_data.js', function(data, textStatus, jqxhr) {
- // when the file is loaded, initialize the tree
- if(jqxhr.status === 200) {
- init_google_navtree("gcm-tree-list", toroot, GCM_NAVTREE_DATA);
- highlightSidenav();
- resizeNav();
- }
- });
-}
-
-function showSamplesRefTree() {
- init_default_samples_navtree(toRoot);
-}
-
-function init_default_samples_navtree(toroot) {
- // load json file for navtree data
- $.getScript(toRoot + 'samples_navtree_data.js', function(data, textStatus, jqxhr) {
- // when the file is loaded, initialize the tree
- if(jqxhr.status === 200) {
- // hack to remove the "about the samples" link then put it back in
- // after we nuke the list to remove the dummy static list of samples
- var $firstLi = $("#nav.samples-nav > li:first-child").clone();
- $("#nav.samples-nav").empty();
- $("#nav.samples-nav").append($firstLi);
-
- init_google_navtree2("nav.samples-nav", SAMPLES_NAVTREE_DATA);
- highlightSidenav();
- resizeNav();
- if ($("#jd-content #samples").length) {
- showSamples();
- }
- }
+ // when the file is loaded, initialize the tree
+ if (jqxhr.status === 200) {
+ init_google_navtree("gcm-tree-list", toroot, GCM_NAVTREE_DATA);
+ highlightSidenav();
+ }
});
}
@@ -3356,25 +1096,25 @@
* 'null' to simply toggle.
*/
function toggleInherited(linkObj, expand) {
- var base = linkObj.getAttribute("id");
- var list = document.getElementById(base + "-list");
- var summary = document.getElementById(base + "-summary");
- var trigger = document.getElementById(base + "-trigger");
- var a = $(linkObj);
- if ( (expand == null && a.hasClass("closed")) || expand ) {
- list.style.display = "none";
- summary.style.display = "block";
- trigger.src = toRoot + "assets/images/triangle-opened.png";
- a.removeClass("closed");
- a.addClass("opened");
- } else if ( (expand == null && a.hasClass("opened")) || (expand == false) ) {
- list.style.display = "block";
- summary.style.display = "none";
- trigger.src = toRoot + "assets/images/triangle-closed.png";
- a.removeClass("opened");
- a.addClass("closed");
- }
- return false;
+ var base = linkObj.getAttribute("id");
+ var list = document.getElementById(base + "-list");
+ var summary = document.getElementById(base + "-summary");
+ var trigger = document.getElementById(base + "-trigger");
+ var a = $(linkObj);
+ if ((expand == null && a.hasClass("closed")) || expand) {
+ list.style.display = "none";
+ summary.style.display = "block";
+ trigger.src = toRoot + "assets/images/styles/disclosure_up.png";
+ a.removeClass("closed");
+ a.addClass("opened");
+ } else if ((expand == null && a.hasClass("opened")) || (expand == false)) {
+ list.style.display = "block";
+ summary.style.display = "none";
+ trigger.src = toRoot + "assets/images/styles/disclosure_down.png";
+ a.removeClass("opened");
+ a.addClass("closed");
+ }
+ return false;
}
/* Toggle all inherited classes in a single table (e.g. all inherited methods)
@@ -3386,12 +1126,12 @@
var a = $(linkObj);
var table = $(a.parent().parent().parent()); // ugly way to get table/tbody
var expandos = $(".jd-expando-trigger", table);
- if ( (expand == null && a.text() == "[Expand]") || expand ) {
+ if ((expand == null && a.text() == "[Expand]") || expand) {
expandos.each(function(i) {
toggleInherited(this, true);
});
a.text("[Collapse]");
- } else if ( (expand == null && a.text() == "[Collapse]") || (expand == false) ) {
+ } else if ((expand == null && a.text() == "[Collapse]") || (expand == false)) {
expandos.each(function(i) {
toggleInherited(this, false);
});
@@ -3428,25 +1168,19 @@
$("#toggleAllClassInherited").text("[Collapse All]");
}
-
/* HANDLE KEY EVENTS
* - Listen for Ctrl+F (Cmd on Mac) and expand all inherited members (to aid page search)
*/
var agent = navigator['userAgent'].toLowerCase();
var mac = agent.indexOf("macintosh") != -1;
-$(document).keydown( function(e) {
-var control = mac ? e.metaKey && !e.ctrlKey : e.ctrlKey; // get ctrl key
+$(document).keydown(function(e) {
+ var control = mac ? e.metaKey && !e.ctrlKey : e.ctrlKey; // get ctrl key
if (control && e.which == 70) { // 70 is "F"
ensureAllInheritedExpanded();
}
});
-
-
-
-
-
/* On-demand functions */
/** Move sample code line numbers out of PRE block and into non-copyable column */
@@ -3470,40 +1204,39 @@
// highlight the line when hovering on the number
$("#codesample-line-numbers a.number").mouseover(function() {
var id = $(this).attr('href');
- $(id).css('background','#e7e7e7');
+ $(id).css('background', '#e7e7e7');
});
$("#codesample-line-numbers a.number").mouseout(function() {
var id = $(this).attr('href');
- $(id).css('background','none');
+ $(id).css('background', 'none');
});
});
}
// create SHIFT key binder to avoid the selectText method when selecting multiple lines
var shifted = false;
-$(document).bind('keyup keydown', function(e){shifted = e.shiftKey; return true;} );
+$(document).bind('keyup keydown', function(e) {
+ shifted = e.shiftKey; return true;
+});
// courtesy of jasonedelman.com
function selectText(element) {
- var doc = document
- , range, selection
- ;
- if (doc.body.createTextRange) { //ms
- range = doc.body.createTextRange();
- range.moveToElementText(element);
- range.select();
- } else if (window.getSelection) { //all others
- selection = window.getSelection();
- range = doc.createRange();
- range.selectNodeContents(element);
- selection.removeAllRanges();
- selection.addRange(range);
- }
+ var doc = document ,
+ range, selection
+ ;
+ if (doc.body.createTextRange) { //ms
+ range = doc.body.createTextRange();
+ range.moveToElementText(element);
+ range.select();
+ } else if (window.getSelection) { //all others
+ selection = window.getSelection();
+ range = doc.createRange();
+ range.selectNodeContents(element);
+ selection.removeAllRanges();
+ selection.addRange(range);
+ }
}
-
-
-
/** Display links and other information about samples that match the
group specified by the URL */
function showSamples() {
@@ -3514,16 +1247,14 @@
$selectedLi = $("#nav li.selected");
$selectedLi.children("ul").children("li").each(function() {
- var $li = $("<li>").append($(this).find("a").first().clone());
- $ul.append($li);
+ var $li = $("<li>").append($(this).find("a").first().clone());
+ $ul.append($li);
});
$("#samples").append($ul);
}
-
-
/* ########################################################## */
/* ################### RESOURCE CARDS ##################### */
/* ########################################################## */
@@ -3532,93 +1263,93 @@
jd_tag_helpers.js and the *_unified_data.js to be loaded. */
(function() {
- // Prevent the same resource from being loaded more than once per page.
- var addedPageResources = {};
-
$(document).ready(function() {
- $('.resource-widget').each(function() {
- initResourceWidget(this);
- });
+ // Need to initialize hero carousel before other sections for dedupe
+ // to work correctly.
+ $('[data-carousel-query]').dacCarouselQuery();
- /* Pass the line height to ellipsisfade() to adjust the height of the
- text container to show the max number of lines possible, without
- showing lines that are cut off. This works with the css ellipsis
- classes to fade last text line and apply an ellipsis char. */
-
- //card text currently uses 15px line height.
- var lineHeight = 15;
- $('.card-info .text').ellipsisfade(lineHeight);
+ // Iterate over all instances and initialize a resource widget.
+ $('.resource-widget').resourceWidget();
});
- /*
- Three types of resource layouts:
- Flow - Uses a fixed row-height flow using float left style.
- Carousel - Single card slideshow all same dimension absolute.
- Stack - Uses fixed columns and flexible element height.
- */
- function initResourceWidget(widget) {
- var $widget = $(widget);
- var isFlow = $widget.hasClass('resource-flow-layout'),
- isCarousel = $widget.hasClass('resource-carousel-layout'),
- isStack = $widget.hasClass('resource-stack-layout');
-
- // find size of widget by pulling out its class name
- var sizeCols = 1;
- var m = $widget.get(0).className.match(/\bcol-(\d+)\b/);
- if (m) {
- sizeCols = parseInt(m[1], 10);
- }
-
- var opts = {
- cardSizes: ($widget.data('cardsizes') || '').split(','),
- maxResults: parseInt($widget.data('maxresults') || '100', 10),
- itemsPerPage: $widget.data('itemsperpage'),
- sortOrder: $widget.data('sortorder'),
- query: $widget.data('query'),
- section: $widget.data('section'),
- sizeCols: sizeCols,
+ $.fn.widgetOptions = function() {
+ return {
+ cardSizes: (this.data('cardsizes') || '').split(','),
+ maxResults: parseInt(this.data('maxresults'), 10) || Infinity,
+ initialResults: this.data('initialResults'),
+ itemsPerPage: this.data('itemsPerPage'),
+ sortOrder: this.data('sortorder'),
+ query: this.data('query'),
+ section: this.data('section'),
/* Added by LFL 6/6/14 */
- resourceStyle: $widget.data('resourcestyle') || 'card',
- stackSort: $widget.data('stacksort') || 'true'
+ resourceStyle: this.data('resourcestyle') || 'card',
+ stackSort: this.data('stacksort') || 'true',
+ // For filter based resources
+ allowDuplicates: this.data('allow-duplicates') || 'false'
};
+ };
- // run the search for the set of resources to show
+ $.fn.deprecateOldGridStyles = function() {
+ var m = this.get(0).className.match(/\bcol-(\d+)\b/);
+ if (m && !this.is('.cols > *')) {
+ this.removeClass('col-' + m[1]);
+ }
+ return this;
+ }
- var resources = buildResourceList(opts);
+ /*
+ * Three types of resource layouts:
+ * Flow - Uses a fixed row-height flow using float left style.
+ * Carousel - Single card slideshow all same dimension absolute.
+ * Stack - Uses fixed columns and flexible element height.
+ */
+ function initResourceWidget(widget, resources, opts) {
+ var $widget = $(widget).deprecateOldGridStyles();
+ var isFlow = $widget.hasClass('resource-flow-layout');
+ var isCarousel = $widget.hasClass('resource-carousel-layout');
+ var isStack = $widget.hasClass('resource-stack-layout');
+
+ opts = opts || $widget.widgetOptions();
+ resources = resources || metadata.query(opts);
+
+ if (opts.maxResults !== undefined) {
+ resources = resources.slice(0, opts.maxResults);
+ }
if (isFlow) {
drawResourcesFlowWidget($widget, opts, resources);
} else if (isCarousel) {
drawResourcesCarouselWidget($widget, opts, resources);
} else if (isStack) {
- /* Looks like this got removed and is not used, so repurposing for the
- homepage style layout.
- Modified by LFL 6/6/14
- */
- //var sections = buildSectionList(opts);
- opts['numStacks'] = $widget.data('numstacks');
- drawResourcesStackWidget($widget, opts, resources/*, sections*/);
+ opts.numStacks = $widget.data('numstacks');
+ drawResourcesStackWidget($widget, opts, resources);
}
}
+ $.fn.resourceWidget = function(resources, options) {
+ return this.each(function() {
+ initResourceWidget(this, resources, options);
+ });
+ };
+
/* Initializes a Resource Carousel Widget */
function drawResourcesCarouselWidget($widget, opts, resources) {
$widget.empty();
- var plusone = true; //always show plusone on carousel
+ var plusone = false; // stop showing plusone buttons on cards
$widget.addClass('resource-card slideshow-container')
.append($('<a>').addClass('slideshow-prev').text('Prev'))
.append($('<a>').addClass('slideshow-next').text('Next'));
- var css = { 'width': $widget.width() + 'px',
- 'height': $widget.height() + 'px' };
+ var css = {'width': $widget.width() + 'px',
+ 'height': $widget.height() + 'px'};
var $ul = $('<ul>');
for (var i = 0; i < resources.length; ++i) {
var $card = $('<a>')
.attr('href', cleanUrl(resources[i].url))
- .decorateResourceCard(resources[i],plusone);
+ .decorateResourceCard(resources[i], plusone);
$('<li>').css(css)
.append($card)
@@ -3634,7 +1365,7 @@
btnPrev: '.slideshow-prev',
btnNext: '.slideshow-next'
});
- };
+ }
/* Initializes a Resource Card Stack Widget (column-based layout)
Modified by LFL 6/6/14
@@ -3642,11 +1373,10 @@
function drawResourcesStackWidget($widget, opts, resources, sections) {
// Don't empty widget, grab all items inside since they will be the first
// items stacked, followed by the resource query
- var plusone = true; //by default show plusone on section cards
+ var plusone = false; // stop showing plusone buttons on cards
var cards = $widget.find('.resource-card').detach().toArray();
var numStacks = opts.numStacks || 1;
var $stacks = [];
- var urlString;
for (var i = 0; i < numStacks; ++i) {
$stacks[i] = $('<div>').addClass('resource-card-stack')
@@ -3657,21 +1387,21 @@
// Extract any subsections that are actually resource cards
if (sections) {
- for (var i = 0; i < sections.length; ++i) {
+ for (i = 0; i < sections.length; ++i) {
if (!sections[i].sections || !sections[i].sections.length) {
// Render it as a resource card
sectionResources.push(
$('<a>')
.addClass('resource-card section-card')
.attr('href', cleanUrl(sections[i].resource.url))
- .decorateResourceCard(sections[i].resource,plusone)[0]
+ .decorateResourceCard(sections[i].resource, plusone)[0]
);
} else {
cards.push(
$('<div>')
.addClass('resource-card section-card-menu')
- .decorateResourceSection(sections[i],plusone)[0]
+ .decorateResourceSection(sections[i], plusone)[0]
);
}
}
@@ -3679,7 +1409,7 @@
cards = cards.concat(sectionResources);
- for (var i = 0; i < resources.length; ++i) {
+ for (i = 0; i < resources.length; ++i) {
var $card = createResourceElement(resources[i], opts);
if (opts.resourceStyle.indexOf('related') > -1) {
@@ -3689,8 +1419,8 @@
cards.push($card[0]);
}
- if (opts.stackSort != 'false') {
- for (var i = 0; i < cards.length; ++i) {
+ if (opts.stackSort !== 'false') {
+ for (i = 0; i < cards.length; ++i) {
// Find the stack with the shortest height, but give preference to
// left to right order.
var minHeight = $stacks[0].height();
@@ -3707,8 +1437,7 @@
$stacks[minIndex].append($(cards[i]));
}
}
-
- };
+ }
/*
Create a resource card using the given resource object and a list of html
@@ -3721,7 +1450,7 @@
// so its a div instead of an a tag, also the generic one is not given
// the resource-card class so it appears with a transparent background
// and can be styled in whatever way the css setup.
- if (opts.resourceStyle == 'generic') {
+ if (opts.resourceStyle === 'generic') {
$el = $('<div>')
.addClass('resource')
.attr('href', cleanUrl(resource.url))
@@ -3738,21 +1467,63 @@
return $el;
}
+ function createResponsiveFlowColumn(cardSize) {
+ var cardWidth = parseInt(cardSize.match(/(\d+)/)[1], 10);
+ var column = $('<div>').addClass('col-' + (cardWidth / 3) + 'of6');
+ if (cardWidth < 9) {
+ column.addClass('col-tablet-1of2');
+ } else if (cardWidth > 9 && cardWidth < 18) {
+ column.addClass('col-tablet-1of1');
+ }
+ if (cardWidth < 18) {
+ column.addClass('col-mobile-1of1');
+ }
+ return column;
+ }
+
/* Initializes a flow widget, see distribute.scss for generating accompanying css */
function drawResourcesFlowWidget($widget, opts, resources) {
- $widget.empty();
- var cardSizes = opts.cardSizes || ['6x6'];
- var i = 0, j = 0;
- var plusone = true; // by default show plusone on resource cards
+ // We'll be doing our own modifications to opts.
+ opts = $.extend({}, opts);
- while (i < resources.length) {
+ $widget.empty().addClass('cols');
+ if (opts.itemsPerPage) {
+ $('<div class="col-1of1 dac-section-links dac-text-center">')
+ .append(
+ $('<div class="dac-section-link dac-show-less" data-toggle="show-less">Less<i class="dac-sprite dac-auto-unfold-less"></i></div>'),
+ $('<div class="dac-section-link dac-show-more" data-toggle="show-more">More<i class="dac-sprite dac-auto-unfold-more"></i></div>')
+ )
+ .appendTo($widget);
+ }
+
+ $widget.data('options.resourceflow', opts);
+ $widget.data('resources.resourceflow', resources);
+
+ drawResourceFlowPage($widget, opts, resources);
+ }
+
+ function drawResourceFlowPage($widget, opts, resources) {
+ var cardSizes = opts.cardSizes || ['6x6']; // 2015-08-09: dynamic card sizes are deprecated
+ var i = opts.currentIndex || 0;
+ var j = 0;
+ var plusone = false; // stop showing plusone buttons on cards
+ var firstPage = i === 0;
+ var initialResults = opts.initialResults || opts.itemsPerPage || resources.length;
+ var max = firstPage ? initialResults : i + opts.itemsPerPage;
+ max = Math.min(resources.length, max);
+
+ var page = $('<div class="resource-flow-page">');
+ if (opts.itemsPerPage) {
+ $widget.find('.dac-section-links').before(page);
+ } else {
+ $widget.append(page);
+ }
+
+ while (i < max) {
var cardSize = cardSizes[j++ % cardSizes.length];
- cardSize = cardSize.replace(/^\s+|\s+$/,'');
- // Some card sizes do not get a plusone button, such as where space is constrained
- // or for cards commonly embedded in docs (to improve overall page speed).
- plusone = !((cardSize == "6x2") || (cardSize == "6x3") ||
- (cardSize == "9x2") || (cardSize == "9x3") ||
- (cardSize == "12x2") || (cardSize == "12x3"));
+ cardSize = cardSize.replace(/^\s+|\s+$/, '');
+
+ var column = createResponsiveFlowColumn(cardSize).appendTo(page);
// A stack has a third dimension which is the number of stacked items
var isStack = cardSize.match(/(\d+)x(\d+)x(\d+)/);
@@ -3762,8 +1533,8 @@
if (isStack) {
// Create a stack container which should have the dimensions defined
// by the product of the items inside.
- $stackDiv = $('<div>').addClass('resource-card-stack resource-card-' + isStack[1]
- + 'x' + isStack[2] * isStack[3]) .appendTo($widget);
+ $stackDiv = $('<div>').addClass('resource-card-stack resource-card-' + isStack[1] +
+ 'x' + isStack[2] * isStack[3]) .appendTo(column);
}
// Build each stack item or just a single item
@@ -3773,11 +1544,11 @@
var $card = createResourceElement(resources[i], opts, plusone);
$card.addClass('resource-card-' + cardSize +
- ' resource-card-' + resource.type);
+ ' resource-card-' + resource.type.toLowerCase());
if (isStack) {
$card.addClass('resource-card-' + isStack[1] + 'x' + isStack[2]);
- if (++stackCount == parseInt(isStack[3])) {
+ if (++stackCount === parseInt(isStack[3])) {
$card.addClass('resource-card-row-stack-last');
stackCount = 0;
}
@@ -3785,10 +1556,49 @@
stackCount = 0;
}
- $card.appendTo($stackDiv || $widget);
+ $card.appendTo($stackDiv || column);
- } while (++i < resources.length && stackCount > 0);
+ } while (++i < max && stackCount > 0);
+
+ // Record number of pages viewed in analytics.
+ if (!firstPage) {
+ var clicks = Math.ceil((i - initialResults) / opts.itemsPerPage);
+ ga('send', 'event', 'Cards', 'Click More', clicks);
+ }
}
+
+ opts.currentIndex = i;
+ $widget.toggleClass('dac-has-more', i < resources.length);
+ $widget.toggleClass('dac-has-less', !firstPage);
+
+ $widget.trigger('dac:domchange');
+ if (opts.onRenderPage) {
+ opts.onRenderPage(page);
+ }
+ }
+
+ function drawResourceFlowReset($widget, opts, resources) {
+ $widget.find('.resource-flow-page')
+ .slice(1)
+ .remove();
+ $widget.toggleClass('dac-has-more', true);
+ $widget.toggleClass('dac-has-less', false);
+
+ opts.currentIndex = Math.min(opts.initialResults, resources.length);
+
+ ga('send', 'event', 'Cards', 'Click Less');
+ }
+
+ /* A decorator for event functions which finds the surrounding widget and it's options */
+ function wrapWithWidget(func) {
+ return function(e) {
+ if (e) e.preventDefault();
+
+ var $widget = $(this).closest('.resource-flow-layout');
+ var opts = $widget.data('options.resourceflow');
+ var resources = $widget.data('resources.resourceflow');
+ func($widget, opts, resources);
+ };
}
/* Build a site map of resources using a section as a root. */
@@ -3799,134 +1609,7 @@
return [];
}
- function buildResourceList(opts) {
- var maxResults = opts.maxResults || 100;
-
- var query = opts.query || '';
- var expressions = parseResourceQuery(query);
- var addedResourceIndices = {};
- var results = [];
-
- for (var i = 0; i < expressions.length; i++) {
- var clauses = expressions[i];
-
- // build initial set of resources from first clause
- var firstClause = clauses[0];
- var resources = [];
- switch (firstClause.attr) {
- case 'type':
- resources = ALL_RESOURCES_BY_TYPE[firstClause.value];
- break;
- case 'lang':
- resources = ALL_RESOURCES_BY_LANG[firstClause.value];
- break;
- case 'tag':
- resources = ALL_RESOURCES_BY_TAG[firstClause.value];
- break;
- case 'collection':
- var urls = RESOURCE_COLLECTIONS[firstClause.value].resources || [];
- resources = urls.map(function(url){ return ALL_RESOURCES_BY_URL[url]; });
- break;
- case 'section':
- var urls = SITE_MAP[firstClause.value].sections || [];
- resources = urls.map(function(url){ return ALL_RESOURCES_BY_URL[url]; });
- break;
- }
- // console.log(firstClause.attr + ':' + firstClause.value);
- resources = resources || [];
-
- // use additional clauses to filter corpus
- if (clauses.length > 1) {
- var otherClauses = clauses.slice(1);
- resources = resources.filter(getResourceMatchesClausesFilter(otherClauses));
- }
-
- // filter out resources already added
- if (i > 1) {
- resources = resources.filter(getResourceNotAlreadyAddedFilter(addedResourceIndices));
- }
-
- // add to list of already added indices
- for (var j = 0; j < resources.length; j++) {
- // console.log(resources[j].title);
- addedResourceIndices[resources[j].index] = 1;
- }
-
- // concat to final results list
- results = results.concat(resources);
- }
-
- if (opts.sortOrder && results.length) {
- var attr = opts.sortOrder;
-
- if (opts.sortOrder == 'random') {
- var i = results.length, j, temp;
- while (--i) {
- j = Math.floor(Math.random() * (i + 1));
- temp = results[i];
- results[i] = results[j];
- results[j] = temp;
- }
- } else {
- var desc = attr.charAt(0) == '-';
- if (desc) {
- attr = attr.substring(1);
- }
- results = results.sort(function(x,y) {
- return (desc ? -1 : 1) * (parseInt(x[attr], 10) - parseInt(y[attr], 10));
- });
- }
- }
-
- results = results.filter(getResourceNotAlreadyAddedFilter(addedPageResources));
- results = results.slice(0, maxResults);
-
- for (var j = 0; j < results.length; ++j) {
- addedPageResources[results[j].index] = 1;
- }
-
- return results;
- }
-
-
- function getResourceNotAlreadyAddedFilter(addedResourceIndices) {
- return function(resource) {
- return !addedResourceIndices[resource.index];
- };
- }
-
-
- function getResourceMatchesClausesFilter(clauses) {
- return function(resource) {
- return doesResourceMatchClauses(resource, clauses);
- };
- }
-
-
- function doesResourceMatchClauses(resource, clauses) {
- for (var i = 0; i < clauses.length; i++) {
- var map;
- switch (clauses[i].attr) {
- case 'type':
- map = IS_RESOURCE_OF_TYPE[clauses[i].value];
- break;
- case 'lang':
- map = IS_RESOURCE_IN_LANG[clauses[i].value];
- break;
- case 'tag':
- map = IS_RESOURCE_TAGGED[clauses[i].value];
- break;
- }
-
- if (!map || (!!clauses[i].negative ? map[resource.index] : !map[resource.index])) {
- return clauses[i].negative;
- }
- }
- return true;
- }
-
- function cleanUrl(url)
- {
+ function cleanUrl(url) {
if (url && url.indexOf('//') === -1) {
url = toRoot + url;
}
@@ -3934,53 +1617,16 @@
return url;
}
-
- function parseResourceQuery(query) {
- // Parse query into array of expressions (expression e.g. 'tag:foo + type:video')
- var expressions = [];
- var expressionStrs = query.split(',') || [];
- for (var i = 0; i < expressionStrs.length; i++) {
- var expr = expressionStrs[i] || '';
-
- // Break expression into clauses (clause e.g. 'tag:foo')
- var clauses = [];
- var clauseStrs = expr.split(/(?=[\+\-])/);
- for (var j = 0; j < clauseStrs.length; j++) {
- var clauseStr = clauseStrs[j] || '';
-
- // Get attribute and value from clause (e.g. attribute='tag', value='foo')
- var parts = clauseStr.split(':');
- var clause = {};
-
- clause.attr = parts[0].replace(/^\s+|\s+$/g,'');
- if (clause.attr) {
- if (clause.attr.charAt(0) == '+') {
- clause.attr = clause.attr.substring(1);
- } else if (clause.attr.charAt(0) == '-') {
- clause.negative = true;
- clause.attr = clause.attr.substring(1);
- }
- }
-
- if (parts.length > 1) {
- clause.value = parts[1].replace(/^\s+|\s+$/g,'');
- }
-
- clauses.push(clause);
- }
-
- if (!clauses.length) {
- continue;
- }
-
- expressions.push(clauses);
- }
-
- return expressions;
- }
+ // Delegated events for resources.
+ $(document).on('click', '.resource-flow-layout [data-toggle="show-more"]', wrapWithWidget(drawResourceFlowPage));
+ $(document).on('click', '.resource-flow-layout [data-toggle="show-less"]', wrapWithWidget(drawResourceFlowReset));
})();
(function($) {
+ // A mapping from category and type values to new values or human presentable strings.
+ var SECTION_MAP = {
+ googleplay: 'google play'
+ };
/*
Utility method for creating dom for the description area of a card.
@@ -4009,10 +1655,10 @@
return $description;
}
-
/* Simple jquery function to create dom for a standard resource card */
- $.fn.decorateResourceCard = function(resource,plusone) {
- var section = resource.group || resource.type;
+ $.fn.decorateResourceCard = function(resource, plusone) {
+ var section = resource.category || resource.type;
+ section = (SECTION_MAP[section] || section).toLowerCase();
var imgUrl = resource.image ||
'assets/images/resource-card-default-android.jpg';
@@ -4020,6 +1666,12 @@
imgUrl = toRoot + imgUrl;
}
+ if (resource.type === 'youtube' || resource.type === 'video') {
+ $('<div>').addClass('play-button')
+ .append($('<i class="dac-sprite dac-play-white">'))
+ .appendTo(this);
+ }
+
$('<div>').addClass('card-bg')
.css('background-image', 'url(' + (imgUrl || toRoot +
'assets/images/resource-card-default-android.jpg') + ')')
@@ -4027,7 +1679,8 @@
$('<div>').addClass('card-info' + (!resource.summary ? ' empty-desc' : ''))
.append($('<div>').addClass('section').text(section))
- .append($('<div>').addClass('title').html(resource.title))
+ .append($('<div>').addClass('title' + (resource.title_highlighted ? ' highlighted' : ''))
+ .html(resource.title_highlighted || resource.title))
.append(buildResourceCardDescription(resource, plusone))
.appendTo(this);
@@ -4035,7 +1688,7 @@
};
/* Simple jquery function to create dom for a resource section card (menu) */
- $.fn.decorateResourceSection = function(section,plusone) {
+ $.fn.decorateResourceSection = function(section, plusone) {
var resource = section.resource;
//keep url clean for matching and offline mode handling
var urlPrefix = resource.image.indexOf("//") > -1 ? "" : toRoot;
@@ -4113,9 +1766,6 @@
return this;
};
-
-
-
/* Render other types of resource styles that are not cards. */
$.fn.decorateResource = function(resource, opts) {
var imgUrl = resource.image ||
@@ -4134,7 +1784,7 @@
$('<div>').addClass('image')
.css('background-image', 'url(' + imgUrl + ')'),
$('<div>').addClass('info').append(
- $('<h4>').addClass('title').html(resource.title),
+ $('<h4>').addClass('title').html(resource.title_highlighted || resource.title),
$('<p>').addClass('summary').html(resource.summary),
$('<a>').attr('href', linkUrl).addClass('cta').html('Learn More')
)
@@ -4144,31 +1794,6 @@
};
})(jQuery);
-
-/* Calculate the vertical area remaining */
-(function($) {
- $.fn.ellipsisfade= function(lineHeight) {
- this.each(function() {
- // get element text
- var $this = $(this);
- var remainingHeight = $this.parent().parent().height();
- $this.parent().siblings().each(function ()
- {
- if ($(this).is(":visible")) {
- var h = $(this).height();
- remainingHeight = remainingHeight - h;
- }
- });
-
- adjustedRemainingHeight = ((remainingHeight)/lineHeight>>0)*lineHeight
- $this.parent().css({'height': adjustedRemainingHeight});
- $this.css({'height': "auto"});
- });
-
- return this;
- };
-}) (jQuery);
-
/*
Fullscreen Carousel
@@ -4259,10 +1884,6 @@
}
})();
-
-
-
-
/*
Tab Carousel
@@ -4354,3 +1975,4584 @@
}
}
})();
+
+/**
+ * Auto TOC
+ *
+ * Upgrades h2s on the page to have a rule and be toggle-able on mobile.
+ */
+(function($) {
+ var upgraded = false;
+ var h2Titles;
+
+ function initWidget() {
+ // add HRs below all H2s (except for a few other h2 variants)
+ // Consider doing this with css instead.
+ h2Titles = $('h2').not('#qv h2, #tb h2, .sidebox h2, #devdoc-nav h2, h2.norule');
+ h2Titles.css({paddingBottom:0}).after('<hr/>');
+
+ // Exit early if on older browser.
+ if (!window.matchMedia) {
+ return;
+ }
+
+ // Only run logic in mobile layout.
+ var query = window.matchMedia('(max-width: 719px)');
+ if (query.matches) {
+ makeTogglable();
+ } else {
+ query.addListener(makeTogglable);
+ }
+ }
+
+ function makeTogglable() {
+ // Only run this logic once.
+ if (upgraded) { return; }
+ upgraded = true;
+
+ // Only make content h2s togglable.
+ var contentTitles = h2Titles.filter('#jd-content *');
+
+ // If there are more than 1
+ if (contentTitles.size() < 2) {
+ return;
+ }
+
+ contentTitles.each(function() {
+ // Find all the relevant nodes.
+ var $title = $(this);
+ var $hr = $title.next();
+ var $contents = allNextUntil($hr[0], 'h2, .next-docs');
+ var $section = $($title)
+ .add($hr)
+ .add($title.prev('a[name]'))
+ .add($contents);
+ var $anchor = $section.first().prev();
+ var anchorMethod = 'after';
+ if ($anchor.length === 0) {
+ $anchor = $title.parent();
+ anchorMethod = 'prepend';
+ }
+
+ // Some h2s are in their own container making it pretty hard to find the end, so skip.
+ if ($contents.length === 0) {
+ return;
+ }
+
+ // Remove from DOM before messing with it. DOM is slow!
+ $section.detach();
+
+ // Add mobile-only expand arrows.
+ $title.prepend('<span class="dac-visible-mobile-inline-block">' +
+ '<i class="dac-toggle-expand dac-sprite dac-expand-more-black"></i>' +
+ '<i class="dac-toggle-collapse dac-sprite dac-expand-less-black"></i>' +
+ '</span>')
+ .attr('data-toggle', 'section');
+
+ // Wrap in magic markup.
+ $section = $section.wrapAll('<div class="dac-toggle dac-mobile">').parent();
+
+ // extra div used for max-height calculation.
+ $contents.wrapAll('<div class="dac-toggle-content dac-expand"><div>');
+
+ // Pre-expand section if requested.
+ if ($title.hasClass('is-expanded')) {
+ $section.addClass('is-expanded');
+ }
+
+ // Pre-expand section if targetted by hash.
+ if (location.hash && $section.find(location.hash).length) {
+ $section.addClass('is-expanded');
+ }
+
+ // Add it back to the dom.
+ $anchor[anchorMethod].call($anchor, $section);
+ });
+ }
+
+ // Similar to $.fn.nextUntil() except we need all nodes, jQuery skips text nodes.
+ function allNextUntil(elem, until) {
+ var matched = [];
+
+ while ((elem = elem.nextSibling) && elem.nodeType !== 9) {
+ if (elem.nodeType === 1 && jQuery(elem).is(until)) {
+ break;
+ }
+ matched.push(elem);
+ }
+ return $(matched);
+ }
+
+ $(function() {
+ initWidget();
+ });
+})(jQuery);
+
+(function($, window) {
+ 'use strict';
+
+ // Blogger API info
+ var apiUrl = 'https://www.googleapis.com/blogger/v3';
+ var apiKey = 'AIzaSyCFhbGnjW06dYwvRCU8h_zjdpS4PYYbEe8';
+
+ // Blog IDs can be found in the markup of the blog posts
+ var blogs = {
+ 'android-developers': {
+ id: '6755709643044947179',
+ title: 'Android Developers Blog'
+ }
+ };
+ var monthNames = ['January', 'February', 'March', 'April', 'May', 'June',
+ 'July', 'August', 'September', 'October', 'November', 'December'];
+
+ var BlogReader = (function() {
+ var reader;
+
+ function BlogReader() {
+ this.doneSetup = false;
+ }
+
+ /**
+ * Initialize the blog reader and modal.
+ */
+ BlogReader.prototype.setup = function() {
+ $('#jd-content').append(
+ '<div id="blog-reader" data-modal="blog-reader" class="dac-modal dac-has-small-header">' +
+ '<div class="dac-modal-container">' +
+ '<div class="dac-modal-window">' +
+ '<header class="dac-modal-header">' +
+ '<div class="dac-modal-header-actions">' +
+ '<a href="" class="dac-modal-header-open" target="_blank">' +
+ '<i class="dac-sprite dac-open-in-new"></i>' +
+ '</a>' +
+ '<button class="dac-modal-header-close" data-modal-toggle>' +
+ '</button>' +
+ '</div>' +
+ '<h2 class="norule dac-modal-header-title"></h2>' +
+ '</header>' +
+ '<div class="dac-modal-content dac-blog-reader">' +
+ '<time class="dac-blog-reader-date" pubDate></time>' +
+ '<h3 class="dac-blog-reader-title"></h3>' +
+ '<div class="dac-blog-reader-text clearfix"></div>' +
+ '</div>' +
+ '</div>' +
+ '</div>' +
+ '</div>');
+
+ this.blogReader = $('#blog-reader').dacModal();
+
+ this.doneSetup = true;
+ };
+
+ BlogReader.prototype.openModal_ = function(blog, post) {
+ var published = new Date(post.published);
+ var formattedDate = monthNames[published.getMonth()] + ' ' + published.getDay() + ' ' + published.getFullYear();
+ this.blogReader.find('.dac-modal-header-open').attr('href', post.url);
+ this.blogReader.find('.dac-modal-header-title').text(blog.title);
+ this.blogReader.find('.dac-blog-reader-title').html(post.title);
+ this.blogReader.find('.dac-blog-reader-date').html(formattedDate);
+ this.blogReader.find('.dac-blog-reader-text').html(post.content);
+ this.blogReader.trigger('modal-open');
+ };
+
+ /**
+ * Show a blog post in a modal
+ * @param {string} blogName - The name of the Blogspot blog.
+ * @param {string} postPath - The path to the blog post.
+ * @param {bool} secondTry - Has it failed once?
+ */
+ BlogReader.prototype.showPost = function(blogName, postPath, secondTry) {
+ var blog = blogs[blogName];
+ var postUrl = 'https://' + blogName + '.blogspot.com' + postPath;
+
+ var url = apiUrl + '/blogs/' + blog.id + '/posts/bypath?path=' + encodeURIComponent(postPath) + '&key=' + apiKey;
+ $.ajax(url, {timeout: 650}).done(this.openModal_.bind(this, blog)).fail(function(error) {
+ // Retry once if we get an error
+ if (error.status === 500 && !secondTry) {
+ this.showPost(blogName, postPath, true);
+ } else {
+ window.location.href = postUrl;
+ }
+ }.bind(this));
+ };
+
+ return {
+ getReader: function() {
+ if (!reader) {
+ reader = new BlogReader();
+ }
+ return reader;
+ }
+ };
+ })();
+
+ var blogReader = BlogReader.getReader();
+
+ function wrapLinkWithReader(e) {
+ var el = $(e.currentTarget);
+ if (el.hasClass('dac-modal-header-open')) {
+ return;
+ }
+
+ // Only catch links on blogspot.com
+ var matches = el.attr('href').match(/https?:\/\/([^\.]*).blogspot.com([^$]*)/);
+ if (matches && matches.length === 3) {
+ var blogName = matches[1];
+ var postPath = matches[2];
+
+ // Check if we have information about the blog
+ if (!blogs[blogName]) {
+ return;
+ }
+
+ // Setup the first time it's used
+ if (!blogReader.doneSetup) {
+ blogReader.setup();
+ }
+
+ e.preventDefault();
+ blogReader.showPost(blogName, postPath);
+ }
+ }
+
+ $(document).on('click.blog-reader', 'a[href*="blogspot.com/"]', wrapLinkWithReader);
+})(jQuery, window);
+
+(function($) {
+ $.fn.debounce = function(func, wait, immediate) {
+ var timeout;
+
+ return function() {
+ var context = this;
+ var args = arguments;
+
+ var later = function() {
+ timeout = null;
+ if (!immediate) {
+ func.apply(context, args);
+ }
+ };
+
+ var callNow = immediate && !timeout;
+ clearTimeout(timeout);
+ timeout = setTimeout(later, wait);
+
+ if (callNow) {
+ func.apply(context, args);
+ }
+ };
+ };
+})(jQuery);
+
+/* Calculate the vertical area remaining */
+(function($) {
+ $.fn.ellipsisfade = function() {
+ // Only fetch line-height of first element to avoid recalculate style.
+ // Will be NaN if no elements match, which is ok.
+ var lineHeight = parseInt(this.css('line-height'), 10);
+
+ this.each(function() {
+ // get element text
+ var $this = $(this);
+ var remainingHeight = $this.parent().parent().height();
+ $this.parent().siblings().each(function() {
+ var elHeight;
+ if ($(this).is(':visible')) {
+ elHeight = $(this).outerHeight(true);
+ remainingHeight = remainingHeight - elHeight;
+ }
+ });
+
+ var adjustedRemainingHeight = ((remainingHeight) / lineHeight >> 0) * lineHeight;
+ $this.parent().css({height: adjustedRemainingHeight});
+ $this.css({height: 'auto'});
+ });
+
+ return this;
+ };
+
+ /* Pass the line height to ellipsisfade() to adjust the height of the
+ text container to show the max number of lines possible, without
+ showing lines that are cut off. This works with the css ellipsis
+ classes to fade last text line and apply an ellipsis char. */
+ function updateEllipsis(context) {
+ if (!(context instanceof jQuery)) {
+ context = $('html');
+ }
+
+ context.find('.card-info .text').ellipsisfade();
+ }
+
+ $(window).on('resize', $.fn.debounce(updateEllipsis, 500));
+ $(updateEllipsis);
+ $('html').on('dac:domchange', function(e) { updateEllipsis($(e.target)); });
+})(jQuery);
+
+/* Filter */
+(function($) {
+ 'use strict';
+
+ /**
+ * A single filter item content.
+ * @type {string} - Element template.
+ * @private
+ */
+ var ITEM_STR_ = '<input type="checkbox" value="{{value}}" class="dac-form-checkbox" id="{{id}}">' +
+ '<label for="{{id}}" class="dac-form-checkbox-button"></label>' +
+ '<label for="{{id}}" class="dac-form-label">{{name}}</label>';
+
+ /**
+ * Template for a chip element.
+ * @type {*|HTMLElement}
+ * @private
+ */
+ var CHIP_BASE_ = $('<li class="dac-filter-chip">' +
+ '<button class="dac-filter-chip-close">' +
+ '<i class="dac-sprite dac-close-black dac-filter-chip-close-icon"></i>' +
+ '</button>' +
+ '</li>');
+
+ /**
+ * Component to handle narrowing down resources.
+ * @param {HTMLElement} el - The DOM element.
+ * @param {Object} options
+ * @constructor
+ */
+ function Filter(el, options) {
+ this.el = $(el);
+ this.options = $.extend({}, Filter.DEFAULTS_, options);
+ this.init();
+ }
+
+ Filter.DEFAULTS_ = {
+ activeClass: 'dac-active',
+ chipsDataAttr: 'filter-chips',
+ nameDataAttr: 'filter-name',
+ countDataAttr: 'filter-count',
+ tabViewDataAttr: 'tab-view',
+ valueDataAttr: 'filter-value'
+ };
+
+ /**
+ * Draw resource cards.
+ * @param {Array} resources
+ * @private
+ */
+ Filter.prototype.draw_ = function(resources) {
+ var that = this;
+
+ if (resources.length === 0) {
+ this.containerEl_.html('<p class="dac-filter-message">Nothing matches selected filters.</p>');
+ return;
+ }
+
+ // Draw resources.
+ that.containerEl_.resourceWidget(resources, that.data_.options);
+ };
+
+ /**
+ * Initialize a Filter component.
+ */
+ Filter.prototype.init = function() {
+ this.containerEl_ = $(this.options.filter);
+
+ // Setup data settings
+ this.data_ = {};
+ this.data_.chips = {};
+ this.data_.options = this.containerEl_.widgetOptions();
+ this.data_.all = window.metadata.query(this.data_.options);
+
+ // Initialize filter UI
+ this.initUi();
+ };
+
+ /**
+ * Generate a chip for a given filter item.
+ * @param {Object} item - A single filter option (checkbox container).
+ * @returns {HTMLElement} A new Chip element.
+ */
+ Filter.prototype.chipForItem = function(item) {
+ var chip = CHIP_BASE_.clone();
+ chip.prepend(this.data_.chips[item.data('filter-value')]);
+ chip.data('item.dac-filter', item);
+ item.data('chip.dac-filter', chip);
+ this.addToItemValue(item, 1);
+ return chip[0];
+ };
+
+ /**
+ * Update count of checked filter items.
+ * @param {Object} item - A single filter option (checkbox container).
+ * @param {Number} value - Either -1 or 1.
+ */
+ Filter.prototype.addToItemValue = function(item, value) {
+ var tab = item.parent().data(this.options.tabViewDataAttr);
+ var countEl = this.countEl_.filter('[data-' + this.options.countDataAttr + '="' + tab + '"]');
+ var count = value + parseInt(countEl.text(), 10);
+ countEl.text(count);
+ countEl.toggleClass('dac-disabled', count === 0);
+ };
+
+ /**
+ * Set event listeners.
+ * @private
+ */
+ Filter.prototype.setEventListeners_ = function() {
+ this.chipsEl_.on('click.dac-filter', '.dac-filter-chip-close', this.closeChipHandler_.bind(this));
+ this.tabViewEl_.on('change.dac-filter', ':checkbox', this.toggleCheckboxHandler_.bind(this));
+ };
+
+ /**
+ * Check filter items that are active by default.
+ */
+ Filter.prototype.activateInitialFilters_ = function() {
+ var id = (new Date()).getTime();
+ var initiallyCheckedValues = this.data_.options.query.replace(/,\s*/g, '+').split('+');
+ var chips = document.createDocumentFragment();
+ var that = this;
+
+ this.items_.each(function(i) {
+ var item = $(this);
+ var opts = item.data();
+ that.data_.chips[opts.filterValue] = opts.filterName;
+
+ var checkbox = $(ITEM_STR_.replace(/\{\{name\}\}/g, opts.filterName)
+ .replace(/\{\{value\}\}/g, opts.filterValue)
+ .replace(/\{\{id\}\}/g, 'filter-' + id + '-' + (i + 1)));
+
+ if (initiallyCheckedValues.indexOf(opts.filterValue) > -1) {
+ checkbox[0].checked = true;
+ chips.appendChild(that.chipForItem(item));
+ }
+
+ item.append(checkbox);
+ });
+
+ this.chipsEl_.append(chips);
+ };
+
+ /**
+ * Initialize the Filter view
+ */
+ Filter.prototype.initUi = function() {
+ // Cache DOM elements
+ this.chipsEl_ = this.el.find('[data-' + this.options.chipsDataAttr + ']');
+ this.countEl_ = this.el.find('[data-' + this.options.countDataAttr + ']');
+ this.tabViewEl_ = this.el.find('[data-' + this.options.tabViewDataAttr + ']');
+ this.items_ = this.el.find('[data-' + this.options.nameDataAttr + ']');
+
+ // Setup UI
+ this.draw_(this.data_.all);
+ this.activateInitialFilters_();
+ this.setEventListeners_();
+ };
+
+ /**
+ * @returns {[types|Array, tags|Array, category|Array]}
+ */
+ Filter.prototype.getActiveClauses = function() {
+ var tags = [];
+ var types = [];
+ var categories = [];
+
+ this.items_.find(':checked').each(function(i, checkbox) {
+ // Currently, there is implicit business logic here that `tag` is AND'ed together
+ // while `type` is OR'ed. So , and + do the same thing here. It would be great to
+ // reuse the same query engine for filters, but it would need more powerful syntax.
+ // Probably parenthesis, to support "tag:dog + tag:cat + (type:video, type:blog)"
+ var expression = $(checkbox).val();
+ var regex = /(\w+):(\w+)/g;
+ var match;
+
+ while (match = regex.exec(expression)) {
+ switch (match[1]) {
+ case 'category':
+ categories.push(match[2]);
+ break;
+ case 'tag':
+ tags.push(match[2]);
+ break;
+ case 'type':
+ types.push(match[2]);
+ break;
+ }
+ }
+ });
+
+ return [types, tags, categories];
+ };
+
+ /**
+ * Actual filtering logic.
+ * @returns {Array}
+ */
+ Filter.prototype.filteredResources = function() {
+ var data = this.getActiveClauses();
+ var types = data[0];
+ var tags = data[1];
+ var categories = data[2];
+ var resources = [];
+ var resource = {};
+ var tag = '';
+ var shouldAddResource = true;
+
+ for (var resourceIndex = 0; resourceIndex < this.data_.all.length; resourceIndex++) {
+ resource = this.data_.all[resourceIndex];
+ shouldAddResource = types.indexOf(resource.type) > -1;
+
+ if (categories && categories.length > 0) {
+ shouldAddResource = shouldAddResource && categories.indexOf(resource.category) > -1;
+ }
+
+ for (var tagIndex = 0; shouldAddResource && tagIndex < tags.length; tagIndex++) {
+ tag = tags[tagIndex];
+ shouldAddResource = resource.tags.indexOf(tag) > -1;
+ }
+
+ if (shouldAddResource) {
+ resources.push(resource);
+ }
+ }
+
+ return resources;
+ };
+
+ /**
+ * Close Chip Handler
+ * @param {Event} event - Click event
+ * @private
+ */
+ Filter.prototype.closeChipHandler_ = function(event) {
+ var chip = $(event.currentTarget).parent();
+ var checkbox = chip.data('item.dac-filter').find(':first-child')[0];
+ checkbox.checked = false;
+ this.changeStateForCheckbox(checkbox);
+ };
+
+ /**
+ * Handle filter item state change.
+ * @param {Event} event - Change event
+ * @private
+ */
+ Filter.prototype.toggleCheckboxHandler_ = function(event) {
+ this.changeStateForCheckbox(event.currentTarget);
+ };
+
+ /**
+ * Redraw resource view based on new state.
+ * @param checkbox
+ */
+ Filter.prototype.changeStateForCheckbox = function(checkbox) {
+ var item = $(checkbox).parent();
+
+ if (checkbox.checked) {
+ this.chipsEl_.append(this.chipForItem(item));
+ ga('send', 'event', 'Filters', 'Check', $(checkbox).val());
+ } else {
+ item.data('chip.dac-filter').remove();
+ this.addToItemValue(item, -1);
+ ga('send', 'event', 'Filters', 'Uncheck', $(checkbox).val());
+ }
+
+ this.draw_(this.filteredResources());
+ };
+
+ /**
+ * jQuery plugin
+ */
+ $.fn.dacFilter = function() {
+ return this.each(function() {
+ var el = $(this);
+ new Filter(el, el.data());
+ });
+ };
+
+ /**
+ * Data Attribute API
+ */
+ $(function() {
+ $('[data-filter]').dacFilter();
+ });
+})(jQuery);
+
+(function($) {
+ 'use strict';
+
+ /**
+ * Toggle Floating Label state.
+ * @param {HTMLElement} el - The DOM element.
+ * @param options
+ * @constructor
+ */
+ function FloatingLabel(el, options) {
+ this.el = $(el);
+ this.options = $.extend({}, FloatingLabel.DEFAULTS_, options);
+ this.group = this.el.closest('.dac-form-input-group');
+ this.input = this.group.find('.dac-form-input');
+
+ this.checkValue_ = this.checkValue_.bind(this);
+ this.checkValue_();
+
+ this.input.on('focus', function() {
+ this.group.addClass('dac-focused');
+ }.bind(this));
+ this.input.on('blur', function() {
+ this.group.removeClass('dac-focused');
+ this.checkValue_();
+ }.bind(this));
+ this.input.on('keyup', this.checkValue_);
+ }
+
+ /**
+ * The label is moved out of the textbox when it has a value.
+ */
+ FloatingLabel.prototype.checkValue_ = function() {
+ if (this.input.val().length) {
+ this.group.addClass('dac-has-value');
+ } else {
+ this.group.removeClass('dac-has-value');
+ }
+ };
+
+ /**
+ * jQuery plugin
+ * @param {object} options - Override default options.
+ */
+ $.fn.dacFloatingLabel = function(options) {
+ return this.each(function() {
+ new FloatingLabel(this, options);
+ });
+ };
+
+ $(document).on('ready.aranja', function() {
+ $('.dac-form-floatlabel').each(function() {
+ $(this).dacFloatingLabel($(this).data());
+ });
+ });
+})(jQuery);
+
+(function($) {
+ 'use strict';
+
+ /**
+ * @param {HTMLElement} el - The DOM element.
+ * @param {Object} options
+ * @constructor
+ */
+ function Crumbs(selected, options) {
+ this.options = $.extend({}, Crumbs.DEFAULTS_, options);
+ this.el = $(this.options.container);
+
+ // Do not build breadcrumbs for landing site.
+ if (!selected || location.pathname === '/index.html' || location.pathname === '/') {
+ return;
+ }
+
+ // Cache navigation resources
+ this.selected = $(selected);
+ this.selectedParent = this.selected.closest('.dac-nav-secondary').siblings('a');
+
+ // Build the breadcrumb list.
+ this.init();
+ }
+
+ Crumbs.DEFAULTS_ = {
+ container: '.dac-header-crumbs',
+ crumbItem: $('<li class="dac-header-crumbs-item">'),
+ linkClass: 'dac-header-crumbs-link'
+ };
+
+ Crumbs.prototype.init = function() {
+ Crumbs.buildCrumbForLink(this.selected.clone()).appendTo(this.el);
+
+ if (this.selectedParent.length) {
+ Crumbs.buildCrumbForLink(this.selectedParent.clone()).prependTo(this.el);
+ }
+
+ // Reveal the breadcrumbs
+ this.el.addClass('dac-has-content');
+ };
+
+ /**
+ * Build a HTML structure for a breadcrumb.
+ * @param {string} link
+ * @return {jQuery}
+ */
+ Crumbs.buildCrumbForLink = function(link) {
+ link.find('br').replaceWith(' ');
+
+ var crumbLink = $('<a>')
+ .attr('class', Crumbs.DEFAULTS_.linkClass)
+ .attr('href', link.attr('href'))
+ .text(link.text());
+
+ return Crumbs.DEFAULTS_.crumbItem.clone().append(crumbLink);
+ };
+
+ /**
+ * jQuery plugin
+ */
+ $.fn.dacCrumbs = function(options) {
+ return this.each(function() {
+ new Crumbs(this, options);
+ });
+ };
+})(jQuery);
+
+(function($) {
+ 'use strict';
+
+ /**
+ * @param {HTMLElement} el - The DOM element.
+ * @param {Object} options
+ * @constructor
+ */
+ function SearchInput(el, options) {
+ this.el = $(el);
+ this.options = $.extend({}, SearchInput.DEFAULTS_, options);
+ this.body = $('body');
+ this.input = this.el.find('input');
+ this.close = this.el.find(this.options.closeButton);
+ this.clear = this.el.find(this.options.clearButton);
+ this.icon = this.el.find('.' + this.options.iconClass);
+ this.init();
+ }
+
+ SearchInput.DEFAULTS_ = {
+ activeClass: 'dac-active',
+ activeIconClass: 'dac-search',
+ closeButton: '[data-search-close]',
+ clearButton: '[data-search-clear]',
+ hiddenClass: 'dac-hidden',
+ iconClass: 'dac-header-search-icon',
+ searchModeClass: 'dac-search-mode',
+ transitionDuration: 250
+ };
+
+ SearchInput.prototype.init = function() {
+ this.input.on('focus.dac-search', this.setActiveState.bind(this))
+ .on('input.dac-search', this.checkInputValue.bind(this));
+ this.close.on('click.dac-search', this.unsetActiveStateHandler_.bind(this));
+ this.clear.on('click.dac-search', this.clearInput.bind(this));
+ };
+
+ SearchInput.prototype.setActiveState = function() {
+ var that = this;
+
+ this.clear.addClass(this.options.hiddenClass);
+ this.body.addClass(this.options.searchModeClass);
+ this.checkInputValue();
+
+ // Set icon to black after background has faded to white.
+ setTimeout(function() {
+ that.icon.addClass(that.options.activeIconClass);
+ }, this.options.transitionDuration);
+ };
+
+ SearchInput.prototype.unsetActiveStateHandler_ = function(event) {
+ event.preventDefault();
+ this.unsetActiveState();
+ };
+
+ SearchInput.prototype.unsetActiveState = function() {
+ this.icon.removeClass(this.options.activeIconClass);
+ this.clear.addClass(this.options.hiddenClass);
+ this.body.removeClass(this.options.searchModeClass);
+ };
+
+ SearchInput.prototype.clearInput = function(event) {
+ event.preventDefault();
+ this.input.val('');
+ this.clear.addClass(this.options.hiddenClass);
+ };
+
+ SearchInput.prototype.checkInputValue = function() {
+ if (this.input.val().length) {
+ this.clear.removeClass(this.options.hiddenClass);
+ } else {
+ this.clear.addClass(this.options.hiddenClass);
+ }
+ };
+
+ /**
+ * jQuery plugin
+ * @param {object} options - Override default options.
+ */
+ $.fn.dacSearchInput = function() {
+ return this.each(function() {
+ var el = $(this);
+ el.data('search-input.dac', new SearchInput(el, el.data()));
+ });
+ };
+
+ /**
+ * Data Attribute API
+ */
+ $(function() {
+ $('[data-search]').dacSearchInput();
+ });
+})(jQuery);
+
+/* global METADATA */
+(function($) {
+ function DacCarouselQuery(el) {
+ el = $(el);
+
+ var opts = el.data();
+ opts.maxResults = parseInt(opts.maxResults || '100', 10);
+ opts.query = opts.carouselQuery;
+ var resources = window.metadata.query(opts);
+
+ el.empty();
+ $(resources).each(function() {
+ var resource = $.extend({}, this, METADATA.carousel[this.url]);
+ el.dacHero(resource);
+ });
+
+ // Pagination element.
+ el.append('<div class="dac-hero-carousel-pagination"><div class="wrap" data-carousel-pagination>');
+
+ el.dacCarousel();
+ }
+
+ // jQuery plugin
+ $.fn.dacCarouselQuery = function() {
+ return this.each(function() {
+ var el = $(this);
+ var data = el.data('dac.carouselQuery');
+
+ if (!data) { el.data('dac.carouselQuery', (data = new DacCarouselQuery(el))); }
+ });
+ };
+
+ // Data API
+ $(function() {
+ $('[data-carousel-query]').dacCarouselQuery();
+ });
+})(jQuery);
+
+(function($) {
+ /**
+ * A CSS based carousel, inspired by SequenceJS.
+ * @param {jQuery} el
+ * @param {object} options
+ * @constructor
+ */
+ function DacCarousel(el, options) {
+ this.el = $(el);
+ this.options = options = $.extend({}, DacCarousel.OPTIONS, this.el.data(), options || {});
+ this.frames = this.el.find(options.frameSelector);
+ this.count = this.frames.size();
+ this.current = options.start;
+
+ this.initPagination();
+ this.initEvents();
+ this.initFrame();
+ }
+
+ DacCarousel.OPTIONS = {
+ auto: true,
+ autoTime: 10000,
+ autoMinTime: 5000,
+ btnPrev: '[data-carousel-prev]',
+ btnNext: '[data-carousel-next]',
+ frameSelector: 'article',
+ loop: true,
+ start: 0,
+ swipeThreshold: 160,
+ pagination: '[data-carousel-pagination]'
+ };
+
+ DacCarousel.prototype.initPagination = function() {
+ this.pagination = $([]);
+ if (!this.options.pagination) { return; }
+
+ var pagination = $('<ul class="dac-pagination">');
+ var parent = this.el;
+ if (typeof this.options.pagination === 'string') { parent = this.el.find(this.options.pagination); }
+
+ if (this.count > 1) {
+ for (var i = 0; i < this.count; i++) {
+ var li = $('<li class="dac-pagination-item">').text(i);
+ if (i === this.options.start) { li.addClass('active'); }
+ li.click(this.go.bind(this, i));
+
+ pagination.append(li);
+ }
+ this.pagination = pagination.children();
+ parent.append(pagination);
+ }
+ };
+
+ DacCarousel.prototype.initEvents = function() {
+ var that = this;
+
+ this.touch = {
+ start: {x: 0, y: 0},
+ end: {x: 0, y: 0}
+ };
+
+ this.el.on('touchstart', this.touchstart_.bind(this));
+ this.el.on('touchend', this.touchend_.bind(this));
+ this.el.on('touchmove', this.touchmove_.bind(this));
+
+ this.el.hover(function() {
+ that.pauseRotateTimer();
+ }, function() {
+ that.startRotateTimer();
+ });
+
+ $(this.options.btnPrev).click(function(e) {
+ e.preventDefault();
+ that.prev();
+ });
+
+ $(this.options.btnNext).click(function(e) {
+ e.preventDefault();
+ that.next();
+ });
+ };
+
+ DacCarousel.prototype.touchstart_ = function(event) {
+ var t = event.originalEvent.touches[0];
+ this.touch.start = {x: t.screenX, y: t.screenY};
+ };
+
+ DacCarousel.prototype.touchend_ = function() {
+ var deltaX = this.touch.end.x - this.touch.start.x;
+ var deltaY = Math.abs(this.touch.end.y - this.touch.start.y);
+ var shouldSwipe = (deltaY < Math.abs(deltaX)) && (Math.abs(deltaX) >= this.options.swipeThreshold);
+
+ if (shouldSwipe) {
+ if (deltaX > 0) {
+ this.prev();
+ } else {
+ this.next();
+ }
+ }
+ };
+
+ DacCarousel.prototype.touchmove_ = function(event) {
+ var t = event.originalEvent.touches[0];
+ this.touch.end = {x: t.screenX, y: t.screenY};
+ };
+
+ DacCarousel.prototype.initFrame = function() {
+ this.frames.removeClass('active').eq(this.options.start).addClass('active');
+ };
+
+ DacCarousel.prototype.startRotateTimer = function() {
+ if (!this.options.auto || this.rotateTimer) { return; }
+ this.rotateTimer = setTimeout(this.next.bind(this), this.options.autoTime);
+ };
+
+ DacCarousel.prototype.pauseRotateTimer = function() {
+ clearTimeout(this.rotateTimer);
+ this.rotateTimer = null;
+ };
+
+ DacCarousel.prototype.prev = function() {
+ this.go(this.current - 1);
+ };
+
+ DacCarousel.prototype.next = function() {
+ this.go(this.current + 1);
+ };
+
+ DacCarousel.prototype.go = function(next) {
+ // Figure out what the next slide is.
+ while (this.count > 0 && next >= this.count) { next -= this.count; }
+ while (next < 0) { next += this.count; }
+
+ // Cancel if we're already on that slide.
+ if (next === this.current) { return; }
+
+ // Prepare next slide.
+ this.frames.eq(next).removeClass('out');
+
+ // Recalculate styles before starting slide transition.
+ this.el.resolveStyles();
+ // Update pagination
+ this.pagination.removeClass('active').eq(next).addClass('active');
+
+ // Transition out current frame
+ this.frames.eq(this.current).toggleClass('active out');
+
+ // Transition in a new frame
+ this.frames.eq(next).toggleClass('active');
+
+ this.current = next;
+ };
+
+ // Helper which resolves new styles for an element, so it can start transitioning
+ // from the new values.
+ $.fn.resolveStyles = function() {
+ /*jshint expr:true*/
+ this[0] && this[0].offsetTop;
+ return this;
+ };
+
+ // jQuery plugin
+ $.fn.dacCarousel = function() {
+ this.each(function() {
+ var $el = $(this);
+ $el.data('dac-carousel', new DacCarousel(this));
+ });
+ return this;
+ };
+
+ // Data API
+ $(function() {
+ $('[data-carousel]').dacCarousel();
+ });
+})(jQuery);
+
+/* global toRoot */
+
+(function($) {
+ // Ordering matters
+ var TAG_MAP = [
+ {from: 'developerstory', to: 'Android Developer Story'},
+ {from: 'googleplay', to: 'Google Play'}
+ ];
+
+ function DacHero(el, resource, isSearch) {
+ var slide = $('<article>');
+ slide.addClass(isSearch ? 'dac-search-hero' : 'dac-expand dac-hero');
+ var image = cleanUrl(resource.heroImage || resource.image);
+ var fullBleed = image && !resource.heroColor;
+
+ if (!isSearch) {
+ // Configure background
+ slide.css({
+ backgroundImage: fullBleed ? 'url(' + image + ')' : '',
+ backgroundColor: resource.heroColor || ''
+ });
+
+ // Should copy be inverted
+ slide.toggleClass('dac-invert', resource.heroInvert || fullBleed);
+ slide.toggleClass('dac-darken', fullBleed);
+
+ // Should be clickable
+ slide.append($('<a class="dac-hero-carousel-action">').attr('href', cleanUrl(resource.url)));
+ }
+
+ var cols = $('<div class="cols dac-hero-content">');
+
+ // inline image column
+ var rightCol = $('<div class="col-1of2 col-push-1of2 dac-hero-figure">')
+ .appendTo(cols);
+
+ if ((!fullBleed || isSearch) && image) {
+ rightCol.append($('<img>').attr('src', image));
+ }
+
+ // info column
+ $('<div class="col-1of2 col-pull-1of2">')
+ .append($('<div class="dac-hero-tag">').text(formatTag(resource)))
+ .append($('<h1 class="dac-hero-title">').text(formatTitle(resource)))
+ .append($('<p class="dac-hero-description">').text(resource.summary))
+ .append($('<a class="dac-hero-cta">')
+ .text(formatCTA(resource))
+ .attr('href', cleanUrl(resource.url))
+ .prepend($('<span class="dac-sprite dac-auto-chevron">'))
+ )
+ .appendTo(cols);
+
+ slide.append(cols.wrap('<div class="wrap">').parent());
+ el.append(slide);
+ }
+
+ function cleanUrl(url) {
+ if (url && url.indexOf('//') === -1) {
+ url = toRoot + url;
+ }
+ return url;
+ }
+
+ function formatTag(resource) {
+ // Hmm, need a better more scalable solution for this.
+ for (var i = 0, mapping; mapping = TAG_MAP[i]; i++) {
+ if (resource.tags.indexOf(mapping.from) > -1) {
+ return mapping.to;
+ }
+ }
+ return resource.type;
+ }
+
+ function formatTitle(resource) {
+ return resource.title.replace(/android developer story: /i, '');
+ }
+
+ function formatCTA(resource) {
+ return resource.type === 'youtube' ? 'Watch the video' : 'Learn more';
+ }
+
+ // jQuery plugin
+ $.fn.dacHero = function(resource, isSearch) {
+ return this.each(function() {
+ var el = $(this);
+ return new DacHero(el, resource, isSearch);
+ });
+ };
+})(jQuery);
+
+(function($) {
+ 'use strict';
+
+ function highlightString(label, query) {
+ query = query || '';
+ //query = query.replace('<wbr>', '').replace('.', '\\.');
+ var queryRE = new RegExp('(' + query + ')', 'ig');
+ return label.replace(queryRE, '<em>$1</em>');
+ }
+
+ $.fn.highlightMatches = function(query) {
+ return this.each(function() {
+ var el = $(this);
+ var label = el.html();
+ var highlighted = highlightString(label, query);
+ el.html(highlighted);
+ el.addClass('highlighted');
+ });
+ };
+})(jQuery);
+
+/**
+ * History tracking.
+ * Track visited urls in localStorage.
+ */
+(function($) {
+ var PAGES_TO_STORE_ = 100;
+ var MIN_NUMBER_OF_PAGES_TO_DISPLAY_ = 6;
+ var CONTAINER_SELECTOR_ = '.dac-search-results-history-wrap';
+
+ /**
+ * Generate resource cards for visited pages.
+ * @param {HTMLElement} el
+ * @constructor
+ */
+ function HistoryQuery(el) {
+ this.el = $(el);
+
+ // Only show history component if enough pages have been visited.
+ if (getVisitedPages().length < MIN_NUMBER_OF_PAGES_TO_DISPLAY_) {
+ this.el.closest(CONTAINER_SELECTOR_).addClass('dac-hidden');
+ return;
+ }
+
+ // Rename query
+ this.el.data('query', this.el.data('history-query'));
+
+ // jQuery method to populate cards.
+ this.el.resourceWidget();
+ }
+
+ /**
+ * Fetch from localStorage an array of visted pages
+ * @returns {Array}
+ */
+ function getVisitedPages() {
+ var visited = localStorage.getItem('visited-pages');
+ return visited ? JSON.parse(visited) : [];
+ }
+
+ /**
+ * Return a page corresponding to cuurent pathname. If none exists, create one.
+ * @param {Array} pages
+ * @param {String} path
+ * @returns {Object} Page
+ */
+ function getPageForPath(pages, path) {
+ var page;
+
+ // Backwards lookup for current page, last pages most likely to be visited again.
+ for (var i = pages.length - 1; i >= 0; i--) {
+ if (pages[i].path === path) {
+ page = pages[i];
+
+ // Remove page object from pages list to ensure correct ordering.
+ pages.splice(i, 1);
+
+ return page;
+ }
+ }
+
+ // If storage limit is exceeded, remove last visited path.
+ if (pages.length >= PAGES_TO_STORE_) {
+ pages.shift();
+ }
+
+ return {path: path};
+ }
+
+ /**
+ * Add current page to back of visited array, increase hit count by 1.
+ */
+ function addCurrectPage() {
+ var path = location.pathname;
+
+ // Do not track frontpage visits.
+ if (path === '/' || path === '/index.html') {return;}
+
+ var pages = getVisitedPages();
+ var page = getPageForPath(pages, path);
+
+ // New page visits have no hit count.
+ page.hit = ~~page.hit + 1;
+
+ // Most recently visted pages are located at the end of the visited array.
+ pages.push(page);
+
+ localStorage.setItem('visited-pages', JSON.stringify(pages));
+ }
+
+ /**
+ * Hit count compare function.
+ * @param {Object} a - page
+ * @param {Object} b - page
+ * @returns {number}
+ */
+ function byHit(a, b) {
+ if (a.hit > b.hit) {
+ return -1;
+ } else if (a.hit < b.hit) {
+ return 1;
+ }
+
+ return 0;
+ }
+
+ /**
+ * Return a list of visited urls in a given order.
+ * @param {String} order - (recent|most-visited)
+ * @returns {Array}
+ */
+ $.dacGetVisitedUrls = function(order) {
+ var pages = getVisitedPages();
+
+ if (order === 'recent') {
+ pages.reverse();
+ } else {
+ pages.sort(byHit);
+ }
+
+ return pages.map(function(page) {
+ return page.path.replace(/^\//, '');
+ });
+ };
+
+ // jQuery plugin
+ $.fn.dacHistoryQuery = function() {
+ return this.each(function() {
+ var el = $(this);
+ var data = el.data('dac.recentlyVisited');
+
+ if (!data) {
+ el.data('dac.recentlyVisited', (data = new HistoryQuery(el)));
+ }
+ });
+ };
+
+ $(function() {
+ $('[data-history-query]').dacHistoryQuery();
+ // Do not block page rendering.
+ setTimeout(addCurrectPage, 0);
+ });
+})(jQuery);
+
+/* ############################################ */
+/* ########## LOCALIZATION ############ */
+/* ############################################ */
+/**
+ * Global helpers.
+ */
+function getBaseUri(uri) {
+ var intlUrl = (uri.substring(0, 6) === '/intl/');
+ if (intlUrl) {
+ var base = uri.substring(uri.indexOf('intl/') + 5, uri.length);
+ base = base.substring(base.indexOf('/') + 1, base.length);
+ return '/' + base;
+ } else {
+ return uri;
+ }
+}
+
+function changeLangPref(targetLang, submit) {
+ window.writeCookie('pref_lang', targetLang, null);
+//DD
+ $('#language').find('option[value="' + targetLang + '"]').attr('selected', true);
+ // ####### TODO: Remove this condition once we're stable on devsite #######
+ // This condition is only needed if we still need to support legacy GAE server
+ if (window.devsite) {
+ // Switch language when on Devsite server
+ if (submit) {
+ $('#setlang').submit();
+ }
+ } else {
+ // Switch language when on legacy GAE server
+ if (submit) {
+ window.location = getBaseUri(location.pathname);
+ }
+ }
+}
+// Redundant usage to appease jshint.
+window.changeLangPref = changeLangPref;
+
+(function() {
+ /**
+ * Whitelisted locales. Should match choices in language dropdown. Repeated here
+ * as a lot of i18n logic happens before page load and dropdown is ready.
+ */
+ var LANGUAGES = [
+ 'en',
+ 'es',
+ 'in',
+ 'ja',
+ 'ko',
+ 'pt-br',
+ 'ru',
+ 'vi',
+ 'zh-cn',
+ 'zh-tw'
+ ];
+
+ /**
+ * Master list of translated strings for template files.
+ */
+ var PHRASES = {
+ 'newsletter': {
+ 'title': 'Get the latest Android developer news and tips that will help you find success on Google Play.',
+ 'requiredHint': '* Required Fields',
+ 'name': 'Full name',
+ 'email': 'Email address',
+ 'company': 'Company / developer name',
+ 'appUrl': 'One of your Play Store app URLs',
+ 'business': {
+ 'label': 'Which best describes your business:',
+ 'apps': 'Apps',
+ 'games': 'Games',
+ 'both': 'Apps & Games'
+ },
+ 'confirmMailingList': 'Add me to the mailing list for the monthly newsletter and occasional emails about ' +
+ 'development and Google Play opportunities.',
+ 'privacyPolicy': 'I acknowledge that the information provided in this form will be subject to Google\'s ' +
+ '<a href="https://www.google.com/policies/privacy/" target="_blank">privacy policy</a>.',
+ 'languageVal': 'English',
+ 'successTitle': 'Hooray!',
+ 'successDetails': 'You have successfully signed up for the latest Android developer news and tips.',
+ 'languageValTarget': {
+ 'en': 'English',
+ 'ar': 'Arabic (العربيّة)',
+ 'in': 'Indonesian (Bahasa)',
+ 'fr': 'French (français)',
+ 'de': 'German (Deutsch)',
+ 'ja': 'Japanese (日本語)',
+ 'ko': 'Korean (한국어)',
+ 'ru': 'Russian (Русский)',
+ 'es': 'Spanish (español)',
+ 'th': 'Thai (ภาษาไทย)',
+ 'tr': 'Turkish (Türkçe)',
+ 'vi': 'Vietnamese (tiếng Việt)',
+ 'pt-br': 'Brazilian Portuguese (Português Brasileiro)',
+ 'zh-cn': 'Simplified Chinese (简体中文)',
+ 'zh-tw': 'Traditional Chinese (繁體中文)',
+ },
+ 'resetLangTitle': "Browse this site in %{targetLang}?",
+ 'resetLangTextIntro': 'You requested a page in %{targetLang}, but your language preference for this site is %{lang}.',
+ 'resetLangTextCta': 'Would you like to change your language preference and browse this site in %{targetLang}? ' +
+ 'If you want to change your language preference later, use the language menu at the bottom of each page.',
+ 'resetLangButtonYes': 'Change Language',
+ 'resetLangButtonNo': 'Not Now'
+ }
+ };
+
+ /**
+ * Current locale.
+ */
+ var locale = (function() {
+ var lang = window.readCookie('pref_lang');
+ if (lang === 0 || LANGUAGES.indexOf(lang) === -1) {
+ lang = 'en';
+ }
+ return lang;
+ })();
+ var localeTarget = (function() {
+ var localeTarget = locale;
+ if (window.devsite) {
+ if (getQueryVariable('hl')) {
+ var target = getQueryVariable('hl');
+ if (!(target === 0) || (LANGUAGES.indexOf(target) === -1)) {
+ localeTarget = target;
+ }
+ }
+ } else {
+ if (location.pathname.substring(0,6) == "/intl/") {
+ var target = location.pathname.split('/')[2];
+ if (!(target === 0) || (LANGUAGES.indexOf(target) === -1)) {
+ localeTarget = target;
+ }
+ }
+ }
+
+ return localeTarget;
+ })();
+
+ /**
+ * Global function shims for backwards compatibility
+ */
+ window.changeNavLang = function() {
+ // Already done.
+ };
+
+ window.loadLangPref = function() {
+ // Languages pref already loaded.
+ };
+
+ window.getLangPref = function() {
+ return locale;
+ };
+
+ window.getLangTarget = function() {
+ return localeTarget;
+ };
+
+ // Expose polyglot instance for advanced localization.
+ var polyglot = window.polyglot = new window.Polyglot({
+ locale: locale,
+ phrases: PHRASES
+ });
+
+ // When DOM is ready.
+ $(function() {
+ // Mark current locale in language picker.
+ $('#language').find('option[value="' + locale + '"]').attr('selected', true);
+
+ $('html').dacTranslate().on('dac:domchange', function(e) {
+ $(e.target).dacTranslate();
+ });
+ });
+
+ $.fn.dacTranslate = function() {
+ // Translate strings in template markup:
+
+ // OLD
+ // Having all translations in HTML does not scale well and bloats every page.
+ // Need to migrate this to data-l JS translations below.
+ if (locale !== 'en') {
+ var $links = this.find('a[' + locale + '-lang]');
+ $links.each(function() { // for each link with a translation
+ var $link = $(this);
+ // put the desired language from the attribute as the text
+ $link.text($link.attr(locale + '-lang'));
+ });
+ }
+
+ // NEW
+ // A simple declarative api for JS translations. Feel free to extend as appropriate.
+
+ // Miscellaneous string compilations
+ // Build full strings from localized substrings:
+ var myLocaleTarget = window.getLangTarget();
+ var myTargetLang = window.polyglot.t("newsletter.languageValTarget." + myLocaleTarget);
+ var myLang = window.polyglot.t("newsletter.languageVal");
+ var myTargetLangTitleString = window.polyglot.t("newsletter.resetLangTitle", {targetLang: myTargetLang});
+ var myResetLangTextIntro = window.polyglot.t("newsletter.resetLangTextIntro", {targetLang: myTargetLang, lang: myLang});
+ var myResetLangTextCta = window.polyglot.t("newsletter.resetLangTextCta", {targetLang: myTargetLang});
+ //var myResetLangButtonYes = window.polyglot.t("newsletter.resetLangButtonYes", {targetLang: myTargetLang});
+
+ // Inject strings as text values in dialog components:
+ $("#langform .dac-modal-header-title").text(myTargetLangTitleString);
+ $("#langform #resetLangText").text(myResetLangTextIntro);
+ $("#langform #resetLangCta").text(myResetLangTextCta);
+ //$("#resetLangButtonYes").attr("data-t", window.polyglot.t(myResetLangButtonYes));
+
+ // Text: <div data-t="nav.home"></div>
+ // HTML: <div data-t="privacy" data-t-html></html>
+ this.find('[data-t]').each(function() {
+ var el = $(this);
+ var data = el.data();
+ if (data.t) {
+ el[data.tHtml === '' ? 'html' : 'text'](polyglot.t(data.t));
+ }
+ });
+
+ return this;
+ };
+})();
+/* ########## END LOCALIZATION ############ */
+
+// Translations. These should eventually be moved into language-specific files and loaded on demand.
+// jshint nonbsp:false
+switch (window.getLangPref()) {
+ case 'ar':
+ window.polyglot.extend({
+ 'newsletter': {
+ 'title': 'Google Play. يمكنك الحصول على آخر الأخبار والنصائح من مطوّري تطبيقات Android، مما يساعدك ' +
+ 'على تحقيق النجاح على',
+ 'requiredHint': '* حقول مطلوبة',
+ 'name': '. الاسم بالكامل ',
+ 'email': '. عنوان البريد الإلكتروني ',
+ 'company': '. اسم الشركة / اسم مطوّر البرامج',
+ 'appUrl': '. أحد عناوين URL لتطبيقاتك في متجر Play',
+ 'business': {
+ 'label': '. ما العنصر الذي يوضح طبيعة نشاطك التجاري بدقة؟ ',
+ 'apps': 'التطبيقات',
+ 'games': 'الألعاب',
+ 'both': 'التطبيقات والألعاب'
+ },
+ 'confirmMailingList': 'إضافتي إلى القائمة البريدية للنشرة الإخبارية الشهرية والرسائل الإلكترونية التي يتم' +
+ ' إرسالها من حين لآخر بشأن التطوير وفرص Google Play.',
+ 'privacyPolicy': 'أقر بأن المعلومات المقدَّمة في هذا النموذج تخضع لسياسة خصوصية ' +
+ '<a href="https://www.google.com/intl/ar/policies/privacy/" target="_blank">Google</a>.',
+ 'languageVal': 'Arabic (العربيّة)',
+ 'successTitle': 'رائع!',
+ 'successDetails': 'لقد اشتركت بنجاح للحصول على آخر الأخبار والنصائح من مطوّري برامج Android.'
+ }
+ });
+ break;
+ case 'zh-cn':
+ window.polyglot.extend({
+ 'newsletter': {
+ 'title': '获取最新的 Android 开发者资讯和提示,助您在 Google Play 上取得成功。',
+ 'requiredHint': '* 必填字段',
+ 'name': '全名',
+ 'email': '电子邮件地址',
+ 'company': '公司/开发者名称',
+ 'appUrl': '您的某个 Play 商店应用网址',
+ 'business': {
+ 'label': '哪一项能够最准确地描述您的业务?',
+ 'apps': '应用',
+ 'games': '游戏',
+ 'both': '应用和游戏'
+ },
+ 'confirmMailingList': '将我添加到邮寄名单,以便接收每月简报以及不定期发送的关于开发和 Google Play 商机的电子邮件。',
+ 'privacyPolicy': '我确认自己了解在此表单中提供的信息受 <a href="https://www.google.com/intl/zh-CN/' +
+ 'policies/privacy/" target="_blank">Google</a> 隐私权政策的约束。',
+ 'languageVal': 'Simplified Chinese (简体中文)',
+ 'successTitle': '太棒了!',
+ 'successDetails': '您已成功订阅最新的 Android 开发者资讯和提示。'
+ }
+ });
+ break;
+ case 'zh-tw':
+ window.polyglot.extend({
+ 'newsletter': {
+ 'title': '獲得 Android 開發人員的最新消息和各項秘訣,讓您在 Google Play 上輕鬆邁向成功之路。',
+ 'requiredHint': '* 必要欄位',
+ 'name': '全名',
+ 'email': '電子郵件地址',
+ 'company': '公司/開發人員名稱',
+ 'appUrl': '您其中一個 Play 商店應用程式的網址',
+ 'business': {
+ 'label': '為您的商家選取最合適的產品類別。',
+ 'apps': '應用程式',
+ 'games': '遊戲',
+ 'both': '應用程式和遊戲'
+ },
+ 'confirmMailingList': '我想加入 Google Play 的郵寄清單,以便接收每月電子報和 Google Play 不定期寄送的電子郵件,' +
+ '瞭解關於開發和 Google Play 商機的資訊。',
+ 'privacyPolicy': '我瞭解,我在這張表單中提供的資訊將受到 <a href="' +
+ 'https://www.google.com/intl/zh-TW/policies/privacy/" target="_blank">Google</a> 隱私權政策.',
+ 'languageVal': 'Traditional Chinese (繁體中文)',
+ 'successTitle': '太棒了!',
+ 'successDetails': '您已經成功訂閱 Android 開發人員的最新消息和各項秘訣。'
+ }
+ });
+ break;
+ case 'fr':
+ window.polyglot.extend({
+ 'newsletter': {
+ 'title': 'Recevez les dernières actualités destinées aux développeurs Android, ainsi que des conseils qui ' +
+ 'vous mèneront vers le succès sur Google Play.',
+ 'requiredHint': '* Champs obligatoires',
+ 'name': 'Nom complet',
+ 'email': 'Adresse e-mail',
+ 'company': 'Nom de la société ou du développeur',
+ 'appUrl': 'Une de vos URL Play Store',
+ 'business': {
+ 'label': 'Quelle option décrit le mieux votre activité ?',
+ 'apps': 'Applications',
+ 'games': 'Jeux',
+ 'both': 'Applications et jeux'
+ },
+ 'confirmMailingList': 'Ajoutez-moi à la liste de diffusion de la newsletter mensuelle et tenez-moi informé ' +
+ 'par des e-mails occasionnels de l\'évolution et des opportunités de Google Play.',
+ 'privacyPolicy': 'Je comprends que les renseignements fournis dans ce formulaire seront soumis aux <a href="' +
+ 'https://www.google.com/intl/fr/policies/privacy/" target="_blank">règles de confidentialité</a> de Google.',
+ 'languageVal': 'French (français)',
+ 'successTitle': 'Super !',
+ 'successDetails': 'Vous êtes bien inscrit pour recevoir les actualités et les conseils destinés aux ' +
+ 'développeurs Android.'
+ }
+ });
+ break;
+ case 'de':
+ window.polyglot.extend({
+ 'newsletter': {
+ 'title': 'Abonniere aktuelle Informationen und Tipps für Android-Entwickler und werde noch erfolgreicher ' +
+ 'bei Google Play.',
+ 'requiredHint': '* Pflichtfelder',
+ 'name': 'Vollständiger Name',
+ 'email': 'E-Mail-Adresse',
+ 'company': 'Unternehmens-/Entwicklername',
+ 'appUrl': 'Eine der URLs deiner Play Store App',
+ 'business': {
+ 'label': 'Welche der folgenden Kategorien beschreibt dein Unternehmen am besten?',
+ 'apps': 'Apps',
+ 'games': 'Spiele',
+ 'both': 'Apps und Spiele'
+ },
+ 'confirmMailingList': 'Meine E-Mail-Adresse soll zur Mailingliste hinzugefügt werden, damit ich den ' +
+ 'monatlichen Newsletter sowie gelegentlich E-Mails zu Entwicklungen und Optionen bei Google Play erhalte.',
+ 'privacyPolicy': 'Ich bestätige, dass die in diesem Formular bereitgestellten Informationen gemäß der ' +
+ '<a href="https://www.google.com/intl/de/policies/privacy/" target="_blank">Datenschutzerklärung</a> von ' +
+ 'Google verwendet werden dürfen.',
+ 'languageVal': 'German (Deutsch)',
+ 'successTitle': 'Super!',
+ 'successDetails': 'Du hast dich erfolgreich angemeldet und erhältst jetzt aktuelle Informationen und Tipps ' +
+ 'für Android-Entwickler.'
+ }
+ });
+ break;
+ case 'in':
+ window.polyglot.extend({
+ 'newsletter': {
+ 'title': 'Receba as dicas e as notícias mais recentes para os desenvolvedores Android e seja bem-sucedido ' +
+ 'no Google Play.',
+ 'requiredHint': '* Bidang Wajib Diisi',
+ 'name': 'Nama lengkap',
+ 'email': 'Alamat email',
+ 'company': 'Nama pengembang / perusahaan',
+ 'appUrl': 'Salah satu URL aplikasi Play Store Anda',
+ 'business': {
+ 'label': 'Dari berikut ini, mana yang paling cocok dengan bisnis Anda?',
+ 'apps': 'Aplikasi',
+ 'games': 'Game',
+ 'both': 'Aplikasi dan Game'
+ },
+ 'confirmMailingList': 'Tambahkan saya ke milis untuk mendapatkan buletin bulanan dan email sesekali mengenai ' +
+ 'perkembangan dan kesempatan yang ada di Google Play.',
+ 'privacyPolicy': 'Saya memahami bahwa informasi yang diberikan dalam formulir ini tunduk pada <a href="' +
+ 'https://www.google.com/intl/in/policies/privacy/" target="_blank">kebijakan privasi</a> Google.',
+ 'languageVal': 'Indonesian (Bahasa)',
+ 'successTitle': 'Hore!',
+ 'successDetails': 'Anda berhasil mendaftar untuk kiat dan berita pengembang Android terbaru.'
+ }
+ });
+ break;
+ case 'it':
+ //window.polyglot.extend({
+ // 'newsletter': {
+ // 'title': 'Receba as dicas e as notícias mais recentes para os desenvolvedores Android e seja bem-sucedido ' +
+ // 'no Google Play.',
+ // 'requiredHint': '* Campos obrigatórios',
+ // 'name': 'Nome completo',
+ // 'email': 'Endereço de Email',
+ // 'company': 'Nome da empresa / do desenvolvedor',
+ // 'appUrl': 'URL de um dos seus apps da Play Store',
+ // 'business': {
+ // 'label': 'Qual das seguintes opções melhor descreve sua empresa?',
+ // 'apps': 'Apps',
+ // 'games': 'Jogos',
+ // 'both': 'Apps e Jogos'
+ // },
+ // 'confirmMailingList': 'Inscreva-me na lista de e-mails para que eu receba o boletim informativo mensal, ' +
+ // 'bem como e-mails ocasionais sobre o desenvolvimento e as oportunidades do Google Play.',
+ // 'privacyPolicy': 'Reconheço que as informações fornecidas neste formulário estão sujeitas à <a href="' +
+ // 'https://www.google.com.br/policies/privacy/" target="_blank">Política de Privacidade</a> do Google.',
+ // 'languageVal': 'Italian (italiano)',
+ // 'successTitle': 'Uhu!',
+ // 'successDetails': 'Você se inscreveu para receber as notícias e as dicas mais recentes para os ' +
+ // 'desenvolvedores Android.',
+ // }
+ //});
+ break;
+ case 'ja':
+ window.polyglot.extend({
+ 'newsletter': {
+ 'title': 'Google Play での成功に役立つ Android デベロッパー向けの最新ニュースやおすすめの情報をお届けします。',
+ 'requiredHint': '* 必須',
+ 'name': '氏名',
+ 'email': 'メールアドレス',
+ 'company': '会社名 / デベロッパー名',
+ 'appUrl': 'Play ストア アプリの URL(いずれか 1 つ)',
+ 'business': {
+ 'label': 'お客様のビジネスに最もよく当てはまるものをお選びください。',
+ 'apps': 'アプリ',
+ 'games': 'ゲーム',
+ 'both': 'アプリとゲーム'
+ },
+ 'confirmMailingList': '開発や Google Play の最新情報に関する毎月発行のニュースレターや不定期発行のメールを受け取る',
+ 'privacyPolicy': 'このフォームに入力した情報に <a href="https://www.google.com/intl/ja/policies/privacy/" ' +
+ 'target="_blank">Google</a> のプライバシー ポリシーが適用',
+ 'languageVal': 'Japanese (日本語)',
+ 'successTitle': '完了です!',
+ 'successDetails': 'Android デベロッパー向けの最新ニュースやおすすめの情報の配信登録が完了しました。'
+ }
+ });
+ break;
+ case 'ko':
+ window.polyglot.extend({
+ 'newsletter': {
+ 'title': 'Google Play에서 성공을 거두는 데 도움이 되는 최신 Android 개발자 소식 및 도움말을 받아 보세요.',
+ 'requiredHint': '* 필수 입력란',
+ 'name': '이름',
+ 'email': '이메일 주소',
+ 'company': '회사/개발자 이름',
+ 'appUrl': 'Play 스토어 앱 URL 중 1개',
+ 'business': {
+ 'label': '다음 중 내 비즈니스를 가장 잘 설명하는 단어는 무엇인가요?',
+ 'apps': '앱',
+ 'games': '게임',
+ 'both': '앱 및 게임'
+ },
+ 'confirmMailingList': '개발 및 Google Play 관련 소식에 관한 월별 뉴스레터 및 비정기 이메일을 받아보겠습니다.',
+ 'privacyPolicy': '이 양식에 제공한 정보는 <a href="https://www.google.com/intl/ko/policies/privacy/" ' +
+ 'target="_blank">Google의</a> 개인정보취급방침에 따라 사용됨을',
+ 'languageVal':'Korean (한국어)',
+ 'successTitle': '축하합니다!',
+ 'successDetails': '최신 Android 개발자 뉴스 및 도움말을 받아볼 수 있도록 가입을 완료했습니다.'
+ }
+ });
+ break;
+ case 'pt-br':
+ window.polyglot.extend({
+ 'newsletter': {
+ 'title': 'Receba as dicas e as notícias mais recentes para os desenvolvedores Android e seja bem-sucedido ' +
+ 'no Google Play.',
+ 'requiredHint': '* Campos obrigatórios',
+ 'name': 'Nome completo',
+ 'email': 'Endereço de Email',
+ 'company': 'Nome da empresa / do desenvolvedor',
+ 'appUrl': 'URL de um dos seus apps da Play Store',
+ 'business': {
+ 'label': 'Qual das seguintes opções melhor descreve sua empresa?',
+ 'apps': 'Apps',
+ 'games': 'Jogos',
+ 'both': 'Apps e Jogos'
+ },
+ 'confirmMailingList': 'Inscreva-me na lista de e-mails para que eu receba o boletim informativo mensal, ' +
+ 'bem como e-mails ocasionais sobre o desenvolvimento e as oportunidades do Google Play.',
+ 'privacyPolicy': 'Reconheço que as informações fornecidas neste formulário estão sujeitas à <a href="' +
+ 'https://www.google.com.br/policies/privacy/" target="_blank">Política de Privacidade</a> do Google.',
+ 'languageVal': 'Brazilian Portuguese (Português Brasileiro)',
+ 'successTitle': 'Uhu!',
+ 'successDetails': 'Você se inscreveu para receber as notícias e as dicas mais recentes para os ' +
+ 'desenvolvedores Android.'
+ }
+ });
+ break;
+ case 'ru':
+ window.polyglot.extend({
+ 'newsletter': {
+ 'title': 'Хотите получать последние новости и советы для разработчиков Google Play? Заполните эту форму.',
+ 'requiredHint': '* Обязательные поля',
+ 'name': 'Полное имя',
+ 'email': 'Адрес электронной почты',
+ 'company': 'Название компании или имя разработчика',
+ 'appUrl': 'Ссылка на любое ваше приложение в Google Play',
+ 'business': {
+ 'label': 'Что вы создаете?',
+ 'apps': 'Приложения',
+ 'games': 'Игры',
+ 'both': 'Игры и приложения'
+ },
+ 'confirmMailingList': 'Я хочу получать ежемесячную рассылку для разработчиков и другие полезные новости ' +
+ 'Google Play.',
+ 'privacyPolicy': 'Я предоставляю эти данные в соответствии с <a href="' +
+ 'https://www.google.com/intl/ru/policies/privacy/" target="_blank">Политикой конфиденциальности</a> Google.',
+ 'languageVal': 'Russian (Русский)',
+ 'successTitle': 'Поздравляем!',
+ 'successDetails': 'Теперь вы подписаны на последние новости и советы для разработчиков Android.'
+ }
+ });
+ break;
+ case 'es':
+ window.polyglot.extend({
+ 'newsletter': {
+ 'title': 'Recibe las últimas noticias y sugerencias para programadores de Android y logra tener éxito en ' +
+ 'Google Play.',
+ 'requiredHint': '* Campos obligatorios',
+ 'name': 'Dirección de correo electrónico',
+ 'email': 'Endereço de Email',
+ 'company': 'Nombre de la empresa o del programador',
+ 'appUrl': 'URL de una de tus aplicaciones de Play Store',
+ 'business': {
+ 'label': '¿Qué describe mejor a tu empresa?',
+ 'apps': 'Aplicaciones',
+ 'games': 'Juegos',
+ 'both': 'Juegos y aplicaciones'
+ },
+ 'confirmMailingList': 'Deseo unirme a la lista de distribución para recibir el boletín informativo mensual ' +
+ 'y correos electrónicos ocasionales sobre desarrollo y oportunidades de Google Play.',
+ 'privacyPolicy': 'Acepto que la información que proporcioné en este formulario cumple con la <a href="' +
+ 'https://www.google.com/intl/es/policies/privacy/" target="_blank">política de privacidad</a> de Google.',
+ 'languageVal': 'Spanish (español)',
+ 'successTitle': '¡Felicitaciones!',
+ 'successDetails': 'El registro para recibir las últimas noticias y sugerencias para programadores de Android ' +
+ 'se realizó correctamente.'
+ }
+ });
+ break;
+ case 'th':
+ window.polyglot.extend({
+ 'newsletter': {
+ 'title': 'รับข่าวสารล่าสุดสำหรับนักพัฒนาซอฟต์แวร์ Android ตลอดจนเคล็ดลับที่จะช่วยให้คุณประสบความสำเร็จบน ' +
+ 'Google Play',
+ 'requiredHint': '* ช่องที่ต้องกรอก',
+ 'name': 'ชื่อและนามสกุล',
+ 'email': 'ที่อยู่อีเมล',
+ 'company': 'ชื่อบริษัท/นักพัฒนาซอฟต์แวร์',
+ 'appUrl': 'URL แอปใดแอปหนึ่งของคุณใน Play สโตร์',
+ 'business': {
+ 'label': 'ข้อใดตรงกับธุรกิจของคุณมากที่สุด',
+ 'apps': 'แอป',
+ 'games': 'เกม',
+ 'both': 'แอปและเกม'
+ },
+ 'confirmMailingList': 'เพิ่มฉันลงในรายชื่ออีเมลเพื่อรับจดหมายข่าวรายเดือนและอีเมลเป็นครั้งคราวเกี่ยวกับก' +
+ 'ารพัฒนาซอฟต์แวร์และโอกาสใน Google Play',
+ 'privacyPolicy': 'ฉันรับทราบว่าข้อมูลที่ให้ไว้ในแบบฟอร์มนี้จะเป็นไปตามนโยบายส่วนบุคคลของ ' +
+ '<a href="https://www.google.com/intl/th/policies/privacy/" target="_blank">Google</a>',
+ 'languageVal': 'Thai (ภาษาไทย)',
+ 'successTitle': 'ไชโย!',
+ 'successDetails': 'คุณลงชื่อสมัครรับข่าวสารและเคล็ดลับล่าสุดสำหรับนักพัฒนาซอฟต์แวร์ Android เสร็จเรียบร้อยแล้ว'
+ }
+ });
+ break;
+ case 'tr':
+ window.polyglot.extend({
+ 'newsletter': {
+ 'title': 'Google Play\'de başarılı olmanıza yardımcı olacak en son Android geliştirici haberleri ve ipuçları.',
+ 'requiredHint': '* Zorunlu Alanlar',
+ 'name': 'Tam ad',
+ 'email': 'E-posta adresi',
+ 'company': 'Şirket / geliştirici adı',
+ 'appUrl': 'Play Store uygulama URL\'lerinizden biri',
+ 'business': {
+ 'label': 'İşletmenizi en iyi hangisi tanımlar?',
+ 'apps': 'Uygulamalar',
+ 'games': 'Oyunlar',
+ 'both': 'Uygulamalar ve Oyunlar'
+ },
+ 'confirmMailingList': 'Beni, geliştirme ve Google Play fırsatlarıyla ilgili ara sıra gönderilen e-posta ' +
+ 'iletilerine ilişkin posta listesine ve aylık haber bültenine ekle.',
+ 'privacyPolicy': 'Bu formda sağlanan bilgilerin Google\'ın ' +
+ '<a href="https://www.google.com/intl/tr/policies/privacy/" target="_blank">Gizlilik Politikası\'na</a> ' +
+ 'tabi olacağını kabul ediyorum.',
+ 'languageVal': 'Turkish (Türkçe)',
+ 'successTitle': 'Yaşasın!',
+ 'successDetails': 'En son Android geliştirici haberleri ve ipuçlarına başarıyla kaydoldunuz.'
+ }
+ });
+ break;
+ case 'vi':
+ window.polyglot.extend({
+ 'newsletter': {
+ 'title': 'Nhận tin tức và mẹo mới nhất dành cho nhà phát triển Android sẽ giúp bạn tìm thấy thành công trên ' +
+ 'Google Play.',
+ 'requiredHint': '* Các trường bắt buộc',
+ 'name': 'Tên đầy đủ',
+ 'email': 'Địa chỉ email',
+ 'company': 'Tên công ty/nhà phát triển',
+ 'appUrl': 'Một trong số các URL ứng dụng trên cửa hàng Play của bạn',
+ 'business': {
+ 'label': 'Lựa chọn nào sau đây mô tả chính xác nhất doanh nghiệp của bạn?',
+ 'apps': 'Ứng dụng',
+ 'games': 'Trò chơi',
+ 'both': 'Ứng dụng và trò chơi'
+ },
+ 'confirmMailingList': 'Thêm tôi vào danh sách gửi thư cho bản tin hàng tháng và email định kỳ về việc phát ' +
+ 'triển và cơ hội của Google Play.',
+ 'privacyPolicy': 'Tôi xác nhận rằng thông tin được cung cấp trong biểu mẫu này tuân thủ chính sách bảo mật ' +
+ 'của <a href="https://www.google.com/intl/vi/policies/privacy/" target="_blank">Google</a>.',
+ 'languageVal': 'Vietnamese (tiếng Việt)',
+ 'successTitle': 'Thật tuyệt!',
+ 'successDetails': 'Bạn đã đăng ký thành công nhận tin tức và mẹo mới nhất dành cho nhà phát triển của Android.'
+ }
+ });
+ break;
+}
+
+(function($) {
+ 'use strict';
+
+ function Modal(el, options) {
+ this.el = $(el);
+ this.options = $.extend({}, options);
+ this.isOpen = false;
+
+ this.el.on('click', function(event) {
+ if (!$.contains(this.el.find('.dac-modal-window')[0], event.target)) {
+ return this.el.trigger('modal-close');
+ }
+ }.bind(this));
+
+ this.el.on('modal-open', this.open_.bind(this));
+ this.el.on('modal-close', this.close_.bind(this));
+ this.el.on('modal-toggle', this.toggle_.bind(this));
+ }
+
+ Modal.prototype.toggle_ = function() {
+ this.el.trigger('modal-' + (this.isOpen ? 'close' : 'open'));
+ };
+
+ Modal.prototype.close_ = function() {
+ this.el.removeClass('dac-active');
+ $('body').removeClass('dac-modal-open');
+ this.isOpen = false;
+ // When closing the modal for Android Studio downloads, reload the page
+ // because otherwise we might get stuck with post-download dialog state
+ if ($("[data-modal='studio_tos']").length) {
+ location.reload();
+ }
+ };
+
+ Modal.prototype.open_ = function() {
+ this.el.addClass('dac-active');
+ $('body').addClass('dac-modal-open');
+ this.isOpen = true;
+ };
+
+ function onClickToggleModal(event) {
+ event.preventDefault();
+ var toggle = $(event.currentTarget);
+ var options = toggle.data();
+ var modal = options.modalToggle ? $('[data-modal="' + options.modalToggle + '"]') :
+ toggle.closest('[data-modal]');
+ modal.trigger('modal-toggle');
+ }
+
+ /**
+ * jQuery plugin
+ * @param {object} options - Override default options.
+ */
+ $.fn.dacModal = function(options) {
+ return this.each(function() {
+ new Modal(this, options);
+ });
+ };
+
+ $.fn.dacToggleModal = function(options) {
+ return this.each(function() {
+ new ToggleModal(this, options);
+ });
+ };
+
+ /**
+ * Data Attribute API
+ */
+ $(document).on('ready.aranja', function() {
+ $('[data-modal]').each(function() {
+ $(this).dacModal($(this).data());
+ });
+
+ $('html').on('click.modal', '[data-modal-toggle]', onClickToggleModal);
+
+ // Check if url anchor is targetting a toggle to open the modal.
+ if (location.hash) {
+ $(location.hash + '[data-modal-toggle]').trigger('click');
+ }
+
+ if (window.getLangTarget() !== window.getLangPref()) {
+ $('#langform').trigger('modal-open');
+ $("#langform button.yes").attr("onclick","window.changeLangPref('" + window.getLangTarget() + "', true); return false;");
+ $("#langform button.no").attr("onclick","window.changeLangPref('" + window.getLangPref() + "', true); return false;");
+ }
+ });
+})(jQuery);
+
+/* Fullscreen - Toggle fullscreen mode for reference pages */
+(function($) {
+ 'use strict';
+
+ /**
+ * @param {HTMLElement} el - The DOM element.
+ * @constructor
+ */
+ function Fullscreen(el) {
+ this.el = $(el);
+ this.html = $('html');
+ this.icon = this.el.find('.dac-sprite');
+ this.isFullscreen = window.readCookie(Fullscreen.COOKIE_) === 'true';
+ this.activate_();
+ this.el.on('click.dac-fullscreen', this.toggleHandler_.bind(this));
+ }
+
+ /**
+ * Cookie name for storing the state
+ * @type {string}
+ * @private
+ */
+ Fullscreen.COOKIE_ = 'fullscreen';
+
+ /**
+ * Classes to modify the DOM
+ * @type {{mode: string, fullscreen: string, fullscreenExit: string}}
+ * @private
+ */
+ Fullscreen.CLASSES_ = {
+ mode: 'dac-fullscreen-mode',
+ fullscreen: 'dac-fullscreen',
+ fullscreenExit: 'dac-fullscreen-exit'
+ };
+
+ /**
+ * Event listener for toggling fullscreen mode
+ * @param {MouseEvent} event
+ * @private
+ */
+ Fullscreen.prototype.toggleHandler_ = function(event) {
+ event.stopPropagation();
+ this.toggle(!this.isFullscreen, true);
+ };
+
+ /**
+ * Change the DOM based on current state.
+ * @private
+ */
+ Fullscreen.prototype.activate_ = function() {
+ this.icon.toggleClass(Fullscreen.CLASSES_.fullscreen, !this.isFullscreen);
+ this.icon.toggleClass(Fullscreen.CLASSES_.fullscreenExit, this.isFullscreen);
+ this.html.toggleClass(Fullscreen.CLASSES_.mode, this.isFullscreen);
+ };
+
+ /**
+ * Toggle fullscreen mode and store the state in a cookie.
+ */
+ Fullscreen.prototype.toggle = function() {
+ this.isFullscreen = !this.isFullscreen;
+ window.writeCookie(Fullscreen.COOKIE_, this.isFullscreen, null);
+ this.activate_();
+ };
+
+ /**
+ * jQuery plugin
+ */
+ $.fn.dacFullscreen = function() {
+ return this.each(function() {
+ new Fullscreen($(this));
+ });
+ };
+})(jQuery);
+
+(function($) {
+ 'use strict';
+
+ /**
+ * @param {HTMLElement} selected - The link that is selected in the nav.
+ * @constructor
+ */
+ function HeaderTabs(selected) {
+
+ // Don't highlight any tabs on the index page
+ if (location.pathname === '/index.html' || location.pathname === '/') {
+ //return;
+ }
+
+ this.selected = $(selected);
+ this.selectedParent = this.selected.closest('.dac-nav-secondary').siblings('a');
+ this.links = $('.dac-header-tabs a');
+
+ this.selectActiveTab();
+ }
+
+ HeaderTabs.prototype.selectActiveTab = function() {
+ var section = null;
+
+ if (this.selectedParent.length) {
+ section = this.selectedParent.text();
+ } else {
+ section = this.selected.text();
+ }
+
+ if (section) {
+ this.links.removeClass('selected');
+
+ this.links.filter(function() {
+ return $(this).text() === $.trim(section);
+ }).addClass('selected');
+ }
+ };
+
+ /**
+ * jQuery plugin
+ */
+ $.fn.dacHeaderTabs = function() {
+ return this.each(function() {
+ new HeaderTabs(this);
+ });
+ };
+})(jQuery);
+
+(function($) {
+ 'use strict';
+ var icon = $('<i/>').addClass('dac-sprite dac-nav-forward');
+ var config = JSON.parse(window.localStorage.getItem('global-navigation') || '{}');
+ var forwardLink = $('<span/>')
+ .addClass('dac-nav-link-forward')
+ .html(icon)
+ .on('click', swap_);
+
+ /**
+ * @constructor
+ */
+ function Nav(navigation) {
+ $('.dac-nav-list').dacCurrentPage().dacHeaderTabs().dacSidebarToggle($('body'));
+
+ navigation.find('[data-reference-tree]').dacReferenceNav();
+
+ setupViews_(navigation.children().eq(0).children());
+
+ initCollapsedNavs(navigation.find('.dac-nav-sub-slider'));
+
+ $('#dac-main-navigation').scrollIntoView('.selected')
+ }
+
+ function updateStore(icon) {
+ var navClass = getCurrentLandingPage_(icon);
+ var isExpanded = icon.hasClass('dac-expand-less-black');
+ var expandedNavs = config.expanded || [];
+ if (isExpanded) {
+ expandedNavs.push(navClass);
+ } else {
+ expandedNavs = expandedNavs.filter(function(item) {
+ return item !== navClass;
+ });
+ }
+ config.expanded = expandedNavs;
+ window.localStorage.setItem('global-navigation', JSON.stringify(config));
+ }
+
+ function toggleSubNav_(icon) {
+ var isExpanded = icon.hasClass('dac-expand-less-black');
+ icon.toggleClass('dac-expand-less-black', !isExpanded);
+ icon.toggleClass('dac-expand-more-black', isExpanded);
+ icon.data('sub-navigation.dac').slideToggle(200);
+
+ updateStore(icon);
+ }
+
+ function handleSubNavToggle_(event) {
+ event.preventDefault();
+ var icon = $(event.target);
+ toggleSubNav_(icon);
+ }
+
+ function getCurrentLandingPage_(icon) {
+ return icon.closest('li')[0].className.replace('dac-nav-item ', '');
+ }
+
+ // Setup sub navigation collapse/expand
+ function initCollapsedNavs(toggleIcons) {
+ toggleIcons.each(setInitiallyActive_($('body')));
+ toggleIcons.on('click', handleSubNavToggle_);
+
+ }
+
+ function setInitiallyActive_(body) {
+ var expandedNavs = config.expanded || [];
+ return function(i, icon) {
+ icon = $(icon);
+ var subNav = icon.next();
+
+ if (!subNav.length) {
+ return;
+ }
+
+ var landingPageClass = getCurrentLandingPage_(icon);
+ var expanded = expandedNavs.indexOf(landingPageClass) >= 0;
+ landingPageClass = landingPageClass === 'home' ? 'about' : landingPageClass;
+
+ // TODO: Should read from localStorage
+ var visible = body.hasClass(landingPageClass) || expanded;
+
+ icon.data('sub-navigation.dac', subNav);
+ icon.toggleClass('dac-expand-less-black', visible);
+ icon.toggleClass('dac-expand-more-black', !visible);
+ subNav.toggle(visible);
+ };
+ }
+
+ function setupViews_(views) {
+ if (views.length === 1) {
+ // Active tier 1 nav.
+ views.addClass('dac-active');
+ } else {
+ // Activate back button and tier 2 nav.
+ views.slice(0, 2).addClass('dac-active');
+ var selectedNav = views.eq(2).find('.selected').after(forwardLink);
+ var langAttr = selectedNav.attr(window.getLangPref() + '-lang');
+ //form the label from locale attr if possible, else set to selectedNav text value
+ if ((typeof langAttr !== typeof undefined && langAttr !== false) && (langAttr !== '')) {
+ $('.dac-nav-back-title').text(langAttr);
+ } else {
+ $('.dac-nav-back-title').text(selectedNav.text());
+ }
+ }
+
+ // Navigation should animate.
+ setTimeout(function() {
+ views.removeClass('dac-no-anim');
+ }, 10);
+ }
+
+ function swap_(event) {
+ event.preventDefault();
+ $(event.currentTarget).trigger('swap-content');
+ }
+
+ /**
+ * jQuery plugin
+ */
+ $.fn.dacNav = function() {
+ return this.each(function() {
+ new Nav($(this));
+ });
+ };
+})(jQuery);
+
+/* global NAVTREE_DATA */
+(function($) {
+ /**
+ * Build the reference navigation with namespace dropdowns.
+ * @param {jQuery} el - The DOM element.
+ */
+ function buildReferenceNav(el) {
+ var namespaceList = el.find('[data-reference-namespaces]');
+ var resources = el.find('[data-reference-resources]');
+ var selected = namespaceList.find('.selected');
+
+ // Links should be toggleable.
+ namespaceList.find('a').addClass('dac-reference-nav-toggle dac-closed');
+
+ // Load in all resources
+ $.getScript('/navtree_data.js', function(data, textStatus, xhr) {
+ if (xhr.status === 200) {
+ namespaceList.on('click', 'a.dac-reference-nav-toggle', toggleResourcesHandler);
+ }
+ });
+
+ // No setup required if no resources are present
+ if (!resources.length) {
+ return;
+ }
+
+ // The resources should be a part of selected namespace.
+ var overview = addResourcesToView(resources, selected);
+
+ // Currently viewing Overview
+ if (location.pathname === overview.attr('href')) {
+ overview.parent().addClass('selected');
+ }
+
+ // Open currently selected resource
+ var listsToOpen = selected.children().eq(1);
+ listsToOpen = listsToOpen.add(listsToOpen.find('.selected').parent()).show();
+
+ // Mark dropdowns as open
+ listsToOpen.prev().removeClass('dac-closed');
+
+ // Scroll into view
+ namespaceList.scrollIntoView(selected);
+ }
+
+ /**
+ * Handles the toggling of resources.
+ * @param {Event} event
+ */
+ function toggleResourcesHandler(event) {
+ event.preventDefault();
+ var el = $(this);
+
+ // If resources for given namespace is not present, fetch correct data.
+ if (this.tagName === 'A' && !this.hasResources) {
+ addResourcesToView(buildResourcesViewForData(getDataForNamespace(el.text())), el.parent());
+ }
+
+ el.toggleClass('dac-closed').next().slideToggle(200);
+ }
+
+ /**
+ * @param {String} namespace
+ * @returns {Array} namespace data
+ */
+ function getDataForNamespace(namespace) {
+ var namespaceData = NAVTREE_DATA.filter(function(data) {
+ return data[0] === namespace;
+ });
+
+ return namespaceData.length ? namespaceData[0][2] : [];
+ }
+
+ /**
+ * Build a list item for a resource
+ * @param {Array} resource
+ * @returns {String}
+ */
+ function buildResourceItem(resource) {
+ return '<li class="api apilevel-' + resource[3] + '"><a href="/' + resource[1] + '">' + resource[0] + '</a></li>';
+ }
+
+ /**
+ * Build resources list items.
+ * @param {Array} resources
+ * @returns {String}
+ */
+ function buildResourceList(resources) {
+ return '<li><h2>' + resources[0] + '</h2><ul>' + resources[2].map(buildResourceItem).join('') + '</ul>';
+ }
+
+ /**
+ * Build a resources view
+ * @param {Array} data
+ * @returns {jQuery} resources in an unordered list.
+ */
+ function buildResourcesViewForData(data) {
+ return $('<ul>' + data.map(buildResourceList).join('') + '</ul>');
+ }
+
+ /**
+ * Add resources to a containing view.
+ * @param {jQuery} resources
+ * @param {jQuery} view
+ * @returns {jQuery} the overview link.
+ */
+ function addResourcesToView(resources, view) {
+ var namespace = view.children().eq(0);
+ var overview = $('<a href="' + namespace.attr('href') + '">Overview</a>');
+
+ // Mark namespace with content;
+ namespace[0].hasResources = true;
+
+ // Add correct classes / event listeners to resources.
+ resources.prepend($('<li>').html(overview))
+ .find('a')
+ .addClass('dac-reference-nav-resource')
+ .end()
+ .find('h2')
+ .addClass('dac-reference-nav-toggle dac-closed')
+ .on('click', toggleResourcesHandler)
+ .end()
+ .add(resources.find('ul'))
+ .addClass('dac-reference-nav-resources')
+ .end()
+ .appendTo(view);
+
+ return overview;
+ }
+
+ /**
+ * jQuery plugin
+ */
+ $.fn.dacReferenceNav = function() {
+ return this.each(function() {
+ buildReferenceNav($(this));
+ });
+ };
+})(jQuery);
+
+/** Scroll a container to make a target element visible
+ This is called when the page finished loading. */
+$.fn.scrollIntoView = function(target) {
+ if ('string' === typeof target) {
+ target = this.find(target);
+ }
+ if (this.is(':visible')) {
+ if (target.length == 0) {
+ // If no selected item found, exit
+ return;
+ }
+
+ // get the target element's offset from its container nav by measuring the element's offset
+ // relative to the document then subtract the container nav's offset relative to the document
+ var targetOffset = target.offset().top - this.offset().top;
+ var containerHeight = this.height();
+ if (targetOffset > containerHeight * .8) { // multiply nav height by .8 so we move up the item
+ // if it's more than 80% down the nav
+ // scroll the item up by an amount equal to 80% the container height
+ this.scrollTop(targetOffset - (containerHeight * .8));
+ }
+ }
+};
+
+(function($) {
+ $.fn.dacCurrentPage = function() {
+ // Highlight the header tabs...
+ // highlight Design tab
+ var baseurl = getBaseUri(window.location.pathname);
+ var urlSegments = baseurl.split('/');
+ var navEl = this;
+ var body = $('body');
+ var subNavEl = navEl.find('.dac-nav-secondary');
+ var parentNavEl;
+ var selected;
+ // In NDK docs, highlight appropriate sub-nav
+ if (body.hasClass('ndk')) {
+ if (body.hasClass('guide')) {
+ selected = navEl.find('> li.guides > a').addClass('selected');
+ } else if (body.hasClass('reference')) {
+ selected = navEl.find('> li.reference > a').addClass('selected');
+ } else if (body.hasClass('samples')) {
+ selected = navEl.find('> li.samples > a').addClass('selected');
+ } else if (body.hasClass('downloads')) {
+ selected = navEl.find('> li.downloads > a').addClass('selected');
+ }
+ } else if (body.hasClass('studio')) {
+ if (body.hasClass('features')) {
+ selected = navEl.find('> li.features > a').addClass('selected');
+ } else if (body.hasClass('guide')) {
+ selected = navEl.find('> li.guide > a').addClass('selected');
+ } else if (body.hasClass('preview')) {
+ selected = navEl.find('> li.preview > a').addClass('selected');
+ }
+ } else if (body.hasClass('design')) {
+ selected = navEl.find('> li.design > a').addClass('selected');
+ // highlight Home nav
+ } else if (body.hasClass('about')) {
+ parentNavEl = navEl.find('> li.home > a');
+ parentNavEl.addClass('has-subnav');
+ // In Home docs, also highlight appropriate sub-nav
+ if (urlSegments[1] === 'wear' || urlSegments[1] === 'tv' ||
+ urlSegments[1] === 'auto') {
+ selected = subNavEl.find('li.' + urlSegments[1] + ' > a').addClass('selected');
+ } else if (urlSegments[1] === 'about') {
+ selected = subNavEl.find('li.versions > a').addClass('selected');
+ } else {
+ selected = parentNavEl.removeClass('has-subnav').addClass('selected');
+ }
+ // highlight Develop nav
+ } else if (body.hasClass('develop') || body.hasClass('google')) {
+ parentNavEl = navEl.find('> li.develop > a');
+ parentNavEl.addClass('has-subnav');
+ // In Develop docs, also highlight appropriate sub-nav
+ if (urlSegments[1] === 'training') {
+ selected = subNavEl.find('li.training > a').addClass('selected');
+ } else if (urlSegments[1] === 'guide') {
+ selected = subNavEl.find('li.guide > a').addClass('selected');
+ } else if (urlSegments[1] === 'reference') {
+ // If the root is reference, but page is also part of Google Services, select Google
+ if (body.hasClass('google')) {
+ selected = subNavEl.find('li.google > a').addClass('selected');
+ } else {
+ selected = subNavEl.find('li.reference > a').addClass('selected');
+ }
+ } else if ((urlSegments[1] === 'tools') || (urlSegments[1] === 'sdk')) {
+ selected = subNavEl.find('li.tools > a').addClass('selected');
+ } else if (body.hasClass('google')) {
+ selected = subNavEl.find('li.google > a').addClass('selected');
+ } else if (body.hasClass('samples')) {
+ selected = subNavEl.find('li.samples > a').addClass('selected');
+ } else {
+ selected = parentNavEl.removeClass('has-subnav').addClass('selected');
+ }
+ // highlight Distribute nav
+ } else if (body.hasClass('distribute')) {
+ parentNavEl = navEl.find('> li.distribute > a');
+ parentNavEl.addClass('has-subnav');
+ // In Distribute docs, also highlight appropriate sub-nav
+ if (urlSegments[2] === 'users') {
+ selected = subNavEl.find('li.users > a').addClass('selected');
+ } else if (urlSegments[2] === 'engage') {
+ selected = subNavEl.find('li.engage > a').addClass('selected');
+ } else if (urlSegments[2] === 'monetize') {
+ selected = subNavEl.find('li.monetize > a').addClass('selected');
+ } else if (urlSegments[2] === 'analyze') {
+ selected = subNavEl.find('li.analyze > a').addClass('selected');
+ } else if (urlSegments[2] === 'tools') {
+ selected = subNavEl.find('li.disttools > a').addClass('selected');
+ } else if (urlSegments[2] === 'stories') {
+ selected = subNavEl.find('li.stories > a').addClass('selected');
+ } else if (urlSegments[2] === 'essentials') {
+ selected = subNavEl.find('li.essentials > a').addClass('selected');
+ } else if (urlSegments[2] === 'googleplay') {
+ selected = subNavEl.find('li.googleplay > a').addClass('selected');
+ } else {
+ selected = parentNavEl.removeClass('has-subnav').addClass('selected');
+ }
+ } else if (body.hasClass('preview')) {
+ selected = navEl.find('> li.preview > a').addClass('selected');
+ }
+ return $(selected);
+ };
+})(jQuery);
+
+(function($) {
+ 'use strict';
+
+ /**
+ * Toggle the visabilty of the mobile navigation.
+ * @param {HTMLElement} el - The DOM element.
+ * @param {Object} options
+ * @constructor
+ */
+ function ToggleNav(el, options) {
+ this.el = $(el);
+ this.options = $.extend({}, ToggleNav.DEFAULTS_, options);
+ this.body = $(document.body);
+ this.navigation_ = this.body.find(this.options.navigation);
+ this.el.on('click', this.clickHandler_.bind(this));
+ }
+
+ ToggleNav.BREAKPOINT_ = 980;
+
+ /**
+ * Open on correct sizes
+ */
+ function toggleSidebarVisibility(body) {
+ var wasClosed = ('' + localStorage.getItem('navigation-open')) === 'false';
+
+ if (wasClosed) {
+ body.removeClass(ToggleNav.DEFAULTS_.activeClass);
+ } else if (window.innerWidth >= ToggleNav.BREAKPOINT_) {
+ body.addClass(ToggleNav.DEFAULTS_.activeClass);
+ } else {
+ body.removeClass(ToggleNav.DEFAULTS_.activeClass);
+ }
+ }
+
+ /**
+ * ToggleNav Default Settings
+ * @type {{body: boolean, dimmer: string, navigation: string, activeClass: string}}
+ * @private
+ */
+ ToggleNav.DEFAULTS_ = {
+ body: true,
+ dimmer: '.dac-nav-dimmer',
+ animatingClass: 'dac-nav-animating',
+ navigation: '[data-dac-nav]',
+ activeClass: 'dac-nav-open'
+ };
+
+ /**
+ * The actual toggle logic.
+ * @param {Event} event
+ * @private
+ */
+ ToggleNav.prototype.clickHandler_ = function(event) {
+ event.preventDefault();
+ var animatingClass = this.options.animatingClass;
+ var body = this.body;
+
+ body.addClass(animatingClass);
+ body.toggleClass(this.options.activeClass);
+
+ setTimeout(function() {
+ body.removeClass(animatingClass);
+ }, this.navigation_.transitionDuration());
+
+ if (window.innerWidth >= ToggleNav.BREAKPOINT_) {
+ localStorage.setItem('navigation-open', body.hasClass(this.options.activeClass));
+ }
+ };
+
+ /**
+ * jQuery plugin
+ * @param {object} options - Override default options.
+ */
+ $.fn.dacToggleMobileNav = function() {
+ return this.each(function() {
+ var el = $(this);
+ new ToggleNav(el, el.data());
+ });
+ };
+
+ $.fn.dacSidebarToggle = function(body) {
+ toggleSidebarVisibility(body);
+ $(window).on('resize', toggleSidebarVisibility.bind(null, body));
+ };
+
+ /**
+ * Data Attribute API
+ */
+ $(function() {
+ $('[data-dac-toggle-nav]').dacToggleMobileNav();
+ });
+})(jQuery);
+
+(function($) {
+ 'use strict';
+
+ /**
+ * Submit the newsletter form to a Google Form.
+ * @param {HTMLElement} el - The Form DOM element.
+ * @constructor
+ */
+ function NewsletterForm(el) {
+ this.el = $(el);
+ this.form = this.el.find('form');
+ $('<iframe/>').hide()
+ .attr('name', 'dac-newsletter-iframe')
+ .attr('src', '')
+ .insertBefore(this.form);
+ this.el.find('[data-newsletter-language]').val(window.polyglot.t('newsletter.languageVal'));
+ this.form.on('submit', this.submitHandler_.bind(this));
+ }
+
+ /**
+ * Milliseconds until modal has vanished after modal-close is triggered.
+ * @type {number}
+ * @private
+ */
+ NewsletterForm.CLOSE_DELAY_ = 300;
+
+ /**
+ * Switch view to display form after close.
+ * @private
+ */
+ NewsletterForm.prototype.closeHandler_ = function() {
+ setTimeout(function() {
+ this.el.trigger('swap-reset');
+ }.bind(this), NewsletterForm.CLOSE_DELAY_);
+ };
+
+ /**
+ * Reset the modal to initial state.
+ * @private
+ */
+ NewsletterForm.prototype.reset_ = function() {
+ this.form.trigger('reset');
+ this.el.one('modal-close', this.closeHandler_.bind(this));
+ };
+
+ /**
+ * Display a success view on submit.
+ * @private
+ */
+ NewsletterForm.prototype.submitHandler_ = function() {
+ this.el.one('swap-complete', this.reset_.bind(this));
+ this.el.trigger('swap-content');
+ };
+
+ /**
+ * jQuery plugin
+ * @param {object} options - Override default options.
+ */
+ $.fn.dacNewsletterForm = function(options) {
+ return this.each(function() {
+ new NewsletterForm(this, options);
+ });
+ };
+
+ /**
+ * Data Attribute API
+ */
+ $(document).on('ready.aranja', function() {
+ $('[data-newsletter]').each(function() {
+ $(this).dacNewsletterForm();
+ });
+ });
+})(jQuery);
+
+/* globals METADATA, YOUTUBE_RESOURCES, BLOGGER_RESOURCES */
+window.metadata = {};
+
+/**
+ * Prepare metadata and indices for querying.
+ */
+window.metadata.prepare = (function() {
+ // Helper functions.
+ function mergeArrays() {
+ return Array.prototype.concat.apply([], arguments);
+ }
+
+ /**
+ * Creates lookup maps for a resource index.
+ * I.e. where MAP['some tag'][resource.id] === true when that resource has 'some tag'.
+ * @param resourceDict
+ * @returns {{}}
+ */
+ function buildResourceLookupMap(resourceDict) {
+ var map = {};
+ for (var key in resourceDict) {
+ var dictForKey = {};
+ var srcArr = resourceDict[key];
+ for (var i = 0; i < srcArr.length; i++) {
+ dictForKey[srcArr[i].index] = true;
+ }
+ map[key] = dictForKey;
+ }
+ return map;
+ }
+
+ /**
+ * Merges metadata maps for english and the current language into the global store.
+ */
+ function mergeMetadataMap(name, locale) {
+ if (locale && locale !== 'en' && METADATA[locale]) {
+ METADATA[name] = $.extend(METADATA.en[name], METADATA[locale][name]);
+ } else {
+ METADATA[name] = METADATA.en[name];
+ }
+ }
+
+ /**
+ * Index all resources by type, url, tag and category.
+ * @param resources
+ */
+ function createIndices(resources) {
+ // URL, type, tag and category lookups
+ var byType = METADATA.byType = {};
+ var byUrl = METADATA.byUrl = {};
+ var byTag = METADATA.byTag = {};
+ var byCategory = METADATA.byCategory = {};
+
+ for (var i = 0; i < resources.length; i++) {
+ var res = resources[i];
+
+ // Store index.
+ res.index = i;
+
+ // Index by type.
+ var type = res.type;
+ if (type) {
+ byType[type] = byType[type] || [];
+ byType[type].push(res);
+ }
+
+ // Index by tag.
+ var tags = res.tags || [];
+ for (var j = 0; j < tags.length; j++) {
+ var tag = tags[j];
+ if (tag) {
+ byTag[tag] = byTag[tag] || [];
+ byTag[tag].push(res);
+ }
+ }
+
+ // Index by category.
+ var category = res.category;
+ if (category) {
+ byCategory[category] = byCategory[category] || [];
+ byCategory[category].push(res);
+ }
+
+ // Index by url.
+ var url = res.url;
+ if (url) {
+ res.baseUrl = url.replace(/^intl\/\w+[\/]/, '');
+ byUrl[res.baseUrl] = res;
+ }
+ }
+ METADATA.hasType = buildResourceLookupMap(byType);
+ METADATA.hasTag = buildResourceLookupMap(byTag);
+ METADATA.hasCategory = buildResourceLookupMap(byCategory);
+ }
+
+ return function() {
+ // Only once.
+ if (METADATA.all) { return; }
+
+ // Get current language.
+ var locale = getLangPref();
+
+ // Merge english resources.
+ METADATA.all = mergeArrays(
+ METADATA.en.about,
+ METADATA.en.design,
+ METADATA.en.distribute,
+ METADATA.en.develop,
+ YOUTUBE_RESOURCES,
+ BLOGGER_RESOURCES,
+ METADATA.en.extras
+ );
+
+ // Merge local language resources.
+ if (locale !== 'en' && METADATA[locale]) {
+ METADATA.all = mergeArrays(
+ METADATA.all,
+ METADATA[locale].about,
+ METADATA[locale].design,
+ METADATA[locale].distribute,
+ METADATA[locale].develop,
+ METADATA[locale].extras
+ );
+ }
+
+ mergeMetadataMap('collections', locale);
+ mergeMetadataMap('searchHeroCollections', locale);
+ mergeMetadataMap('carousel', locale);
+
+ // Create query indicies for resources.
+ createIndices(METADATA.all, locale);
+
+ // Reference metadata.
+ METADATA.androidReference = window.DATA;
+ METADATA.googleReference = mergeArrays(window.GMS_DATA, window.GCM_DATA);
+ };
+})();
+
+/* global METADATA, util */
+window.metadata.query = (function($) {
+ var pageMap = {};
+
+ function buildResourceList(opts) {
+ window.metadata.prepare();
+ var expressions = parseResourceQuery(opts.query || '');
+ var instanceMap = {};
+ var results = [];
+
+ for (var i = 0; i < expressions.length; i++) {
+ var clauses = expressions[i];
+
+ // Get all resources for first clause
+ var resources = getResourcesForClause(clauses.shift());
+
+ // Concat to final results list
+ results = results.concat(resources.map(filterResources(clauses, i > 0, instanceMap)).filter(filterEmpty));
+ }
+
+ // Set correct order
+ if (opts.sortOrder && results.length) {
+ results = opts.sortOrder === 'random' ? util.shuffle(results) : results.sort(sortResultsByKey(opts.sortOrder));
+ }
+
+ // Slice max results.
+ if (opts.maxResults !== Infinity) {
+ results = results.slice(0, opts.maxResults);
+ }
+
+ // Remove page level duplicates
+ if (opts.allowDuplicates === undefined || opts.allowDuplicates === 'false') {
+ results = results.filter(removePageLevelDuplicates);
+
+ for (var index = 0; index < results.length; ++index) {
+ pageMap[results[index].index] = 1;
+ }
+ }
+
+ return results;
+ }
+
+ function filterResources(clauses, removeDuplicates, map) {
+ return function(resource) {
+ var resourceIsAllowed = true;
+
+ // References must be defined.
+ if (resource === undefined) {
+ return;
+ }
+
+ // Get canonical (localized) version of resource if possible.
+ resource = METADATA.byUrl[resource.baseUrl] || METADATA.byUrl[resource.url] || resource;
+
+ // Filter out resources already used
+ if (removeDuplicates) {
+ resourceIsAllowed = !map[resource.index];
+ }
+
+ // Must fulfill all criteria
+ if (clauses.length > 0) {
+ resourceIsAllowed = resourceIsAllowed && doesResourceMatchClauses(resource, clauses);
+ }
+
+ // Mark resource as used.
+ if (resourceIsAllowed) {
+ map[resource.index] = 1;
+ }
+
+ return resourceIsAllowed && resource;
+ };
+ }
+
+ function filterEmpty(resource) {
+ return resource;
+ }
+
+ function sortResultsByKey(key) {
+ var desc = key.charAt(0) === '-';
+
+ if (desc) {
+ key = key.substring(1);
+ }
+
+ return function(x, y) {
+ return (desc ? -1 : 1) * (parseInt(x[key], 10) - parseInt(y[key], 10));
+ };
+ }
+
+ function getResourcesForClause(clause) {
+ switch (clause.attr) {
+ case 'type':
+ return METADATA.byType[clause.value];
+ case 'tag':
+ return METADATA.byTag[clause.value];
+ case 'collection':
+ var resources = METADATA.collections[clause.value] || {};
+ return getResourcesByUrlCollection(resources.resources);
+ case 'history':
+ return getResourcesByUrlCollection($.dacGetVisitedUrls(clause.value));
+ case 'section':
+ return getResourcesByUrlCollection([clause.value].sections);
+ default:
+ return [];
+ }
+ }
+
+ function getResourcesByUrlCollection(resources) {
+ return (resources || []).map(function(url) {
+ return METADATA.byUrl[url];
+ });
+ }
+
+ function removePageLevelDuplicates(resource) {
+ return resource && !pageMap[resource.index];
+ }
+
+ function doesResourceMatchClauses(resource, clauses) {
+ for (var i = 0; i < clauses.length; i++) {
+ var map;
+ switch (clauses[i].attr) {
+ case 'type':
+ map = METADATA.hasType[clauses[i].value];
+ break;
+ case 'tag':
+ map = METADATA.hasTag[clauses[i].value];
+ break;
+ }
+
+ if (!map || (!!clauses[i].negative ? map[resource.index] : !map[resource.index])) {
+ return clauses[i].negative;
+ }
+ }
+
+ return true;
+ }
+
+ function parseResourceQuery(query) {
+ // Parse query into array of expressions (expression e.g. 'tag:foo + type:video')
+ var expressions = [];
+ var expressionStrs = query.split(',') || [];
+ for (var i = 0; i < expressionStrs.length; i++) {
+ var expr = expressionStrs[i] || '';
+
+ // Break expression into clauses (clause e.g. 'tag:foo')
+ var clauses = [];
+ var clauseStrs = expr.split(/(?=[\+\-])/);
+ for (var j = 0; j < clauseStrs.length; j++) {
+ var clauseStr = clauseStrs[j] || '';
+
+ // Get attribute and value from clause (e.g. attribute='tag', value='foo')
+ var parts = clauseStr.split(':');
+ var clause = {};
+
+ clause.attr = parts[0].replace(/^\s+|\s+$/g, '');
+ if (clause.attr) {
+ if (clause.attr.charAt(0) === '+') {
+ clause.attr = clause.attr.substring(1);
+ } else if (clause.attr.charAt(0) === '-') {
+ clause.negative = true;
+ clause.attr = clause.attr.substring(1);
+ }
+ }
+
+ if (parts.length > 1) {
+ clause.value = parts[1].replace(/^\s+|\s+$/g, '');
+ }
+
+ clauses.push(clause);
+ }
+
+ if (!clauses.length) {
+ continue;
+ }
+
+ expressions.push(clauses);
+ }
+
+ return expressions;
+ }
+
+ return buildResourceList;
+})(jQuery);
+
+/* global METADATA, getLangPref */
+
+window.metadata.search = (function() {
+ 'use strict';
+
+ var currentLang = getLangPref();
+
+ function search(query) {
+ window.metadata.prepare();
+ return {
+ android: findDocsMatches(query, METADATA.androidReference),
+ docs: findDocsMatches(query, METADATA.googleReference),
+ resources: findResourceMatches(query)
+ };
+ }
+
+ function findDocsMatches(query, data) {
+ var results = [];
+
+ for (var i = 0; i < data.length; i++) {
+ var s = data[i];
+ if (query.length !== 0 && s.label.toLowerCase().indexOf(query.toLowerCase()) !== -1) {
+ results.push(s);
+ }
+ }
+
+ rankAutocompleteApiResults(query, results);
+
+ return results;
+ }
+
+ function findResourceMatches(query) {
+ var results = [];
+
+ // Search for matching JD docs
+ if (query.length >= 2) {
+ /* In some langs, spaces may be optional between certain non-Ascii word-glyphs. For
+ * those langs, only match query at word boundaries if query includes Ascii chars only.
+ */
+ var NO_BOUNDARY_LANGUAGES = ['ja','ko','vi','zh-cn','zh-tw'];
+ var isAsciiOnly = /^[\u0000-\u007f]*$/.test(query);
+ var noBoundaries = (NO_BOUNDARY_LANGUAGES.indexOf(window.getLangPref()) !== -1);
+ var exprBoundary = (!isAsciiOnly && noBoundaries) ? '' : '(?:^|\\s)';
+ var queryRegex = new RegExp(exprBoundary + query.toLowerCase(), 'g');
+
+ var all = METADATA.all;
+ for (var i = 0; i < all.length; i++) {
+ // current search comparison, with counters for tag and title,
+ // used later to improve ranking
+ var s = all[i];
+ s.matched_tag = 0;
+ s.matched_title = 0;
+ var matched = false;
+
+ // Check if query matches any tags; work backwards toward 1 to assist ranking
+ if (s.keywords) {
+ for (var j = s.keywords.length - 1; j >= 0; j--) {
+ // it matches a tag
+ if (s.keywords[j].toLowerCase().match(queryRegex)) {
+ matched = true;
+ s.matched_tag = j + 1; // add 1 to index position
+ }
+ }
+ }
+
+ // Check if query matches doc title
+ if (s.title.toLowerCase().match(queryRegex)) {
+ matched = true;
+ s.matched_title = 1;
+ }
+
+ // Remember the doc if it matches either
+ if (matched) {
+ results.push(s);
+ }
+ }
+
+ // Improve the current results
+ results = lookupBetterResult(results);
+
+ // Rank/sort all the matched pages
+ rankAutocompleteDocResults(results);
+
+ return results;
+ }
+ }
+
+ // Replaces a match with another resource by url, if it exists.
+ function lookupReplacementByUrl(match, url) {
+ var replacement = METADATA.byUrl[url];
+
+ // Replacement resource does not exists.
+ if (!replacement) { return; }
+
+ replacement.matched_title = Math.max(replacement.matched_title, match.matched_title);
+ replacement.matched_tag = Math.max(replacement.matched_tag, match.matched_tag);
+
+ return replacement;
+ }
+
+ // Find the localized version of a page if it exists.
+ function lookupLocalizedVersion(match) {
+ return METADATA.byUrl[match.baseUrl] || METADATA.byUrl[match.url];
+ }
+
+ // Find the main page for a tutorial when matching a subpage.
+ function lookupTutorialIndex(match) {
+ // Guard for non index tutorial pages.
+ if (match.type !== 'training' || match.url.indexOf('index.html') >= 0) { return; }
+
+ var indexUrl = match.url.replace(/[^\/]+$/, 'index.html');
+ return lookupReplacementByUrl(match, indexUrl);
+ }
+
+ // Find related results which are a better match for the user.
+ function lookupBetterResult(matches) {
+ var newMatches = [];
+
+ matches = matches.filter(function(match) {
+ var newMatch = match;
+ newMatch = lookupTutorialIndex(newMatch) || newMatch;
+ newMatch = lookupLocalizedVersion(newMatch) || newMatch;
+
+ if (newMatch !== match) {
+ newMatches.push(newMatch);
+ }
+
+ return newMatch === match;
+ });
+
+ return toUnique(newMatches.concat(matches));
+ }
+
+ /* Order the jd doc result list based on match quality */
+ function rankAutocompleteDocResults(matches) {
+ if (!matches || !matches.length) {
+ return;
+ }
+
+ var _resultScoreFn = function(match) {
+ var score = 1.0;
+
+ // if the query matched a tag
+ if (match.matched_tag > 0) {
+ // multiply score by factor relative to position in tags list (max of 3)
+ score *= 3 / match.matched_tag;
+
+ // if it also matched the title
+ if (match.matched_title > 0) {
+ score *= 2;
+ }
+ } else if (match.matched_title > 0) {
+ score *= 3;
+ }
+
+ if (match.lang === currentLang) {
+ score *= 5;
+ }
+
+ return score;
+ };
+
+ for (var i = 0; i < matches.length; i++) {
+ matches[i].__resultScore = _resultScoreFn(matches[i]);
+ }
+
+ matches.sort(function(a, b) {
+ var n = b.__resultScore - a.__resultScore;
+
+ if (n === 0) {
+ // lexicographical sort if scores are the same
+ n = (a.title < b.title) ? -1 : 1;
+ }
+
+ return n;
+ });
+ }
+
+ /* Order the result list based on match quality */
+ function rankAutocompleteApiResults(query, matches) {
+ query = query || '';
+ if (!matches || !matches.length) {
+ return;
+ }
+
+ // helper function that gets the last occurence index of the given regex
+ // in the given string, or -1 if not found
+ var _lastSearch = function(s, re) {
+ if (s === '') {
+ return -1;
+ }
+ var l = -1;
+ var tmp;
+ while ((tmp = s.search(re)) >= 0) {
+ if (l < 0) {
+ l = 0;
+ }
+ l += tmp;
+ s = s.substr(tmp + 1);
+ }
+ return l;
+ };
+
+ // helper function that counts the occurrences of a given character in
+ // a given string
+ var _countChar = function(s, c) {
+ var n = 0;
+ for (var i = 0; i < s.length; i++) {
+ if (s.charAt(i) === c) {
+ ++n;
+ }
+ }
+ return n;
+ };
+
+ var queryLower = query.toLowerCase();
+ var queryAlnum = (queryLower.match(/\w+/) || [''])[0];
+ var partPrefixAlnumRE = new RegExp('\\b' + queryAlnum);
+ var partExactAlnumRE = new RegExp('\\b' + queryAlnum + '\\b');
+
+ var _resultScoreFn = function(result) {
+ // scores are calculated based on exact and prefix matches,
+ // and then number of path separators (dots) from the last
+ // match (i.e. favoring classes and deep package names)
+ var score = 1.0;
+ var labelLower = result.label.toLowerCase();
+ var t;
+ var partsAfter;
+ t = _lastSearch(labelLower, partExactAlnumRE);
+ if (t >= 0) {
+ // exact part match
+ partsAfter = _countChar(labelLower.substr(t + 1), '.');
+ score *= 200 / (partsAfter + 1);
+ } else {
+ t = _lastSearch(labelLower, partPrefixAlnumRE);
+ if (t >= 0) {
+ // part prefix match
+ partsAfter = _countChar(labelLower.substr(t + 1), '.');
+ score *= 20 / (partsAfter + 1);
+ }
+ }
+
+ return score;
+ };
+
+ for (var i = 0; i < matches.length; i++) {
+ // if the API is deprecated, default score is 0; otherwise, perform scoring
+ if (matches[i].deprecated === 'true') {
+ matches[i].__resultScore = 0;
+ } else {
+ matches[i].__resultScore = _resultScoreFn(matches[i]);
+ }
+ }
+
+ matches.sort(function(a, b) {
+ var n = b.__resultScore - a.__resultScore;
+
+ if (n === 0) {
+ // lexicographical sort if scores are the same
+ n = (a.label < b.label) ? -1 : 1;
+ }
+
+ return n;
+ });
+ }
+
+ // Destructive but fast toUnique.
+ // http://stackoverflow.com/a/25082874
+ function toUnique(array) {
+ var c;
+ var b = array.length || 1;
+
+ while (c = --b) {
+ while (c--) {
+ if (array[b] === array[c]) {
+ array.splice(c, 1);
+ }
+ }
+ }
+ return array;
+ }
+
+ return search;
+})();
+
+(function($) {
+ 'use strict';
+
+ /**
+ * Smoothly scroll to location on current page.
+ * @param el
+ * @param options
+ * @constructor
+ */
+ function ScrollButton(el, options) {
+ this.el = $(el);
+ this.target = $(this.el.attr('href'));
+ this.options = $.extend({}, ScrollButton.DEFAULTS_, options);
+
+ if (typeof this.options.offset === 'string') {
+ this.options.offset = $(this.options.offset).height();
+ }
+
+ this.el.on('click', this.clickHandler_.bind(this));
+ }
+
+ /**
+ * Default options
+ * @type {{duration: number, easing: string, offset: number, scrollContainer: string}}
+ * @private
+ */
+ ScrollButton.DEFAULTS_ = {
+ duration: 300,
+ easing: 'swing',
+ offset: '.dac-header',
+ scrollContainer: 'html, body'
+ };
+
+ /**
+ * Scroll logic
+ * @param event
+ * @private
+ */
+ ScrollButton.prototype.clickHandler_ = function(event) {
+ if (event.altKey || event.ctrlKey || event.metaKey || event.shiftKey) {
+ return;
+ }
+
+ event.preventDefault();
+
+ var position = this.getTargetPosition();
+ $(this.options.scrollContainer).animate({
+ scrollTop: position - this.options.offset
+ }, this.options);
+ };
+
+ ScrollButton.prototype.getTargetPosition = function() {
+ if (this.options.scrollContainer === ScrollButton.DEFAULTS_.scrollContainer) {
+ return this.target.offset().top;
+ }
+ var scrollContainer = $(this.options.scrollContainer)[0];
+ var currentEl = this.target[0];
+ var pos = 0;
+ while (currentEl !== scrollContainer && currentEl !== null) {
+ pos += currentEl.offsetTop;
+ currentEl = currentEl.offsetParent;
+ }
+ return pos;
+ };
+
+ /**
+ * jQuery plugin
+ * @param {object} options - Override default options.
+ */
+ $.fn.dacScrollButton = function(options) {
+ return this.each(function() {
+ new ScrollButton(this, options);
+ });
+ };
+
+ /**
+ * Data Attribute API
+ */
+ $(document).on('ready.aranja', function() {
+ $('[data-scroll-button]').each(function() {
+ $(this).dacScrollButton($(this).data());
+ });
+ });
+})(jQuery);
+
+/* global getLangPref */
+(function($) {
+ var LANG;
+
+ function getSearchLang() {
+ if (!LANG) {
+ LANG = getLangPref();
+
+ // Fix zh-cn to be zh-CN.
+ LANG = LANG.replace(/-\w+/, function(m) { return m.toUpperCase(); });
+ }
+ return LANG;
+ }
+
+ function customSearch(query, start) {
+ var searchParams = {
+ // current cse instance:
+ //cx: '001482626316274216503:zu90b7s047u',
+ // new cse instance:
+ cx: '000521750095050289010:zpcpi1ea4s8',
+ key: 'AIzaSyCFhbGnjW06dYwvRCU8h_zjdpS4PYYbEe8',
+ q: query,
+ start: start || 1,
+ num: 9,
+ hl: getSearchLang(),
+ fields: 'queries,items(pagemap,link,title,htmlSnippet,formattedUrl)'
+ };
+
+ return $.get('https://content.googleapis.com/customsearch/v1?' + $.param(searchParams));
+ }
+
+ function renderResults(el, results, searchAppliance) {
+ var referenceResults = searchAppliance.getReferenceResults();
+ if (!results.items) {
+ el.append($('<div>').text('No results'));
+ return;
+ }
+
+ for (var i = 0; i < results.items.length; i++) {
+ var item = results.items[i];
+ var isDuplicate = false;
+ $(referenceResults.android).each(function(index, result) {
+ if (item.link.indexOf(result.link) > -1) {
+ isDuplicate = true;
+ return false;
+ }
+ });
+
+ if (!isDuplicate) {
+ var hasImage = item.pagemap && item.pagemap.cse_thumbnail;
+ var sectionMatch = item.link.match(/developer\.android\.com\/(\w*)/);
+ var section = (sectionMatch && sectionMatch[1]) || 'blog';
+
+ var entry = $('<div>').addClass('dac-custom-search-entry cols');
+
+ if (hasImage) {
+ var image = item.pagemap.cse_thumbnail[0];
+ entry.append($('<div>').addClass('dac-custom-search-image-wrapper')
+ .append($('<div>').addClass('dac-custom-search-image').css('background-image', 'url(' + image.src + ')')));
+ }
+
+ entry.append($('<div>').addClass('dac-custom-search-text-wrapper')
+ .append($('<p>').addClass('dac-custom-search-section').text(section))
+ .append(
+ $('<a>').text(item.title).attr('href', item.link).wrap('<h2>').parent().addClass('dac-custom-search-title')
+ )
+ .append($('<p>').addClass('dac-custom-search-snippet').html(item.htmlSnippet.replace(/<br>/g, '')))
+ .append($('<a>').addClass('dac-custom-search-link').text(item.formattedUrl).attr('href', item.link)));
+
+ el.append(entry);
+ }
+ }
+
+ if (results.queries.nextPage) {
+ var loadMoreButton = $('<button id="dac-custom-search-load-more">')
+ .addClass('dac-custom-search-load-more')
+ .text('Load more')
+ .click(function() {
+ loadMoreResults(el, results, searchAppliance);
+ });
+
+ el.append(loadMoreButton);
+ }
+ };
+
+ function loadMoreResults(el, results, searchAppliance) {
+ var query = results.queries.request[0].searchTerms;
+ var start = results.queries.nextPage[0].startIndex;
+ var loadMoreButton = el.find('#dac-custom-search-load-more');
+
+ loadMoreButton.text('Loading more...');
+
+ customSearch(query, start).then(function(results) {
+ loadMoreButton.remove();
+ renderResults(el, results, searchAppliance);
+ });
+ }
+
+ $.fn.customSearch = function(query, searchAppliance) {
+ var el = $(this);
+
+ customSearch(query).then(function(results) {
+ el.empty();
+ renderResults(el, results, searchAppliance);
+ });
+ };
+})(jQuery);
+
+/* global METADATA */
+
+(function($) {
+ $.fn.dacSearchRenderHero = function(resources, query) {
+ var el = $(this);
+ el.empty();
+
+ var resource = METADATA.searchHeroCollections[query];
+
+ if (resource) {
+ el.dacHero(resource, true);
+ el.show();
+
+ return true;
+ } else {
+ el.hide();
+ }
+ };
+})(jQuery);
+
+(function($) {
+ $.fn.dacSearchRenderReferences = function(results, query) {
+ var referenceCard = $('.suggest-card.reference');
+ referenceCard.data('searchreferences.dac', {results: results, query: query});
+ renderResults(referenceCard, results, query, false);
+ };
+
+ var ROW_COUNT_COLLAPSED = 20;
+ var ROW_COUNT_EXPANDED = 40;
+ var ROW_COUNT_GOOGLE_COLLAPSED = 1;
+ var ROW_COUNT_GOOGLE_EXPANDED = 8;
+
+ function onSuggestionClick(e) {
+ var normalClick = e.which === 1 && !e.ctrlKey && !e.shiftKey && !e.metaKey;
+ if (normalClick) {
+ e.preventDefault();
+ }
+
+ // When user clicks a suggested document, track it
+ var url = $(e.currentTarget).attr('href');
+ ga('send', 'event', 'Suggestion Click', 'clicked: ' + url,
+ 'query: ' + $('#search_autocomplete').val().toLowerCase(),
+ {hitCallback: function() {
+ if (normalClick) {
+ document.location = url;
+ }
+ }});
+ }
+
+ function buildLink(match) {
+ var link = $('<a>').attr('href', window.toRoot + match.link);
+
+ var label = match.label;
+ var classNameStart = label.match(/[A-Z]/) ? label.search(/[A-Z]/) : label.lastIndexOf('.') + 1;
+ var newLink = '<span class="namespace">' +
+ label.substr(0, classNameStart) +
+ '</span>' +
+ label.substr(classNameStart, label.length);
+
+ link.html(newLink);
+ return link;
+ }
+
+ function buildSuggestion(match, query) {
+ var li = $('<li>').addClass('dac-search-results-reference-entry');
+
+ var link = buildLink(match);
+ link.highlightMatches(query);
+ li.append(link);
+ return li[0];
+ }
+
+ function buildResults(results, query) {
+ return results.map(function(match) {
+ return buildSuggestion(match, query);
+ });
+ }
+
+ function renderAndroidResults(list, gMatches, query) {
+ list.empty();
+
+ var header = $('<li class="dac-search-results-reference-header">android</li>');
+ list.append(header);
+
+ if (gMatches.length > 0) {
+ list.removeClass('no-results');
+
+ var resources = buildResults(gMatches, query);
+ list.append(resources);
+ return true;
+ } else {
+ list.append('<li class="dac-search-results-reference-entry-empty">No results</li>');
+ }
+ }
+
+ function renderGoogleDocsResults(list, gGoogleMatches, query) {
+ list = $('.suggest-card.reference ul');
+
+ if (gGoogleMatches.length > 0) {
+ list.append('<li class="dac-search-results-reference-header">in Google Services</li>');
+
+ var resources = buildResults(gGoogleMatches, query);
+ list.append(resources);
+
+ return true;
+ }
+ }
+
+ function renderResults(referenceCard, results, query, expanded) {
+ var list = referenceCard.find('ul');
+ list.toggleClass('is-expanded', !!expanded);
+
+ // Figure out how many results we can show in our fixed size box.
+ var total = expanded ? ROW_COUNT_EXPANDED : ROW_COUNT_COLLAPSED;
+ var googleCount = expanded ? ROW_COUNT_GOOGLE_EXPANDED : ROW_COUNT_GOOGLE_COLLAPSED;
+ googleCount = Math.max(googleCount, total - results.android.length);
+ googleCount = Math.min(googleCount, results.docs.length);
+
+ if (googleCount > 0) {
+ // If there are google results, reserve space for its header.
+ googleCount++;
+ }
+
+ var androidCount = Math.max(0, total - googleCount);
+ if (androidCount === 0) {
+ // Reserve space for "No reference results"
+ googleCount--;
+ }
+
+ renderAndroidResults(list, results.android.slice(0, androidCount), query);
+ renderGoogleDocsResults(list, results.docs.slice(0, googleCount - 1), query);
+
+ var totalResults = results.android.length + results.docs.length;
+ if (totalResults === 0) {
+ list.addClass('no-results');
+ }
+
+ // Tweak see more logic to account for references.
+ var hasMore = totalResults > ROW_COUNT_COLLAPSED && !util.matchesMedia('mobile');
+ if (hasMore) {
+ // We can't actually show all matches, only as many as the expanded list
+ // will fit, so we actually lie if the total results count is more
+ var moreCount = Math.min(totalResults, ROW_COUNT_EXPANDED + ROW_COUNT_GOOGLE_EXPANDED);
+ var $moreLink = $('<li class="dac-search-results-reference-entry-empty " data-toggle="show-more">see more matches</li>');
+ list.append($moreLink.on('click', onToggleMore));
+ }
+ var searchEl = $('#search-resources');
+ searchEl.toggleClass('dac-has-more', searchEl.hasClass('dac-has-more') || (hasMore && !expanded));
+ searchEl.toggleClass('dac-has-less', searchEl.hasClass('dac-has-less') || (hasMore && expanded));
+ }
+
+ function onToggleMore(e) {
+ var link = $(e.currentTarget);
+ var referenceCard = $('.suggest-card.reference');
+ var data = referenceCard.data('searchreferences.dac');
+
+ if (util.matchesMedia('mobile')) { return; }
+
+ renderResults(referenceCard, data.results, data.query, link.data('toggle') === 'show-more');
+ }
+
+ $(document).on('click', '.dac-search-results-resources [data-toggle="show-more"]', onToggleMore);
+ $(document).on('click', '.dac-search-results-resources [data-toggle="show-less"]', onToggleMore);
+ $(document).on('click', '.suggest-card.reference a', onSuggestionClick);
+})(jQuery);
+
+(function($) {
+ function highlightPage(query, page) {
+ page.find('.title').highlightMatches(query);
+ }
+
+ $.fn.dacSearchRenderResources = function(gDocsMatches, query) {
+ this.resourceWidget(gDocsMatches, {
+ itemsPerPage: 18,
+ initialResults: 6,
+ cardSizes: ['6x2'],
+ onRenderPage: highlightPage.bind(null, query)
+ });
+
+ return this;
+ };
+})(jQuery);
+
+/*global metadata */
+
+(function($, metadata) {
+ 'use strict';
+
+ function Search() {
+ this.body = $('body');
+ this.lastQuery = null;
+ this.searchResults = $('#search-results');
+ this.searchClose = $('[data-search-close]');
+ this.searchClear = $('[data-search-clear]');
+ this.searchInput = $('#search_autocomplete');
+ this.searchResultsContent = $('#dac-search-results-content');
+ this.searchResultsFor = $('#search-results-for');
+ this.searchResultsHistory = $('#dac-search-results-history');
+ this.searchResultsResources = $('#search-resources');
+ this.searchResultsHero = $('#dac-search-results-hero');
+ this.searchResultsReference = $('#dac-search-results-reference');
+ this.searchHeader = $('[data-search]').data('search-input.dac');
+ this.currQueryReferenceResults = {};
+ }
+
+ Search.prototype.init = function() {
+ if (!devsite && this.checkRedirectToIndex()) { return; }
+
+ this.searchHistory = window.dacStore('search-history');
+
+ this.searchInput.focus(this.onSearchChanged.bind(this));
+ this.searchInput.keydown(this.handleKeyboardShortcut.bind(this));
+ this.searchInput.on('input', this.onSearchChanged.bind(this));
+ this.searchClear.click(this.clear.bind(this));
+ this.searchClose.click(this.close.bind(this));
+
+ this.customSearch = $.fn.debounce(function(query) {
+ $('#dac-custom-search-results').customSearch(query, this);
+ }.bind(this), 1000);
+ // Start search shortcut (/)
+ $('body').keyup(function(event) {
+ if (event.which === 191 && $(event.target).is(':not(:input)')) {
+ this.searchInput.focus();
+ }
+ }.bind(this));
+
+ $(window).on('popstate', this.onPopState.bind(this));
+ $(window).hashchange(this.onHashChange.bind(this));
+ this.onHashChange();
+ };
+
+ Search.prototype.checkRedirectToIndex = function() {
+ var query = this.getUrlQuery();
+ var target = window.getLangTarget();
+ var prefix = (target !== 'en') ? '/intl/' + target : '';
+ var pathname = location.pathname.slice(prefix.length);
+ if (query != null && pathname !== '/index.html') {
+ location.href = prefix + '/index.html' + location.hash;
+ return true;
+ }
+ };
+
+ Search.prototype.handleKeyboardShortcut = function(event) {
+ // Close (esc)
+ if (event.which === 27) {
+ this.searchClose.trigger('click');
+ event.preventDefault();
+ }
+
+ // Previous result (up arrow)
+ if (event.which === 38) {
+ this.previousResult();
+ event.preventDefault();
+ }
+
+ // Next result (down arrow)
+ if (event.which === 40) {
+ this.nextResult();
+ event.preventDefault();
+ }
+
+ // Navigate to result (enter)
+ if (event.which === 13) {
+ this.navigateToResult();
+ event.preventDefault();
+ }
+ };
+
+ Search.prototype.goToResult = function(relativeIndex) {
+ var links = this.searchResults.find('a').filter(':visible');
+ var selectedLink = this.searchResults.find('.dac-selected');
+
+ if (selectedLink.length) {
+ var found = $.inArray(selectedLink[0], links);
+
+ selectedLink.removeClass('dac-selected');
+ links.eq(found + relativeIndex).addClass('dac-selected');
+ return true;
+ } else {
+ if (relativeIndex > 0) {
+ links.first().addClass('dac-selected');
+ }
+ }
+ };
+
+ Search.prototype.previousResult = function() {
+ this.goToResult(-1);
+ };
+
+ Search.prototype.nextResult = function() {
+ this.goToResult(1);
+ };
+
+ Search.prototype.navigateToResult = function() {
+ var query = this.getQuery();
+ var selectedLink = this.searchResults.find('.dac-selected');
+
+ if (selectedLink.length) {
+ selectedLink[0].click();
+ } else {
+ this.searchHistory.push(query);
+ this.addQueryToUrl(query);
+
+ var isMobileOrTablet = typeof window.orientation !== 'undefined';
+
+ if (isMobileOrTablet) {
+ this.searchInput.blur();
+ }
+ }
+ };
+
+ Search.prototype.onHashChange = function() {
+ var query = this.getUrlQuery();
+ if (query != null && query !== this.getQuery()) {
+ this.searchInput.val(query);
+ this.onSearchChanged();
+ }
+ };
+
+ Search.prototype.clear = function() {
+ this.searchInput.val('');
+ window.location.hash = '';
+ this.onSearchChanged();
+ this.searchInput.focus();
+ };
+
+ Search.prototype.close = function() {
+ this.removeQueryFromUrl();
+ this.searchInput.blur();
+ this.hideOverlay();
+ };
+
+ Search.prototype.getUrlQuery = function() {
+ var queryMatch = location.hash.match(/q=(.*)&?/);
+ return queryMatch && queryMatch[1] && decodeURI(queryMatch[1]);
+ };
+
+ Search.prototype.getQuery = function() {
+ return this.searchInput.val().replace(/(^ +)|( +$)/g, '');
+ };
+
+ Search.prototype.getReferenceResults = function() {
+ return this.currQueryReferenceResults;
+ };
+
+ Search.prototype.onSearchChanged = function() {
+ var query = this.getQuery();
+
+ this.showOverlay();
+ this.render(query);
+ };
+
+ Search.prototype.render = function(query) {
+ if (this.lastQuery === query) { return; }
+
+ if (query.length < 2) {
+ query = '';
+ }
+
+ this.lastQuery = query;
+ this.searchResultsFor.text(query);
+
+ // CSE results lag behind the metadata/reference results. We need to empty
+ // the CSE results and add 'Loading' text so user's aren't looking at two
+ // different sets of search results at one time.
+ var $loadingEl =
+ $('<div class="loadingCustomSearchResults">Loading Results...</div>');
+ $('#dac-custom-search-results').empty().prepend($loadingEl);
+
+ this.customSearch(query);
+ var metadataResults = metadata.search(query);
+ this.searchResultsResources.dacSearchRenderResources(metadataResults.resources, query);
+ this.searchResultsReference.dacSearchRenderReferences(metadataResults, query);
+ this.currQueryReferenceResults = metadataResults;
+ var hasHero = this.searchResultsHero.dacSearchRenderHero(metadataResults.resources, query);
+ var hasQuery = !!query;
+
+ this.searchResultsReference.toggle(!hasHero);
+ this.searchResultsContent.toggle(hasQuery);
+ this.searchResultsHistory.toggle(!hasQuery);
+ this.addQueryToUrl(query);
+ this.pushState();
+ };
+
+ Search.prototype.addQueryToUrl = function(query) {
+ var hash = 'q=' + encodeURI(query);
+
+ if (query) {
+ if (window.history.replaceState) {
+ window.history.replaceState(null, '', '#' + hash);
+ } else {
+ window.location.hash = hash;
+ }
+ }
+ };
+
+ Search.prototype.onPopState = function() {
+ if (!this.getUrlQuery()) {
+ this.hideOverlay();
+ this.searchHeader.unsetActiveState();
+ }
+ };
+
+ Search.prototype.removeQueryFromUrl = function() {
+ window.location.hash = '';
+ };
+
+ Search.prototype.pushState = function() {
+ if (window.history.pushState && !this.lastQuery.length) {
+ window.history.pushState(null, '');
+ }
+ };
+
+ Search.prototype.showOverlay = function() {
+ this.body.addClass('dac-modal-open dac-search-open');
+ };
+
+ Search.prototype.hideOverlay = function() {
+ this.body.removeClass('dac-modal-open dac-search-open');
+ };
+
+ $(document).on('ready.aranja', function() {
+ var search = new Search();
+ search.init();
+ });
+})(jQuery, metadata);
+
+window.dacStore = (function(window) {
+ /**
+ * Creates a new persistent store.
+ * If localStorage is unavailable, the items are stored in memory.
+ *
+ * @constructor
+ * @param {string} name The name of the store
+ * @param {number} maxSize The maximum number of items the store can hold.
+ */
+ var Store = function(name, maxSize) {
+ var content = [];
+
+ var hasLocalStorage = !!window.localStorage;
+
+ if (hasLocalStorage) {
+ try {
+ content = JSON.parse(window.localStorage.getItem(name) || []);
+ } catch (e) {
+ // Store contains invalid data
+ window.localStorage.removeItem(name);
+ }
+ }
+
+ function push(item) {
+ if (content[0] === item) {
+ return;
+ }
+
+ content.unshift(item);
+
+ if (maxSize) {
+ content.splice(maxSize, content.length);
+ }
+
+ if (hasLocalStorage) {
+ window.localStorage.setItem(name, JSON.stringify(content));
+ }
+ }
+
+ function all() {
+ // Return a copy
+ return content.slice();
+ }
+
+ return {
+ push: push,
+ all: all
+ };
+ };
+
+ var stores = {
+ 'search-history': new Store('search-history', 3)
+ };
+
+ /**
+ * Get a named persistent store.
+ * @param {string} name
+ * @return {Store}
+ */
+ return function getStore(name) {
+ return stores[name];
+ };
+})(window);
+
+(function($) {
+ 'use strict';
+
+ /**
+ * A component that swaps two dynamic height views with an animation.
+ * Listens for the following events:
+ * * swap-content: triggers SwapContent.swap_()
+ * * swap-reset: triggers SwapContent.reset()
+ * @param el
+ * @param options
+ * @constructor
+ */
+ function SwapContent(el, options) {
+ this.el = $(el);
+ this.options = $.extend({}, SwapContent.DEFAULTS_, options);
+ this.options.dynamic = this.options.dynamic === 'true';
+ this.containers = this.el.find(this.options.container);
+ this.initiallyActive = this.containers.children('.' + this.options.activeClass).eq(0);
+ this.el.on('swap-content', this.swap.bind(this));
+ this.el.on('swap-reset', this.reset.bind(this));
+ this.el.find(this.options.swapButton).on('click', this.swap.bind(this));
+ }
+
+ /**
+ * SwapContent's default settings.
+ * @type {{activeClass: string, container: string, transitionSpeed: number}}
+ * @private
+ */
+ SwapContent.DEFAULTS_ = {
+ activeClass: 'dac-active',
+ container: '[data-swap-container]',
+ dynamic: 'true',
+ swapButton: '[data-swap-button]',
+ transitionSpeed: 500
+ };
+
+ /**
+ * Returns container's visible height.
+ * @param container
+ * @returns {number}
+ */
+ SwapContent.prototype.currentHeight = function(container) {
+ return container.children('.' + this.options.activeClass).outerHeight();
+ };
+
+ /**
+ * Reset to show initial content
+ */
+ SwapContent.prototype.reset = function() {
+ if (!this.initiallyActive.hasClass(this.initiallyActive)) {
+ this.containers.children().toggleClass(this.options.activeClass);
+ }
+ };
+
+ /**
+ * Complete the swap.
+ */
+ SwapContent.prototype.complete = function() {
+ this.containers.height('auto');
+ this.containers.trigger('swap-complete');
+ };
+
+ /**
+ * Perform the swap of content.
+ */
+ SwapContent.prototype.swap = function() {
+ this.containers.each(function(index, container) {
+ container = $(container);
+
+ if (!this.options.dynamic) {
+ container.children().toggleClass(this.options.activeClass);
+ this.complete.bind(this);
+ return;
+ }
+
+ container.height(this.currentHeight(container)).children().toggleClass(this.options.activeClass);
+ container.animate({height: this.currentHeight(container)}, this.options.transitionSpeed,
+ this.complete.bind(this));
+ }.bind(this));
+ };
+
+ /**
+ * jQuery plugin
+ * @param {object} options - Override default options.
+ */
+ $.fn.dacSwapContent = function(options) {
+ return this.each(function() {
+ new SwapContent(this, options);
+ });
+ };
+
+ /**
+ * Data Attribute API
+ */
+ $(document).on('ready.aranja', function() {
+ $('[data-swap]').each(function() {
+ $(this).dacSwapContent($(this).data());
+ });
+ });
+})(jQuery);
+
+/* Tabs */
+(function($) {
+ 'use strict';
+
+ /**
+ * @param {HTMLElement} el - The DOM element.
+ * @param {Object} options
+ * @constructor
+ */
+ function Tabs(el, options) {
+ this.el = $(el);
+ this.options = $.extend({}, Tabs.DEFAULTS_, options);
+ this.init();
+ }
+
+ Tabs.DEFAULTS_ = {
+ activeClass: 'dac-active',
+ viewDataAttr: 'tab-view',
+ itemDataAttr: 'tab-item'
+ };
+
+ Tabs.prototype.init = function() {
+ var itemDataAttribute = '[data-' + this.options.itemDataAttr + ']';
+ this.tabEl_ = this.el.find(itemDataAttribute);
+ this.tabViewEl_ = this.el.find('[data-' + this.options.viewDataAttr + ']');
+ this.el.on('click.dac-tabs', itemDataAttribute, this.changeTabs.bind(this));
+ };
+
+ Tabs.prototype.changeTabs = function(event) {
+ var current = $(event.currentTarget);
+ var index = current.index();
+
+ if (current.hasClass(this.options.activeClass)) {
+ current.add(this.tabViewEl_.eq(index)).removeClass(this.options.activeClass);
+ } else {
+ this.tabEl_.add(this.tabViewEl_).removeClass(this.options.activeClass);
+ current.add(this.tabViewEl_.eq(index)).addClass(this.options.activeClass);
+ }
+ };
+
+ /**
+ * jQuery plugin
+ */
+ $.fn.dacTabs = function() {
+ return this.each(function() {
+ var el = $(this);
+ new Tabs(el, el.data());
+ });
+ };
+
+ /**
+ * Data Attribute API
+ */
+ $(function() {
+ $('[data-tabs]').dacTabs();
+ });
+})(jQuery);
+
+/* Toast Component */
+(function($) {
+ 'use strict';
+ /**
+ * @constant
+ * @type {String}
+ */
+ var LOCAL_STORAGE_KEY = 'toast-closed-index';
+
+ /**
+ * Dictionary from local storage.
+ */
+ var toastDictionary = localStorage.getItem(LOCAL_STORAGE_KEY);
+ toastDictionary = toastDictionary ? JSON.parse(toastDictionary) : {};
+
+ /**
+ * Variable used for caching the body.
+ */
+ var bodyCached;
+
+ /**
+ * @param {HTMLElement} el - The DOM element.
+ * @param {Object} options
+ * @constructor
+ */
+ function Toast(el, options) {
+ this.el = $(el);
+ this.options = $.extend({}, Toast.DEFAULTS_, options);
+ this.init();
+ }
+
+ Toast.DEFAULTS_ = {
+ closeBtnClass: 'dac-toast-close-btn',
+ closeDuration: 200,
+ visibleClass: 'dac-visible',
+ wrapClass: 'dac-toast-wrap'
+ };
+
+ /**
+ * Generate a close button.
+ * @returns {*|HTMLElement}
+ */
+ Toast.prototype.closeBtn = function() {
+ this.closeBtnEl = this.closeBtnEl || $('<button class="' + this.options.closeBtnClass + '">' +
+ '<i class="dac-sprite dac-close-black"></i>' +
+ '</button>');
+ return this.closeBtnEl;
+ };
+
+ /**
+ * Initialize a new toast element
+ */
+ Toast.prototype.init = function() {
+ this.hash = this.el.text().replace(/[\s\n\t]/g, '').split('').slice(0, 128).join('');
+
+ if (toastDictionary[this.hash]) {
+ return;
+ }
+
+ this.closeBtn().on('click', this.onClickHandler.bind(this));
+ this.el.find('.' + this.options.wrapClass).append(this.closeBtn());
+ this.el.addClass(this.options.visibleClass);
+ this.dynamicPadding(this.el.outerHeight());
+ };
+
+ /**
+ * Add padding to make sure all page is visible.
+ */
+ Toast.prototype.dynamicPadding = function(val) {
+ var currentPadding = parseInt(bodyCached.css('padding-bottom') || 0);
+ bodyCached.css('padding-bottom', val + currentPadding);
+ };
+
+ /**
+ * Remove a toast from the DOM
+ */
+ Toast.prototype.remove = function() {
+ this.dynamicPadding(-this.el.outerHeight());
+ this.el.remove();
+ };
+
+ /**
+ * Handle removal of the toast.
+ */
+ Toast.prototype.onClickHandler = function() {
+ // Only fadeout toasts from top of stack. Others are removed immediately.
+ var duration = this.el.index() === 0 ? this.options.closeDuration : 0;
+ this.el.fadeOut(duration, this.remove.bind(this));
+
+ // Save closed state.
+ toastDictionary[this.hash] = 1;
+ localStorage.setItem(LOCAL_STORAGE_KEY, JSON.stringify(toastDictionary));
+ };
+
+ /**
+ * jQuery plugin
+ * @param {object} options - Override default options.
+ */
+ $.fn.dacToast = function() {
+ return this.each(function() {
+ var el = $(this);
+ new Toast(el, el.data());
+ });
+ };
+
+ /**
+ * Data Attribute API
+ */
+ $(function() {
+ bodyCached = $('#body-content');
+ $('[data-toast]').dacToast();
+ });
+})(jQuery);
+
+(function($) {
+ function Toggle(el) {
+ $(el).on('click.dac.togglesection', this.toggle);
+ }
+
+ Toggle.prototype.toggle = function() {
+ var $this = $(this);
+
+ var $parent = getParent($this);
+ var isExpanded = $parent.hasClass('is-expanded');
+
+ transitionMaxHeight($parent.find('.dac-toggle-content'), !isExpanded);
+ $parent.toggleClass('is-expanded');
+
+ return false;
+ };
+
+ function getParent($this) {
+ var selector = $this.attr('data-target');
+
+ if (!selector) {
+ selector = $this.attr('href');
+ selector = selector && /#[A-Za-z]/.test(selector) && selector.replace(/.*(?=#[^\s]*$)/, '');
+ }
+
+ var $parent = selector && $(selector);
+
+ $parent = $parent && $parent.length ? $parent : $this.closest('.dac-toggle');
+
+ return $parent.length ? $parent : $this.parent();
+ }
+
+ /**
+ * Runs a transition of max-height along with responsive styles which hide or expand the element.
+ * @param $el
+ * @param visible
+ */
+ function transitionMaxHeight($el, visible) {
+ var contentHeight = $el.prop('scrollHeight');
+ var targetHeight = visible ? contentHeight : 0;
+ var duration = $el.transitionDuration();
+
+ // If we're hiding, first set the maxHeight we're transitioning from.
+ if (!visible) {
+ $el.css({
+ transitionDuration: '0s',
+ maxHeight: contentHeight + 'px'
+ })
+ .resolveStyles()
+ .css('transitionDuration', '');
+ }
+
+ // Transition to new state
+ $el.css('maxHeight', targetHeight);
+
+ // Reset maxHeight to css value after transition.
+ setTimeout(function() {
+ $el.css({
+ transitionDuration: '0s',
+ maxHeight: ''
+ })
+ .resolveStyles()
+ .css('transitionDuration', '');
+ }, duration);
+ }
+
+ // Utility to get the transition duration for the element.
+ $.fn.transitionDuration = function() {
+ var d = $(this).css('transitionDuration') || '0s';
+
+ return +(parseFloat(d) * (/ms/.test(d) ? 1 : 1000)).toFixed(0);
+ };
+
+ // jQuery plugin
+ $.fn.toggleSection = function(option) {
+ return this.each(function() {
+ var $this = $(this);
+ var data = $this.data('dac.togglesection');
+ if (!data) {$this.data('dac.togglesection', (data = new Toggle(this)));}
+ if (typeof option === 'string') {data[option].call($this);}
+ });
+ };
+
+ // Data api
+ $(document)
+ .on('click.toggle', '[data-toggle="section"]', Toggle.prototype.toggle);
+})(jQuery);
+
+(function(window) {
+ /**
+ * Media query breakpoints. Should match CSS.
+ */
+ var BREAKPOINTS = {
+ mobile: [0, 719],
+ tablet: [720, 959],
+ desktop: [960, 9999]
+ };
+
+ /**
+ * Fisher-Yates Shuffle (Knuth shuffle).
+ * @param {Array} input
+ * @returns {Array} shuffled array.
+ */
+ function shuffle(input) {
+ for (var i = input.length; i >= 0; i--) {
+ var randomIndex = Math.floor(Math.random() * (i + 1));
+ var randomItem = input[randomIndex];
+ input[randomIndex] = input[i];
+ input[i] = randomItem;
+ }
+
+ return input;
+ }
+
+ /**
+ * Matches media breakpoints like in CSS.
+ * @param {string} form of either mobile, tablet or desktop.
+ */
+ function matchesMedia(form) {
+ var breakpoint = BREAKPOINTS[form];
+ return window.innerWidth >= breakpoint[0] && window.innerWidth <= breakpoint[1];
+ }
+
+ window.util = {
+ shuffle: shuffle,
+ matchesMedia: matchesMedia
+ };
+})(window);
+
+(function($, window) {
+ 'use strict';
+
+ var YouTubePlayer = (function() {
+ var player;
+
+ function VideoPlayer() {
+ this.mPlayerPaused = false;
+ this.doneSetup = false;
+ }
+
+ VideoPlayer.prototype.setup = function() {
+ // loads the IFrame Player API code asynchronously.
+ $.getScript('https://www.youtube.com/iframe_api');
+
+ // Add the shadowbox HTML to the body
+ $('body').prepend(
+'<div id="video-player" class="Video">' +
+ '<div id="video-overlay" class="Video-overlay" />' +
+ '<div class="Video-container">' +
+ '<div class="Video-frame">' +
+ '<span class="Video-loading">Loading…</span>' +
+ '<div id="youTubePlayer"></div>' +
+ '</div>' +
+ '<div class="Video-controls">' +
+ '<button id="picture-in-picture" class="Video-button Video-button--picture-in-picture">' +
+ '<button id="close-video" class="Video-button Video-button--close" />' +
+ '</div>' +
+ '</div>' +
+'</div>');
+
+ this.videoPlayer = $('#video-player');
+
+ var pictureInPictureButton = this.videoPlayer.find('#picture-in-picture');
+ pictureInPictureButton.on('click.aranja', this.toggleMinimizeVideo.bind(this));
+
+ var videoOverlay = this.videoPlayer.find('#video-overlay');
+ var closeButton = this.videoPlayer.find('#close-video');
+ var closeVideo = this.closeVideo.bind(this);
+ videoOverlay.on('click.aranja', closeVideo);
+ closeButton.on('click.aranja', closeVideo);
+
+ this.doneSetup = true;
+ };
+
+ VideoPlayer.prototype.startYouTubePlayer = function(videoId) {
+ this.videoPlayer.show();
+
+ if (!this.isLoaded) {
+ this.queueVideo = videoId;
+ return;
+ }
+
+ this.mPlayerPaused = false;
+ // check if we've already created this player
+ if (!this.youTubePlayer) {
+ // check if there's a start time specified
+ var idAndHash = videoId.split('#');
+ var startTime = 0;
+ if (idAndHash.length > 1) {
+ startTime = idAndHash[1].split('t=')[1] !== undefined ? idAndHash[1].split('t=')[1] : 0;
+ }
+ // enable localized player
+ var lang = getLangPref();
+ var captionsOn = lang === 'en' ? 0 : 1;
+
+ this.youTubePlayer = new YT.Player('youTubePlayer', {
+ height: 720,
+ width: 1280,
+ videoId: idAndHash[0],
+ // jscs:disable requireCamelCaseOrUpperCaseIdentifiers
+ playerVars: {start: startTime, hl: lang, cc_load_policy: captionsOn},
+ // jscs:enable
+ events: {
+ 'onReady': this.onPlayerReady.bind(this),
+ 'onStateChange': this.onPlayerStateChange.bind(this)
+ }
+ });
+ } else {
+ // if a video different from the one already playing was requested, cue it up
+ if (videoId !== this.getVideoId()) {
+ this.youTubePlayer.cueVideoById(videoId);
+ }
+ this.youTubePlayer.playVideo();
+ }
+ };
+
+ VideoPlayer.prototype.onPlayerReady = function(event) {
+ if (!isMobile) {
+ event.target.playVideo();
+ this.mPlayerPaused = false;
+ }
+ };
+
+ VideoPlayer.prototype.toggleMinimizeVideo = function(event) {
+ event.stopPropagation();
+ this.videoPlayer.toggleClass('Video--picture-in-picture');
+ };
+
+ VideoPlayer.prototype.closeVideo = function() {
+ try {
+ this.youTubePlayer.pauseVideo();
+ } catch (e) {
+ }
+ this.videoPlayer.fadeOut(200, function() {
+ this.videoPlayer.removeClass('Video--picture-in-picture');
+ }.bind(this));
+ };
+
+ VideoPlayer.prototype.getVideoId = function() {
+ // jscs:disable requireCamelCaseOrUpperCaseIdentifiers
+ return this.youTubePlayer && this.youTubePlayer.getVideoData().video_id;
+ // jscs:enable
+ };
+
+ /* Track youtube playback for analytics */
+ VideoPlayer.prototype.onPlayerStateChange = function(event) {
+ var videoId = this.getVideoId();
+ var currentTime = this.youTubePlayer && this.youTubePlayer.getCurrentTime();
+
+ // Video starts, send the video ID
+ if (event.data === YT.PlayerState.PLAYING) {
+ if (this.mPlayerPaused) {
+ ga('send', 'event', 'Videos', 'Resume', videoId);
+ } else {
+ // track the start playing event so we know from which page the video was selected
+ ga('send', 'event', 'Videos', 'Start: ' + videoId, 'on: ' + document.location.href);
+ }
+ this.mPlayerPaused = false;
+ }
+
+ // Video paused, send video ID and video elapsed time
+ if (event.data === YT.PlayerState.PAUSED) {
+ ga('send', 'event', 'Videos', 'Paused', videoId, currentTime);
+ this.mPlayerPaused = true;
+ }
+
+ // Video finished, send video ID and video elapsed time
+ if (event.data === YT.PlayerState.ENDED) {
+ ga('send', 'event', 'Videos', 'Finished', videoId, currentTime);
+ this.mPlayerPaused = true;
+ }
+ };
+
+ return {
+ getPlayer: function() {
+ if (!player) {
+ player = new VideoPlayer();
+ }
+
+ return player;
+ }
+ };
+ })();
+
+ var videoPlayer = YouTubePlayer.getPlayer();
+
+ window.onYouTubeIframeAPIReady = function() {
+ videoPlayer.isLoaded = true;
+
+ if (videoPlayer.queueVideo) {
+ videoPlayer.startYouTubePlayer(videoPlayer.queueVideo);
+ }
+ };
+
+ function wrapLinkInPlayer(e) {
+ e.preventDefault();
+
+ if (!videoPlayer.doneSetup) {
+ videoPlayer.setup();
+ }
+
+ var videoIdMatches = $(e.currentTarget).attr('href').match(/(?:youtu.be\/|v=)([^&]*)/);
+ var videoId = videoIdMatches && videoIdMatches[1];
+
+ if (videoId) {
+ videoPlayer.startYouTubePlayer(videoId);
+ }
+ }
+
+ $(document).on('click.video', 'a[href*="youtube.com/watch"], a[href*="youtu.be"]', wrapLinkInPlayer);
+})(jQuery, window);
+
+/**
+ * Wide table
+ *
+ * Wraps tables in a scrollable area so you can read them on mobile.
+ */
+(function($) {
+ function initWideTable() {
+ $('table.jd-sumtable').each(function(i, table) {
+ $(table).wrap('<div class="dac-expand wide-table">');
+ });
+ }
+
+ $(function() {
+ initWideTable();
+ });
+})(jQuery);
+
+/** Utilities */
+
+/* returns the given string with all HTML brackets converted to entities
+ TODO: move this to the site's JS library */
+function escapeHTML(string) {
+ return string.replace(/</g,"<")
+ .replace(/>/g,">");
+};
+
+function getQueryVariable(variable) {
+ var query = window.location.search.substring(1);
+ var vars = query.split("&");
+ for (var i=0;i<vars.length;i++) {
+ var pair = vars[i].split("=");
+ if(pair[0] == variable){return pair[1];}
+ }
+ return(false);
+};
diff --git a/tools/droiddoc/templates-sdk-dev/body_tag.cs b/tools/droiddoc/templates-sdk-dev/body_tag.cs
new file mode 100644
index 0000000..5761b71
--- /dev/null
+++ b/tools/droiddoc/templates-sdk-dev/body_tag.cs
@@ -0,0 +1,15 @@
+<body class="gc-documentation <?cs
+ if:(reference.gms || reference.gcm)
+ ?>google<?cs
+ /if ?><?cs
+ if:(guide||develop||training||reference||tools||sdk)
+ ?>develop<?cs
+ if:reference
+ ?> reference api apilevel-<?cs var:class.since ?><?cs var:package.since ?><?cs
+ /if ?><?cs
+ elif:design
+ ?>design<?cs
+ elif:distribute
+ ?>distribute<?cs
+ /if ?>">
+<div id="doc-api-level" class="<?cs var:class.since ?><?cs var:package.since ?>" style="display:none"></div>
diff --git a/tools/droiddoc/templates-sdk-dev/class.cs b/tools/droiddoc/templates-sdk-dev/class.cs
index 47e826b..faae8a7 100644
--- a/tools/droiddoc/templates-sdk-dev/class.cs
+++ b/tools/droiddoc/templates-sdk-dev/class.cs
@@ -1,263 +1,92 @@
-<?cs include:"doctype.cs" ?>
+<?cs # THIS CREATES A CLASS OR INTERFACE PAGE FROM .java FILES ?>
<?cs include:"macros.cs" ?>
<?cs include:"macros_override.cs" ?>
-<html<?cs if:devsite ?> devsite<?cs /if ?>>
-<?cs include:"head_tag.cs" ?>
-<body class="gc-documentation <?cs if:(reference.gms || reference.gcm) ?>google<?cs /if ?>
- <?cs if:(guide||develop||training||reference||tools||sdk) ?>develop<?cs
- if:reference ?> reference<?cs
- /if ?><?cs
- elif:design ?>design<?cs
- elif:distribute ?>distribute<?cs
- /if ?>" itemscope itemtype="http://schema.org/Article">
- <div id="doc-api-level" class="<?cs var:class.since ?>" style="display:none"></div>
- <a name="top"></a>
-<?cs include:"header.cs" ?>
+<?cs
+####################
+# MACRO FUNCTION USED ONLY IN THIS TEMPLATE TO GENERATE API REFERENCE
+# FIRST, THE FUNCTIONS FOR THE SUMMARY AT THE TOP OF THE PAGE
+####################
+?>
-<div class="col-12" id="doc-col">
-
-<div id="api-info-block">
-
-<?cs # are there inherited members ?>
-<?cs each:cl=class.inherited ?>
- <?cs if:subcount(cl.methods) ?>
- <?cs set:inhmethods = #1 ?>
- <?cs /if ?>
- <?cs if:subcount(cl.constants) ?>
- <?cs set:inhconstants = #1 ?>
- <?cs /if ?>
- <?cs if:subcount(cl.fields) ?>
- <?cs set:inhfields = #1 ?>
- <?cs /if ?>
- <?cs if:subcount(cl.attrs) ?>
- <?cs set:inhattrs = #1 ?>
- <?cs /if ?>
-<?cs /each ?>
-
-<div class="sum-details-links">
-<?cs if:inhattrs || inhconstants || inhfields || inhmethods || (!class.subclasses.hidden &&
- (subcount(class.subclasses.direct) || subcount(class.subclasses.indirect))) ?>
-Summary:
-<?cs if:subcount(class.inners) ?>
- <a href="#nestedclasses">Nested Classes</a>
- <?cs set:linkcount = #1 ?>
-<?cs /if ?>
-<?cs if:subcount(class.attrs) ?>
- <?cs if:linkcount ?>| <?cs /if ?><a href="#lattrs">XML Attrs</a>
- <?cs set:linkcount = #1 ?>
-<?cs /if ?>
-<?cs if:inhattrs ?>
- <?cs if:linkcount ?>| <?cs /if ?><a href="#inhattrs">Inherited XML Attrs</a>
- <?cs set:linkcount = #1 ?>
-<?cs /if ?>
-<?cs if:subcount(class.enumConstants) ?>
- <?cs if:linkcount ?>| <?cs /if ?><a href="#enumconstants">Enums</a>
- <?cs set:linkcount = #1 ?>
-<?cs /if ?>
-<?cs if:subcount(class.constants) ?>
- <?cs if:linkcount ?>| <?cs /if ?><a href="#constants">Constants</a>
- <?cs set:linkcount = #1 ?>
-<?cs /if ?>
-<?cs if:inhconstants ?>
- <?cs if:linkcount ?>| <?cs /if ?><a href="#inhconstants">Inherited Constants</a>
- <?cs set:linkcount = #1 ?>
-<?cs /if ?>
-<?cs if:subcount(class.fields) ?>
- <?cs if:linkcount ?>| <?cs /if ?><a href="#lfields">Fields</a>
- <?cs set:linkcount = #1 ?>
-<?cs /if ?>
-<?cs if:inhfields ?>
- <?cs if:linkcount ?>| <?cs /if ?><a href="#inhfields">Inherited Fields</a>
- <?cs set:linkcount = #1 ?>
-<?cs /if ?>
-<?cs if:subcount(class.ctors.public) ?>
- <?cs if:linkcount ?>| <?cs /if ?><a href="#pubctors">Ctors</a>
- <?cs set:linkcount = #1 ?>
-<?cs /if ?>
-<?cs if:subcount(class.ctors.protected) ?>
- <?cs if:linkcount ?>| <?cs /if ?><a href="#proctors">Protected Ctors</a>
- <?cs set:linkcount = #1 ?>
-<?cs /if ?>
-<?cs if:subcount(class.methods.public) ?>
- <?cs if:linkcount ?>| <?cs /if ?><a href="#pubmethods">Methods</a>
- <?cs set:linkcount = #1 ?>
-<?cs /if ?>
-<?cs if:subcount(class.methods.protected) ?>
- <?cs if:linkcount ?>| <?cs /if ?><a href="#promethods">Protected Methods</a>
- <?cs set:linkcount = #1 ?>
-<?cs /if ?>
-<?cs if:inhmethods ?>
- <?cs if:linkcount ?>| <?cs /if ?><a href="#inhmethods">Inherited Methods</a>
-<?cs /if ?>
-| <a href="#" onclick="return toggleAllClassInherited()" id="toggleAllClassInherited">[Expand All]</a>
-<?cs /if ?>
-</div><!-- end sum-details-links -->
-<div class="api-level">
- <?cs call:since_tags(class) ?><?cs
- if:class.deprecatedsince
- ?><br>Deprecated since <a href="<?cs var:toroot ?>guide/topics/manifest/uses-sdk-element.html#ApiLevels"
- >API level <?cs var:class.deprecatedsince ?></a><?cs
- /if ?>
- <?cs call:federated_refs(class) ?>
-</div>
-</div><!-- end api-info-block -->
-
-<?cs # this next line must be exactly like this to be parsed by eclipse ?>
-<!-- ======== START OF CLASS DATA ======== -->
-
-<div id="jd-header">
- <?cs var:class.scope ?>
- <?cs var:class.static ?>
- <?cs var:class.final ?>
- <?cs var:class.abstract ?>
- <?cs var:class.kind ?>
-<h1 itemprop="name"><?cs var:class.name ?></h1>
-
-<?cs set:colspan = subcount(class.inheritance) ?>
-<?cs each:supr = class.inheritance ?>
- <?cs if:colspan == 2 ?>
- extends <?cs call:type_link(supr.short_class) ?><br/>
- <?cs /if ?>
- <?cs if:last(supr) && subcount(supr.interfaces) ?>
- implements
- <?cs each:t=supr.interfaces ?>
- <?cs call:type_link(t) ?>
- <?cs /each ?>
- <?cs /if ?>
- <?cs set:colspan = colspan-1 ?>
-<?cs /each ?>
-<?cs call:show_annotations_list(class) ?>
-
-</div><!-- end header -->
-
-<div id="naMessage"></div>
-
-<div id="jd-content" class="api apilevel-<?cs var:class.since ?>">
-<table class="jd-inheritance-table">
-<?cs set:colspan = subcount(class.inheritance) ?>
-<?cs each:supr = class.inheritance ?>
- <tr>
- <?cs loop:i = 1, (subcount(class.inheritance)-colspan), 1 ?>
- <td class="jd-inheritance-space"> <?cs if:(subcount(class.inheritance)-colspan) == i ?> ↳<?cs /if ?></td>
- <?cs /loop ?>
- <td colspan="<?cs var:colspan ?>" class="jd-inheritance-class-cell"><?cs
- if:colspan == 1
- ?><?cs call:class_name(class.qualifiedType) ?><?cs
- else
- ?><?cs call:type_link(supr.class) ?><?cs
- /if ?></td>
- </tr>
- <?cs set:colspan = colspan-1 ?>
-<?cs /each ?>
-</table>
-
-<?cs # this next line must be exactly like this to be parsed by eclipse ?>
-
-<?cs if:subcount(class.subclasses.direct) && !class.subclasses.hidden ?>
-<table class="jd-sumtable jd-sumtable-subclasses"><tr><td colspan="12" style="border:none;margin:0;padding:0;">
-<?cs call:expando_trigger("subclasses-direct", "closed") ?>Known Direct Subclasses
-<?cs call:expandable_class_list("subclasses-direct", class.subclasses.direct, "list") ?>
-</td></tr></table>
-<?cs /if ?>
-
-<?cs if:subcount(class.subclasses.indirect) && !class.subclasses.hidden ?>
-<table class="jd-sumtable jd-sumtable-subclasses"><tr><td colspan="12" style="border:none;margin:0;padding:0;">
-<?cs call:expando_trigger("subclasses-indirect", "closed") ?>Known Indirect Subclasses
-<?cs call:expandable_class_list("subclasses-indirect", class.subclasses.indirect, "list") ?>
-</td></tr></table>
-<?cs /if ?>
-
-<div class="jd-descr">
-<?cs call:deprecated_warning(class) ?>
-<?cs if:subcount(class.descr) || subcount(class.annotationdocumentation) ?>
-<h2>Class Overview</h2>
-<?cs if:subcount(class.descr) ?><p itemprop="articleBody"><?cs call:tag_list(class.descr) ?></p><?cs /if ?>
-<?cs if:subcount(class.annotationdocumentation) ?><?cs each:annodoc = class.annotationdocumentation?>
-<p><?cs var:annodoc.text ?></p>
-<?cs /each?><?cs /if?>
-<?cs /if ?>
-
-<?cs call:see_also_tags(class.seeAlso) ?>
-</div><!-- jd-descr -->
-
-
-<?cs # summary macros ?>
-
-<?cs def:write_method_summary(methods, included) ?>
+<?cs
+# Prints the table cells for the summary of methods.
+?><?cs def:write_method_summary(methods, included) ?>
<?cs set:count = #1 ?>
<?cs each:method = methods ?>
- <?cs # The apilevel-N class MUST BE LAST in the sequence of class names ?>
- <tr class="<?cs if:count % #2 ?>alt-color<?cs /if ?> api apilevel-<?cs var:method.since ?>" >
- <td class="jd-typecol"><nobr>
- <?cs var:method.abstract ?>
- <?cs var:method.default ?>
- <?cs var:method.static ?>
- <?cs var:method.final ?>
- <?cs call:type_link(method.generic) ?>
- <?cs call:type_link(method.returnType) ?></nobr>
- </td>
- <td class="jd-linkcol" width="100%"><nobr>
- <span class="sympad"><?cs call:cond_link(method.name, toroot, method.href, included) ?></span>(<?cs call:parameter_list(method.params) ?>)</nobr>
- <?cs if:subcount(method.shortDescr) || subcount(method.deprecated) || subcount(method.showAnnotations) ?>
- <div class="jd-descrdiv">
- <?cs if:subcount(method.shortDescr) || subcount(method.annotationdocumentation) ?><?cs call:short_descr(method)?><?cs /if?>
- <?cs call:show_annotations_list(method) ?>
- </div>
- <?cs /if ?>
- </td></tr>
-<?cs set:count = count + #1 ?>
+ <?cs # The apilevel-N class MUST BE LAST in the sequence of class names ?>
+ <tr class="api apilevel-<?cs var:method.since ?>" >
+ <?cs # leave out this cell if there is no return type = if constructors ?>
+ <?cs if:subcount(method.returnType) ?>
+ <td><code>
+ <?cs var:method.abstract ?>
+ <?cs var:method.default ?>
+ <?cs var:method.static ?>
+ <?cs var:method.final ?>
+ <?cs call:type_link(method.generic) ?>
+ <?cs call:type_link(method.returnType) ?></code>
+ </td>
+ <?cs /if ?>
+ <td width="100%">
+ <code>
+ <?cs call:cond_link(method.name, toroot, method.href, included) ?>(<?cs call:parameter_list(method.params, 0) ?>)
+ </code>
+ <?cs if:subcount(method.shortDescr) || subcount(method.deprecated) ?>
+ <p><?cs call:short_descr(method) ?>
+ <?cs call:show_annotations_list(method) ?></p>
+ <?cs /if ?>
+ </td>
+ </tr>
+ <?cs set:count = count + #1 ?>
<?cs /each ?>
<?cs /def ?>
-<?cs def:write_field_summary(fields, included) ?>
+<?cs
+# Print the table cells for the summary of fields.
+?><?cs def:write_field_summary(fields, included) ?>
<?cs set:count = #1 ?>
- <?cs each:field=fields ?>
- <tr class="<?cs if:count % #2 ?>alt-color<?cs /if ?> api apilevel-<?cs var:field.since ?>" >
- <td class="jd-typecol"><nobr>
- <?cs var:field.scope ?>
- <?cs var:field.static ?>
- <?cs var:field.final ?>
- <?cs call:type_link(field.type) ?></nobr></td>
- <td class="jd-linkcol"><?cs call:cond_link(field.name, toroot, field.href, included) ?></td>
- <td class="jd-descrcol" width="100%">
- <?cs call:short_descr(field) ?>
- <?cs call:show_annotations_list(field) ?>
- </td>
- </tr>
- <?cs set:count = count + #1 ?>
- <?cs /each ?>
+<?cs each:field=fields ?>
+ <tr class="api apilevel-<?cs var:field.since ?>" >
+ <td><code>
+ <?cs var:field.scope ?>
+ <?cs var:field.static ?>
+ <?cs var:field.final ?>
+ <?cs call:type_link(field.type) ?></code></td>
+ <td width="100%">
+ <code><?cs call:cond_link(field.name, toroot, field.href, included) ?></code>
+ <p><?cs call:short_descr(field) ?>
+ <?cs call:show_annotations_list(field) ?></p>
+ </td>
+ </tr>
+ <?cs set:count = count + #1 ?>
+<?cs /each ?>
<?cs /def ?>
-<?cs def:write_constant_summary(fields, included) ?>
+<?cs
+# Print the table cells for the summary of constants
+?><?cs def:write_constant_summary(fields, included) ?>
<?cs set:count = #1 ?>
<?cs each:field=fields ?>
- <tr class="<?cs if:count % #2 ?>alt-color<?cs /if ?> api apilevel-<?cs var:field.since ?>" >
- <td class="jd-typecol"><?cs call:type_link(field.type) ?></td>
- <td class="jd-linkcol"><?cs call:cond_link(field.name, toroot, field.href, included) ?></td>
- <td class="jd-descrcol" width="100%">
- <?cs call:short_descr(field) ?>
- <?cs call:show_annotations_list(field) ?>
+ <tr class="api apilevel-<?cs var:field.since ?>" >
+ <td><code><?cs call:type_link(field.type) ?></code></td>
+ <td width="100%">
+ <code><?cs call:cond_link(field.name, toroot, field.href, included) ?></code>
+ <p><?cs call:short_descr(field) ?>
+ <?cs call:show_annotations_list(field) ?></p>
</td>
</tr>
<?cs set:count = count + #1 ?>
<?cs /each ?>
<?cs /def ?>
-<?cs def:write_attr_summary(attrs, included) ?>
+<?cs
+# Print the table cells for the summary of attributes
+?><?cs def:write_attr_summary(attrs, included) ?>
<?cs set:count = #1 ?>
- <tr>
- <td><nobr><em>Attribute Name</em></nobr></td>
- <td><nobr><em>Related Method</em></nobr></td>
- <td><nobr><em>Description</em></nobr></td>
- </tr>
<?cs each:attr=attrs ?>
- <tr class="<?cs if:count % #2 ?>alt-color<?cs /if ?> api apilevel-<?cs var:attr.since ?>" >
- <td class="jd-linkcol"><?cs if:included ?><a href="<?cs var:toroot ?><?cs var:attr.href ?>"><?cs /if ?><?cs var:attr.name ?><?cs if:included ?></a><?cs /if ?></td>
- <td class="jd-linkcol"><?cs each:m=attr.methods ?>
- <?cs call:cond_link(m.name, toroot, m.href, included) ?>
- <?cs /each ?>
- </td>
- <td class="jd-descrcol" width="100%">
+ <tr class="api apilevel-<?cs var:attr.since ?>" >
+ <td><?cs if:included ?><a href="<?cs var:toroot ?><?cs var:attr.href ?>"><?cs /if
+ ?><code><?cs var:attr.name ?></code><?cs if:included ?></a><?cs /if ?></td>
+ <td width="100%">
<?cs call:short_descr(attr) ?>
<?cs call:show_annotations_list(attr) ?>
</td>
@@ -266,30 +95,220 @@
<?cs /each ?>
<?cs /def ?>
-<?cs def:write_inners_summary(classes) ?>
+<?cs
+# Print the table cells for the inner classes
+?><?cs def:write_inners_summary(classes) ?>
<?cs set:count = #1 ?>
<?cs each:cl=class.inners ?>
- <tr class="<?cs if:count % #2 ?>alt-color<?cs /if ?> api apilevel-<?cs var:cl.since ?>" >
- <td class="jd-typecol"><nobr>
+ <tr class="api apilevel-<?cs var:cl.since ?>" >
+ <td class="jd-typecol"><code>
<?cs var:cl.scope ?>
- <?cs var:cl.static ?>
- <?cs var:cl.final ?>
+ <?cs var:cl.static ?>
+ <?cs var:cl.final ?>
<?cs var:cl.abstract ?>
- <?cs var:cl.kind ?></nobr></td>
- <td class="jd-linkcol"><?cs call:type_link(cl.type) ?></td>
+ <?cs var:cl.kind ?></code></td>
<td class="jd-descrcol" width="100%">
- <?cs call:short_descr(cl) ?>
- <?cs call:show_annotations_list(cl) ?>
+ <code><?cs call:type_link(cl.type) ?></code>
+ <p><?cs call:short_descr(cl) ?>
+ <?cs call:show_annotations_list(cl) ?></p>
</td>
</tr>
<?cs set:count = count + #1 ?>
<?cs /each ?>
<?cs /def ?>
+<?cs
+###################
+# END OF FUNCTIONS FOR API SUMMARY
+# START OF FUNCTIONS FOR THE API DETAILS
+###################
+?>
+<?cs
+# Print the table cells for the summary of constants
+?>
+<?cs def:write_field_details(fields) ?>
+<?cs each:field=fields ?>
+<?cs # this next line must be exactly like this to be parsed by eclipse ?>
+<?cs # the A tag in the next line must remain where it is, so that Eclipse can parse the docs ?>
+<A NAME="<?cs var:field.anchor ?>"></A>
+<?cs # The apilevel-N class MUST BE LAST in the sequence of class names ?>
+<div class="api apilevel-<?cs var:field.since ?>">
+ <h3 class="api-name"><?cs var:field.name ?></h3>
+ <div class="api-level">
+ <?cs call:since_tags(field) ?>
+ <?cs call:federated_refs(field) ?>
+ </div>
+<pre class="api-signature no-pretty-print">
+<?cs if:subcount(field.scope) ?><?cs var:field.scope
+?> <?cs /if ?><?cs if:subcount(field.static) ?><?cs var:field.static
+?> <?cs /if ?><?cs if:subcount(field.final) ?><?cs var:field.final
+?> <?cs /if ?><?cs if:subcount(field.type) ?><?cs call:type_link(field.type)
+?> <?cs /if ?><?cs var:field.name ?></pre>
+ <?cs call:show_annotations_list(field) ?>
+ <?cs call:description(field) ?>
+ <?cs if:subcount(field.constantValue) ?>
+ <p>Constant Value:
+ <?cs if:field.constantValue.isString ?>
+ <?cs var:field.constantValue.str ?>
+ <?cs else ?>
+ <?cs var:field.constantValue.dec ?>
+ (<?cs var:field.constantValue.hex ?>)
+ <?cs /if ?>
+ <?cs /if ?>
+</div>
+<?cs /each ?>
+<?cs /def ?>
-<?cs # end macros ?>
+<?cs def:write_method_details(methods) ?>
+<?cs each:method=methods ?>
+<?cs # the A tag in the next line must remain where it is, so that Eclipse can parse the docs ?>
+<A NAME="<?cs var:method.anchor ?>"></A>
+<?cs # The apilevel-N class MUST BE LAST in the sequence of class names ?>
+<div class="api apilevel-<?cs var:method.since ?>">
+ <h3 class="api-name"><?cs var:method.name ?></h3>
+ <div class="api-level">
+ <div><?cs call:since_tags(method) ?></div>
+ <?cs call:federated_refs(method) ?>
+ </div>
+<pre class="api-signature no-pretty-print">
+<?cs if:subcount(method.scope) ?><?cs var:method.scope
+?> <?cs /if ?><?cs if:subcount(method.static) ?><?cs var:method.static
+?> <?cs /if ?><?cs if:subcount(method.final) ?><?cs var:method.final
+?> <?cs /if ?><?cs if:subcount(method.abstract) ?><?cs var:method.abstract
+?> <?cs /if ?><?cs if:subcount(method.returnType) ?><?cs call:type_link(method.returnType)
+?> <?cs /if ?><?cs var:method.name ?> (<?cs call:parameter_list(method.params, 1) ?>)</pre>
+ <?cs call:show_annotations_list(method) ?>
+ <?cs call:description(method) ?>
+</div>
+<?cs /each ?>
+<?cs /def ?>
-<div class="jd-descr">
-<?cs # make sure there's a summary view to display ?>
+<?cs def:write_attr_details(attrs) ?>
+<?cs each:attr=attrs ?>
+<?cs # the A tag in the next line must remain where it is, so that Eclipse can parse the docs ?>
+<A NAME="<?cs var:attr.anchor ?>"></A>
+<h3 class="api-name"><?cs var:attr.name ?></h3>
+<?cs call:show_annotations_list(attr) ?>
+<?cs call:description(attr) ?>
+<?cs if:subcount(attr.methods) ?>
+ <p><b>Related methods:</b></p>
+ <ul class="nolist">
+ <?cs each:m=attr.methods ?>
+ <li><a href="<?cs var:toroot ?><?cs var:m.href ?>"><?cs var:m.name ?></a></li>
+ <?cs /each ?>
+ </ul>
+<?cs /if ?>
+<?cs /each ?>
+<?cs /def ?>
+<?cs
+#########################
+# END OF MACROS
+# START OF PAGE PRINTING
+#########################
+?>
+<?cs include:"doctype.cs" ?>
+<html<?cs if:devsite ?> devsite<?cs /if ?>>
+<?cs include:"head_tag.cs" ?>
+<?cs include:"body_tag.cs" ?>
+<?cs include:"header.cs" ?>
+<?cs include:"page_info.cs" ?>
+<?cs # This DIV spans the entire document to provide scope for some scripts ?>
+<div class="api apilevel-<?cs var:class.since ?>" id="jd-content">
+<?cs # this next line must be exactly like this to be parsed by eclipse ?>
+<!-- ======== START OF CLASS DATA ======== -->
+<?cs
+#
+# Page header with class name and signature
+#
+?>
+<h1 class="api-title"><?cs var:class.name ?></h1>
+<p>
+<code class="api-signature">
+ <?cs var:class.scope ?>
+ <?cs var:class.static ?>
+ <?cs var:class.final ?>
+ <?cs var:class.abstract ?>
+ <?cs var:class.kind ?>
+ <?cs var:class.name ?>
+</code>
+<br>
+<?cs set:colspan = subcount(class.inheritance) ?>
+<?cs each:supr = class.inheritance ?>
+<code class="api-signature">
+ <?cs if:colspan == 2 ?>
+ extends <?cs call:type_link(supr.short_class) ?>
+ <?cs /if ?>
+ <?cs if:last(supr) && subcount(supr.interfaces) ?>
+ implements
+ <?cs each:t=supr.interfaces ?>
+ <?cs call:type_link(t) ?><?cs
+ if: name(t)!=subcount(supr.interfaces)-1
+ ?>, <?cs /if ?>
+ <?cs /each ?>
+ <?cs /if ?>
+ <?cs set:colspan = colspan-1 ?>
+</code>
+<?cs /each ?>
+</p><?cs
+#
+# Class inheritance tree
+#
+?><table class="jd-inheritance-table">
+<?cs set:colspan = subcount(class.inheritance) ?>
+<?cs each:supr = class.inheritance ?>
+ <tr>
+ <?cs loop:i = 1, (subcount(class.inheritance)-colspan), 1 ?>
+ <td class="jd-inheritance-space"> <?cs
+ if:(subcount(class.inheritance)-colspan) == i
+ ?> ↳<?cs
+ /if ?></td>
+ <?cs /loop ?>
+ <td colspan="<?cs var:colspan ?>" class="jd-inheritance-class-cell"><?cs
+ if:colspan == 1
+ ?><?cs call:class_name(class.qualifiedType) ?><?cs
+ else
+ ?><?cs call:type_link(supr.class) ?><?cs
+ /if ?>
+ </td>
+ </tr>
+ <?cs set:colspan = colspan-1 ?>
+<?cs /each ?>
+</table><?cs
+#
+# Collapsible list of subclasses
+#
+?><?cs
+if:subcount(class.subclasses.direct) && !class.subclasses.hidden ?>
+ <table class="jd-sumtable jd-sumtable-subclasses">
+ <tr><td style="border:none;margin:0;padding:0;">
+ <?cs call:expando_trigger("subclasses-direct", "closed") ?>Known Direct Subclasses
+ <?cs call:expandable_class_list("subclasses-direct", class.subclasses.direct, "list") ?>
+ </td></tr>
+ </table>
+ <?cs /if ?>
+ <?cs if:subcount(class.subclasses.indirect) && !class.subclasses.hidden ?>
+ <table class="jd-sumtable jd-sumtable-subclasses"><tr><td colspan="2" style="border:none;margin:0;padding:0;">
+ <?cs call:expando_trigger("subclasses-indirect", "closed") ?>Known Indirect Subclasses
+ <?cs call:expandable_class_list("subclasses-indirect", class.subclasses.indirect, "list") ?>
+ </td></tr></table><?cs
+/if ?>
+<?cs call:show_annotations_list(class) ?>
+<br><hr><?cs
+#
+# The long-form class description.
+#
+?><?cs call:deprecated_warning(class) ?>
+
+<?cs if:subcount(class.descr) ?>
+ <p><?cs call:tag_list(class.descr) ?></p>
+<?cs /if ?>
+
+<?cs call:see_also_tags(class.seeAlso) ?>
+<?cs
+#################
+# CLASS SUMMARY
+#################
+?>
+<?cs # make sure there is a summary view to display ?>
<?cs if:subcount(class.inners)
|| subcount(class.attrs)
|| inhattrs
@@ -303,19 +322,21 @@
|| subcount(class.methods.public)
|| subcount(class.methods.protected)
|| inhmethods ?>
-<h2>Summary</h2>
+<h2 class="api-section">Summary</h2>
<?cs if:subcount(class.inners) ?>
<?cs # this next line must be exactly like this to be parsed by eclipse ?>
<!-- ======== NESTED CLASS SUMMARY ======== -->
-<table id="nestedclasses" class="jd-sumtable"><tr><th colspan="12">Nested Classes</th></tr>
+<table id="nestedclasses" class="responsive">
+<tr><th colspan="2"><h3>Nested classes</h3></th></tr>
<?cs call:write_inners_summary(class.inners) ?>
<?cs /if ?>
<?cs # this next line must be exactly like this to be parsed by eclipse ?>
<?cs if:subcount(class.attrs) ?>
<!-- =========== FIELD SUMMARY =========== -->
-<table id="lattrs" class="jd-sumtable"><tr><th colspan="12">XML Attributes</th></tr>
+<table id="lattrs" class="responsive">
+<tr><th colspan="2"><h3>XML attributes</h3></th></tr>
<?cs call:write_attr_summary(class.attrs, 1) ?>
<?cs /if ?>
@@ -323,15 +344,17 @@
<?cs if:inhattrs ?>
<?cs # this next line must be exactly like this to be parsed by eclipse ?>
<!-- =========== FIELD SUMMARY =========== -->
-<table id="inhattrs" class="jd-sumtable"><tr><th>
- <a href="#" class="toggle-all" onclick="return toggleAllInherited(this, null)">[Expand]</a>
- <div style="clear:left;">Inherited XML Attributes</div></th></tr>
+<table id="inhattrs" class="responsive inhtable">
+<tr><th><h3>Inherited XML attributes</h3></th></tr>
<?cs each:cl=class.inherited ?>
<?cs if:subcount(cl.attrs) ?>
<tr class="api apilevel-<?cs var:cl.since ?>" >
-<td colspan="12">
-<?cs call:expando_trigger("inherited-attrs-"+cl.qualified, "closed") ?>From <?cs var:cl.kind ?>
-<?cs call:cond_link(cl.qualified, toroot, cl.link, cl.included) ?>
+<td colspan="2">
+<?cs call:expando_trigger("inherited-attrs-"+cl.qualified, "closed") ?>From
+<?cs var:cl.kind ?>
+<code>
+ <?cs call:cond_link(cl.qualified, toroot, cl.link, cl.included) ?>
+</code>
<div id="inherited-attrs-<?cs var:cl.qualified ?>">
<div id="inherited-attrs-<?cs var:cl.qualified ?>-list"
class="jd-inheritedlinks">
@@ -350,25 +373,27 @@
<?cs if:subcount(class.enumConstants) ?>
<?cs # this next line must be exactly like this to be parsed by eclipse ?>
<!-- =========== ENUM CONSTANT SUMMARY =========== -->
-<table id="enumconstants" class="jd-sumtable"><tr><th colspan="12">Enum Values</th></tr>
+<table id="enumconstants" class="responsive constants">
+ <tr><th colspan="2"><h3>Enum values</h3></th></tr>
<?cs set:count = #1 ?>
- <?cs each:field=class.enumConstants ?>
- <tr class="<?cs if:count % #2 ?>alt-color<?cs /if ?> api apilevel-<?cs var:field.since ?>" >
- <td class="jd-descrcol"><?cs call:type_link(field.type) ?> </td>
- <td class="jd-linkcol"><?cs call:cond_link(field.name, toroot, field.href, cl.included) ?> </td>
- <td class="jd-descrcol" width="100%">
- <?cs call:short_descr(field) ?>
- <?cs call:show_annotations_list(field) ?>
- </td>
- </tr>
- <?cs set:count = count + #1 ?>
- <?cs /each ?>
+ <?cs each:field=class.enumConstants ?>
+ <tr class="api apilevel-<?cs var:field.since ?>" >
+ <td><code><?cs call:type_link(field.type) ?></code> </td>
+ <td width="100%">
+ <code><?cs call:cond_link(field.name, toroot, field.href, cl.included) ?></code>
+ <p><?cs call:short_descr(field) ?>
+ <?cs call:show_annotations_list(field) ?></p>
+ </td>
+ </tr>
+ <?cs set:count = count + #1 ?>
+ <?cs /each ?>
<?cs /if ?>
<?cs if:subcount(class.constants) ?>
<?cs # this next line must be exactly like this to be parsed by eclipse ?>
<!-- =========== ENUM CONSTANT SUMMARY =========== -->
-<table id="constants" class="jd-sumtable"><tr><th colspan="12">Constants</th></tr>
+<table id="constants" class="responsive constants">
+<tr><th colspan="2"><h3>Constants</h3></th></tr>
<?cs call:write_constant_summary(class.constants, 1) ?>
</table>
<?cs /if ?>
@@ -377,25 +402,27 @@
<?cs if:inhconstants ?>
<?cs # this next line must be exactly like this to be parsed by eclipse ?>
<!-- =========== ENUM CONSTANT SUMMARY =========== -->
-<table id="inhconstants" class="jd-sumtable"><tr><th>
- <a href="#" class="toggle-all" onclick="return toggleAllInherited(this, null)">[Expand]</a>
- <div style="clear:left;">Inherited Constants</div></th></tr>
+<table id="inhconstants" class="responsive constants inhtable">
+<tr><th><h3>Inherited constants</h3></th></tr>
<?cs each:cl=class.inherited ?>
<?cs if:subcount(cl.constants) ?>
-<tr class="api apilevel-<?cs var:cl.since ?>" >
-<td colspan="12">
-<?cs call:expando_trigger("inherited-constants-"+cl.qualified, "closed") ?>From <?cs var:cl.kind ?>
-<?cs call:cond_link(cl.qualified, toroot, cl.link, cl.included) ?>
-<div id="inherited-constants-<?cs var:cl.qualified ?>">
- <div id="inherited-constants-<?cs var:cl.qualified ?>-list"
- class="jd-inheritedlinks">
+ <tr class="api apilevel-<?cs var:cl.since ?>" >
+ <td>
+ <?cs call:expando_trigger("inherited-constants-"+cl.qualified, "closed") ?>From
+ <?cs var:cl.kind ?>
+ <code>
+ <?cs call:cond_link(cl.qualified, toroot, cl.link, cl.included) ?>
+ </code>
+ <div id="inherited-constants-<?cs var:cl.qualified ?>">
+ <div id="inherited-constants-<?cs var:cl.qualified ?>-list"
+ class="jd-inheritedlinks">
+ </div>
+ <div id="inherited-constants-<?cs var:cl.qualified ?>-summary" style="display: none;">
+ <table class="jd-sumtable-expando responsive">
+ <?cs call:write_constant_summary(cl.constants, cl.included) ?></table>
+ </div>
</div>
- <div id="inherited-constants-<?cs var:cl.qualified ?>-summary" style="display: none;">
- <table class="jd-sumtable-expando">
- <?cs call:write_constant_summary(cl.constants, cl.included) ?></table>
- </div>
-</div>
-</td></tr>
+ </td></tr>
<?cs /if ?>
<?cs /each ?>
</table>
@@ -404,7 +431,8 @@
<?cs if:subcount(class.fields) ?>
<?cs # this next line must be exactly like this to be parsed by eclipse ?>
<!-- =========== FIELD SUMMARY =========== -->
-<table id="lfields" class="jd-sumtable"><tr><th colspan="12">Fields</th></tr>
+<table id="lfields" class="responsive properties">
+<tr><th colspan="2"><h3>Fields</h3></th></tr>
<?cs call:write_field_summary(class.fields, 1) ?>
</table>
<?cs /if ?>
@@ -413,25 +441,27 @@
<?cs if:inhfields ?>
<?cs # this next line must be exactly like this to be parsed by eclipse ?>
<!-- =========== FIELD SUMMARY =========== -->
-<table id="inhfields" class="jd-sumtable"><tr><th>
- <a href="#" class="toggle-all" onclick="return toggleAllInherited(this, null)">[Expand]</a>
- <div style="clear:left;">Inherited Fields</div></th></tr>
+<table id="inhfields" class="properties inhtable">
+<tr><th><h3>Inherited fields</h3></th></tr>
<?cs each:cl=class.inherited ?>
<?cs if:subcount(cl.fields) ?>
-<tr class="api apilevel-<?cs var:cl.since ?>" >
-<td colspan="12">
-<?cs call:expando_trigger("inherited-fields-"+cl.qualified, "closed") ?>From <?cs var:cl.kind ?>
-<?cs call:cond_link(cl.qualified, toroot, cl.link, cl.included) ?>
-<div id="inherited-fields-<?cs var:cl.qualified ?>">
- <div id="inherited-fields-<?cs var:cl.qualified ?>-list"
- class="jd-inheritedlinks">
+ <tr class="api apilevel-<?cs var:cl.since ?>" >
+ <td>
+ <?cs call:expando_trigger("inherited-fields-"+cl.qualified, "closed") ?>From
+ <?cs var:cl.kind ?>
+ <code>
+ <?cs call:cond_link(cl.qualified, toroot, cl.link, cl.included) ?>
+ </code>
+ <div id="inherited-fields-<?cs var:cl.qualified ?>">
+ <div id="inherited-fields-<?cs var:cl.qualified ?>-list"
+ class="jd-inheritedlinks">
+ </div>
+ <div id="inherited-fields-<?cs var:cl.qualified ?>-summary" style="display: none;">
+ <table class="jd-sumtable-expando responsive">
+ <?cs call:write_field_summary(cl.fields, cl.included) ?></table>
+ </div>
</div>
- <div id="inherited-fields-<?cs var:cl.qualified ?>-summary" style="display: none;">
- <table class="jd-sumtable-expando">
- <?cs call:write_field_summary(cl.fields, cl.included) ?></table>
- </div>
-</div>
-</td></tr>
+ </td></tr>
<?cs /if ?>
<?cs /each ?>
</table>
@@ -440,7 +470,8 @@
<?cs if:subcount(class.ctors.public) ?>
<?cs # this next line must be exactly like this to be parsed by eclipse ?>
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
-<table id="pubctors" class="jd-sumtable"><tr><th colspan="12">Public Constructors</th></tr>
+<table id="pubctors" class="responsive constructors">
+<tr><th colspan="2"><h3>Public constructors</h3></th></tr>
<?cs call:write_method_summary(class.ctors.public, 1) ?>
</table>
<?cs /if ?>
@@ -448,7 +479,8 @@
<?cs if:subcount(class.ctors.protected) ?>
<?cs # this next line must be exactly like this to be parsed by eclipse ?>
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
-<table id="proctors" class="jd-sumtable"><tr><th colspan="12">Protected Constructors</th></tr>
+<table id="proctors" class="responsive constructors">
+<tr><th colspan="2"><h3>Protected constructors</h3></th></tr>
<?cs call:write_method_summary(class.ctors.protected, 1) ?>
</table>
<?cs /if ?>
@@ -456,7 +488,8 @@
<?cs if:subcount(class.methods.public) ?>
<?cs # this next line must be exactly like this to be parsed by eclipse ?>
<!-- ========== METHOD SUMMARY =========== -->
-<table id="pubmethods" class="jd-sumtable"><tr><th colspan="12">Public Methods</th></tr>
+<table id="pubmethods" class="responsive methods">
+<tr><th colspan="2"><h3>Public methods</h3></th></tr>
<?cs call:write_method_summary(class.methods.public, 1) ?>
</table>
<?cs /if ?>
@@ -464,7 +497,8 @@
<?cs if:subcount(class.methods.protected) ?>
<?cs # this next line must be exactly like this to be parsed by eclipse ?>
<!-- ========== METHOD SUMMARY =========== -->
-<table id="promethods" class="jd-sumtable"><tr><th colspan="12">Protected Methods</th></tr>
+<table id="promethods" class="reponsive methods">
+<tr><th colspan="2"><h3>Protected methods</h3></th></tr>
<?cs call:write_method_summary(class.methods.protected, 1) ?>
</table>
<?cs /if ?>
@@ -473,28 +507,31 @@
<?cs if:inhmethods ?>
<?cs # this next line must be exactly like this to be parsed by eclipse ?>
<!-- ========== METHOD SUMMARY =========== -->
-<table id="inhmethods" class="jd-sumtable"><tr><th>
- <a href="#" class="toggle-all" onclick="return toggleAllInherited(this, null)">[Expand]</a>
- <div style="clear:left;">Inherited Methods</div></th></tr>
+<table id="inhmethods" class="methods inhtable">
+<tr><th><h3>Inherited methods</h3></th></tr>
<?cs each:cl=class.inherited ?>
<?cs if:subcount(cl.methods) ?>
<tr class="api apilevel-<?cs var:cl.since ?>" >
-<td colspan="12"><?cs call:expando_trigger("inherited-methods-"+cl.qualified, "closed") ?>
-From <?cs var:cl.kind ?>
-<?cs if:cl.included ?>
- <a href="<?cs var:toroot ?><?cs var:cl.link ?>"><?cs var:cl.qualified ?></a>
-<?cs elif:cl.federated ?>
- <a href="<?cs var:cl.link ?>"><?cs var:cl.qualified ?></a>
-<?cs else ?>
- <?cs var:cl.qualified ?>
-<?cs /if ?>
+<td colspan="2">
+<?cs call:expando_trigger("inherited-methods-"+cl.qualified, "closed") ?>From
+<?cs var:cl.kind ?>
+<code>
+ <?cs if:cl.included ?>
+ <a href="<?cs var:toroot ?><?cs var:cl.link ?>"><?cs var:cl.qualified ?></a>
+ <?cs elif:cl.federated ?>
+ <a href="<?cs var:cl.link ?>"><?cs var:cl.qualified ?></a>
+ <?cs else ?>
+ <?cs var:cl.qualified ?>
+ <?cs /if ?>
+</code>
<div id="inherited-methods-<?cs var:cl.qualified ?>">
<div id="inherited-methods-<?cs var:cl.qualified ?>-list"
class="jd-inheritedlinks">
</div>
<div id="inherited-methods-<?cs var:cl.qualified ?>-summary" style="display: none;">
- <table class="jd-sumtable-expando">
- <?cs call:write_method_summary(cl.methods, cl.included) ?></table>
+ <table class="jd-sumtable-expando responsive">
+ <?cs call:write_method_summary(cl.methods, cl.included) ?>
+ </table>
</div>
</div>
</td></tr>
@@ -503,111 +540,16 @@
</table>
<?cs /if ?>
<?cs /if ?>
-</div><!-- jd-descr (summary) -->
-
-<!-- Details -->
-
-<?cs def:write_field_details(fields) ?>
-<?cs each:field=fields ?>
-<?cs # this next line must be exactly like this to be parsed by eclipse ?>
-<?cs # the A tag in the next line must remain where it is, so that Eclipse can parse the docs ?>
-<A NAME="<?cs var:field.anchor ?>"></A>
-<?cs # The apilevel-N class MUST BE LAST in the sequence of class names ?>
-<div class="jd-details api apilevel-<?cs var:field.since ?>">
- <h4 class="jd-details-title">
- <span class="normal">
- <?cs var:field.scope ?>
- <?cs var:field.static ?>
- <?cs var:field.final ?>
- <?cs call:type_link(field.type) ?>
- </span>
- <?cs var:field.name ?>
- </h4>
- <div class="api-level">
- <?cs call:since_tags(field) ?>
- <?cs call:federated_refs(field) ?>
- </div>
- <div class="jd-details-descr">
- <?cs call:show_annotations_list(field) ?>
- <?cs call:description(field) ?>
- <?cs if:subcount(field.constantValue) ?>
- <div class="jd-tagdata">
- <span class="jd-tagtitle">Constant Value: </span>
- <span>
- <?cs if:field.constantValue.isString ?>
- <?cs var:field.constantValue.str ?>
- <?cs else ?>
- <?cs var:field.constantValue.dec ?>
- (<?cs var:field.constantValue.hex ?>)
- <?cs /if ?>
- </span>
- </div>
- <?cs /if ?>
- </div>
-</div>
-<?cs /each ?>
-<?cs /def ?>
-
-<?cs def:write_method_details(methods) ?>
-<?cs each:method=methods ?>
-<?cs # the A tag in the next line must remain where it is, so that Eclipse can parse the docs ?>
-<A NAME="<?cs var:method.anchor ?>"></A>
-<?cs # The apilevel-N class MUST BE LAST in the sequence of class names ?>
-<div class="jd-details api apilevel-<?cs var:method.since ?>">
- <h4 class="jd-details-title">
- <span class="normal">
- <?cs var:method.scope ?>
- <?cs var:method.abstract ?>
- <?cs var:method.default ?>
- <?cs var:method.static ?>
- <?cs var:method.final ?>
- <?cs call:type_link(method.returnType) ?>
- </span>
- <span class="sympad"><?cs var:method.name ?></span>
- <span class="normal">(<?cs call:parameter_list(method.params) ?>)</span>
- </h4>
- <div class="api-level">
- <div><?cs call:since_tags(method) ?></div>
- <?cs call:federated_refs(method) ?>
- </div>
- <div class="jd-details-descr">
- <?cs call:show_annotations_list(method) ?>
- <?cs call:description(method) ?>
- </div>
-</div>
-<?cs /each ?>
-<?cs /def ?>
-
-<?cs def:write_attr_details(attrs) ?>
-<?cs each:attr=attrs ?>
-<?cs # the A tag in the next line must remain where it is, so that Eclipse can parse the docs ?>
-<A NAME="<?cs var:attr.anchor ?>"></A>
-<div class="jd-details">
- <h4 class="jd-details-title"><?cs var:attr.name ?>
- </h4>
- <div class="jd-details-descr">
- <?cs call:show_annotations_list(attr) ?>
- <?cs call:description(attr) ?>
-
- <div class="jd-tagdata">
- <h5 class="jd-tagtitle">Related Methods</h5>
- <ul class="nolist">
- <?cs each:m=attr.methods ?>
- <li><a href="<?cs var:toroot ?><?cs var:m.href ?>"><?cs var:m.name ?></a></li>
- <?cs /each ?>
- </ul>
- </div>
- </div>
-</div>
-<?cs /each ?>
-<?cs /def ?>
-
-
+<?cs
+################
+# CLASS DETAILS
+################
+?>
<!-- XML Attributes -->
<?cs if:subcount(class.attrs) ?>
<?cs # this next line must be exactly like this to be parsed by eclipse ?>
<!-- ========= FIELD DETAIL ======== -->
-<h2>XML Attributes</h2>
+<h2 class="api-section">XML attributes</h2>
<?cs call:write_attr_details(class.attrs) ?>
<?cs /if ?>
@@ -615,7 +557,7 @@
<?cs if:subcount(class.enumConstants) ?>
<?cs # this next line must be exactly like this to be parsed by eclipse ?>
<!-- ========= ENUM CONSTANTS DETAIL ======== -->
-<h2>Enum Values</h2>
+<h2 class="api-section">Enum values</h2>
<?cs call:write_field_details(class.enumConstants) ?>
<?cs /if ?>
@@ -623,7 +565,7 @@
<?cs if:subcount(class.constants) ?>
<?cs # this next line must be exactly like this to be parsed by eclipse ?>
<!-- ========= ENUM CONSTANTS DETAIL ======== -->
-<h2>Constants</h2>
+<h2 class="api-section">Constants</h2>
<?cs call:write_field_details(class.constants) ?>
<?cs /if ?>
@@ -631,7 +573,7 @@
<?cs if:subcount(class.fields) ?>
<?cs # this next line must be exactly like this to be parsed by eclipse ?>
<!-- ========= FIELD DETAIL ======== -->
-<h2>Fields</h2>
+<h2 class="api-section">Fields</h2>
<?cs call:write_field_details(class.fields) ?>
<?cs /if ?>
@@ -639,7 +581,7 @@
<?cs if:subcount(class.ctors.public) ?>
<?cs # this next line must be exactly like this to be parsed by eclipse ?>
<!-- ========= CONSTRUCTOR DETAIL ======== -->
-<h2>Public Constructors</h2>
+<h2 class="api-section">Public constructors</h2>
<?cs call:write_method_details(class.ctors.public) ?>
<?cs /if ?>
@@ -647,7 +589,7 @@
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<!-- Protected ctors -->
<?cs if:subcount(class.ctors.protected) ?>
-<h2>Protected Constructors</h2>
+<h2 class="api-section">Protected constructors</h2>
<?cs call:write_method_details(class.ctors.protected) ?>
<?cs /if ?>
@@ -655,27 +597,24 @@
<!-- ========= METHOD DETAIL ======== -->
<!-- Public methdos -->
<?cs if:subcount(class.methods.public) ?>
-<h2>Public Methods</h2>
+<h2 class="api-section">Public methods</h2>
<?cs call:write_method_details(class.methods.public) ?>
<?cs /if ?>
<?cs # this next line must be exactly like this to be parsed by eclipse ?>
<!-- ========= METHOD DETAIL ======== -->
<?cs if:subcount(class.methods.protected) ?>
-<h2>Protected Methods</h2>
+<h2 class="api-section">Protected methods</h2>
<?cs call:write_method_details(class.methods.protected) ?>
<?cs /if ?>
<?cs # the next two lines must be exactly like this to be parsed by eclipse ?>
<!-- ========= END OF CLASS DATA ========= -->
-<A NAME="navbar_top"></A>
+</div><!-- end jd-content -->
+<?cs if:!devsite ?>
<?cs include:"footer.cs" ?>
-</div> <!-- jd-content -->
-
-</div><!-- end doc-content -->
-
<?cs include:"trailer.cs" ?>
-
+<?cs /if ?>
</body>
</html>
diff --git a/tools/droiddoc/templates-sdk-dev/classes.cs b/tools/droiddoc/templates-sdk-dev/classes.cs
index 405892d..2793db3 100644
--- a/tools/droiddoc/templates-sdk-dev/classes.cs
+++ b/tools/droiddoc/templates-sdk-dev/classes.cs
@@ -1,34 +1,27 @@
-<?cs include:"doctype.cs" ?>
+<?cs # THIS CREATES A LIST OF ALL PACKAGES AND NAMES IT packages.html ?>
<?cs include:"macros.cs" ?>
<?cs include:"macros_override.cs" ?>
+<?cs include:"doctype.cs" ?>
<html<?cs if:devsite ?> devsite<?cs /if ?>>
<?cs include:"head_tag.cs" ?>
-<body class="gc-documentation <?cs if:(reference.gms || reference.gcm) ?>google<?cs /if ?>
- <?cs if:(guide||develop||training||reference||tools||sdk) ?>develop<?cs
- if:reference ?> reference<?cs
- /if ?><?cs
- elif:design ?>design<?cs
- elif:distribute ?>distribute<?cs
- /if ?>" itemscope itemtype="http://schema.org/Article">
- <a name="top"></a>
+<?cs include:"body_tag.cs" ?>
<?cs include:"header.cs" ?>
-<div class="col-12" id="doc-col">
-
-<div id="jd-header">
<h1><?cs var:page.title ?></h1>
-</div>
+<p>These are the API classes. See all
+<a href="packages.html">API packages</a>.</p>
-<div id="jd-content">
-<p>These are the Android API classes. See all <a href="packages.html">API packages</a>.</p>
-<div class="jd-letterlist"><?cs each:letter=docs.classes ?>
- <a href="#letter_<?cs name:letter ?>"><?cs name:letter ?></a> <?cs /each?>
+<div class="jd-letterlist"><?cs
+ each:letter=docs.classes ?>
+ <a href="#letter_<?cs name:letter ?>"><?cs
+ name:letter ?></a> <?cs
+ /each?>
</div>
<?cs each:letter=docs.classes ?>
<?cs set:count = #1 ?>
<h2 id="letter_<?cs name:letter ?>"><?cs name:letter ?></h2>
-<table class="jd-sumtable">
+<table>
<?cs set:cur_row = #0 ?>
<?cs each:cl = letter ?>
<tr class="<?cs if:count % #2 ?>alt-color<?cs /if ?> api apilevel-<?cs var:cl.since ?>" >
@@ -43,11 +36,9 @@
</table>
<?cs /each ?>
+<?cs if:!devsite ?>
<?cs include:"footer.cs" ?>
-</div><!-- end jd-content -->
-</div><!-- end doc-content -->
-
<?cs include:"trailer.cs" ?>
-
+<?cs /if ?>
</body>
-</html>
\ No newline at end of file
+</html>
diff --git a/tools/droiddoc/templates-sdk-dev/components/masthead.cs b/tools/droiddoc/templates-sdk-dev/components/masthead.cs
index d48ea29..b105b52 100644
--- a/tools/droiddoc/templates-sdk-dev/components/masthead.cs
+++ b/tools/droiddoc/templates-sdk-dev/components/masthead.cs
@@ -1,374 +1,294 @@
<?cs def:custom_masthead() ?>
-<?cs if:preview ?>
- <?cs call:preview_masthead() ?>
-<?cs else ?>
-<a name="top"></a>
-
-<!-- dialog to prompt lang pref change when loaded from hardcoded URL
-<div id="langMessage" style="display:none">
- <div>
- <div class="lang en">
- <p>You requested a page in English, would you like to proceed with this language setting?</p>
- </div>
- <div class="lang es">
- <p>You requested a page in Spanish (Español), would you like to proceed with this language setting?</p>
- </div>
- <div class="lang ja">
- <p>You requested a page in Japanese (日本語), would you like to proceed with this language setting?</p>
- </div>
- <div class="lang ko">
- <p>You requested a page in Korean (한국어), would you like to proceed with this language setting?</p>
- </div>
- <div class="lang ru">
- <p>You requested a page in Russian (Русский), would you like to proceed with this language setting?</p>
- </div>
- <div class="lang zh-cn">
- <p>You requested a page in Simplified Chinese (简体中文), would you like to proceed with this language setting?</p>
- </div>
- <div class="lang zh-tw">
- <p>You requested a page in Traditional Chinese (繁體中文), would you like to proceed with this language setting?</p>
- </div>
- <a href="#" class="button yes" onclick="return false;">
- <span class="lang en">Yes</span>
- <span class="lang es">Sí</span>
- <span class="lang ja">Yes</span>
- <span class="lang ko">Yes</span>
- <span class="lang ru">Yes</span>
- <span class="lang zh-cn">是的</span>
- <span class="lang zh-tw">没有</span>
- </a>
- <a href="#" class="button" onclick="$('#langMessage').hide();return false;">
- <span class="lang en">No</span>
- <span class="lang es">No</span>
- <span class="lang ja">No</span>
- <span class="lang ko">No</span>
- <span class="lang ru">No</span>
- <span class="lang zh-cn">没有</span>
- <span class="lang zh-tw">没有</span>
- </a>
- </div>
-</div> -->
-
-<?cs if:!devsite ?><?cs # leave out the global header for devsite; it is in devsite template ?>
+ <a name="top"></a>
<!-- Header -->
<div id="header-wrapper">
- <div id="header"><?cs call:butter_bar() ?>
- <div class="wrap" id="header-wrap">
- <div class="col-3 logo">
- <a href="<?cs var:toroot ?>index.html">
- <img src="<?cs var:toroot ?>assets/images/dac_logo.png"
- srcset="<?cs var:toroot ?>assets/images/dac_logo@2x.png 2x"
- width="123" height="25" alt="Android Developers" />
- </a>
- <div class="btn-quicknav" id="btn-quicknav">
- <a href="#" class="arrow-inactive">Quicknav</a>
- <a href="#" class="arrow-active">Quicknav</a>
- </div>
- </div>
- <ul class="nav-x col-9">
- <li class="design">
- <a href="<?cs var:toroot ?>design/index.html"
- zh-tw-lang="設計"
- zh-cn-lang="设计"
- ru-lang="Проектирование"
- ko-lang="디자인"
- ja-lang="設計"
- es-lang="Diseñar"
- >Design</a></li>
- <li class="develop"><a href="<?cs var:toroot ?>develop/index.html"
- zh-tw-lang="開發"
- zh-cn-lang="开发"
- ru-lang="Разработка"
- ko-lang="개발"
- ja-lang="開発"
- es-lang="Desarrollar"
- >Develop</a></li>
- <li class="distribute last"><a href="<?cs var:toroot ?>distribute/<?cs
- if:android.whichdoc == "offline" ?>googleplay/<?cs /if ?>index.html"
- zh-tw-lang="發佈"
- zh-cn-lang="分发"
- ru-lang="Распространение"
- ko-lang="배포"
- ja-lang="配布"
- es-lang="Distribuir"
- >Distribute</a></li>
- </ul>
+ <div class="dac-header <?cs if:ndk ?>dac-ndk<?cs /if ?>" id="header">
+ <div class="dac-header-inner">
+ <a class="dac-nav-toggle" data-dac-toggle-nav href="javascript:;" title="Open navigation">
+ <span class="dac-nav-hamburger">
+ <span class="dac-nav-hamburger-top"></span>
+ <span class="dac-nav-hamburger-mid"></span>
+ <span class="dac-nav-hamburger-bot"></span>
+ </span>
+ </a>
+ <?cs if:ndk ?><a class="dac-header-logo" style="width:144px;" href="<?cs var:toroot
+ ?>ndk/index.html">
+ <img class="dac-header-logo-image" src="<?cs var:toroot ?>assets/images/android_logo.png"
+ srcset="<?cs var:toroot ?>assets/images/android_logo@2x.png 2x"
+ width="32" height="36" alt="Android" /> NDK
+ </a><?cs else ?><a class="dac-header-logo" href="<?cs var:toroot ?>index.html">
+ <img class="dac-header-logo-image" src="<?cs var:toroot ?>assets/images/android_logo.png"
+ srcset="<?cs var:toroot ?>assets/images/android_logo@2x.png 2x"
+ width="32" height="36" alt="Android" /> Developers
+ </a><?cs /if ?>
+ <?cs if:ndk
+ ?><ul class="dac-header-tabs">
+ <li>
+ <a href="<?cs var:toroot ?>ndk/guides/index.html" class="dac-header-tab"
+ zh-tw-lang="API 指南"
+ zh-cn-lang="API 指南"
+ ru-lang="Руководства по API"
+ ko-lang="API 가이드"
+ ja-lang="API ガイド"
+ es-lang="Guías de la API">Guides</a>
+ </li>
+ <li>
+ <a href="<?cs var:toroot ?>ndk/reference/index.html" class="dac-header-tab"
+ zh-tw-lang="參考資源"
+ zh-cn-lang="参考"
+ ru-lang="Справочник"
+ ko-lang="참조문서"
+ ja-lang="リファレンス"
+ es-lang="Referencia">Reference</a>
+ </li>
+ <li>
+ <a href="<?cs var:toroot ?>ndk/samples/index.html" class="dac-header-tab"
+ >Samples</a>
+ </li>
+ <li>
+ <a href="<?cs var:toroot ?>ndk/downloads/index.html" class="dac-header-tab"
+ >Downloads</a>
+ </li>
+ </ul><?cs else
+ ?><ul class="dac-header-tabs">
+ <li>
+ <a class="dac-header-tab" href="<?cs var:toroot ?>design/index.html"
+ zh-tw-lang="設計"
+ zh-cn-lang="设计"
+ ru-lang="Проектирование"
+ ko-lang="디자인"
+ ja-lang="設計"
+ es-lang="Diseñar">Design</a>
+ </li>
+ <li>
+ <a class="dac-header-tab" href="<?cs var:toroot ?>develop/index.html"
+ zh-tw-lang="開發"
+ zh-cn-lang="开发"
+ ru-lang="Разработка"
+ ko-lang="개발"
+ ja-lang="開発"
+ es-lang="Desarrollar">Develop</a>
+ </li>
+ <li>
+ <a class="dac-header-tab" href="<?cs var:toroot ?>distribute/index.html"
+ zh-tw-lang="發佈"
+ zh-cn-lang="分发"
+ ru-lang="Распространение"
+ ko-lang="배포"
+ ja-lang="配布"
+ es-lang="Distribuir">Distribute</a>
+ </li>
+ </ul><?cs
+ /if ?>
+
+ <?cs if:ndk ?><a class="dac-header-console-btn" href="http://developer.android.com">
+ Back to Android Developers
+ </a><?cs else ?><a class="dac-header-console-btn" href="https://play.google.com/apps/publish/">
+ <span class="dac-sprite dac-google-play"></span>
+ <span class="dac-visible-desktop-inline">Developer</span>
+ Console
+ </a><?cs /if ?>
<?cs # ADD SEARCH AND MENU ?>
+ <?cs if:!ndk ?>
<?cs call:header_search_widget() ?>
-
-
- <!-- Expanded quicknav -->
- <div id="quicknav" class="col-13">
- <ul>
- <li class="about">
- <ul>
- <li><a href="<?cs var:toroot ?>about/index.html">About</a></li>
- <li><a href="<?cs var:toroot ?>wear/index.html">Wear</a></li>
- <li><a href="<?cs var:toroot ?>tv/index.html">TV</a></li>
- <li><a href="<?cs var:toroot ?>auto/index.html">Auto</a></li>
- </ul>
- </li>
- <li class="design">
- <ul>
- <li><a href="<?cs var:toroot ?>design/index.html">Get Started</a></li>
- <li><a href="<?cs var:toroot ?>design/devices.html">Devices</a></li>
- <li><a href="<?cs var:toroot ?>design/style/index.html">Style</a></li>
- <li><a href="<?cs var:toroot ?>design/patterns/index.html">Patterns</a></li>
- <li><a href="<?cs var:toroot ?>design/building-blocks/index.html">Building Blocks</a></li>
- <li><a href="<?cs var:toroot ?>design/downloads/index.html">Downloads</a></li>
- <li><a href="<?cs var:toroot ?>design/videos/index.html">Videos</a></li>
- </ul>
- </li>
- <li class="develop">
- <ul>
- <li><a href="<?cs var:toroot ?>training/index.html"
- zh-tw-lang="訓練課程"
- zh-cn-lang="培训"
- ru-lang="Курсы"
- ko-lang="교육"
- ja-lang="トレーニング"
- es-lang="Capacitación"
- >Training</a></li>
- <li><a href="<?cs var:toroot ?>guide/index.html"
- zh-tw-lang="API 指南"
- zh-cn-lang="API 指南"
- ru-lang="Руководства по API"
- ko-lang="API 가이드"
- ja-lang="API ガイド"
- es-lang="Guías de la API"
- >API Guides</a></li>
- <li><a href="<?cs var:toroot ?>reference/packages.html"
- zh-tw-lang="參考資源"
- zh-cn-lang="参考"
- ru-lang="Справочник"
- ko-lang="참조문서"
- ja-lang="リファレンス"
- es-lang="Referencia"
- >Reference</a></li>
- <li><a href="<?cs var:toroot ?>sdk/index.html"
- zh-tw-lang="相關工具"
- zh-cn-lang="工具"
- ru-lang="Инструменты"
- ko-lang="도구"
- ja-lang="ツール"
- es-lang="Herramientas"
- >Tools</a>
- </li>
- <li><a href="<?cs var:toroot ?>google/index.html">Google Services</a>
- </li>
- <?cs if:android.hasSamples ?>
- <li><a href="<?cs var:toroot ?>samples/index.html">Samples</a>
- </li>
- <?cs /if ?>
- </ul>
- </li>
- <li class="distribute last">
- <ul>
- <li><a href="<?cs var:toroot ?>distribute/googleplay/index.html">Google Play</a></li>
- <li><a href="<?cs var:toroot ?>distribute/essentials/index.html">Essentials</a></li>
- <li><a href="<?cs var:toroot ?>distribute/users/index.html">Get Users</a></li>
- <li><a href="<?cs var:toroot ?>distribute/engage/index.html">Engage & Retain</a></li>
- <li><a href="<?cs var:toroot ?>distribute/monetize/index.html">Monetize</a></li>
- <li><a href="<?cs var:toroot ?>distribute/analyze/index.html">Analyze</a></li>
- <li><a href="<?cs var:toroot ?>distribute/tools/index.html">Tools & Reference</a></li>
- <li><a href="<?cs var:toroot ?>distribute/stories/index.html">Developer Stories</a></li>
- </ul>
- </li>
- </ul>
- </div><!-- /Expanded quicknav -->
+ <?cs /if ?>
</div><!-- end header-wrap.wrap -->
</div><!-- end header -->
-
- <?cs if:about || wear || tv || auto ?>
- <!-- Secondary x-nav -->
- <div id="nav-x">
- <div class="wrap">
- <ul class="nav-x col-9 about" style="width:100%">
- <li class="about"><a href="<?cs var:toroot ?>about/index.html"
- >About</a></li>
- <li class="wear"><a href="<?cs var:toroot ?>wear/index.html"
- >Wear</a></li>
- <li class="tv"><a href="<?cs var:toroot ?>tv/index.html"
- >TV</a></li>
- <li class="auto"><a href="<?cs var:toroot ?>auto/index.html"
- >Auto</a></li>
- </ul>
- </div>
- </div>
- <!-- /Sendondary x-nav ABOUT -->
-
-
-
- <?cs elif:training || guide || reference || tools || develop || google || samples ?>
- <!-- Secondary x-nav -->
- <div id="nav-x">
- <div class="wrap" style="position:relative;z-index:1">
-
- <?cs if:reference ?>
-
- <?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="訓練課程"
- zh-cn-lang="培训"
- ru-lang="Курсы"
- ko-lang="교육"
- ja-lang="トレーニング"
- es-lang="Capacitación"
- >Training</a></li>
- <li class="guide"><a href="<?cs var:toroot ?>guide/index.html"
- zh-tw-lang="API 指南"
- zh-cn-lang="API 指南"
- ru-lang="Руководства по API"
- ko-lang="API 가이드"
- ja-lang="API ガイド"
- es-lang="Guías de la API"
- >API Guides</a></li>
- <li class="reference"><a href="<?cs var:toroot ?>reference/packages.html"
- zh-tw-lang="參考資源"
- zh-cn-lang="参考"
- ru-lang="Справочник"
- ko-lang="참조문서"
- ja-lang="リファレンス"
- es-lang="Referencia"
- >Reference</a></li>
- <li class="tools"><a href="<?cs var:toroot ?>sdk/index.html"
- zh-tw-lang="相關工具"
- zh-cn-lang="工具"
- ru-lang="Инструменты"
- ko-lang="도구"
- ja-lang="ツール"
- es-lang="Herramientas"
- >Tools</a></li>
- <li class="google"><a href="<?cs var:toroot ?>google/index.html"
- >Google Services</a>
- </li>
- <?cs if:android.hasSamples ?>
- <li class="samples"><a href="<?cs var:toroot ?>samples/index.html"
- >Samples</a>
- </li>
- <?cs /if ?>
- </ul>
- </div>
- </div>
- <!-- /Sendondary x-nav DEVELOP -->
-
- <?cs elif:distribute || googleplay || essentials || users || engage || monetize || analyze || disttools || stories ?>
- <!-- Secondary distribute x-nav -->
- <div id="nav-x">
- <div class="wrap">
- <ul class="nav-x distribute">
- <li class="googleplay"><a href="<?cs var:toroot ?>distribute/googleplay/index.html"
- >Google Play</a></li>
- <li class="essentials"><a href="<?cs var:toroot ?>distribute/essentials/index.html"
- >Essentials</a></li>
- <li class="users"><a href="<?cs var:toroot ?>distribute/users/index.html"
- >Get Users</a></li>
- <li class="engage"><a href="<?cs var:toroot ?>distribute/engage/index.html"
- >Engage & Retain</a></li>
- <li class="monetize"><a href="<?cs var:toroot ?>distribute/monetize/index.html"
- >Monetize</a>
- </li>
- <li class="analyze"><a href="<?cs var:toroot ?>distribute/analyze/index.html"
- >Analyze</a>
- </li>
- <li class="disttools"><a href="<?cs var:toroot ?>distribute/tools/index.html"
- >Tools</a>
- </li>
- <li class="stories"><a href="<?cs var:toroot ?>distribute/stories/index.html"
- >Stories</a>
- </li>
- </ul>
- <a href="https://play.google.com/apps/publish/" class="developer-console-btn">Developer Console</a>
- </div> <!-- /Secondary distribute x-nav -->
- </div>
- <!-- /Sendondary x-nav DISTRIBUTE -->
- <?cs /if ?>
-
- <div id="searchResults" class="wrap" style="display:none;">
- <h2 id="searchTitle">Results</h2>
- <div id="leftSearchControl" class="search-control">Loading...</div>
- </div>
</div> <!--end header-wrapper -->
- <div id="sticky-header">
- <div>
- <a class="logo" href="#top"></a>
- <a class="top" href="#top"></a>
- <ul class="breadcrumb">
- <?cs # More <li> elements added here with javascript ?>
- <?cs if:!section.landing ?><li class="current"><?cs var:page.title ?></li><?cs
- /if ?>
+ <?cs if:ndk ?>
+ <!-- NDK Navigation-->
+ <nav class="dac-nav">
+ <div class="dac-nav-dimmer" data-dac-toggle-nav></div>
+
+ <div class="dac-nav-sidebar" data-swap data-dynamic="false" data-transition-speed="300" data-dac-nav>
+ <div data-swap-container>
+ <?cs call:custom_left_nav() ?>
+ <ul id="dac-main-navigation" class="dac-nav-list dac-swap-section dac-left dac-no-anim">
+ <li class="dac-nav-item guides">
+ <a class="dac-nav-link" href="<?cs var:toroot ?>ndk/guides/index.html"
+ zh-tw-lang="API 指南"
+ zh-cn-lang="API 指南"
+ ru-lang="Руководства по API"
+ ko-lang="API 가이드"
+ ja-lang="API ガイド"
+ es-lang="Guías de la API">Guides</a>
+ </li>
+ <li class="dac-nav-item reference">
+ <a class="dac-nav-link" href="<?cs var:toroot ?>ndk/reference/index.html"
+ zh-tw-lang="參考資源"
+ zh-cn-lang="参考"
+ ru-lang="Справочник"
+ ko-lang="참조문서"
+ ja-lang="リファレンス"
+ es-lang="Referencia">Reference</a>
+ </li>
+ <li class="dac-nav-item samples">
+ <a class="dac-nav-link" href="<?cs var:toroot ?>ndk/samples/index.html"
+ >Samples</a>
+ </li>
+ <li class="dac-nav-item downloads">
+ <a class="dac-nav-link" href="<?cs var:toroot ?>ndk/downloads/index.html"
+ >Downloads</a>
+ </li>
</ul>
</div>
- </div>
-
-<?cs /if ?><?cs # end if/else !devsite ?>
-<?cs /if ?><?cs # end if/else preview ?><?cs
-/def ?>
-
-<?cs def:preview_masthead() ?>
-<a name="top"></a>
+ </div>
+ </nav>
+ <!-- end NDK navigation-->
-<!-- Header -->
-<div id="header-wrapper">
- <div id="header"><?cs call:butter_bar() ?>
- <div class="wrap" id="header-wrap">
- <div class="col_3 logo landing-logo" style="width:240px">
- <a href="<?cs var:toroot ?>preview/index.html">
- <img src="<?cs var:toroot ?>assets/images/android.png" height="25" alt="Android"
- style="margin:-3px 0 0" />
- </a>
- </div>
- <div class="col-8" style="margin:0"><h1 style="margin: 4px 0 0 0px;padding:0;line-height:16px;
-color:#666;font-weight:100;font-size:27px;">M Developer Preview</h1></div>
- <?cs # ADD SEARCH AND MENU ?>
- <?cs call:header_search_widget() ?>
+ <?cs else ?>
+ <!-- Navigation-->
+ <nav class="dac-nav">
+ <div class="dac-nav-dimmer" data-dac-toggle-nav></div>
- </div><!-- end header-wrap -->
- </div><!-- /Header -->
-
-
- <div id="searchResults" class="wrap" style="display:none;">
- <h2 id="searchTitle">Results</h2>
- <div id="leftSearchControl" class="search-control">Loading...</div>
- </div>
-</div> <!--end header-wrapper -->
-
-<div id="sticky-header">
- <div>
- <a class="logo" href="#top"></a>
- <a class="top" href="#top"></a>
- <ul class="breadcrumb">
- <?cs # More <li> elements added here with javascript ?>
- <?cs if:!section.landing ?><li class="current"><?cs var:page.title ?></li><?cs
- /if ?>
- </ul>
- </div>
-</div>
-
- <?cs
-/def ?>
-
-
-<?cs # (UN)COMMENT THE INSIDE OF THIS METHOD TO TOGGLE VISIBILITY ?>
-<?cs def:butter_bar() ?>
-
-<?cs # HIDE THE BUTTER BAR
-
- <div style="height:20px"><!-- spacer to bump header down --></div>
- <div id="butterbar-wrapper">
- <div id="butterbar">
- <a href="http://googleblog.blogspot.com/" id="butterbar-message">
- The Android {version_number} SDK will be available on {Month} {Day}!
- </a>
+ <div class="dac-nav-sidebar" data-swap data-dynamic="false" data-transition-speed="300" data-dac-nav>
+ <div data-swap-container>
+ <?cs call:custom_left_nav() ?>
+ <ul id="dac-main-navigation" class="dac-nav-list dac-swap-section dac-left dac-no-anim">
+ <li class="dac-nav-item home">
+ <a class="dac-nav-link" href="<?cs var:toroot ?>index.html">Home</a>
+ <i class="dac-sprite dac-expand-more-black dac-nav-sub-slider"></i>
+ <ul class="dac-nav-secondary about">
+ <li class="dac-nav-item versions">
+ <a class="dac-nav-link" href="<?cs var:toroot ?>about/versions/marshmallow/index.html">Android</a>
+ </li>
+ <li class="dac-nav-item wear">
+ <a class="dac-nav-link" href="<?cs var:toroot ?>wear/index.html">Wear</a>
+ </li>
+ <li class="dac-nav-item tv">
+ <a class="dac-nav-link" href="<?cs var:toroot ?>tv/index.html">TV</a>
+ </li>
+ <li class="dac-nav-item auto">
+ <a class="dac-nav-link" href="<?cs var:toroot ?>auto/index.html">Auto</a>
+ </li>
+ </ul>
+ </li>
+ <li class="dac-nav-item design">
+ <a class="dac-nav-link" href="<?cs var:toroot ?>design/index.html"
+ zh-tw-lang="設計"
+ zh-cn-lang="设计"
+ ru-lang="Проектирование"
+ ko-lang="디자인"
+ ja-lang="設計"
+ es-lang="Diseñar">Design</a>
+ </li>
+ <li class="dac-nav-item develop">
+ <a class="dac-nav-link" href="<?cs var:toroot ?>develop/index.html"
+ zh-tw-lang="開發"
+ zh-cn-lang="开发"
+ ru-lang="Разработка"
+ ko-lang="개발"
+ ja-lang="開発"
+ es-lang="Desarrollar">Develop</a>
+ <i class="dac-sprite dac-expand-more-black dac-nav-sub-slider"></i>
+ <ul class="dac-nav-secondary develop">
+ <li class="dac-nav-item training">
+ <a class="dac-nav-link" href="<?cs var:toroot ?>training/index.html"
+ zh-tw-lang="訓練課程"
+ zh-cn-lang="培训"
+ ru-lang="Курсы"
+ ko-lang="교육"
+ ja-lang="トレーニング"
+ es-lang="Capacitación">Training</a>
+ </li>
+ <li class="dac-nav-item guide">
+ <a class="dac-nav-link" href="<?cs var:toroot ?>guide/index.html"
+ zh-tw-lang="API 指南"
+ zh-cn-lang="API 指南"
+ ru-lang="Руководства по API"
+ ko-lang="API 가이드"
+ ja-lang="API ガイド"
+ es-lang="Guías de la API">API Guides</a>
+ </li>
+ <li class="dac-nav-item reference">
+ <a class="dac-nav-link" href="<?cs var:toroot ?>reference/packages.html"
+ zh-tw-lang="參考資源"
+ zh-cn-lang="参考"
+ ru-lang="Справочник"
+ ko-lang="참조문서"
+ ja-lang="リファレンス"
+ es-lang="Referencia">Reference</a>
+ </li>
+ <li class="dac-nav-item tools">
+ <a class="dac-nav-link" href="<?cs var:toroot ?>sdk/index.html"
+ zh-tw-lang="相關工具"
+ zh-cn-lang="工具"
+ ru-lang="Инструменты"
+ ko-lang="도구"
+ ja-lang="ツール"
+ es-lang="Herramientas">Tools</a></li>
+ <li class="dac-nav-item google">
+ <a class="dac-nav-link" href="<?cs var:toroot ?>google/index.html">Google Services</a>
+ </li>
+ <?cs if:android.hasSamples ?>
+ <li class="dac-nav-item samples">
+ <a class="dac-nav-link" href="<?cs var:toroot ?>samples/index.html">Samples</a>
+ </li>
+ <?cs /if ?>
+ </ul>
+ </li>
+ <li class="dac-nav-item distribute">
+ <a class="dac-nav-link" href="<?cs var:toroot ?>distribute/<?cs if:android.whichdoc == 'offline' ?>googleplay/<?cs /if ?>index.html"
+ zh-tw-lang="發佈"
+ zh-cn-lang="分发"
+ ru-lang="Распространение"
+ ko-lang="배포"
+ ja-lang="配布"
+ es-lang="Distribuir">Distribute</a>
+ <i class="dac-sprite dac-expand-more-black dac-nav-sub-slider"></i>
+ <ul class="dac-nav-secondary distribute">
+ <li class="dac-nav-item googleplay">
+ <a class="dac-nav-link" href="<?cs var:toroot ?>distribute/googleplay/index.html">Google Play</a></li>
+ <li class="dac-nav-item essentials">
+ <a class="dac-nav-link" href="<?cs var:toroot ?>distribute/essentials/index.html">Essentials</a></li>
+ <li class="dac-nav-item users">
+ <a class="dac-nav-link" href="<?cs var:toroot ?>distribute/users/index.html">Get Users</a></li>
+ <li class="dac-nav-item engage">
+ <a class="dac-nav-link" href="<?cs var:toroot ?>distribute/engage/index.html">Engage & Retain</a></li>
+ <li class="dac-nav-item monetize">
+ <a class="dac-nav-link" href="<?cs var:toroot ?>distribute/monetize/index.html">Earn</a>
+ </li>
+ <li class="dac-nav-item analyze">
+ <a class="dac-nav-link" href="<?cs var:toroot ?>distribute/analyze/index.html">Analyze</a>
+ </li>
+ <li class="dac-nav-item stories">
+ <a class="dac-nav-link" href="<?cs var:toroot ?>distribute/stories/index.html">Stories</a>
+ </li>
+ </ul>
+ </li>
+ <li class="dac-nav-item preview">
+ <a class="dac-nav-link" href="<?cs var:toroot ?>preview/index.html">Preview</a>
+ </li>
+ </ul>
</div>
</div>
+ </nav>
+ <!-- end navigation-->
+ <?cs /if ?>
+
+<!-- Nav Setup -->
+<script>$('[data-dac-nav]').dacNav();</script>
+
+<?cs
+/def ?><?cs # end custom_masthead() ?>
+
+
+<?cs def:toast() ?>
+
+ <?cs # (UN)COMMENT TO TOGGLE VISIBILITY
+
+ <div class="dac-toast-group">
+ <div class="dac-toast" data-toast>
+ <div class="dac-toast-wrap">
+ This is a demo notification <a href="#">Learn more</a>.
+ </div>
+ </div>
+ </div>
?>
diff --git a/tools/droiddoc/templates-sdk-dev/customizations.cs b/tools/droiddoc/templates-sdk-dev/customizations.cs
index c8c88cc..d5a6960 100644
--- a/tools/droiddoc/templates-sdk-dev/customizations.cs
+++ b/tools/droiddoc/templates-sdk-dev/customizations.cs
@@ -1,337 +1,33 @@
-<?cs
-def:fullpage() ?>
+<?cs def:body_content_wrap_start() ?>
+ <div class="wrap clearfix" id="body-content">
+<?cs /def ?>
+
+<?cs def:fullpage() ?>
<div id="body-content">
-<?cs /def ?>
-<?cs
-def:sdk_nav() ?>
- <div class="wrap clearfix" id="body-content">
- <div class="col-4" id="side-nav" itemscope itemtype="http://schema.org/SiteNavigationElement">
- <div id="devdoc-nav" class="scroll-pane">
-
-<?cs
- include:"../../../../frameworks/base/docs/html/sdk/sdk_toc.cs" ?>
-
-
- </div>
- </div> <!-- end side-nav -->
-<?cs /def ?><?cs
-
-def:no_nav() ?>
- <div class="wrap clearfix" id="body-content">
-<?cs /def ?><?cs
-
-def:tools_nav() ?>
- <div class="wrap clearfix" id="body-content">
- <div class="col-3" id="side-nav" itemscope itemtype="http://schema.org/SiteNavigationElement">
- <div id="devdoc-nav" class="scroll-pane">
-<?cs
- include:"../../../../frameworks/base/docs/html/tools/tools_toc.cs" ?>
-
-
- </div>
- </div> <!-- end side-nav -->
- <script>
- $(document).ready(function() {
- scrollIntoView("devdoc-nav");
- });
- </script>
-<?cs /def ?>
-<?cs
-def:training_nav() ?>
- <div class="wrap clearfix" id="body-content">
- <div class="col-4" id="side-nav" itemscope itemtype="http://schema.org/SiteNavigationElement">
- <div id="devdoc-nav" class="scroll-pane">
-
-
-<?cs
- include:"../../../../frameworks/base/docs/html/training/training_toc.cs" ?>
-
-
- </div>
- </div> <!-- end side-nav -->
- <script>
- $(document).ready(function() {
- scrollIntoView("devdoc-nav");
- });
- </script>
-<?cs /def ?><?cs
-
-def:googleplay_nav() ?>
- <div class="wrap clearfix" id="body-content">
- <div class="col-3" id="side-nav" itemscope itemtype="http://schema.org/SiteNavigationElement">
- <div id="devdoc-nav" class="scroll-pane">
-<?cs include:"../../../../frameworks/base/docs/html/distribute/googleplay/googleplay_toc.cs" ?>
- </div>
- </div> <!-- end side-nav -->
- <script>
- $(document).ready(function() {
- scrollIntoView("devdoc-nav");
- });
- </script>
-<?cs /def ?><?cs
-
-def:essentials_nav() ?>
- <div class="wrap clearfix" id="body-content">
- <div class="col-3" id="side-nav" itemscope itemtype="http://schema.org/SiteNavigationElement">
- <div id="devdoc-nav" class="scroll-pane">
-<?cs include:"../../../../frameworks/base/docs/html/distribute/essentials/essentials_toc.cs" ?>
- </div>
- </div> <!-- end side-nav -->
- <script>
- $(document).ready(function() {
- scrollIntoView("devdoc-nav");
- });
- </script>
-<?cs /def ?><?cs
-
-def:users_nav() ?>
- <div class="wrap clearfix" id="body-content">
- <div class="col-3" id="side-nav" itemscope itemtype="http://schema.org/SiteNavigationElement">
- <div id="devdoc-nav" class="scroll-pane">
-<?cs include:"../../../../frameworks/base/docs/html/distribute/users/users_toc.cs" ?>
- </div>
- </div> <!-- end side-nav -->
- <script>
- $(document).ready(function() {
- scrollIntoView("devdoc-nav");
- });
- </script>
-<?cs /def ?><?cs
-
-def:engage_nav() ?>
- <div class="wrap clearfix" id="body-content">
- <div class="col-3" id="side-nav" itemscope itemtype="http://schema.org/SiteNavigationElement">
- <div id="devdoc-nav" class="scroll-pane">
-<?cs include:"../../../../frameworks/base/docs/html/distribute/engage/engage_toc.cs" ?>
- </div>
- </div> <!-- end side-nav -->
- <script>
- $(document).ready(function() {
- scrollIntoView("devdoc-nav");
- });
- </script>
-<?cs /def ?><?cs
-
-def:analyze_nav() ?>
- <div class="wrap clearfix" id="body-content">
- <div class="col-3" id="side-nav" itemscope itemtype="http://schema.org/SiteNavigationElement">
- <div id="devdoc-nav" class="scroll-pane">
-<?cs include:"../../../../frameworks/base/docs/html/distribute/analyze/analyze_toc.cs" ?>
- </div>
- </div> <!-- end side-nav -->
- <script>
- $(document).ready(function() {
- scrollIntoView("devdoc-nav");
- });
- </script>
-<?cs /def ?><?cs
-
-def:monetize_nav() ?>
- <div class="wrap clearfix" id="body-content">
- <div class="col-3" id="side-nav" itemscope itemtype="http://schema.org/SiteNavigationElement">
- <div id="devdoc-nav" class="scroll-pane">
-<?cs include:"../../../../frameworks/base/docs/html/distribute/monetize/monetize_toc.cs" ?>
- </div>
- </div> <!-- end side-nav -->
- <script>
- $(document).ready(function() {
- scrollIntoView("devdoc-nav");
- });
- </script>
-<?cs /def ?><?cs
-
-def:disttools_nav() ?>
- <div class="wrap clearfix" id="body-content">
- <div class="col-3" id="side-nav" itemscope itemtype="http://schema.org/SiteNavigationElement">
- <div id="devdoc-nav" class="scroll-pane">
-<?cs include:"../../../../frameworks/base/docs/html/distribute/tools/disttools_toc.cs" ?>
- </div>
- </div> <!-- end side-nav -->
- <script>
- $(document).ready(function() {
- scrollIntoView("devdoc-nav");
- });
- </script>
-<?cs /def ?><?cs
-
-def:stories_nav() ?>
- <div class="wrap clearfix" id="body-content">
- <div class="col-3" id="side-nav" itemscope itemtype="http://schema.org/SiteNavigationElement">
- <div id="devdoc-nav" class="scroll-pane">
-<?cs include:"../../../../frameworks/base/docs/html/distribute/stories/stories_toc.cs" ?>
- </div>
- </div> <!-- end side-nav -->
- <script>
- $(document).ready(function() {
- scrollIntoView("devdoc-nav");
- });
- </script>
-<?cs /def ?><?cs
-
-def:guide_nav() ?>
- <div class="wrap clearfix" id="body-content">
- <div class="col-4" id="side-nav" itemscope itemtype="http://schema.org/SiteNavigationElement">
- <div id="devdoc-nav" class="scroll-pane">
-
-<?cs
- include:"../../../../frameworks/base/docs/html/guide/guide_toc.cs" ?>
-
-
- </div>
- </div> <!-- end side-nav -->
- <script>
- $(document).ready(function() {
- scrollIntoView("devdoc-nav");
- });
- </script>
-<?cs /def ?>
-<?cs
-def:design_nav() ?>
- <div class="wrap clearfix" id="body-content">
- <div class="col-3" id="side-nav" itemscope itemtype="http://schema.org/SiteNavigationElement">
- <div id="devdoc-nav" class="scroll-pane">
-
-
-<?cs
- include:"../../../../frameworks/base/docs/html/design/design_toc.cs" ?>
-
-
- </div>
- </div> <!-- end side-nav -->
- <script>
- $(document).ready(function() {
- scrollIntoView("devdoc-nav");
- });
- </script>
-<?cs /def ?>
-<?cs
-def:distribute_nav() ?>
- <div class="wrap clearfix" id="body-content">
- <div class="col-3" id="side-nav" itemscope itemtype="http://schema.org/SiteNavigationElement">
- <div id="devdoc-nav" class="scroll-pane">
-
-<?cs
- include:"../../../../frameworks/base/docs/html/distribute/distribute_toc.cs" ?>
-
-
- </div>
- </div> <!-- end side-nav -->
- <script>
- $(document).ready(function() {
- scrollIntoView("devdoc-nav");
- });
- </script>
+ <div>
<?cs /def ?>
-<?cs
-def:samples_nav() ?>
- <div class="wrap clearfix" id="body-content">
- <div class="col-4" id="side-nav" itemscope itemtype="http://schema.org/SiteNavigationElement">
- <div id="devdoc-nav" class="scroll-pane">
+<?cs # The default side navigation for the reference docs ?>
+<?cs def:reference_default_nav() ?>
+ <!-- Fullscreen toggler -->
+ <button data-fullscreen class="dac-nav-fullscreen">
+ <i class="dac-sprite dac-fullscreen"></i>
+ </button>
-<?cs
- include:"../../../../frameworks/base/docs/html/samples/samples_toc.cs" ?>
+ <script>$('[data-fullscreen]').dacFullscreen();</script>
+ <!-- End: Fullscreen toggler -->
- </div>
-
- </div> <!-- end side-nav -->
- <script>
- $(document).ready(function() {
- scrollIntoView("devdoc-nav");
- });
+ <?cs if:reference.gcm || reference.gms ?>
+ <?cs include:"../../../../frameworks/base/docs/html/google/google_toc.cs" ?>
+ <script type="text/javascript">
+ showGoogleRefTree();
</script>
-<?cs /def ?>
-
-<?cs
-def:google_nav() ?>
- <div class="wrap clearfix" id="body-content">
- <div class="col-4" id="side-nav" itemscope itemtype="http://schema.org/SiteNavigationElement">
- <div id="devdoc-nav" class="scroll-pane">
-
-<?cs
- include:"../../../../frameworks/base/docs/html/google/google_toc.cs" ?>
-
-
- </div>
- <script type="text/javascript">
- showGoogleRefTree();
-
- </script>
- </div> <!-- end side-nav -->
- <script>
- $(document).ready(function() {
- scrollIntoView("devdoc-nav");
- });
- </script>
-<?cs /def ?>
-
-<?cs
-def:about_nav() ?>
- <div class="wrap clearfix" id="body-content">
- <div class="col-3" id="side-nav" itemscope itemtype="http://schema.org/SiteNavigationElement">
- <div id="devdoc-nav" class="scroll-pane">
-
-<?cs
- include:"../../../../frameworks/base/docs/html/about/about_toc.cs" ?>
-
-
- </div>
- </div> <!-- end side-nav -->
- <script>
- $(document).ready(function() {
- scrollIntoView("devdoc-nav");
- });
- </script>
-<?cs /def ?>
-
-
-<?cs
-def:wear_nav() ?>
- <div class="wrap clearfix" id="body-content">
- <div class="col-4" id="side-nav" itemscope itemtype="http://schema.org/SiteNavigationElement">
- <div id="devdoc-nav" class="scroll-pane">
-
-<?cs
- include:"../../../../frameworks/base/docs/html/wear/wear_toc.cs" ?>
-
-
- </div>
- </div> <!-- end side-nav -->
- <script>
- $(document).ready(function() {
- scrollIntoView("devdoc-nav");
- });
- </script>
-<?cs /def ?>
-
-<?cs
-def:preview_nav() ?>
- <div class="wrap clearfix" id="body-content">
- <div class="col-4" id="side-nav" itemscope itemtype="http://schema.org/SiteNavigationElement">
- <div id="devdoc-nav" class="scroll-pane">
- <?cs
- include:"../../../../frameworks/base/docs/html/preview/preview_toc.cs" ?>
- </div>
- </div> <!-- end side-nav -->
- <script>
- $(document).ready(function() {
- scrollIntoView("devdoc-nav");
- });
- </script>
-<?cs /def ?>
-
-<?cs # The default side navigation for the reference docs ?><?cs
-def:default_left_nav() ?>
-<?cs if:reference.gcm || reference.gms ?>
- <?cs call:google_nav() ?>
-<?cs else ?>
- <div class="wrap clearfix" id="body-content">
- <div class="col-4" id="side-nav" itemscope itemtype="http://schema.org/SiteNavigationElement">
- <div id="devdoc-nav">
+ <?cs else ?>
+ <div id="devdoc-nav">
<div id="api-nav-header">
<div id="api-level-toggle">
<label for="apiLevelCheckbox" class="disabled"
- title="Select your target API level to dim unavailable APIs">API level: </label>
+ title="Select your target API level to dim unavailable APIs">API level: </label>
<div class="select-wrapper">
<select id="apiLevelSelector">
<!-- option elements added by buildApiLevelSelector() -->
@@ -339,277 +35,209 @@
</div>
</div><!-- end toggle -->
<div id="api-nav-title">Android APIs</div>
- </div><!-- end nav header -->
+ </div><!-- end nav header -->
<script>
- var SINCE_DATA = [ <?cs
- each:since = since ?>'<?cs
- var:since.name ?>'<?cs
+ var SINCE_DATA = [ <?cs
+ each:since = since ?>'<?cs
+ var:since.name ?>'<?cs
if:!last(since) ?>, <?cs /if ?><?cs
- /each
- ?> ];
+ /each
+ ?> ];
buildApiLevelSelector();
</script>
-
- <div id="swapper">
- <div id="nav-panels">
- <div id="resize-packages-nav">
- <div id="packages-nav" class="scroll-pane">
- <ul>
- <?cs call:package_link_list(docs.packages) ?>
- </ul><br/>
+ <div class="dac-reference-nav" data-reference-tree>
+ <ul class="dac-reference-nav-list" data-reference-namespaces>
+ <?cs call:package_link_list(docs.packages) ?>
+ </ul>
- </div> <!-- end packages-nav -->
- </div> <!-- end resize-packages -->
- <div id="classes-nav" class="scroll-pane">
-
-
-<?cs
- if:subcount(class.package) ?>
- <ul>
- <?cs call:list("Annotations", class.package.annotations) ?>
- <?cs call:list("Interfaces", class.package.interfaces) ?>
- <?cs call:list("Classes", class.package.classes) ?>
- <?cs call:list("Enums", class.package.enums) ?>
- <?cs call:list("Exceptions", class.package.exceptions) ?>
- <?cs call:list("Errors", class.package.errors) ?>
- </ul><?cs
- elif:subcount(package) ?>
- <ul>
- <?cs call:class_link_list("Annotations", package.annotations) ?>
- <?cs call:class_link_list("Interfaces", package.interfaces) ?>
- <?cs call:class_link_list("Classes", package.classes) ?>
- <?cs call:class_link_list("Enums", package.enums) ?>
- <?cs call:class_link_list("Exceptions", package.exceptions) ?>
- <?cs call:class_link_list("Errors", package.errors) ?>
- </ul><?cs
- else ?>
- <p style="padding:10px">Select a package to view its members</p><?cs
- /if ?><br/>
-
-
- </div><!-- end classes -->
- </div><!-- end nav-panels -->
- <div id="nav-tree" style="display:none" class="scroll-pane">
- <div id="tree-list"></div>
- </div><!-- end nav-tree -->
- </div><!-- end swapper -->
- <div id="nav-swap">
- <a class="fullscreen">fullscreen</a>
- <a href='#' onclick='swapNav();return false;'><span id='tree-link'>Use Tree Navigation</span><span id='panel-link' style='display:none'>Use Panel Navigation</span></a>
+ <?cs if:subcount(class.package) ?>
+ <ul data-reference-resources>
+ <?cs call:list("Annotations", class.package.annotations) ?>
+ <?cs call:list("Interfaces", class.package.interfaces) ?>
+ <?cs call:list("Classes", class.package.classes) ?>
+ <?cs call:list("Enums", class.package.enums) ?>
+ <?cs call:list("Exceptions", class.package.exceptions) ?>
+ <?cs call:list("Errors", class.package.errors) ?>
+ </ul>
+ <?cs elif:subcount(package) ?>
+ <ul data-reference-resources>
+ <?cs call:class_link_list("Annotations", package.annotations) ?>
+ <?cs call:class_link_list("Interfaces", package.interfaces) ?>
+ <?cs call:class_link_list("Classes", package.classes) ?>
+ <?cs call:class_link_list("Enums", package.enums) ?>
+ <?cs call:class_link_list("Exceptions", package.exceptions) ?>
+ <?cs call:class_link_list("Errors", package.errors) ?>
+ </ul>
+ <?cs /if ?>
</div>
- </div> <!-- end devdoc-nav -->
- </div> <!-- end side-nav -->
- <script type="text/javascript">
- // init fullscreen based on user pref
- var fullscreen = readCookie("fullscreen");
- if (fullscreen != 0) {
- if (fullscreen == "false") {
- toggleFullscreen(false);
- } else {
- toggleFullscreen(true);
- }
- }
- // init nav version for mobile
- if (isMobile) {
- swapNav(); // tree view should be used on mobile
- $('#nav-swap').hide();
- } else {
- chooseDefaultNav();
- if ($("#nav-tree").is(':visible')) {
- init_default_navtree("<?cs var:toroot ?>");
- }
- }
- // scroll the selected page into view
- $(document).ready(function() {
- scrollIntoView("packages-nav");
- scrollIntoView("classes-nav");
- });
- </script>
-<?cs /if ?>
- <?cs
-/def ?>
-
+ </div>
+ <?cs /if ?>
+<?cs /def ?>
<?cs
-def:header_search_widget() ?>
-<div class="menu-container">
- <div class="moremenu">
- <div id="more-btn"></div>
- </div>
- <div class="morehover" id="moremenu">
- <div class="top"></div>
- <div class="mid">
- <div class="header">Links</div>
- <ul>
- <li><a href="https://play.google.com/apps/publish/" target="_googleplay">Google Play Developer Console</a></li>
- <li><a href="http://android-developers.blogspot.com/">Android Developers Blog</a></li>
- <li><a href="<?cs var:toroot ?>about/index.html">About Android</a></li>
- </ul>
- <div class="header">Android Sites</div>
- <ul>
- <li><a href="http://www.android.com">Android.com</a></li>
- <li class="active"><a>Android Developers</a></li>
- <li><a href="http://source.android.com">Android Open Source Project</a></li>
- </ul>
+def:ndk_nav() ?>
+ <div class="wrap clearfix" id="body-content"><div class="cols">
+ <div class="col-3 dac-toggle dac-mobile" id="side-nav" itemscope itemtype="http://schema.org/SiteNavigationElement">
+ <?cs call:mobile_nav_toggle() ?>
+ <div class="dac-toggle-content" id="devdoc-nav">
+ <div class="scroll-pane">
+<?cs
+if:guide ?><?cs include:"../../../../frameworks/base/docs/html/ndk/guides/guides_toc.cs" ?><?cs
+elif:reference ?><?cs include:"../../../../frameworks/base/docs/html/ndk/reference/reference_toc.cs" ?><?cs
+elif:downloads ?><?cs include:"../../../../frameworks/base/docs/html/ndk/downloads/downloads_toc.cs" ?><?cs
+elif:samples ?><?cs include:"../../../../frameworks/base/docs/html/ndk/samples/samples_toc.cs" ?><?cs
+/if ?>
+ </div>
+ </div>
+ </div> <!-- end side-nav -->
+<?cs /def ?>
- <?cs # Include language switcher only in online docs ?>
- <?cs if:android.whichdoc == "online" ?>
- <div class="header">Language</div>
- <div id="language" class="locales">
- <select name="language" onChange="changeLangPref(this.value, true)">
- <option value="en">English</option>
- <option value="es">Español</option>
- <option value="ja">日本語</option>
- <option value="ko">한국어</option>
- <option value="ru">Русский</option>
- <option value="zh-cn">中文(简体)</option>
- <option value="zh-tw">中文(繁體)</option>
- </select>
+<?cs def:header_search_widget() ?>
+ <form data-search class="dac-header-search">
+ <button class="dac-header-search-close" data-search-close>
+ <i class="dac-sprite dac-back-arrow"></i>
+ </button>
+
+ <div class="dac-header-search-inner">
+ <i class="dac-sprite dac-search-white dac-header-search-icon"></i>
+ <input id="search_autocomplete" type="text" value="" autocomplete="off" name="q" class="dac-header-search-input" placeholder="Search" />
+ <button class="dac-header-search-clear dac-hidden" data-search-clear>
+ <i class="dac-sprite dac-close-black"></i>
+ </button>
+ </div>
+ </form>
+<?cs /def ?>
+
+<?cs def:search_results() ?>
+ <div id="search-results" class="dac-search-results">
+ <div id="dac-search-results-history" class="dac-search-results-history">
+ <div class="wrap dac-search-results-history-wrap">
+ <div class="cols">
+ <div class="col-1of2 col-tablet-1of2 col-mobile-1of1">
+ <h2>Most visited</h2>
+ <div class="resource-flow-layout" data-history-query="history:most/visited" data-maxresults="3" data-cardsizes="18x2"></div>
</div>
- <script type="text/javascript">
- <!--
- loadLangPref();
- //-->
- </script>
+
+ <div class="col-1of2 col-tablet-1of2 col-mobile-1of1">
+ <h2>Recently visited</h2>
+ <div class="resource-flow-layout cols" data-history-query="history:recent" data-allow-duplicates="true" data-maxresults="3" data-cardsizes="18x2"></div>
+ </div>
+ </div>
+ </div>
+ </div>
+
+ <div id="dac-search-results-content" class="dac-search-results-content">
+ <div class="dac-search-results-metadata wrap">
+ <div class="dac-search-results-for">
+ <h2>Results for <span id="search-results-for"></span></h2>
+ </div>
+
+ <div id="dac-search-results-hero"></div>
+
+ <div class="dac-search-results-hero cols">
+ <div id="dac-search-results-reference" class="col-3of6 col-tablet-1of2 col-mobile-1of1">
+ <div class="suggest-card reference no-display">
+ <ul class="dac-search-results-reference">
+ </ul>
+ </div>
+ </div>
+ <div id="dac-custom-search-results"></div>
+ </div>
+ </div>
+
+ </div>
+ </div>
+<?cs /def ?>
+
+<?cs def:custom_left_nav() ?>
+ <?cs if:(!fullpage && !nonavpage) || forcelocalnav ?>
+ <a class="dac-nav-back-button dac-swap-section dac-up dac-no-anim" data-swap-button href="javascript:;">
+ <i class="dac-sprite dac-nav-back"></i> <span class="dac-nav-back-title">Back</span>
+ </a>
+ <div class="dac-nav-sub dac-swap-section dac-right dac-active" itemscope itemtype="http://schema.org/SiteNavigationElement">
+ <?cs if:ndk ?>
+ <?cs if:guide ?>
+ <?cs include:"../../../../frameworks/base/docs/html/ndk/guides/guides_toc.cs" ?>
+ <?cs elif:reference ?>
+ <?cs include:"../../../../frameworks/base/docs/html/ndk/reference/reference_toc.cs" ?>
+ <?cs elif:downloads ?>
+ <?cs include:"../../../../frameworks/base/docs/html/ndk/downloads/downloads_toc.cs" ?>
+ <?cs elif:samples ?>
+ <?cs include:"../../../../frameworks/base/docs/html/ndk/samples/samples_toc.cs" ?>
+ <?cs else ?>
+ <?cs call:reference_default_nav() ?>
+ <?cs /if ?>
+ <?cs elif:guide ?>
+ <?cs include:"../../../../frameworks/base/docs/html/guide/guide_toc.cs" ?>
+ <?cs elif:design ?>
+ <?cs include:"../../../../frameworks/base/docs/html/design/design_toc.cs" ?>
+ <?cs elif:training ?>
+ <?cs include:"../../../../frameworks/base/docs/html/training/training_toc.cs" ?>
+ <?cs elif:tools ?>
+ <?cs include:"../../../../frameworks/base/docs/html/tools/tools_toc.cs" ?>
+ <?cs elif:google ?>
+ <?cs include:"../../../../frameworks/base/docs/html/google/google_toc.cs" ?>
+ <?cs elif:samples ?>
+ <?cs include:"../../../../frameworks/base/docs/html/samples/samples_toc.cs" ?>
+ <?cs elif:preview ?>
+ <?cs include:"../../../../frameworks/base/docs/html/preview/preview_toc.cs" ?>
+ <?cs elif:distribute ?>
+ <?cs if:googleplay ?>
+ <?cs include:"../../../../frameworks/base/docs/html/distribute/googleplay/googleplay_toc.cs" ?>
+ <?cs elif:essentials ?>
+ <?cs include:"../../../../frameworks/base/docs/html/distribute/essentials/essentials_toc.cs" ?>
+ <?cs elif:users ?>
+ <?cs include:"../../../../frameworks/base/docs/html/distribute/users/users_toc.cs" ?>
+ <?cs elif:engage ?>
+ <?cs include:"../../../../frameworks/base/docs/html/distribute/engage/engage_toc.cs" ?>
+ <?cs elif:monetize ?>
+ <?cs include:"../../../../frameworks/base/docs/html/distribute/monetize/monetize_toc.cs" ?>
+ <?cs elif:analyze ?>
+ <?cs include:"../../../../frameworks/base/docs/html/distribute/analyze/analyze_toc.cs" ?>
+ <?cs elif:disttools ?>
+ <?cs include:"../../../../frameworks/base/docs/html/distribute/tools/disttools_toc.cs" ?>
+ <?cs elif:stories ?>
+ <?cs include:"../../../../frameworks/base/docs/html/distribute/stories/stories_toc.cs" ?>
+ <?cs /if ?>
+ <?cs elif:about ?>
+ <?cs include:"../../../../frameworks/base/docs/html/about/about_toc.cs" ?>
+ <?cs else ?>
+ <?cs call:reference_default_nav() ?>
<?cs /if ?>
- <?cs # End of lang switcher ?>
- <br class="clearfix" />
- </div><!-- end 'mid' -->
- <div class="bottom"></div>
- </div><!-- end 'moremenu' -->
-
- <div class="search" id="search-container">
- <div class="search-inner">
- <div id="search-btn"></div>
- <div class="left"></div>
- <form onsubmit="return submit_search()">
- <input id="search_autocomplete" type="text" value="" autocomplete="off" name="q"
- onfocus="search_focus_changed(this, true)" onblur="search_focus_changed(this, false)"
- onkeydown="return search_changed(event, true, '<?cs var:toroot ?>')"
- onkeyup="return search_changed(event, false, '<?cs var:toroot ?>')" />
- </form>
- <div class="right"></div>
- <a class="close hide">close</a>
- <div class="left"></div>
- <div class="right"></div>
- </div><!-- end search-inner -->
- </div><!-- end search-container -->
-
- <div class="search_filtered_wrapper reference">
- <div class="suggest-card reference no-display">
- <ul class="search_filtered">
- </ul>
</div>
- </div>
-
- <div class="search_filtered_wrapper docs">
- <div class="suggest-card dummy no-display"> </div>
- <div class="suggest-card develop no-display">
- <ul class="search_filtered">
- </ul>
- <div class="child-card guides no-display">
- </div>
- <div class="child-card training no-display">
- </div>
- <div class="child-card samples no-display">
- </div>
- </div>
- <div class="suggest-card design no-display">
- <ul class="search_filtered">
- </ul>
- </div>
- <div class="suggest-card distribute no-display">
- <ul class="search_filtered">
- </ul>
- </div>
- </div>
-</div><!-- end menu-container (search and menu widget) -->
+ <?cs /if ?>
<?cs /def ?>
-
-
-<?cs
-def:custom_left_nav() ?><?cs
- if:fullpage ?><?cs
- call:fullpage() ?><?cs
- elif:nonavpage ?><?cs
- call:no_nav() ?><?cs
- elif:guide ?><?cs
- call:guide_nav() ?><?cs
- elif:design ?><?cs
- call:design_nav() ?><?cs
- elif:training ?><?cs
- call:training_nav() ?><?cs
- elif:tools ?><?cs
- call:tools_nav() ?><?cs
- elif:google ?><?cs
- call:google_nav() ?><?cs
- elif:samples ?><?cs
- call:samples_nav() ?><?cs
- elif:distribute ?><?cs
- if:googleplay ?><?cs
- call:googleplay_nav() ?><?cs
- elif:essentials ?><?cs
- call:essentials_nav() ?><?cs
- elif:users ?><?cs
- call:users_nav() ?><?cs
- elif:engage ?><?cs
- call:engage_nav() ?><?cs
- elif:monetize ?><?cs
- call:monetize_nav() ?><?cs
- elif:analyze ?><?cs
- call:analyze_nav() ?><?cs
- elif:disttools ?><?cs
- call:disttools_nav() ?><?cs
- elif:stories ?><?cs
- call:stories_nav() ?><?cs
- /if ?><?cs
- elif:about ?><?cs
- call:about_nav() ?><?cs
- elif:distribute ?><?cs
- call:distribute_nav() ?><?cs
- elif:wear ?><?cs
- call:wear_nav() ?><?cs
- elif:preview ?><?cs
- call:preview_nav() ?><?cs
- else ?><?cs
- call:default_left_nav() ?> <?cs
- /if ?><?cs
-/def ?>
-
-<?cs # appears at the bottom of every page ?><?cs
-def:custom_cc_copyright() ?>
- Except as noted, this content is
+<?cs # appears at the bottom of every page ?>
+<?cs def:custom_cc_copyright() ?>
+ Except as noted, this content is
licensed under <a href="http://creativecommons.org/licenses/by/2.5/">
- Creative Commons Attribution 2.5</a>. For details and
- restrictions, see the <a href="<?cs var:toroot ?>license.html">Content
- License</a>.<?cs
-/def ?>
-
-<?cs
-def:custom_copyright() ?>
- Except as noted, this content is licensed under <a
- href="http://www.apache.org/licenses/LICENSE-2.0">Apache 2.0</a>.
- For details and restrictions, see the <a href="<?cs var:toroot ?>license.html">
- Content License</a>.<?cs
-/def ?>
-
-<?cs
-def:custom_footerlinks() ?>
- <p>
- <a href="<?cs var:toroot ?>about/index.html">About Android</a> |
- <a href="<?cs var:toroot ?>legal.html">Legal</a> |
- <a href="<?cs var:toroot ?>support.html">Support</a>
- </p><?cs
-/def ?>
-
-<?cs # appears on the right side of the blue bar at the bottom off every page ?><?cs
-def:custom_buildinfo() ?><?cs
- if:!google && !reference.gcm && !reference.gms ?>
- Android <?cs var:sdk.version ?> r<?cs var:sdk.rel.id ?> — <?cs
- /if ?>
-<script src="<?cs var:toroot ?>timestamp.js" type="text/javascript"></script>
-<script>document.write(BUILD_TIMESTAMP)</script>
+ Creative Commons Attribution 2.5</a>. For details and
+ restrictions, see the <a href="<?cs var:toroot ?>license.html">Content
+ License</a>.
<?cs /def ?>
+<?cs def:custom_copyright() ?>
+ Except as noted, this content is licensed under <a
+ href="http://www.apache.org/licenses/LICENSE-2.0">Apache 2.0</a>.
+ For details and restrictions, see the <a href="<?cs var:toroot ?>license.html">
+ Content License</a>.
+<?cs /def ?>
+
+<?cs def:custom_footerlinks() ?>
+ <a href="<?cs var:toroot ?>about/android.html">About Android</a>
+ <a href="<?cs var:toroot ?>auto/index.html">Auto</a>
+ <a href="<?cs var:toroot ?>tv/index.html">TV</a>
+ <a href="<?cs var:toroot ?>wear/index.html">Wear</a>
+ <a href="<?cs var:toroot ?>legal.html">Legal</a>
+<?cs /def ?>
+
+<?cs # appears on the right side of the blue bar at the bottom off every page ?>
+<?cs def:custom_buildinfo() ?>
+ <?cs if:!google && !reference.gcm && !reference.gms ?>
+ Android <?cs var:sdk.version ?> r<?cs var:sdk.rel.id ?> —
+ <?cs /if ?>
+ <script src="<?cs var:toroot ?>timestamp.js" type="text/javascript"></script>
+ <script>document.write(BUILD_TIMESTAMP)</script>
+<?cs /def ?>
diff --git a/tools/droiddoc/templates-sdk-dev/designpage.cs b/tools/droiddoc/templates-sdk-dev/designpage.cs
index 2be179d..d75ce0a 100644
--- a/tools/droiddoc/templates-sdk-dev/designpage.cs
+++ b/tools/droiddoc/templates-sdk-dev/designpage.cs
@@ -37,17 +37,11 @@
<?cs if:header.hide ?>
<?cs else ?>
-<div class="layout-content-row content-header <?cs if:header.justLinks ?>just-links<?cs /if ?>">
- <div class="layout-content-col span-9">
+<div class="content-header <?cs if:header.justLinks ?>just-links<?cs /if ?>">
<?cs if:header.justLinks ?>
<?cs elif:header.title ?><h2><?cs var:header.title ?></h2>
<?cs else ?><h2><?cs var:page.title ?></h2>
<?cs /if ?>
- </div>
- <div class="paging-links layout-content-col span-4" itemscope itemtype="http://schema.org/SiteNavigationElement">
- <a href="#" class="prev-page-link">Previous</a>
- <a href="#" class="next-page-link">Next</a>
- </div>
</div>
<?cs /if ?>
@@ -55,9 +49,9 @@
<?cs if:footer.hide ?>
<?cs else ?>
-<div class="layout-content-row content-footer" itemscope itemtype="http://schema.org/SiteNavigationElement">
- <div class="paging-links layout-content-col span-9"> </div>
- <div class="paging-links layout-content-col span-4">
+<div class="cols content-footer" itemscope itemtype="http://schema.org/SiteNavigationElement">
+ <div class="paging-links col-9"> </div>
+ <div class="paging-links col-4">
<a href="#" class="prev-page-link">Previous</a>
<a href="#" class="next-page-link">Next</a>
</div>
diff --git a/tools/droiddoc/templates-sdk-dev/docpage.cs b/tools/droiddoc/templates-sdk-dev/docpage.cs
index 83b1199..3d17d37 100644
--- a/tools/droiddoc/templates-sdk-dev/docpage.cs
+++ b/tools/droiddoc/templates-sdk-dev/docpage.cs
@@ -4,46 +4,63 @@
<?cs include:"head_tag.cs" ?>
<body class="gc-documentation
+<?cs # add document classes for navigation header selection (and other stuff) ?>
<?cs
-if:(google || reference.gms || reference.gcm) ?>google<?cs /if ?><?cs
- if:(guide||develop||training||reference||tools||sdk||samples) ?>develop<?cs
+ if:(google || reference.gms || reference.gcm) ?>google <?cs /if ?><?cs
+ if:ndk ?>ndk<?cs
if:guide ?> guide<?cs /if ?><?cs
if:samples ?> samples<?cs /if ?><?cs
- elif:(distribute||googleplay||essentials||users||engage||monetize||disttools||stories)
- ?>distribute<?cs
- if:googleplay ?> googleplay<?cs /if ?><?cs
- if:essentials ?> essentials<?cs /if ?><?cs
- if:users ?> users<?cs /if ?><?cs
- if:engage ?> engage<?cs /if ?><?cs
- if:monetize ?> monetize<?cs /if ?><?cs
- if:disttools ?> disttools<?cs /if ?><?cs
- if:stories ?> stories<?cs /if ?><?cs
- elif:(about||wear||tv||auto) ?>about<?cs
- elif:design ?>design<?cs
-/if ?><?cs
-if:page.trainingcourse ?> trainingcourse<?cs
+ if:reference ?> reference<?cs /if ?><?cs
+ if:downloads ?> downloads<?cs /if ?><?cs
+ else ?><?cs
+ if:(guide||develop||training||reference||tools||sdk||google||samples) ?>develop<?cs
+ if:guide ?> guide<?cs /if ?><?cs
+ if:samples ?> samples<?cs /if ?><?cs
+ elif:(distribute||googleplay||essentials||users||engage||monetize||disttools||stories||analyze) ?>distribute<?cs
+ if:googleplay ?> googleplay<?cs /if ?><?cs
+ if:essentials ?> essentials<?cs /if ?><?cs
+ if:users ?> users<?cs /if ?><?cs
+ if:engage ?> engage<?cs /if ?><?cs
+ if:monetize ?> monetize<?cs /if ?><?cs
+ if:disttools ?> disttools<?cs /if ?><?cs
+ if:stories ?> stories<?cs /if ?><?cs
+ if:analyze ?> analyze<?cs /if ?><?cs
+ elif:(design||vision||material||patterns||devices||designdownloads) ?> design<?cs
+ if:vision ?> vision<?cs /if ?><?cs
+ if:material ?> material<?cs /if ?><?cs
+ if:patterns ?> patterns<?cs /if ?><?cs
+ if:devices ?> devices<?cs /if ?><?cs
+ if:designdownloads ?> designdownloads<?cs /if ?><?cs
+ elif:(about||versions||wear||tv||auto) ?> about<?cs
+ if:versions ?> versions<?cs /if ?><?cs
+ if:wear ?> wear<?cs /if ?><?cs
+ if:tv ?> tv<?cs /if ?><?cs
+ if:auto ?> auto<?cs /if ?><?cs
+ elif:(preview) ?> preview<?cs
+ /if ?><?cs
+ if:page.trainingcourse ?> trainingcourse<?cs /if ?><?cs
/if ?>" itemscope itemtype="http://schema.org/Article"><?cs
include:"header.cs" ?>
-<div <?cs
- if:fullpage
- ?>class="fullpage"<?cs
- elif:(design||tools||about||sdk||googleplay||essentials||users||monetize||disttools) && !nonavpage
- ?>class="col-13" id="doc-col"<?cs
- elif:!nonavpage
- ?>class="col-12" id="doc-col"<?cs /if ?> >
-
-<?cs if:(design||training||walkthru) && !page.trainingcourse && !page.article ?><?cs # header logic for docs that provide previous/next buttons ?>
- <?cs if:header.hide ?>
+<?cs if:(design||training||walkthru) && !page.trainingcourse && !page.article ?><?cs
+# header logic for docs that provide previous/next buttons ?>
+ <?cs if:(header.hide||devsite) ?>
<?cs else ?>
- <div class="layout-content-row content-header <?cs if:header.justLinks ?>just-links<?cs /if ?>">
- <div class="layout-content-col <?cs if:training ?>span-7<?cs else ?>span-9<?cs /if ?>">
+ <div class="content-header <?cs if:header.justLinks ?>just-links<?cs /if ?>">
<?cs if:header.justLinks ?>
- <?cs else ?><h1 itemprop="name"><?cs var:page.title ?></h1>
+ <?cs else ?>
+ <ul class="dac-header-crumbs">
+ <?cs # More <li> elements added here with javascript ?>
+ </ul>
+
+ <!-- Breadcrumb Setup -->
+ <script>$('.dac-nav-list').dacCurrentPage().dacCrumbs();</script>
+
+ <h1 itemprop="name"><?cs var:page.title ?>
+ </h1>
<?cs /if ?>
- </div>
<?cs if:training ?>
- <div class="training-nav-top layout-content-col span-5" itemscope itemtype="http://schema.org/SiteNavigationElement">
+ <div class="training-nav-top" itemscope itemtype="http://schema.org/SiteNavigationElement">
<a href="#" class="prev-page-link hide"
zh-tw-lang="上一堂課"
zh-cn-lang="上一课"
@@ -70,7 +87,7 @@
>Get started</a>
</div>
<?cs elif:!page.trainingcourse ?>
- <div class="paging-links layout-content-col span-4" itemscope itemtype="http://schema.org/SiteNavigationElement">
+ <?cs # <div class="paging-linkss" itemscope itemtype="http://schema.org/SiteNavigationElement">
<a href="#" class="prev-page-link hide"
zh-tw-lang="上一堂課"
zh-cn-lang="上一课"
@@ -87,7 +104,7 @@
ja-lang="次へ"
es-lang="Siguiente"
>Next</a>
- </div>
+ </div> ?>
<?cs /if ?><?cs # end if training ?>
</div>
<?cs /if ?><?cs # end if header.hide ?>
@@ -112,25 +129,34 @@
</style>
<?cs /if ?>
- <?cs if:(!fullpage && !header.hide) ?>
+ <?cs if:(!fullpage && !header.hide && !devsite) ?>
<?cs if:page.landing ?><?cs # header logic for docs that are landing pages ?>
<div class="landing-banner">
<?cs if:page.landing.image ?><?cs # use two-column layout only if there is an image ?>
- <div class="col-6">
- <img src="<?cs var:toroot ?><?cs var:page.landing.image ?>" alt="" />
- </div>
- <div class="col-6">
+ <div class="cols">
+ <div class="col-6">
+ <img src="<?cs var:toroot ?><?cs var:page.landing.image ?>" alt="" />
+ </div>
+ <div class="col-6">
<?cs /if ?>
<h1 itemprop="name" style="margin-bottom:0;"><?cs var:page.title ?></h1>
<p itemprop="description"><?cs var:page.landing.intro ?></p>
<p><a class="next-page-link topic-start-link"></a></p>
<?cs if:page.landing.image ?>
+ </div>
</div>
<?cs /if ?>
</div>
<?cs else ?>
<?cs if:tab1 ?><div id="title-tabs-wrapper"><?cs /if ?>
+ <ul class="dac-header-crumbs">
+ <?cs # More <li> elements added here with javascript ?>
+ </ul>
+
+ <!-- Breadcrumb Setup -->
+ <p><script>$('.dac-nav-list').dacCurrentPage().dacCrumbs();</script></p>
+
<h1 itemprop="name" <?cs if:tab1 ?>class="with-title-tabs"<?cs /if ?>><?cs var:page.title ?></h1><?cs
if:tab1 ?><ul id="title-tabs">
<li class="selected"><a href="<?cs var:tab1.link ?>"><?cs var:tab1 ?></a></li>
@@ -145,21 +171,63 @@
<?cs /if ?>
<?cs /if ?><?cs # end if design ?>
+ <?cs if devsite ?>
+ <?cs if:tab1 ?>
+ <div id="title-tabs-wrapper">
+ <ul id="title-tabs">
+ <li class="selected"><a href="<?cs var:tab1.link ?>"><?cs var:tab1 ?></a></li>
+ <?cs if:tab2 ?>
+ <li><a href="<?cs var:tab2.link ?>"><?cs var:tab2 ?></a></li><?cs /if ?>
+ <?cs if:tab3 ?>
+ <li><a href="<?cs var:tab3.link ?>"><?cs var:tab3 ?></a></li><?cs /if ?>
+ </ul>
+ </div><!-- end tab-wrapper -->
+ <?cs /if ?>
+ <?cs /if ?>
+
<?cs # THIS IS THE MAIN DOC CONTENT ?>
<div id="jd-content">
-
-
<div class="jd-descr" itemprop="articleBody">
+ <?cs if:(!fullpage && !header.hide && devsite) ?>
+ <?cs if:page.landing ?><?cs # header logic for docs that are landing pages ?>
+ <div class="landing-banner">
+ <?cs if:page.landing.image ?><?cs # use two-column layout only if there is an image ?>
+ <div class="cols">
+ <div class="col-6">
+ <img src="<?cs var:toroot ?><?cs var:page.landing.image ?>" alt="" />
+ </div>
+ <div class="col-6">
+ <?cs /if ?>
+ <h1 itemprop="name" style="margin-bottom:0;"><?cs var:page.title ?></h1>
+ <p itemprop="description"><?cs var:page.landing.intro ?></p>
+
+ <p><a class="next-page-link topic-start-link"></a></p>
+ <?cs if:page.landing.image ?>
+ </div>
+ </div>
+ <?cs /if ?>
+ </div>
+ <?cs /if ?>
+ <?cs /if ?>
+
<?cs call:tag_list(root.descr) ?>
</div>
+ <?cs if:!fullscreen && (design||training||walkthru) && !page.landing && !page.trainingcourse
+ && !footer.hide && !devsite?>
<div class="content-footer <?cs
- if:fullpage ?>wrap<?cs
- else ?>layout-content-row<?cs /if ?>"
+ if:fullpage ?>wrap<?cs /if ?>"
itemscope itemtype="http://schema.org/SiteNavigationElement">
- <?cs if:!fullscreen ?>
- <div class="paging-links layout-content-col col-10">
- <?cs if:(design||training||walkthru) && !page.landing && !page.trainingcourse && !footer.hide ?>
+ <div class="paging-links">
+ <a href="#" class="prev-page-link hide"
+ zh-tw-lang="上一堂課"
+ zh-cn-lang="上一课"
+ ru-lang="Предыдущий"
+ ko-lang="이전"
+ ja-lang="前へ"
+ es-lang="Anterior"
+ ><span class="page-link-caption">Previous</span>
+ </a>
<a href="#" class="next-page-link hide"
zh-tw-lang="下一堂課"
zh-cn-lang="下一课"
@@ -167,7 +235,8 @@
ko-lang="다음"
ja-lang="次へ"
es-lang="Siguiente"
- >Next</a>
+ ><span class="page-link-caption">Next</span>
+ </a>
<a href="#" class="start-class-link hide"
zh-tw-lang="開始上課"
zh-cn-lang="开始"
@@ -176,31 +245,18 @@
ja-lang="開始する"
es-lang="Empezar"
>Get started</a>
- <a href="#" class="next-class-link hide">Next class</a>
- <?cs /if ?>
- </div>
- <div class="layout-content-col plus-container col-2" >
- <?cs if:!page.noplus ?><?cs if:fullpage ?><style>#___plusone_0 {float:right !important;}</style><?cs /if ?>
- <div class="g-plusone" data-size="medium"></div>
- <?cs /if ?>
- </div>
- <?cs /if ?>
+ <a href="#" class="next-class-link hide">
+ <span class="page-link-caption">Next class</span>
+ </a>
+ </div>
</div>
+ <?cs /if ?>
</div> <!-- end jd-content -->
+<?cs if:!devsite ?>
<?cs include:"footer.cs" ?>
-</div><!-- end doc-content -->
-
<?cs include:"trailer.cs" ?>
- <script src="https://developer.android.com/ytblogger_lists_unified.js" type="text/javascript"></script>
- <script src="<?cs var:toroot ?>jd_lists_unified.js?v=9" type="text/javascript"></script>
- <script src="<?cs var:toroot ?>jd_extras.js?v=11" type="text/javascript"></script>
- <script src="<?cs var:toroot ?>jd_collections.js?v=12" type="text/javascript"></script>
- <script src="<?cs var:toroot ?>jd_tag_helpers.js?v=5" type="text/javascript"></script>
-
+<?cs /if ?>
</body>
</html>
-
-
-
diff --git a/tools/droiddoc/templates-sdk-dev/footer.cs b/tools/droiddoc/templates-sdk-dev/footer.cs
index b609d3b..af34a1a 100644
--- a/tools/droiddoc/templates-sdk-dev/footer.cs
+++ b/tools/droiddoc/templates-sdk-dev/footer.cs
@@ -1,20 +1,219 @@
-<div id="footer" class="wrap" <?cs if:fullpage ?>style="width:940px"<?cs /if ?>>
-
-<?cs if:reference ?>
- <div id="copyright">
- <?cs call:custom_copyright() ?>
+<?cs # page footer content ?>
+<div class="wrap">
+ <div class="dac-footer<?cs if:fullpage ?> dac-landing<?cs /if ?>">
+ <div class="cols dac-footer-main">
+ <div class="col-1of2">
+ <a class="dac-footer-getnews" id="newsletter" data-modal-toggle="newsletter" href="javascript:;">Get news & tips <span
+ class="dac-fab dac-primary"><i class="dac-sprite dac-mail"></i></span></a>
+ </div>
+ <div class="col-1of2 dac-footer-reachout">
+ <div class="dac-footer-contact">
+ <a class="dac-footer-contact-link" href="http://android-developers.blogspot.com/">Blog</a>
+ <a class="dac-footer-contact-link" href="/support.html">Support</a>
+ </div>
+ <div class="dac-footer-social">
+ <a class="dac-button-social dac-youtube dac-footer-social-link" href="https://www.youtube.com/user/androiddevelopers"><i class="dac-sprite dac-youtube"></i></a>
+ <a class="dac-button-social dac-gplus dac-footer-social-link" href="https://plus.google.com/+AndroidDevelopers"><i class="dac-sprite dac-gplus"></i></a>
+ <a class="dac-button-social dac-twitter dac-footer-social-link" href="https://twitter.com/AndroidDev"><i class="dac-sprite dac-twitter"></i></a>
+ </div>
+ </div>
+ </div>
+
+ <hr class="dac-footer-separator"/>
+
+ <?cs if:reference ?>
+ <p class="dac-footer-copyright">
+ <?cs call:custom_copyright() ?>
+ </p>
+ <p class="dac-footer-build">
+ <?cs call:custom_buildinfo() ?>
+ </p>
+ <?cs elif:!hide_license_footer ?>
+ <p class="dac-footer-copyright">
+ <?cs call:custom_cc_copyright() ?>
+ </p>
+ <?cs /if ?>
+
+ <p class="dac-footer-links">
+ <a href="/about/android.html">About Android</a>
+ <a href="/auto/index.html">Auto</a>
+ <a href="/tv/index.html">TV</a>
+ <a href="/wear/index.html">Wear</a>
+ <a href="/legal.html">Legal</a>
+
+ <span id="language" class="locales">
+ <select name="language" onchange="changeLangPref(this.value, true)">
+ <option value="en" selected="selected">English</option>
+ <option value="es">Español</option>
+ <option value="in">Bahasa Indonesia</option>
+ <option value="ja">日本語</option>
+ <option value="ko">한국어</option>
+ <option value="pt-br">Português Brasileiro</option>
+ <option value="ru">Русский</option>
+ <option value="vi">tiếng Việt</option>
+ <option value="zh-cn">中文(简体)</option>
+ <option value="zh-tw">中文(繁體)</option>
+ </select>
+ </span>
+ </p>
</div>
- <div id="build_info">
- <?cs call:custom_buildinfo() ?>
+</div>
+<!-- end footer -->
+
+<?cs call:toast() ?>
+
+<div data-modal="newsletter" data-newsletter data-swap class="dac-modal newsletter">
+ <div class="dac-modal-container">
+ <div class="dac-modal-window">
+ <header class="dac-modal-header">
+ <div class="dac-modal-header-actions">
+ <button class="dac-modal-header-close" data-modal-toggle></button>
+ </div>
+ <div class="dac-swap" data-swap-container>
+ <section class="dac-swap-section dac-active dac-down">
+ <h2 class="norule dac-modal-header-title" data-t="newsletter.title"></h2>
+ <p class="dac-modal-header-subtitle" data-t="newsletter.requiredHint"></p>
+ </section>
+ <section class="dac-swap-section dac-up">
+ <h2 class="norule dac-modal-header-title" data-t="newsletter.successTitle">Hooray!</h2>
+ </section>
+ </div>
+ </header>
+ <div class="dac-swap" data-swap-container>
+ <section class="dac-swap-section dac-active dac-left">
+ <form action="https://docs.google.com/forms/d/1QgnkzbEJIDu9lMEea0mxqWrXUJu0oBCLD7ar23V0Yys/formResponse" class="dac-form" method="post" target="dac-newsletter-iframe">
+ <input type="hidden" name="entry.935454734" data-newsletter-language>
+ <section class="dac-modal-content">
+ <fieldset class="dac-form-fieldset">
+ <div class="cols">
+ <div class="col-1of2 newsletter-leftCol">
+ <div class="dac-form-input-group">
+ <label for="newsletter-full-name" class="dac-form-floatlabel" data-t="newsletter.name">Full name</label>
+ <input type="text" class="dac-form-input" name="entry.1357890476" id="newsletter-full-name" required>
+ <span class="dac-form-required">*</span>
+ </div>
+ <div class="dac-form-input-group">
+ <label for="newsletter-email" class="dac-form-floatlabel" data-t="newsletter.email">Email address</label>
+ <input type="email" class="dac-form-input" name="entry.472100832" id="newsletter-email" required>
+ <span class="dac-form-required">*</span>
+ </div>
+ </div>
+ <div class="col-1of2 newsletter-rightCol">
+ <div class="dac-form-input-group">
+ <label for="newsletter-company" class="dac-form-floatlabel" data-t="newsletter.company">Company / developer name</label>
+ <input type="text" class="dac-form-input" name="entry.1664780309" id="newsletter-company">
+ </div>
+ <div class="dac-form-input-group">
+ <label for="newsletter-play-store" class="dac-form-floatlabel" data-t="newsletter.appUrl">One of your Play Store app URLs</label>
+ <input type="url" class="dac-form-input" name="entry.47013838" id="newsletter-play-store" required>
+ <span class="dac-form-required">*</span>
+ </div>
+ </div>
+ </div>
+ </fieldset>
+ <fieldset class="dac-form-fieldset">
+ <div class="cols">
+ <div class="col-1of2 newsletter-leftCol">
+ <legend class="dac-form-legend"><span data-t="newsletter.business.label">Which best describes your business:</span><span class="dac-form-required">*</span>
+ </legend>
+ <div class="dac-form-radio-group">
+ <input type="radio" value="Apps" class="dac-form-radio" name="entry.1796324055" id="newsletter-business-type-app" required>
+ <label for="newsletter-business-type-app" class="dac-form-radio-button"></label>
+ <label for="newsletter-business-type-app" class="dac-form-label" data-t="newsletter.business.apps">Apps</label>
+ </div>
+ <div class="dac-form-radio-group">
+ <input type="radio" value="Games" class="dac-form-radio" name="entry.1796324055" id="newsletter-business-type-games" required>
+ <label for="newsletter-business-type-games" class="dac-form-radio-button"></label>
+ <label for="newsletter-business-type-games" class="dac-form-label" data-t="newsletter.business.games">Games</label>
+ </div>
+ <div class="dac-form-radio-group">
+ <input type="radio" value="Apps and Games" class="dac-form-radio" name="entry.1796324055" id="newsletter-business-type-appsgames" required>
+ <label for="newsletter-business-type-appsgames" class="dac-form-radio-button"></label>
+ <label for="newsletter-business-type-appsgames" class="dac-form-label" data-t="newsletter.business.both">Apps & Games</label>
+ </div>
+ </div>
+ <div class="col-1of2 newsletter-rightCol newsletter-checkboxes">
+ <div class="dac-form-radio-group">
+ <div class="dac-media">
+ <div class="dac-media-figure">
+ <input type="checkbox" class="dac-form-checkbox" name="entry.732309842" id="newsletter-add" required value="Add me to the mailing list for the monthly newsletter and occasional emails about development and Google Play opportunities.">
+ <label for="newsletter-add" class="dac-form-checkbox-button"></label>
+ </div>
+ <div class="dac-media-body">
+ <label for="newsletter-add" class="dac-form-label dac-form-aside"><span data-t="newsletter.confirmMailingList"></span><span class="dac-form-required">*</span></label>
+ </div>
+ </div>
+ </div>
+ <div class="dac-form-radio-group">
+ <div class="dac-media">
+ <div class="dac-media-figure">
+ <input type="checkbox" class="dac-form-checkbox" name="entry.2045036090" id="newsletter-terms" required value="I acknowledge that the information provided in this form will be subject to Google's privacy policy (https://www.google.com/policies/privacy/).">
+ <label for="newsletter-terms" class="dac-form-checkbox-button"></label>
+ </div>
+ <div class="dac-media-body">
+ <label for="newsletter-terms" class="dac-form-label dac-form-aside"><span data-t="newsletter.privacyPolicy" data-t-html></span><span class="dac-form-required">*</span></label>
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+ </fieldset>
+ </section>
+ <footer class="dac-modal-footer">
+ <div class="cols">
+ <div class="col-2of5">
+ </div>
+ </div>
+ <button type="submit" value="Submit" class="dac-fab dac-primary dac-large dac-modal-action"><i class="dac-sprite dac-arrow-right"></i></button>
+ </footer>
+ </form>
+ </section>
+ <section class="dac-swap-section dac-right">
+ <div class="dac-modal-content">
+ <p class="newsletter-success-message" data-t="newsletter.successDetails"></p>
+ </div>
+ </section>
+ </div>
+ </div>
</div>
-<?cs elif:!hide_license_footer ?>
- <div id="copyright">
- <?cs call:custom_cc_copyright() ?>
+</div>
+<!-- end newsletter modal -->
+
+<!-- start reset language header modal -->
+<div data-modal="langform" class="dac-modal" id="langform">
+ <div class="dac-modal-container">
+ <div class="dac-modal-window">
+ <header class="dac-modal-header">
+ <div class="dac-modal-header-actions">
+ <button class="dac-modal-header-close" data-modal-toggle></button>
+ </div>
+ <section class="dac-swap-section dac-active dac-down">
+ <h2 class="norule dac-modal-header-title"></h2>
+ </section>
+ </header>
+ <section class="dac-swap-section dac-active dac-left">
+ <section class="dac-modal-content">
+ <fieldset class="dac-form-fieldset">
+ <div class="cols">
+ <div class="col-2of2 langform-leftCol">
+ <p id="resetLangText"></p>
+ <p id="resetLangCta"></p>
+ </div>
+ </div>
+ </fieldset>
+ </section>
+ <footer class="dac-modal-footer" id="langfooter">
+ <div class="cols">
+ <div class="col-2of5">
+ </div>
+ </div>
+ <button class="button dac-primary dac-modal-action lang yes" data-t="newsletter.resetLangButtonYes" data-modal-toggle></button>
+ <button class="button dac-primary dac-modal-action lang no" data-t="newsletter.resetLangButtonNo" data-modal-toggle></button>
+ </a>
+ </footer>
+ </form>
+ </section>
+ </div>
</div>
-<?cs /if ?>
-<?cs if:!no_footer_links ?>
- <div id="footerlinks">
- <?cs call:custom_footerlinks() ?>
- </div>
-<?cs /if ?>
-</div> <!-- end footer -->
\ No newline at end of file
+</div>
+<!-- end langreset modal -->
diff --git a/tools/droiddoc/templates-sdk-dev/head_tag.cs b/tools/droiddoc/templates-sdk-dev/head_tag.cs
index 9f79f54..4088a57 100644
--- a/tools/droiddoc/templates-sdk-dev/head_tag.cs
+++ b/tools/droiddoc/templates-sdk-dev/head_tag.cs
@@ -1,34 +1,147 @@
<head>
<?cs
####### If building devsite, add some meta data needed for when generating the top nav ######### ?>
-<?cs
- if:devsite ?><?cs
- if:guide||develop||training||reference||tools||sdk||google||samples
- ?><meta name="top_category" value="develop" /><?cs
- elif:google
- ?><meta name="top_category" value="google" /><?cs
- elif:reference && !(reference.gms || reference.gcm)
- ?><meta name="top_category" value="css-fullscreen" /><?cs
- /if ?>
<?cs
- /if
-?><?cs
- # END if/else devsite ?>
-<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-<meta name="viewport" content="width=<?cs
- if:page.viewport_width ?><?cs
- var:page.viewport_width ?><?cs
- else ?>device-width<?cs /if ?>" />
+ if:devsite ?>
+ <meta name="top_category" value="<?cs
+ if:ndk ?>ndk<?cs
+ elif:(guide||develop||training||reference||tools||sdk||google||reference.gms||reference.gcm||samples) ?>develop<?cs
+ elif:(distribute||googleplay||essentials||users||engage||monetize||disttools||stories||analyze) ?>distribute<?cs
+ elif:(design||vision||material||patterns||devices||designdownloads) ?>design<?cs
+ elif:(about||versions||wear||tv||auto) ?>about<?cs
+ elif:preview ?>preview<?cs
+ else ?>none<?cs
+ /if ?>" />
+ <?cs set:dac_subcategory_set = #1 ?>
+ <meta name="subcategory" value="<?cs
+ if:ndk ?><?cs
+ if:guide ?>guide<?cs
+ elif:samples ?>samples<?cs
+ elif:reference ?>reference<?cs
+ elif:downloads ?>downloads<?cs
+ else ?>none<?cs set:dac_subcategory_set = #0 ?><?cs /if ?><?cs
+ else ?><?cs
+ if:(guide||develop||training||reference||tools||sdk||samples) ?><?cs
+ if:guide ?>guide<?cs
+ elif:training ?><?cs
+ if:page.trainingcourse ?>trainingcourse<?cs
+ else ?>training<?cs /if ?><?cs
+ elif:reference ?>reference<?cs
+ elif:tools ?>tools<?cs
+ elif:sdk ?>sdk<?cs
+ elif:samples ?>samples<?cs
+ else ?>none<?cs set:dac_subcategory_set = #0 ?><?cs /if ?><?cs
+ elif:(google||reference.gms||reference.gcm) ?>google<?cs
+ elif:(distribute||googleplay||essentials||users||engage||monetize||disttools||stories||analyze) ?><?cs
+ if:googleplay ?>googleplay<?cs
+ elif:essentials ?>essentials<?cs
+ elif:users ?>users<?cs
+ elif:engage ?>engage<?cs
+ elif:monetize ?>monetize<?cs
+ elif:disttools ?>disttools<?cs
+ elif:stories ?>stories<?cs
+ elif:analyze ?>analyze<?cs
+ else ?>none<?cs set:dac_subcategory_set = #0 ?><?cs /if ?><?cs
+ elif:(about||versions||wear||tv||auto) ?>about<?cs
+ elif:preview ?>preview<?cs
+ elif:design ?>design<?cs
+ elif:walkthru ?>walkthru<?cs
+ else ?>none<?cs set:dac_subcategory_set = #0 ?><?cs /if ?><?cs
+ /if ?>" />
+
+ <?cs if:nonavpage ?>
+ <meta name="hide_toc" value='True' />
+ <?cs elif: !nonavpage && dac_subcategory_set ?>
+ <meta name="book_path" value="<?cs
+ if:ndk ?>/ndk<?cs
+ if:guide ?>/guides<?cs
+ elif:samples ?>/samples<?cs
+ elif:reference ?>/reference<?cs
+ elif:downloads ?>/downloads<?cs /if ?><?cs
+ else ?><?cs
+ if:(guide||develop||training||reference||tools||sdk||samples) ?><?cs
+ if:guide ?>/guide<?cs
+ elif:training ?>/training<?cs
+ elif:reference ?>/reference<?cs
+ elif:tools ?>/tools<?cs
+ elif:sdk ?>/tools<?cs
+ elif:samples ?>/samples<?cs /if ?><?cs
+ elif:(google||reference.gms||reference.gcm) ?>/google<?cs
+ elif:(distribute||googleplay||essentials||users||engage||monetize||disttools||stories||analyze) ?>/distribute<?cs
+ if:googleplay ?>/googleplay<?cs
+ elif:essentials ?>/essentials<?cs
+ elif:users ?>/users<?cs
+ elif:engage ?>/engage<?cs
+ elif:monetize ?>/monetize<?cs
+ elif:disttools ?>/disttools<?cs
+ elif:stories ?>/stories<?cs
+ elif:analyze ?>/analyze<?cs /if ?><?cs
+ elif:(about||versions||wear||tv||auto) ?>/about<?cs
+ elif:preview ?>/preview<?cs
+ elif:design ?>/design<?cs
+ elif:walkthru ?>/walkthru<?cs /if ?><?cs
+ /if ?>/_book.yaml" />
+ <?cs /if ?>
+
+ <?cs if:page.tags && page.tags != "" ?>
+ <meta name="keywords" value='<?cs var:page.tags ?>' />
+ <?cs /if ?>
+
+ <?cs if:meta.tags && meta.tags != "" ?>
+ <meta name="meta_tags" value='<?cs var:meta.tags ?>' />
+ <?cs /if ?>
+
+ <?cs if:fullpage ?>
+ <meta name="full_width" value="True" />
+ <?cs /if ?>
+
+ <?cs if:page.landing ?>
+ <meta name="page_type" value="landing" />
+ <?cs /if ?>
+
+ <?cs if:page.article ?>
+ <meta name="page_type" value="article" />
+ <?cs /if ?>
+
+ <?cs /if ?><?cs
+ # END if/else devsite ?>
<?cs
- if:page.metaDescription ?>
-<meta name="Description" content="<?cs var:page.metaDescription ?>"><?cs
- /if ?>
+ if:!devsite ?>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<meta name="viewport" content="width=device-width,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
+<meta content="IE=edge" http-equiv="X-UA-Compatible">
<link rel="shortcut icon" type="image/x-icon" href="<?cs var:toroot ?>favicon.ico" />
+<link rel="alternate" href="http://developer.android.com/<?cs var:path.canonical ?>" hreflang="en" />
+<link rel="alternate" href="http://developer.android.com/intl/es/<?cs var:path.canonical ?>" hreflang="es" />
+<link rel="alternate" href="http://developer.android.com/intl/id/<?cs var:path.canonical ?>" hreflang="id" />
+<link rel="alternate" href="http://developer.android.com/intl/ja/<?cs var:path.canonical ?>" hreflang="ja" />
+<link rel="alternate" href="http://developer.android.com/intl/ko/<?cs var:path.canonical ?>" hreflang="ko" />
+<link rel="alternate" href="http://developer.android.com/intl/pt-br/<?cs var:path.canonical ?>" hreflang="pt-br" />
+<link rel="alternate" href="http://developer.android.com/intl/ru/<?cs var:path.canonical ?>" hreflang="ru" />
+<link rel="alternate" href="http://developer.android.com/intl/vi/<?cs var:path.canonical ?>" hreflang="vi" />
+<link rel="alternate" href="http://developer.android.com/intl/zh-cn/<?cs var:path.canonical ?>" hreflang="zh-cn" />
+<link rel="alternate" href="http://developer.android.com/intl/zh-tw/<?cs var:path.canonical ?>" hreflang="zh-tw" />
+<?cs /if ?><?cs
+# END if/else !devsite ?>
+
<title><?cs
+if:devsite ?><?cs
+ if:page.title ?><?cs
+ var:page.title ?><?cs
+ else ?>Android Developers<?cs
+ /if ?><?cs
+else ?><?cs
if:page.title ?><?cs
var:page.title ?> | <?cs
- /if ?>Android Developers</title>
-
+ /if ?>Android Developers
+<?cs /if ?><?cs
+# END if/else devsite ?></title>
+<?cs
+ if:page.metaDescription ?>
+<meta name="description" content="<?cs var:page.metaDescription ?>"><?cs
+ /if ?>
+<?cs
+ if:!devsite ?>
<!-- STYLESHEETS -->
<link rel="stylesheet"
href="<?cs
@@ -38,22 +151,16 @@
if:android.whichdoc != 'online' ?>http:<?cs
/if ?>//fonts.googleapis.com/css?family=Roboto:light,regular,medium,thin,italic,mediumitalic,bold"
title="roboto">
-<link href="<?cs var:toroot ?>assets/css/default.css?v=5" rel="stylesheet" type="text/css">
-
-<?cs if:reference && !(reference.gms || reference.gcm || preview) ?>
-<!-- FULLSCREEN STYLESHEET -->
-<link href="<?cs var:toroot ?>assets/css/fullscreen.css" rel="stylesheet" class="fullscreen"
-type="text/css">
-<?cs /if ?>
+<?cs
+ if:ndk ?><link rel="stylesheet" href="<?cs
+ if:android.whichdoc != 'online' ?>http:<?cs
+ /if ?>//fonts.googleapis.com/css?family=Roboto+Mono:400,500,700" title="roboto-mono" type="text/css"><?cs
+/if ?>
+<link href="<?cs var:toroot ?>assets/css/default.css?v=16" rel="stylesheet" type="text/css">
<!-- JAVASCRIPT -->
<script src="<?cs if:android.whichdoc != 'online' ?>http:<?cs /if ?>//www.google.com/jsapi" type="text/javascript"></script>
-<?cs
-if:devsite
- ?><script src="<?cs var:toroot ?>_static/js/android_3p-bundle.js" type="text/javascript"></script><?cs
-else
- ?><script src="<?cs var:toroot ?>assets/js/android_3p-bundle.js" type="text/javascript"></script><?cs
-/if ?><?cs
+<script src="<?cs var:toroot ?>assets/js/android_3p-bundle.js" type="text/javascript"></script><?cs
if:page.customHeadTag ?>
<?cs var:page.customHeadTag ?><?cs
/if ?>
@@ -61,15 +168,9 @@
var toRoot = "<?cs var:toroot ?>";
var metaTags = [<?cs var:meta.tags ?>];
var devsite = <?cs if:devsite ?>true<?cs else ?>false<?cs /if ?>;
+ var useUpdatedTemplates = <?cs if:useUpdatedTemplates ?>true<?cs else ?>false<?cs /if ?>;
</script>
-<script src="<?cs var:toroot ?>assets/js/docs.js?v=3" type="text/javascript"></script>
-
-<?cs if:helpoutsWidget ?>
-<script type="text/javascript" src="https://helpouts.google.com/ps/res/embed.js" defer async
- data-helpouts-embed data-helpouts-vertical="programming"
- data-helpouts-tags="<?cs var:page.tags ?>" data-helpouts-prefix="android"
- data-helpouts-standalone="true"></script>
-<?cs /if ?>
+<script src="<?cs var:toroot ?>assets/js/docs.js?v=17" type="text/javascript"></script>
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
@@ -82,5 +183,6 @@
ga('send', 'pageview');
ga('universal.send', 'pageview'); // Send page view for new tracker.
</script>
-
+<?cs /if ?><?cs
+# END if/else !devsite ?>
</head>
diff --git a/tools/droiddoc/templates-sdk-dev/header.cs b/tools/droiddoc/templates-sdk-dev/header.cs
index e8301be..8c67138 100644
--- a/tools/droiddoc/templates-sdk-dev/header.cs
+++ b/tools/droiddoc/templates-sdk-dev/header.cs
@@ -1,3 +1,11 @@
-<?cs call:custom_masthead() ?>
-<?cs call:custom_left_nav() ?>
+<?cs if:!devsite ?><?cs # leave out the global header for devsite; it is in devsite template ?>
+ <?cs call:custom_masthead() ?>
+ <?cs if:(fullpage) ?>
+ <?cs call:fullpage() ?>
+ <?cs else ?>
+ <?cs call:body_content_wrap_start() ?>
+ <?cs /if ?>
+
+ <?cs call:search_results() ?>
+<?cs /if ?><?cs # end if/else !devsite ?>
diff --git a/tools/droiddoc/templates-sdk-dev/jd_lists_unified.cs b/tools/droiddoc/templates-sdk-dev/jd_lists_unified.cs
index 417a5c1..4a6f4f7 100644
--- a/tools/droiddoc/templates-sdk-dev/jd_lists_unified.cs
+++ b/tools/droiddoc/templates-sdk-dev/jd_lists_unified.cs
@@ -1 +1,10 @@
+window.METADATA = window.METADATA || {};
+METADATA['<?cs var:metadata.lang ?>'] = {};
+
+METADATA['<?cs var:metadata.lang ?>'].about = [];
+METADATA['<?cs var:metadata.lang ?>'].design = [];
+METADATA['<?cs var:metadata.lang ?>'].develop = [];
+METADATA['<?cs var:metadata.lang ?>'].distribute = [];
+METADATA['<?cs var:metadata.lang ?>'].extras = [];
+
<?cs var:reference_tree ?>
diff --git a/tools/droiddoc/templates-sdk-dev/macros_override.cs b/tools/droiddoc/templates-sdk-dev/macros_override.cs
index 0a94598..5b92fe3 100644
--- a/tools/droiddoc/templates-sdk-dev/macros_override.cs
+++ b/tools/droiddoc/templates-sdk-dev/macros_override.cs
@@ -33,4 +33,19 @@
<?cs set:count = count + #1 ?>
<?cs /each ?>
</table>
-<?cs /def ?>
\ No newline at end of file
+<?cs /def ?>
+
+<?cs
+# Prints a comma separated list of parameters with optional line breaks
+?><?cs
+def:parameter_list(params, linebreaks) ?><?cs
+ each:param = params ?><?cs
+ call:simple_type_link(param.type)?> <?cs
+ var:param.name ?><?cs
+ if: name(param)!=subcount(params)-1
+ ?>, <?cs if:linebreaks
+?>
+ <?cs /if ?><?cs
+ /if ?><?cs
+ /each ?><?cs
+/def ?>
\ No newline at end of file
diff --git a/tools/droiddoc/templates-sdk-dev/nosidenavpage.cs b/tools/droiddoc/templates-sdk-dev/nosidenavpage.cs
index 8e59693..61754f0 100644
--- a/tools/droiddoc/templates-sdk-dev/nosidenavpage.cs
+++ b/tools/droiddoc/templates-sdk-dev/nosidenavpage.cs
@@ -11,6 +11,7 @@
<?cs call:custom_masthead() ?>
<div id="body-content">
+<div>
<div id="doc-content" style="position:relative;">
<?cs call:tag_list(root.descr) ?>
diff --git a/tools/droiddoc/templates-sdk-dev/package.cs b/tools/droiddoc/templates-sdk-dev/package.cs
index 2225565..460a67b 100644
--- a/tools/droiddoc/templates-sdk-dev/package.cs
+++ b/tools/droiddoc/templates-sdk-dev/package.cs
@@ -1,50 +1,25 @@
-<?cs include:"doctype.cs" ?>
+<?cs # THIS CREATES A PACKAGE SUMMARY PAGE FROM EACH package.html FILES
+ # AND NAMES IT package-summary.html ?>
<?cs include:"macros.cs" ?>
<?cs include:"macros_override.cs" ?>
+<?cs include:"doctype.cs" ?>
<html<?cs if:devsite ?> devsite<?cs /if ?>>
<?cs include:"head_tag.cs" ?>
-
-<body class="gc-documentation <?cs if:(reference.gms || reference.gcm) ?>google<?cs /if ?>
- <?cs if:(guide||develop||training||reference||tools||sdk) ?>develop<?cs
- if:reference ?> reference<?cs
- /if ?><?cs
- elif:design ?>design<?cs
- elif:distribute ?>distribute<?cs
- /if ?>">
- <div id="doc-api-level" class="<?cs var:package.since ?>" style="display:none"></div>
- <a name="top"></a>
+<?cs include:"body_tag.cs" ?>
<?cs include:"header.cs" ?>
+<?cs include:"page_info.cs" ?>
+<div class="api apilevel-<?cs var:package.since ?>" id="jd-content">
-<div class="col-12" id="doc-col">
-
-<div id="api-info-block">
-<div class="api-level">
- <?cs call:since_tags(package) ?>
- <?cs call:federated_refs(package) ?>
-</div>
-</div>
-
-<div id="jd-header">
- package
- <h1><?cs var:package.name ?></h1>
-</div><!-- end header -->
-
-<div id="naMessage"></div>
-
-<div id="jd-content" class="api apilevel-<?cs var:package.since ?>">
+<h1><?cs var:package.name ?></h1>
<?cs if:subcount(package.descr) ?>
- <div class="jd-descr">
- <?cs call:tag_list(package.descr) ?>
- </div>
+ <?cs call:tag_list(package.descr) ?>
<?cs /if ?>
<?cs def:class_table(label, classes) ?>
<?cs if:subcount(classes) ?>
<h2><?cs var:label ?></h2>
- <div class="jd-sumtable">
<?cs call:class_link_table(classes) ?>
- </div>
<?cs /if ?>
<?cs /def ?>
@@ -55,11 +30,10 @@
<?cs call:class_table("Exceptions", package.exceptions) ?>
<?cs call:class_table("Errors", package.errors) ?>
+</div><!-- end apilevel -->
+<?cs if:!devsite ?>
<?cs include:"footer.cs" ?>
-</div><!-- end jd-content -->
-</div><!-- doc-content -->
-
<?cs include:"trailer.cs" ?>
-
+<?cs /if ?>
</body>
</html>
diff --git a/tools/droiddoc/templates-sdk-dev/packages.cs b/tools/droiddoc/templates-sdk-dev/packages.cs
index 5056d3a..4db2ea9 100644
--- a/tools/droiddoc/templates-sdk-dev/packages.cs
+++ b/tools/droiddoc/templates-sdk-dev/packages.cs
@@ -1,33 +1,19 @@
-<?cs include:"doctype.cs" ?>
+<?cs # THIS CREATES A LIST OF ALL PACKAGES AND NAMES IT packages.html ?>
<?cs include:"macros.cs" ?>
+<?cs include:"doctype.cs" ?>
<html<?cs if:devsite ?> devsite<?cs /if ?>>
<?cs include:"head_tag.cs" ?>
-<body class="gc-documentation <?cs if:(reference.gms || reference.gcm) ?>google<?cs /if ?>
- <?cs if:(guide||develop||training||reference||tools||sdk) ?>develop<?cs
- if:reference ?> reference<?cs
- /if ?><?cs
- elif:design ?>design<?cs
- elif:distribute ?>distribute<?cs
- /if ?>">
- <a name="top"></a>
+<?cs include:"body_tag.cs" ?>
<?cs include:"header.cs" ?>
-<div class="col-12" id="doc-col">
-
-<div id="jd-header">
<h1><?cs var:page.title ?></h1>
-</div>
-
-<div id="jd-content">
-
-<div class="jd-descr">
-<p><?cs call:tag_list(root.descr) ?></p>
-</div>
+<p>These are the API packages.
+See all <a href="classes.html">API classes</a>.</p>
<?cs set:count = #1 ?>
-<table class="jd-sumtable">
+<table>
<?cs each:pkg = docs.packages ?>
- <tr class="<?cs if:count % #2 ?>alt-color<?cs /if ?> api apilevel-<?cs var:pkg.since ?>" >
+ <tr class="api apilevel-<?cs var:pkg.since ?>" >
<td class="jd-linkcol"><?cs call:package_link(pkg) ?></td>
<td class="jd-descrcol" width="100%"><?cs call:tag_list(pkg.shortDescr) ?></td>
</tr>
@@ -35,11 +21,9 @@
<?cs /each ?>
</table>
+<?cs if:!devsite ?>
<?cs include:"footer.cs" ?>
-</div><!-- end jd-content -->
-</div> <!-- end doc-content -->
-
<?cs include:"trailer.cs" ?>
-
+<?cs /if ?>
</body>
</html>
diff --git a/tools/droiddoc/templates-sdk-dev/page_info.cs b/tools/droiddoc/templates-sdk-dev/page_info.cs
new file mode 100644
index 0000000..fad1274
--- /dev/null
+++ b/tools/droiddoc/templates-sdk-dev/page_info.cs
@@ -0,0 +1,109 @@
+<?cs # optional, more info about the page, such as API level and links ?>
+<?cs
+# A modal dialog when API level is set too low for this page
+?><div id="naMessage"></div>
+<?cs
+#
+# If this is a package summary page...
+#
+?><?cs
+if:subcount(package)
+?>
+<div id="api-info-block">
+<div class="api-level">
+ <?cs call:since_tags(package) ?>
+ <?cs call:federated_refs(package) ?>
+</div>
+</div><?cs
+#
+# Or if this is a class page...
+#
+?><?cs
+elif:subcount(class)
+?>
+<div id="api-info-block">
+<div class="api-level">
+ <?cs call:since_tags(class) ?><?cs
+ if:class.deprecatedsince
+ ?><br>Deprecated since <a href="<?cs var:toroot ?>guide/topics/manifest/uses-sdk-element.html#ApiLevels"
+ >API level <?cs var:class.deprecatedsince ?></a><?cs
+ /if ?>
+ <?cs call:federated_refs(class) ?>
+</div>
+
+<?cs # Set variables about whether there are inherited members; no output ?>
+<?cs each:cl=class.inherited ?>
+ <?cs if:subcount(cl.methods) ?>
+ <?cs set:inhmethods = #1 ?>
+ <?cs /if ?>
+ <?cs if:subcount(cl.constants) ?>
+ <?cs set:inhconstants = #1 ?>
+ <?cs /if ?>
+ <?cs if:subcount(cl.fields) ?>
+ <?cs set:inhfields = #1 ?>
+ <?cs /if ?>
+ <?cs if:subcount(cl.attrs) ?>
+ <?cs set:inhattrs = #1 ?>
+ <?cs /if ?>
+<?cs /each ?>
+
+<div class="sum-details-links">
+<?cs if:inhattrs || inhconstants || inhfields || inhmethods || (!class.subclasses.hidden &&
+ (subcount(class.subclasses.direct) || subcount(class.subclasses.indirect))) ?>
+Summary:
+<?cs if:subcount(class.inners) ?>
+ <a href="#nestedclasses">Nested Classes</a>
+ <?cs set:linkcount = #1 ?>
+<?cs /if ?>
+<?cs if:subcount(class.attrs) ?>
+ <?cs if:linkcount ?>| <?cs /if ?><a href="#lattrs">XML Attrs</a>
+ <?cs set:linkcount = #1 ?>
+<?cs /if ?>
+<?cs if:inhattrs ?>
+ <?cs if:linkcount ?>| <?cs /if ?><a href="#inhattrs">Inherited XML Attrs</a>
+ <?cs set:linkcount = #1 ?>
+<?cs /if ?>
+<?cs if:subcount(class.enumConstants) ?>
+ <?cs if:linkcount ?>| <?cs /if ?><a href="#enumconstants">Enums</a>
+ <?cs set:linkcount = #1 ?>
+<?cs /if ?>
+<?cs if:subcount(class.constants) ?>
+ <?cs if:linkcount ?>| <?cs /if ?><a href="#constants">Constants</a>
+ <?cs set:linkcount = #1 ?>
+<?cs /if ?>
+<?cs if:inhconstants ?>
+ <?cs if:linkcount ?>| <?cs /if ?><a href="#inhconstants">Inherited Constants</a>
+ <?cs set:linkcount = #1 ?>
+<?cs /if ?>
+<?cs if:subcount(class.fields) ?>
+ <?cs if:linkcount ?>| <?cs /if ?><a href="#lfields">Fields</a>
+ <?cs set:linkcount = #1 ?>
+<?cs /if ?>
+<?cs if:inhfields ?>
+ <?cs if:linkcount ?>| <?cs /if ?><a href="#inhfields">Inherited Fields</a>
+ <?cs set:linkcount = #1 ?>
+<?cs /if ?>
+<?cs if:subcount(class.ctors.public) ?>
+ <?cs if:linkcount ?>| <?cs /if ?><a href="#pubctors">Ctors</a>
+ <?cs set:linkcount = #1 ?>
+<?cs /if ?>
+<?cs if:subcount(class.ctors.protected) ?>
+ <?cs if:linkcount ?>| <?cs /if ?><a href="#proctors">Protected Ctors</a>
+ <?cs set:linkcount = #1 ?>
+<?cs /if ?>
+<?cs if:subcount(class.methods.public) ?>
+ <?cs if:linkcount ?>| <?cs /if ?><a href="#pubmethods">Methods</a>
+ <?cs set:linkcount = #1 ?>
+<?cs /if ?>
+<?cs if:subcount(class.methods.protected) ?>
+ <?cs if:linkcount ?>| <?cs /if ?><a href="#promethods">Protected Methods</a>
+ <?cs set:linkcount = #1 ?>
+<?cs /if ?>
+<?cs if:inhmethods ?>
+ <?cs if:linkcount ?>| <?cs /if ?><a href="#inhmethods">Inherited Methods</a>
+<?cs /if ?>
+| <a href="#" onclick="return toggleAllClassInherited()" id="toggleAllClassInherited">[Expand All]</a>
+<?cs /if ?>
+</div><!-- end sum-details-links -->
+</div><!-- end api-info-block --><?cs
+/if ?><?cs # end of if package or class ?>
\ No newline at end of file
diff --git a/tools/droiddoc/templates-sdk-dev/sample.cs b/tools/droiddoc/templates-sdk-dev/sample.cs
index 32a0788..2c5b9d2 100644
--- a/tools/droiddoc/templates-sdk-dev/sample.cs
+++ b/tools/droiddoc/templates-sdk-dev/sample.cs
@@ -5,11 +5,6 @@
<body class="gc-documentation develop samples" itemscope itemtype="http://schema.org/Article">
<?cs include:"header.cs" ?>
-<div <?cs if:fullpage
-?>class="fullpage"<?cs elif:design||tools||about||sdk||distribute
-?>class="col-13" id="doc-col"<?cs else
-?>class="col-12" id="doc-col"<?cs /if ?> >
-
<!-- start breadcrumb block -->
<div id="api-info-block">
<div class="sum-details-links">
@@ -30,7 +25,7 @@
<div id="pathCrumb">
<?cs each:item = parentdirs ?>
<?cs if:LinkifyPathCrumb
- ?><a href="<?cs var:toroot ?><?cs var:item.Link ?>"><?cs var:item.Name ?></a> /
+ ?><a href="<?cs var:toroot ?><?cs var:item.Link ?>"><?cs var:item.Name ?></a> /
<?cs else
?><?cs var:item.Name ?> / <?cs /if ?>
<?cs /each ?>
@@ -92,9 +87,9 @@
<div class="content-footer <?cs
if:fullpage ?>wrap<?cs
- else ?>layout-content-row<?cs /if ?>"
+ else ?>cols<?cs /if ?>"
itemscope itemtype="http://schema.org/SiteNavigationElement">
- <div class="layout-content-col <?cs
+ <div class="<?cs
if:fullpage ?>col-16<?cs
elif:training||guide ?>col-8<?cs
else ?>col-9<?cs /if ?>" style="padding-top:4px">
@@ -103,7 +98,7 @@
<?cs /if ?>
</div>
<?cs if:!fullscreen ?>
- <div class="paging-links layout-content-col col-4">
+ <div class="paging-links col-4">
<?cs if:(design||training||walkthru) && !page.landing && !page.trainingcourse && !footer.hide ?>
<a href="#" class="prev-page-link hide"
zh-tw-lang="上一堂課"
@@ -128,24 +123,17 @@
<?cs # for training classes, provide a different kind of link when the next page is a different class ?>
<?cs if:training && !page.article ?>
- <div class="layout-content-row content-footer next-class" style="display:none" itemscope itemtype="http://schema.org/SiteNavigationElement">
+ <div class="content-footer next-class" style="display:none" itemscope itemtype="http://schema.org/SiteNavigationElement">
<a href="#" class="next-class-link hide">Next class: </a>
</div>
<?cs /if ?>
</div> <!-- end jd-content -->
-<?cs include:"footer.cs" ?>
-</div><!-- end doc-content -->
-
-<?cs include:"trailer.cs" ?>
+ <?cs if:!devsite ?>
+ <?cs include:"footer.cs" ?>
+ <?cs include:"trailer.cs" ?>
+ <?cs /if ?>
</body>
</html>
-
-
-
-
-
-
-
diff --git a/tools/droiddoc/templates-sdk-dev/sampleindex.cs b/tools/droiddoc/templates-sdk-dev/sampleindex.cs
index 1bacb53..db648ff 100644
--- a/tools/droiddoc/templates-sdk-dev/sampleindex.cs
+++ b/tools/droiddoc/templates-sdk-dev/sampleindex.cs
@@ -5,11 +5,6 @@
<body class="gc-documentation develop samples" itemscope itemtype="http://schema.org/Article">
<?cs include:"header.cs" ?>
-<div <?cs if:fullpage
-?>class="fullpage"<?cs elif:design||tools||about||sdk||distribute
-?>class="col-13" id="doc-col"<?cs else
-?>class="col-12" id="doc-col"<?cs /if ?> >
-
<!-- start breadcrumb block -->
<div id="api-info-block">
<div class="sum-details-links">
@@ -82,9 +77,9 @@
<?cs /if ?><?cs # end if/else online docs ?>
<div class="content-footer <?cs
if:fullpage ?>wrap<?cs
- else ?>layout-content-row<?cs /if ?>"
+ else ?>cols<?cs /if ?>"
itemscope itemtype="http://schema.org/SiteNavigationElement">
- <div class="layout-content-col <?cs
+ <div class="<?cs
if:fullpage ?>col-16<?cs
elif:training||guide ?>col-8<?cs
else ?>col-9<?cs /if ?>" style="padding-top:4px">
@@ -93,7 +88,7 @@
<?cs /if ?>
</div>
<?cs if:!fullscreen ?>
- <div class="paging-links layout-content-col col-4">
+ <div class="paging-links col-4">
<?cs if:(design||training||walkthru) && !page.landing && !page.trainingcourse && !footer.hide ?>
<a href="#" class="prev-page-link hide"
zh-tw-lang="上一堂課"
@@ -118,7 +113,7 @@
<?cs # for training classes, provide a different kind of link when the next page is a different class ?>
<?cs if:training && !page.article ?>
- <div class="layout-content-row content-footer next-class" style="display:none" itemscope itemtype="http://schema.org/SiteNavigationElement">
+ <div class="content-footer next-class" style="display:none" itemscope itemtype="http://schema.org/SiteNavigationElement">
<a href="#" class="next-class-link hide">Next class: </a>
</div>
<?cs /if ?>
@@ -126,7 +121,6 @@
</div> <!-- end jd-content -->
<?cs include:"footer.cs" ?>
-</div><!-- end doc-content -->
<?cs include:"trailer.cs" ?>
diff --git a/tools/droiddoc/templates-sdk-dev/sdkpage.cs b/tools/droiddoc/templates-sdk-dev/sdkpage.cs
index 817ac47..30d6d04 100644
--- a/tools/droiddoc/templates-sdk-dev/sdkpage.cs
+++ b/tools/droiddoc/templates-sdk-dev/sdkpage.cs
@@ -1,5 +1,6 @@
<?cs include:"doctype.cs" ?>
<?cs include:"macros.cs" ?>
+<?cs include:"../../../../frameworks/base/docs/html/sdk/sdk_vars.cs" ?>
<html<?cs if:devsite ?> devsite<?cs /if ?>>
<?cs if:sdk.redirect ?>
<head>
@@ -80,20 +81,20 @@
<th>Platform</th>
<th>Package</th>
<th style="white-space:nowrap">Size (Bytes)</th>
- <th>MD5 Checksum</th>
+ <th>SHA1 Checksum</th>
</tr>
<tr>
<td>Windows 32-bit</td>
<td>
- <a onClick="return onDownload(this)"
- href="http://dl.google.com/android/ndk/<?cs var:ndk.win32_download ?>"><?cs var:ndk.win32_download ?></a>
+ <a onClick="return onDownload(this)" data-modal-toggle="ndk_tos"
+ href="http://dl.google.com/android/repository/<?cs var:ndk.win32_download ?>"><?cs var:ndk.win32_download ?></a>
</td>
<td><?cs var:ndk.win32_bytes ?></td>
<td><?cs var:ndk.win32_checksum ?></td>
</tr>
<!-- <tr>
<td>
- <a onClick="return onDownload(this)"
+ <a onClick="return onDownload(this)" data-modal-toggle="ndk_tos"
href="http://dl.google.com/android/ndk/<?cs var:ndk.win32.legacy_download ?>"><?cs var:ndk.win32.legacy_download ?></a>
</td>
<td><?cs var:ndk.win32.legacy_bytes ?></td>
@@ -102,66 +103,59 @@
<tr>
<td>Windows 64-bit</td>
<td>
- <a onClick="return onDownload(this)"
- href="http://dl.google.com/android/ndk/<?cs var:ndk.win64_download ?>"><?cs var:ndk.win64_download ?></a>
+ <a onClick="return onDownload(this)" data-modal-toggle="ndk_tos"
+ href="http://dl.google.com/android/repository/<?cs var:ndk.win64_download ?>"><?cs var:ndk.win64_download ?></a>
</td>
<td><?cs var:ndk.win64_bytes ?></td>
<td><?cs var:ndk.win64_checksum ?></td>
</tr>
<!-- <tr>
<td>
- <a onClick="return onDownload(this)"
- href="http://dl.google.com/android/ndk/<?cs var:ndk.win64.legacy_download ?>"><?cs var:ndk.win64.legacy_download ?></a>
+ <a onClick="return onDownload(this)" data-modal-toggle="ndk_tos"
+ href="http://dl.google.com/android/repository/<?cs var:ndk.win64.legacy_download ?>"><?cs var:ndk.win64.legacy_download ?></a>
</td>
<td><?cs var:ndk.win64.legacy_bytes ?></td>
<td><?cs var:ndk.win64.legacy_checksum ?></td>
</tr> -->
+<!-- (this item is deprecated)
<tr>
<td>Mac OS X 32-bit</td>
<td>
- <a onClick="return onDownload(this)"
- href="http://dl.google.com/android/ndk/<?cs var:ndk.mac32_download ?>"><?cs var:ndk.mac32_download ?></a>
+ <a onClick="return onDownload(this)" data-modal-toggle="ndk_tos"
+ href="http://dl.google.com/android/repository/<?cs var:ndk.mac32_download ?>"><?cs var:ndk.mac32_download ?></a>
</td>
<td><?cs var:ndk.mac32_bytes ?></td>
<td><?cs var:ndk.mac32_checksum ?></td>
- </tr>
- <!-- <tr>
+ </tr> -->
+ <!-- (this item is deprecated)
+ <tr>
<td>
- <a onClick="return onDownload(this)"
- href="http://dl.google.com/android/ndk/<?cs var:ndk.mac32.legacy_download ?>"><?cs var:ndk.mac32.legacy_download ?></a>
+ <a onClick="return onDownload(this)" data-modal-toggle="ndk_tos"
+ href="http://dl.google.com/android/repository/<?cs var:ndk.mac32.legacy_download ?>"><?cs var:ndk.mac32.legacy_download ?></a>
</td>
<td><?cs var:ndk.mac32.legacy_bytes ?></td>
<td><?cs var:ndk.mac32.legacy_checksum ?></td>
</tr> -->
<td>Mac OS X 64-bit</td>
<td>
- <a onClick="return onDownload(this)"
- href="http://dl.google.com/android/ndk/<?cs var:ndk.mac64_download ?>"><?cs var:ndk.mac64_download ?></a>
+ <a onClick="return onDownload(this)" data-modal-toggle="ndk_tos"
+ href="http://dl.google.com/android/repository/<?cs var:ndk.mac64_download ?>"><?cs var:ndk.mac64_download ?></a>
</td>
<td><?cs var:ndk.mac64_bytes ?></td>
<td><?cs var:ndk.mac64_checksum ?></td>
</tr>
<!-- <tr>
<td>
- <a onClick="return onDownload(this)"
- href="http://dl.google.com/android/ndk/<?cs var:ndk.mac64.legacy_download ?>"><?cs var:ndk.mac64.legacy_download ?></a>
+ <a onClick="return onDownload(this)" data-modal-toggle="ndk_tos"
+ href="http://dl.google.com/android/repository/<?cs var:ndk.mac64.legacy_download ?>"><?cs var:ndk.mac64.legacy_download ?></a>
</td>
<td><?cs var:ndk.mac64.legacy_bytes ?></td>
<td><?cs var:ndk.mac64.legacy_checksum ?></td>
</tr> -->
- <tr>
- <td>Linux 32-bit (x86)</td>
- <td>
- <a onClick="return onDownload(this)"
- href="http://dl.google.com/android/ndk/<?cs var:ndk.linux32_download ?>"><?cs var:ndk.linux32_download ?></a>
- </td>
- <td><?cs var:ndk.linux32_bytes ?></td>
- <td><?cs var:ndk.linux32_checksum ?></td>
- </tr>
<!-- <tr>
<td>
- <a onClick="return onDownload(this)"
- href="http://dl.google.com/android/ndk/<?cs var:ndk.linux32.legacy_download ?>"><?cs var:ndk.linux32.legacy_download ?></a>
+ <a onClick="return onDownload(this)" data-modal-toggle="ndk_tos"
+ href="http://dl.google.com/android/repository/<?cs var:ndk.linux32.legacy_download ?>"><?cs var:ndk.linux32.legacy_download ?></a>
</td>
<td><?cs var:ndk.linux32.legacy_bytes ?></td>
<td><?cs var:ndk.linux32.legacy_checksum ?></td>
@@ -169,16 +163,16 @@
<tr>
<td>Linux 64-bit (x86)</td>
<td>
- <a onClick="return onDownload(this)"
- href="http://dl.google.com/android/ndk/<?cs var:ndk.linux64_download ?>"><?cs var:ndk.linux64_download ?></a>
+ <a onClick="return onDownload(this)" data-modal-toggle="ndk_tos"
+ href="http://dl.google.com/android/repository/<?cs var:ndk.linux64_download ?>"><?cs var:ndk.linux64_download ?></a>
</td>
<td><?cs var:ndk.linux64_bytes ?></td>
<td><?cs var:ndk.linux64_checksum ?></td>
</tr>
<!-- <tr>
<td>
- <a onClick="return onDownload(this)"
- href="http://dl.google.com/android/ndk/<?cs var:ndk.linux64.legacy_download ?>"><?cs var:ndk.linux64.legacy_download ?></a>
+ <a onClick="return onDownload(this)" data-modal-toggle="ndk_tos"
+ href="http://dl.google.com/android/repository/<?cs var:ndk.linux64.legacy_download ?>"><?cs var:ndk.linux64.legacy_download ?></a>
</td>
<td><?cs var:ndk.linux64.legacy_bytes ?></td>
<td><?cs var:ndk.linux64.legacy_checksum ?></td>
@@ -190,16 +184,13 @@
<?cs call:tag_list(root.descr) ?>
-
+<?cs ######## The NDK version of the download script ######### ?>
<script>
function onDownload(link) {
$("#downloadForRealz").html("Download " + $(link).text());
$("#downloadForRealz").attr('href',$(link).attr('href'));
- $("#tos").fadeIn('slow');
-
- location.hash = "download";
return false;
}
@@ -212,25 +203,28 @@
}
}
- function onDownloadNdkForRealz(link) {
+
+ function onDownloadForRealz(link) {
if ($("input#agree").is(':checked')) {
- $("#tos").fadeOut('slow');
-
- $('html, body').animate({
- scrollTop: $("#Installing").offset().top
- }, 800, function() {
- $("#Installing").click();
+ $("div.sdk-terms").slideUp();
+ $("h2#tos-header").text('Now downloading...');
+ $(".sdk-terms-intro").text('Your download is in progress.');
+ $("#sdk-terms-form").fadeOut('slow', function() {
+ setTimeout(function() {
+ // close the dialog
+ $('#ndk_tos').trigger('modal-close');
+ // reload to refresh the tos or optionally forward the user
+ location.reload();
+ }, 3000);
});
-
+ ga('send', 'event', 'SDK', 'NDK tools', $("#downloadForRealz").html());
return true;
} else {
- $("label#agreeLabel").parent().stop().animate({color: "#258AAF"}, 200,
- function() {$("label#agreeLabel").parent().stop().animate({color: "#222"}, 200)}
- );
return false;
}
}
+
$(window).hashchange( function(){
if (location.hash == "") {
location.reload();
@@ -262,155 +256,173 @@
<?cs call:tag_list(root.descr) ?>
+<section id="downloads" class="dac-section dac-small">
+<div class="wrap">
+
+<h2 class="norule">Start using Android Studio today</h2>
+
+<p>Android Studio includes all the tools you need to build apps for Android.</p>
+
+<div style="float:left;margin-right:40px;width:auto;">
+<p>
+ <a class="landing-button green download-bundle-button"
+ data-modal-toggle="studio_tos">Download Android Studio 2.0<br>
+ <span class="small"></span></a>
+</p>
+</div>
+
+<div style="float:left;width:auto;margin-bottom:40px">
+<ul class="nolist" style="text-transform: uppercase;margin:8px 0">
+<li>Version: <?cs var:studio.version ?></li>
+<li>Release date: <?cs var:studio.release.date ?></li>
+</ul>
+</div>
-<div class="pax col-13 online" style="margin:0;">
-
-<h3>SDK Tools Only</h3>
-
-<p>If you prefer to use a different IDE or run the tools from the
-command line or with build scripts, you can instead download the stand-alone Android SDK Tools.
-These packages provide the basic SDK tools for app development, without an IDE.
-Also see the <a href="<?cs var:toroot ?>tools/sdk/tools-notes.html">SDK tools release notes</a>.</p>
+<h4 style="clear:left;margin-top:40px">Select a different platform</h4>
<table class="download">
<tr>
<th>Platform</th>
- <th>Package</th>
+ <th>Android Studio package</th>
<th>Size</th>
- <th>SHA-1 Checksum</th>
+ <th>SHA-1 checksum</th>
</tr>
<tr>
- <td rowspan="2">Windows</td>
- <td>
- <a onclick="return onDownload(this)" id="win-tools" href="http://dl.google.com/android/<?cs
-var:sdk.win_installer
-?>"><?cs var:sdk.win_installer ?></a> (Recommended)
- </td>
- <td><?cs var:sdk.win_installer_bytes ?> bytes</td>
- <td><?cs var:sdk.win_installer_checksum ?></td>
- </tr>
- <tr>
- <!-- blank TD from Windows rowspan -->
- <td>
- <a onclick="return onDownload(this)" href="http://dl.google.com/android/<?cs var:sdk.win_download
-?>"><?cs var:sdk.win_download ?></a>
- </td>
- <td><?cs var:sdk.win_bytes ?> bytes</td>
- <td><?cs var:sdk.win_checksum ?></td>
- </tr>
- <tr>
- <td><nobr>Mac OS X</nobr></td>
- <td>
- <a onclick="return onDownload(this)" id="mac-tools" href="http://dl.google.com/android/<?cs
-var:sdk.mac_download
-?>"><?cs var:sdk.mac_download ?></a>
- </td>
- <td><?cs var:sdk.mac_bytes ?> bytes</td>
- <td><?cs var:sdk.mac_checksum ?></td>
- </tr>
- <tr>
- <td>Linux</td>
- <td>
- <a onclick="return onDownload(this)" id="linux-tools" href="http://dl.google.com/android/<?cs
-var:sdk.linux_download
-?>"><?cs var:sdk.linux_download ?></a>
- </td>
- <td><?cs var:sdk.linux_bytes ?> bytes</td>
- <td><?cs var:sdk.linux_checksum ?></td>
- </tr>
- </table>
-
-
-
-<h3>All Android Studio Packages</h3>
-
-<p>Select a specific Android Studio package for your platform. Also see the
-<a href="<?cs var:toroot ?>tools/revisions/studio.html">Android Studio release notes</a>.</p>
-
- <table class="download">
- <tr>
- <th>Platform</th>
- <th>Package</th>
- <th>Size</th>
- <th>SHA-1 Checksum</th>
- </tr>
-
- <tr>
<td rowspan="3">Windows</td>
<td>
- <a onclick="return onDownload(this)" id="win-bundle"
+ <a onclick="return onDownload(this,false,true)" id="win-bundle" data-modal-toggle="studio_tos"
href="https://dl.google.com/dl/android/studio/install/<?cs var:studio.version ?>/<?cs var:studio.win_bundle_exe_download ?>"
- ><?cs var:studio.win_bundle_exe_download ?></a><br>(Recommended)
+ ><?cs var:studio.win_bundle_exe_download ?></a><br>
+ Includes Windows installer (recommended)
</td>
- <td><?cs var:studio.win_bundle_exe_bytes ?> bytes</td>
+ <td id="win-bundle-size"><?cs call:size_in_mb(studio.win_bundle_exe_bytes) ?> MB
+ <br>(<?cs var:studio.win_bundle_exe_bytes ?> bytes)</td>
<td><?cs var:studio.win_bundle_exe_checksum ?></td>
</tr>
-
<tr>
<!-- blank TD from Windows rowspan -->
<td>
- <a onclick="return onDownload(this)"
- href="https://dl.google.com/dl/android/studio/install/<?cs var:studio.version ?>/<?cs var:studio.win_notools_exe_download ?>"
- ><?cs var:studio.win_notools_exe_download ?></a><br>(No SDK tools included)
- </td>
- <td><?cs var:studio.win_notools_exe_bytes ?> bytes</td>
- <td><?cs var:studio.win_notools_exe_checksum ?></td>
- </tr>
-
- <tr>
- <!-- blank TD from Windows rowspan -->
- <td>
- <a onclick="return onDownload(this)"
+ <a onclick="return onDownload(this,false,true)" id="win-bundle-zip" data-modal-toggle="studio_tos"
href="https://dl.google.com/dl/android/studio/ide-zips/<?cs var:studio.version ?>/<?cs var:studio.win_bundle_download ?>"
- ><?cs var:studio.win_bundle_download ?></a>
+ ><?cs var:studio.win_bundle_download ?></a><br>
+ No Windows installer
</td>
- <td><?cs var:studio.win_bundle_bytes ?> bytes</td>
+ <td><?cs call:size_in_mb(studio.win_bundle_bytes) ?> MB
+ <br>(<?cs var:studio.win_bundle_bytes ?> bytes)</td>
<td><?cs var:studio.win_bundle_checksum ?></td>
</tr>
-
+ <tr>
+ <!-- blank TD from Windows rowspan -->
+ <td>
+ <a onclick="return onDownload(this,false,true)" id="win-bundle-notools" data-modal-toggle="studio_tos"
+ href="https://dl.google.com/dl/android/studio/install/<?cs var:studio.version ?>/<?cs var:studio.win_notools_exe_download ?>"
+ ><?cs var:studio.win_notools_exe_download ?></a><br>
+ Includes Windows installer but no SDK tools
+ </td>
+ <td><?cs call:size_in_mb(studio.win_notools_exe_bytes) ?> MB
+ <br>(<?cs var:studio.win_notools_exe_bytes ?> bytes)</td>
+ <td><?cs var:studio.win_notools_exe_checksum ?></td>
+ </tr>
<tr>
<td><nobr>Mac OS X</nobr></td>
<td>
- <a onclick="return onDownload(this)" id="mac-bundle"
+ <a onclick="return onDownload(this,false,true)" id="mac-bundle" data-modal-toggle="studio_tos"
href="https://dl.google.com/dl/android/studio/install/<?cs var:studio.version ?>/<?cs var:studio.mac_bundle_download ?>"
><?cs var:studio.mac_bundle_download ?></a>
</td>
- <td><?cs var:studio.mac_bundle_bytes ?> bytes</td>
+ <td id="mac-bundle-size"><?cs call:size_in_mb(studio.mac_bundle_bytes) ?> MB
+ <br>(<?cs var:studio.mac_bundle_bytes ?> bytes)</td>
<td><?cs var:studio.mac_bundle_checksum ?></td>
</tr>
-
<tr>
<td>Linux</td>
<td>
- <a onclick="return onDownload(this)" id="linux-bundle"
+ <a onclick="return onDownload(this,false,true)" id="linux-bundle" data-modal-toggle="studio_tos"
href="https://dl.google.com/dl/android/studio/ide-zips/<?cs var:studio.version ?>/<?cs var:studio.linux_bundle_download ?>"
><?cs var:studio.linux_bundle_download ?></a>
</td>
- <td><?cs var:studio.linux_bundle_bytes ?> bytes</td>
+ <td id="linux-bundle-size"><?cs call:size_in_mb(studio.linux_bundle_bytes) ?> MB
+ <br>(<?cs var:studio.linux_bundle_bytes ?> bytes)</td>
<td><?cs var:studio.linux_bundle_checksum ?></td>
</tr>
</table>
-</div><!-- end pax -->
+<h4 class="norule" style="margin-top:40px">Get just the SDK tools</h4>
+
+<p>If you do not need Android Studio, you can download the basic
+Android SDK tools below.</p>
+
+ <table class="download">
+ <tr>
+ <th>Platform</th>
+ <th>SDK tools package</th>
+ <th>Size</th>
+ <th>SHA-1 checksum</th>
+ </tr>
+ <tr>
+ <td rowspan="2">Windows</td>
+ <td>
+ <a onclick="return onDownload(this)" id="win-tools" data-modal-toggle="studio_tos"
+ href="//dl.google.com/android/<?cs
+var:sdk.win_installer
+?>"><?cs var:sdk.win_installer ?></a><br>
+ Includes Windows installer
+ </td>
+ <td><?cs call:size_in_mb(sdk.win_installer_bytes) ?> MB
+ <br>(<?cs var:sdk.win_installer_bytes ?> bytes)</td>
+ <td><?cs var:sdk.win_installer_checksum ?></td>
+ </tr>
+ <tr>
+ <!-- blank TD from Windows rowspan -->
+ <td>
+ <a onclick="return onDownload(this)" id="win-tools2" data-modal-toggle="studio_tos"
+ href="//dl.google.com/android/<?cs var:sdk.win_download
+?>"><?cs var:sdk.win_download ?></a><br>
+ No Windows installer
+ </td>
+ <td><?cs call:size_in_mb(sdk.win_bytes) ?> MB
+ <br>(<?cs var:sdk.win_bytes ?> bytes)</td>
+ <td><?cs var:sdk.win_checksum ?></td>
+ </tr>
+ <tr>
+ <td><nobr>Mac OS X</nobr></td>
+ <td>
+ <a onclick="return onDownload(this)" id="mac-tools" data-modal-toggle="studio_tos"
+ href="//dl.google.com/android/<?cs
+var:sdk.mac_download
+?>"><?cs var:sdk.mac_download ?></a>
+ </td>
+ <td><?cs call:size_in_mb(sdk.mac_bytes) ?> MB
+ <br>(<?cs var:sdk.mac_bytes ?> bytes)</td>
+ <td><?cs var:sdk.mac_checksum ?></td>
+ </tr>
+ <tr>
+ <td>Linux</td>
+ <td>
+ <a onclick="return onDownload(this)" id="linux-tools" data-modal-toggle="studio_tos"
+ href="//dl.google.com/android/<?cs
+var:sdk.linux_download
+?>"><?cs var:sdk.linux_download ?></a>
+ </td>
+ <td><?cs call:size_in_mb(sdk.linux_bytes) ?> MB
+ <br>(<?cs var:sdk.linux_bytes ?> bytes)</td>
+ <td><?cs var:sdk.linux_checksum ?></td>
+ </tr>
+ </table>
+ <p>
+Also see the <a href="<?cs var:toroot ?>tools/sdk/tools-notes.html">SDK
+tools release notes</a>.</p>
+
+ </div><!-- end wrap -->
+ </section>
-
-</div><!-- end col-13 for lower-half content -->
-
-
-
-
+<?cs ######## The Android Studio version of the download script ######### ?>
<script>
- if (location.hash == "#Requirements") {
- $('.reqs').show();
- } else if (location.hash == "#ExistingIDE") {
- $('.ide').show();
- }
-
var os;
var bundlename;
var $toolslink;
@@ -435,7 +447,9 @@
$('#not-supported').hide();
/* set up primary Android Studio download button */
- $('.download-bundle-button').append(" <br/><span class='small'>for " + os + "</span>");
+ idname = bundlename + "-size";
+ sizeMB = $(idname).text().split(' MB')[0];
+ $('.download-bundle-button > .small').html(" for " + os + " <em>(" + sizeMB + " MB)</em>");
$('.download-bundle-button').click(function() {return onDownload(this,true,true);}).attr('href', bundlename);
}
@@ -450,12 +464,13 @@
}
$("#downloadForRealz").attr('bundle', bundle);
- $("a#downloadForRealz").attr("name", $(link).attr('href'));
+ if (bundle && !button) {
+ $("a#downloadForRealz").attr("name", "#" + $(link).attr('id'));
+ } else {
+ $("h2#tos-header").text('Download the Android SDK Tools');
+ $("a#downloadForRealz").attr("name", $(link).attr('href'));
+ }
- $("#tos").show();
- $("#landing").hide();
-
- location.hash = "top";
return false;
}
@@ -483,28 +498,27 @@
function onDownloadForRealz(link) {
if ($("input#agree").is(':checked')) {
- location.hash = "";
- location.hash = "top";
$("div.sdk-terms").slideUp();
- $("h1#tos-header").text('Now downloading...');
- $(".sdk-terms-intro").text('You\'ll be redirected to the install instructions in a moment.');
- $("#sdk-terms-form").fadeOut('slow', function() {
- setTimeout(function() {
- if ($("#downloadForRealz").attr('bundle') == 'true') {
- // User downloaded the studio Bundle
- window.location = "/sdk/installing/index.html?pkg=studio";
- } else {
- // User downloaded the SDK Tools
- window.location = "/sdk/installing/index.html?pkg=tools";
- }
- }, 3000);
- });
+ if ($("#downloadForRealz").attr('bundle') == 'true') {
+ $("h2#tos-header").text('Now downloading Android Studio!');
+ $(".sdk-terms-intro").text('Redirecting to the install instructions...');
+ $("#sdk-terms-form").slideUp(function() {
+ setTimeout(function() {
+ window.location = "/sdk/installing/index.html";
+ }, 2000);
+ });
+ } else {
+ $("h2#tos-header").text('Now downloading the Android SDK Tools!');
+ $(".sdk-terms-intro").html("<p>Because you've chosen to download " +
+ "only the Android SDK tools (and not Android Studio), there are no " +
+ "setup procedures to follow.</p><p>For information about how to " +
+ "keep your SDK tools up to date, refer to the " +
+ "<a href='/tools/help/sdk-manager.html'>SDK Manager</a> guide.</p>");
+ $("#sdk-terms-form").slideUp();
+ }
ga('send', 'event', 'SDK', 'IDE and Tools', $("#downloadForRealz").html());
return true;
} else {
- $("label#agreeLabel").parent().stop().animate({color: "#258AAF"}, 200,
- function() {$("label#agreeLabel").parent().stop().animate({color: "#222"}, 200)}
- );
return false;
}
}
@@ -519,7 +533,7 @@
-</div><!-- end the wrapper used for relative/absolute positions -->
+
<?cs # THIS DIV WAS OPENED IN INDEX.JD ?>
@@ -568,6 +582,11 @@
</div><!-- end g-unit -->
<?cs include:"trailer.cs" ?>
+<script src="https://developer.android.com/ytblogger_lists_unified.js?v=17" type="text/javascript"></script>
+<script src="/jd_lists_unified.js?v=17" type="text/javascript"></script>
+<script src="/jd_extras.js?v=17" type="text/javascript"></script>
+<script src="/jd_collections.js?v=17" type="text/javascript"></script>
+<script src="/jd_tag_helpers.js?v=17" type="text/javascript"></script>
<!-- Start of Tag -->
<script type="text/javascript">
diff --git a/tools/droiddoc/templates-sdk-dev/trailer.cs b/tools/droiddoc/templates-sdk-dev/trailer.cs
index 337f8d3..2050475 100644
--- a/tools/droiddoc/templates-sdk-dev/trailer.cs
+++ b/tools/droiddoc/templates-sdk-dev/trailer.cs
@@ -1,3 +1,7 @@
+<?cs
+# Other, non-visible things needed at the end of the page,
+# because not every page needs footer content, but does need other stuff
+?>
</div> <!-- end body-content --> <?cs # normally opened by header.cs ?>
<?cs if:carousel ?>
@@ -18,3 +22,17 @@
</script>
<?cs /if ?>
+<script src="https://developer.android.com/ytblogger_lists_unified.js" defer></script>
+<script src="/jd_lists_unified_en.js?v=17" defer></script>
+<script src="/reference/lists.js?v=17" defer></script>
+<script src="/reference/gcm_lists.js?v=17" defer></script>
+<script src="/reference/gms_lists.js?v=17" defer></script>
+<script>
+ // Load localized metadata.
+ (function(lang) {
+ if (lang === 'en') { return; }
+
+ // Write it to the document so it gets evaluated before DOMContentReady.
+ document.write('<script src="/jd_lists_unified_' + lang + '.js?v=14" defer></' + 'script>');
+ })(getLangPref())
+</script>