From d9ca90b4b9bd631329e6241b1ac4824ad0821639 Mon Sep 17 00:00:00 2001 From: Roman Nurik Date: Tue, 6 Mar 2012 12:25:34 -0800 Subject: [PATCH] Add SDK template and assets for Android Design Change-Id: Id7a953bf59e5e05242c46cdfb2b425e80424fc2f --- .../templates-sdk/assets/design/callout.png | Bin 0 -> 1383 bytes .../templates-sdk/assets/design/default.css | 641 ++++++++++++++++++ .../templates-sdk/assets/design/default.js | 188 ++++++ .../templates-sdk/assets/design/default.scss | 740 +++++++++++++++++++++ .../assets/design/disclosure_down.png | Bin 0 -> 990 bytes .../assets/design/disclosure_left.png | Bin 0 -> 989 bytes .../assets/design/disclosure_right.png | Bin 0 -> 992 bytes .../templates-sdk/assets/design/disclosure_up.png | Bin 0 -> 977 bytes .../templates-sdk/assets/design/ico_action.png | Bin 0 -> 415 bytes .../templates-sdk/assets/design/ico_good.png | Bin 0 -> 318 bytes .../assets/design/ico_movie_inline.png | Bin 0 -> 1040 bytes .../assets/design/ico_phone_tablet.png | Bin 0 -> 302 bytes .../templates-sdk/assets/design/ico_use.png | Bin 0 -> 437 bytes .../templates-sdk/assets/design/ico_web.png | Bin 0 -> 1037 bytes .../templates-sdk/assets/design/ico_wrong.png | Bin 0 -> 286 bytes .../templates-sdk/assets/design/open_new_page.png | Bin 0 -> 980 bytes .../templates-sdk/assets/jquery-1.6.2.min.js | 18 + .../templates-sdk/assets/yui-3.3.0-reset-min.css | 8 + tools/droiddoc/templates-sdk/customizations.cs | 4 + tools/droiddoc/templates-sdk/designpage.cs | 94 +++ 20 files changed, 1693 insertions(+) create mode 100644 tools/droiddoc/templates-sdk/assets/design/callout.png create mode 100644 tools/droiddoc/templates-sdk/assets/design/default.css create mode 100644 tools/droiddoc/templates-sdk/assets/design/default.js create mode 100644 tools/droiddoc/templates-sdk/assets/design/default.scss create mode 100644 tools/droiddoc/templates-sdk/assets/design/disclosure_down.png create mode 100644 tools/droiddoc/templates-sdk/assets/design/disclosure_left.png create mode 100644 tools/droiddoc/templates-sdk/assets/design/disclosure_right.png create mode 100644 tools/droiddoc/templates-sdk/assets/design/disclosure_up.png create mode 100644 tools/droiddoc/templates-sdk/assets/design/ico_action.png create mode 100644 tools/droiddoc/templates-sdk/assets/design/ico_good.png create mode 100644 tools/droiddoc/templates-sdk/assets/design/ico_movie_inline.png create mode 100644 tools/droiddoc/templates-sdk/assets/design/ico_phone_tablet.png create mode 100644 tools/droiddoc/templates-sdk/assets/design/ico_use.png create mode 100644 tools/droiddoc/templates-sdk/assets/design/ico_web.png create mode 100644 tools/droiddoc/templates-sdk/assets/design/ico_wrong.png create mode 100644 tools/droiddoc/templates-sdk/assets/design/open_new_page.png create mode 100644 tools/droiddoc/templates-sdk/assets/jquery-1.6.2.min.js create mode 100644 tools/droiddoc/templates-sdk/assets/yui-3.3.0-reset-min.css create mode 100644 tools/droiddoc/templates-sdk/designpage.cs diff --git a/tools/droiddoc/templates-sdk/assets/design/callout.png b/tools/droiddoc/templates-sdk/assets/design/callout.png new file mode 100644 index 0000000000000000000000000000000000000000..5d49f34b9ca9b8748240b31acf38abd20eeca6dc GIT binary patch literal 1383 zcmeAS@N?(olHy`uVBq!ia0vp^3P3E&!3HEx&&z8EQj#UE5hcO-X(i=}MX3yqDfvmM z3ZA)%>8U}fi7AzZCsS=07?_nZLn2Bde0{8v^Ko2Tt~skz|cV7z)0WFNY~KZ%Gk)tz(4^Clz_GsrKDK}xwt{?0`hE?GD=Dctn~HE z%ggo3jrH=2()A53EiFN27#ZmTRp=I1=9MH?=;jqG!%T2VElw`VEGWs$&r<-In3$Ab zT4JjNbScCOxdm`z^NOLt1Pn0!io^naLp=kKmtYEgeeo;J&4sHjE(uCSxEHIz#UYgi zsro^w#rdU0$-sz9QwCX8VC7ttnpl!w6q28x0}I7~jQo=P;*9(P1?ON>1>eNv%sdbu ztlrnx$}_LHBrz{J)zigR321^|W@d_&vyrp2xw(s*p|OjJp`ojxg}J4x(xwAm%KD6=dz#jPkmR{`v0t4!Q(alvUG zRBsASx45|C)TknMZjdO*x!Aefr0V1r;B4q z#jPZhd%vbUT(jLon3hJI0*JO6`U(*{l%Lno+W`22py}y0Swm_{sLXmv=wY-cD2&s8}8Qs|5LHG(C_`^ooCw@veh*HY?|WG@aiYu z(f<+-XN#7oS+WZhJI?mmBei#SZR4l^yw~qnD?Xb)iBF`MA<0%@nj@EPo{)j~6~2hi z^BV7a$b_3H{PwS%% z(~R$};_3cT_4rMF#)aB8R@)1o>aTdr(5blf;mmX9sgoBv9%~RO-@h`|GLAjwbWt7O z)c@UA=Kf;#5)OI0MnGeU#Kd1E|2@wXxiB^`Ff-gbwsaTE@=QNa(dX&v=d#Wzp$Py# Cv;?XE literal 0 HcmV?d00001 diff --git a/tools/droiddoc/templates-sdk/assets/design/default.css b/tools/droiddoc/templates-sdk/assets/design/default.css new file mode 100644 index 000000000..5000ce8dc --- /dev/null +++ b/tools/droiddoc/templates-sdk/assets/design/default.css @@ -0,0 +1,641 @@ +/* color definitions */ +/* 16 column layout */ +/* clearfix idiom */ +/* common mixins */ +/* page layout + top-level styles */ +::-webkit-selection, +::-moz-selection, +::selection { + background-color: #0099cc; + color: #fff; } + +html, body { + height: 100%; + margin: 0; + padding: 0; + background: #eee none no-repeat fixed top left; + background-image: -webkit-gradient(linear, 100% 0%, 100% 100%, from(#dddddd), color-stop(25%, #f2f2f2), color-stop(75%, #f2f2f2), to(#dddddd)); + background-image: -moz-linear-gradient(top, #dddddd, #f2f2f2, #f2f2f2, #dddddd); + -webkit-font-smoothing: antialiased; + /* prevent subpixel antialiasing, which thickens the text */ + text-rendering: optimizeLegibility; + /* opentype ftw */ } + +body { + color: #555555; + font: 14px/20px Roboto, sans-serif; + font-weight: 400; } + +#page-container { + width: 940px; + margin: 0 40px; } + +#page-header { + height: 80px; + margin-bottom: 20px; + font-size: 48px; + line-height: 48px; + font-weight: 100; + padding-left: 10px; } + #page-header a { + display: block; + position: relative; + top: 20px; + text-decoration: none; + color: #555555 !important; } + +#main-row { + display: inline-block; } + #main-row:after { + content: "."; + display: block; + height: 0; + clear: both; + visibility: hidden; } + * html #main-row { + height: 1px; } + +#page-footer { + margin-left: 190px; + margin-top: 80px; + color: #999999; + padding-bottom: 40px; + font-size: 12px; + line-height: 15px; } + #page-footer a { + color: #777777; } + #page-footer #copyright { + margin-bottom: 10px; } + +#nav-container { + width: 160px; + min-height: 10px; + margin-right: 20px; + float: left; } + +#nav { + width: 160px; } + +#nav.fixed { + position: fixed; + top: 40px; } + +#content { + width: 760px; + float: left; } + +a, +a:visited { + color: #333333; } + +a:hover, +acronym:hover { + color: #7aa1b0 !important; } + +a:focus, +a:active { + color: #33b5e5 !important; } + +img { + border: none; } + +ul { + margin: 0; + padding: 0; } + +strong { + font-weight: 500; } + +em { + font-style: italic; } + +code { + font-family: Courier New, monospace; } + +acronym { + border-bottom: 1px dotted #555555; + cursor: help; } + +acronym:hover { + border-bottom-color: #7aa1b0; } + +img.with-shadow, +video.with-shadow { + box-shadow: 0 2px 4px rgba(0, 0, 0, 0.25); } + +/* disclosures mixin */ +/* content layout */ +.layout-content-row { + display: inline-block; + margin-bottom: 10px; } + .layout-content-row:after { + content: "."; + display: block; + height: 0; + clear: both; + visibility: hidden; } + * html .layout-content-row { + height: 1px; } + +.layout-content-col { + float: left; + margin-left: 20px; } + .layout-content-col:first-child { + margin-left: 0; } + +.layout-content-col.span-1 { + width: 40px; } + +.layout-content-col.span-2 { + width: 100px; } + +.layout-content-col.span-3 { + width: 160px; } + +.layout-content-col.span-4 { + width: 220px; } + +.layout-content-col.span-5 { + width: 280px; } + +.layout-content-col.span-6 { + width: 340px; } + +.layout-content-col.span-7 { + width: 400px; } + +.layout-content-col.span-8 { + width: 460px; } + +.layout-content-col.span-9 { + width: 520px; } + +.layout-content-col.span-10 { + width: 580px; } + +.layout-content-col.span-11 { + width: 640px; } + +.layout-content-col.span-12 { + width: 700px; } + +.layout-content-col.span-13 { + width: 760px; } + +.vspace.size-1 { + height: 10px; } + +.vspace.size-2 { + height: 20px; } + +.vspace.size-3 { + height: 30px; } + +.vspace.size-4 { + height: 40px; } + +.vspace.size-5 { + height: 50px; } + +.vspace.size-6 { + height: 60px; } + +.vspace.size-7 { + height: 70px; } + +.vspace.size-8 { + height: 80px; } + +.vspace.size-9 { + height: 90px; } + +.vspace.size-10 { + height: 100px; } + +.vspace.size-11 { + height: 110px; } + +.vspace.size-12 { + height: 120px; } + +.vspace.size-13 { + height: 130px; } + +.vspace.size-14 { + height: 140px; } + +.vspace.size-15 { + height: 150px; } + +.vspace.size-16 { + height: 160px; } + +/* nav */ +#nav { + /* section header divs */ + /* expanded section header divs */ + /* sublinks */ } + #nav li { + list-style-type: none; + font-size: 14px; + line-height: 10px; } + #nav a { + color: #555555; + text-decoration: none; } + #nav li.selected > a, + #nav li.selected .nav-section-header a { + font-weight: 500; + color: #0099cc !important; } + #nav .nav-section-header { + position: relative; + padding: 10px; + margin-bottom: 1px; + /* section header links */ } + #nav .nav-section-header a { + color: #333333; + font-weight: 500; + text-transform: uppercase; } + #nav .nav-section-header:after { + content: ''; + background: transparent url(disclosure_down.png) no-repeat scroll top left; + width: 10px; + height: 10px; + display: block; + position: absolute; + top: 10px; + right: 10px; } + #nav .nav-section-header.empty:after { + display: none; } + #nav li.expanded .nav-section-header { + background: rgba(0, 0, 0, 0.05); } + #nav li.expanded .nav-section-header:after { + content: ''; + background: transparent url(disclosure_up.png) no-repeat scroll top left; + width: 10px; + height: 10px; } + #nav > li > ul { + height: 0; + overflow: hidden; + margin-bottom: 0; } + #nav > li > ul.animate-height { + -webkit-transition: height 0.25s ease-in; + -moz-transition: height 0.25s ease-in; + transition: height 0.25s ease-in; } + #nav > li > ul li { + padding: 10px 10px 11px 10px; } + #nav > li.expanded > ul { + height: auto; } + #nav > li.expanded > ul li { + background: rgba(0, 0, 0, 0.03); } + #nav #back-dac-section { + padding: 10px; + border-top: 1px solid #ddd; } + #nav #back-dac-section a { + color: #333333; + font-weight: 500; + text-transform: uppercase; } + +/* content header */ +.content-header { + border-bottom: 1px solid #33b5e5; + height: 30px; } + .content-header h2 { + border-bottom: 0; } + .content-header.just-links { + border-bottom: 0; } + +.content-footer { + border-top: 1px solid #33b5e5; + margin-top: 10px; + height: 30px; } + +.paging-links { + position: relative; } + .paging-links a { + position: absolute; + font-size: 14px; + line-height: 30px; + color: #555555; + text-decoration: none; + text-transform: uppercase; } + .paging-links .prev-page-link { + display: none; + left: -5px; } + .paging-links .prev-page-link:before { + content: ''; + background: transparent url(disclosure_left.png) no-repeat scroll top left; + width: 10px; + height: 10px; + display: inline-block; + margin-right: 5px; } + .paging-links .next-page-link { + display: none; + right: 10px; } + .paging-links .next-page-link:after { + content: ''; + background: transparent url(disclosure_right.png) no-repeat scroll top left; + width: 10px; + height: 10px; + display: inline-block; + margin-left: 5px; } + +/* content body */ +@-webkit-keyframes glowheader { + from { + background-color: #33b5e5; + color: #000; + border-bottom-color: #000; } + + to { + background-color: transparent; + color: #33b5e5; + border-bottom-color: #33b5e5; } } + +@-moz-keyframes glowheader { + from { + background-color: #33b5e5; + color: #000; + border-bottom-color: #000; } + + to { + background-color: transparent; + color: #33b5e5; + border-bottom-color: #33b5e5; } } + +@keyframes glowheader { + from { + background-color: #33b5e5; + color: #000; + border-bottom-color: #000; } + + to { + background-color: transparent; + color: #33b5e5; + border-bottom-color: #33b5e5; } } + +#content p, +#content ul, +#content ol, +#content h3 { + margin: 0 10px 10px 10px; } +#content h2 { + padding-left: 10px; + padding-right: 10px; + margin-bottom: 10px; + font-size: 16px; + line-height: 30px; + font-weight: 500; + color: #33b5e5; + border-bottom: 1px solid #33b5e5; + height: 30px; } + #content h2:target { + -webkit-animation-name: glowheader; + -moz-animation-name: glowheader; + animation-name: glowheader; + -webkit-animation-duration: 0.7s; + -moz-animation-duration: 0.7s; + animation-duration: 0.7s; + -webkit-animation-timing-function: ease-out; + -moz-animation-timing-function: ease-out; + animation-timing-function: ease-out; } +#content hr { + border: 0; + border-bottom: 1px solid #33b5e5; + margin-bottom: 20px; } +#content h3 { + color: #33b5e5; + text-transform: uppercase; + font-size: 14px; + line-height: 20px; + font-weight: 500; } +#content h4 { + margin: 0 10px; + color: #333333; + font-weight: 500; + font-size: 14px; + line-height: 20px; } +#content strong { + color: #333333; } +#content ul li, +#content ol li { + margin-left: 20px; } + #content ul li h4, + #content ol li h4 { + margin: 0; } + #content ul li p, + #content ol li p { + margin-left: 0; } +#content ul li { + list-style-type: square; + list-style-type: none; + position: relative; } + #content ul li:before { + content: '\2022'; + font-family: verdana; + font-size: 14px; + line-height: 20px; + position: absolute; + left: -20px; + top: -1px; } +#content ol { + counter-reset: item; } + #content ol li { + font-size: 14px; + line-height: 20px; + list-style-type: none; + position: relative; } + #content ol li:before { + content: counter(item) ". "; + counter-increment: item; + position: absolute; + left: -20px; + top: 0; } + #content ol li.value-1:before { + content: "1. "; } + #content ol li.value-2:before { + content: "2. "; } + #content ol li.value-3:before { + content: "3. "; } + #content ol li.value-4:before { + content: "4. "; } + #content ol li.value-5:before { + content: "5. "; } + #content ol li.value-6:before { + content: "6. "; } + #content ol li.value-7:before { + content: "7. "; } + #content ol li.value-8:before { + content: "8. "; } + #content ol li.value-9:before { + content: "9. "; } + #content ol li.value-10:before { + content: "10. "; } +#content .with-callouts ol li { + list-style-position: inside; + margin-left: 0; } + #content .with-callouts ol li:before { + position: static; + display: inline; + left: 0; + float: left; + width: 17px; + color: #33b5e5; + font-weight: 500; } + +/* special list items */ +li.no-bullet { + list-style-type: none !important; } + +#content li.with-icon { + position: relative; + margin-left: 40px; + min-height: 30px; } + #content li.with-icon p { + margin-left: 0 !important; } + #content li.with-icon:before { + position: absolute; + left: -40px; + top: 0; + content: ''; + width: 30px; + height: 30px; } + #content li.with-icon.tablet:before { + background-image: url(ico_phone_tablet.png); } + #content li.with-icon.web:before { + background-image: url(ico_web.png); } + #content li.with-icon.checklist:before { + background-image: url(ico_checklist.png); } + #content li.with-icon.action:before { + background-image: url(ico_action.png); } + #content li.with-icon.use:before { + background-image: url(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(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 10px; + 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(content/misc_full_galaxynexus_blank_land_span13.png) no-repeat scroll top left; + padding: 42px 122px 62px 126px; + overflow: hidden; } + .framed-galaxynexus-land-span-13, .framed-galaxynexus-land-span-13 video, .framed-galaxynexus-land-span-13 img { + width: 512px; + height: 286px; } + +.framed-galaxynexus-port-span-9 { + background: transparent url(content/misc_full_galaxynexus_blank_port_span9.png) no-repeat scroll top left; + padding: 95px 122px 107px 124px; + overflow: hidden; } + .framed-galaxynexus-port-span-9, .framed-galaxynexus-port-span-9 video, .framed-galaxynexus-port-span-9 img { + width: 274px; + height: 488px; } + +.framed-galaxynexus-port-span-5 { + background: transparent url(content/misc_full_galaxynexus_blank_port_span5.png) no-repeat scroll top left; + padding: 75px 31px 76px 33px; + overflow: hidden; } + .framed-galaxynexus-port-span-5, .framed-galaxynexus-port-span-5 video, .framed-galaxynexus-port-span-5 img { + width: 216px; + height: 384px; } + +/* landing page disclosures */ +.landing-page-link { + text-decoration: none; + font-weight: 500; + color: #333333; } + .landing-page-link:after { + content: ''; + background: transparent url(disclosure_right.png) no-repeat scroll top left; + width: 10px; + height: 10px; + display: inline-block; + margin-left: 5px; } + +/* tooltips */ +.tooltip-box { + position: absolute; + background-color: rgba(0, 0, 0, 0.9); + border-radius: 2px; + font-size: 14px; + line-height: 20px; + color: #fff; + padding: 6px 10px; + max-width: 250px; + z-index: 10000; } + .tooltip-box.below:after { + position: absolute; + content: ''; + line-height: 0; + display: block; + top: -10px; + left: 5px; + border: 5px solid transparent; + border-bottom-color: rgba(0, 0, 0, 0.9); } + +/* video note */ +.video-instructions { + margin-top: 10px; + margin-bottom: 10px; } + .video-instructions:before { + content: ''; + background: transparent url(ico_movie_inline.png) no-repeat scroll top left; + display: inline-block; + width: 12px; + height: 12px; + margin-right: 8px; } + .video-instructions:after { + content: 'Click to replay movie.'; } + +/* download buttons */ +.download-button { + display: block; + margin-bottom: 5px; + text-decoration: none; + background-color: #33b5e5; + color: #fff !important; + font-weight: 500; + box-shadow: 0 1px 1px rgba(0, 0, 0, 0.12); + padding: 6px 12px; + border-radius: 2px; } + .download-button:hover, .download-button:focus { + background-color: #0099cc; + color: #fff !important; } + .download-button:active { + background-color: #006699; } diff --git a/tools/droiddoc/templates-sdk/assets/design/default.js b/tools/droiddoc/templates-sdk/assets/design/default.js new file mode 100644 index 000000000..b30657302 --- /dev/null +++ b/tools/droiddoc/templates-sdk/assets/design/default.js @@ -0,0 +1,188 @@ +$(document).ready(function() { + // prep nav expandos + var pagePath = document.location.pathname; + if (pagePath.indexOf(SITE_ROOT) == 0) { + pagePath = pagePath.substr(SITE_ROOT.length); + if (pagePath == '' || pagePath.charAt(pagePath.length - 1) == '/') { + pagePath += 'index.html'; + } + } + + if (SITE_ROOT.match(/\.\.\//) || SITE_ROOT == '') { + // If running locally, SITE_ROOT will be a relative path, so account for that by + // finding the relative URL to this page. This will allow us to find links on the page + // leading back to this page. + var pathParts = pagePath.split('/'); + var relativePagePathParts = []; + var upDirs = (SITE_ROOT.match(/(\.\.\/)+/) || [''])[0].length / 3; + for (var i = 0; i < upDirs; i++) { + relativePagePathParts.push('..'); + } + for (var i = 0; i < upDirs; i++) { + relativePagePathParts.push(pathParts[pathParts.length - (upDirs - i) - 1]); + } + relativePagePathParts.push(pathParts[pathParts.length - 1]); + pagePath = relativePagePathParts.join('/'); + } else { + // Otherwise the page path should be an absolute URL. + pagePath = SITE_ROOT + pagePath; + } + + // select current page in sidenav and set up prev/next links if they exist + var $selNavLink = $('#nav').find('a[href="' + pagePath + '"]'); + if ($selNavLink.length) { + $selListItem = $selNavLink.closest('li'); + + $selListItem.addClass('selected'); + $selListItem.closest('li.nav-section').addClass('expanded'); + + // set up prev links + var $prevLink = []; + var $prevListItem = $selListItem.prev('li'); + if ($prevListItem.length) { + if ($prevListItem.hasClass('nav-section')) { + // jump to last topic of previous section + $prevLink = $prevListItem.find('a:last'); + } else { + // jump to previous topic in this section + $prevLink = $prevListItem.find('a:eq(0)'); + } + } else { + // jump to this section's index page (if it exists) + $prevLink = $selListItem.parents('li').find('a'); + } + + if ($prevLink.length) { + var prevHref = $prevLink.attr('href'); + if (prevHref == SITE_ROOT + 'index.html') { + // Don't show Previous when it leads to the homepage + $('.prev-page-link').hide(); + } else { + $('.prev-page-link').attr('href', prevHref).show(); + } + } else { + $('.prev-page-link').hide(); + } + + // set up next links + var $nextLink = []; + if ($selListItem.hasClass('nav-section')) { + // we're on an index page, jump to the first topic + $nextLink = $selListItem.find('ul').find('a:eq(0)') + } else { + // jump to the next topic in this section (if it exists) + $nextLink = $selListItem.next('li').find('a:eq(0)'); + if (!$nextLink.length) { + // no more topics in this section, jump to the first topic in the next section + $nextLink = $selListItem.parents('li').next('li.nav-section').find('a:eq(0)'); + } + } + if ($nextLink.length) { + $('.next-page-link').attr('href', $nextLink.attr('href')).show(); + } else { + $('.next-page-link').hide(); + } + } + + // Set up expand/collapse behavior + $('#nav li.nav-section').click(function() { + if ($(this).hasClass('expanded')) { + return; + } + + // hide other + var $old = $('#nav li.nav-section.expanded'); + if ($old.length) { + var $oldUl = $old.children('ul'); + $oldUl.css('height', $oldUl.height() + 'px'); + window.setTimeout(function() { + $oldUl + .addClass('animate-height') + .css('height', ''); + }, 0); + $old.removeClass('expanded'); + } + + // show me + $(this).addClass('expanded'); + var $ul = $(this).children('ul'); + var expandedHeight = $ul.height(); + $ul + .removeClass('animate-height') + .css('height', 0); + window.setTimeout(function() { + $ul + .addClass('animate-height') + .css('height', expandedHeight + 'px'); + }, 0); + }); + + // Stop expand/collapse behavior when clicking on nav section links (since we're navigating away + // from the page) + $('.nav-section-header').find('a:eq(0)').click(function(evt) { + window.location.href = $(this).attr('href'); + return false; + }); + + // Set up play-on-hover