diff --git a/public/_includes/_scripts-include.jade b/public/_includes/_scripts-include.jade index f02d7cce14..202bbcb34b 100644 --- a/public/_includes/_scripts-include.jade +++ b/public/_includes/_scripts-include.jade @@ -37,32 +37,4 @@ script(src="/resources/js/directives/code-example.js") script(src="/resources/js/directives/if-docs.js") script(src="/resources/js/directives/live-example.js") script(src="/resources/js/directives/ngio-ex-path.js") -script(src="/resources/js/directives/scroll-y-offset-element.js") - - -script. - (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ - (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), - m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) - })(window,document,'script','//www.google-analytics.com/analytics.js','ga'); - - ga('create', 'UA-8594346-15', 'auto'); - ga('send', 'pageview') - - -if current.path[0] == "docs" - - script. - (function(w,d,t,u,n,s,e){w['SwiftypeObject']=n;w[n]=w[n]||function(){ - (w[n].q=w[n].q||[]).push(arguments);};s=d.createElement(t); - e=d.getElementsByTagName(t)[0];s.async=1;s.src=u;e.parentNode.insertBefore(s,e); - })(window,document,'script','//s.swiftypecdn.com/install/v1/st.js','_st'); - - _st('install','VsuU7kH5Hnnj9tfyNvfK'); - - -script(src="//www.gstatic.com/feedback/api.js" type="text/javascript") - - -script. - (function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+"://platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}})(document,"script","twitter-wjs"); +script(src="/resources/js/directives/scroll-y-offset-element.js") \ No newline at end of file diff --git a/public/_includes/_scripts-minimum.jade b/public/_includes/_scripts-minimum.jade new file mode 100644 index 0000000000..a568f88d15 --- /dev/null +++ b/public/_includes/_scripts-minimum.jade @@ -0,0 +1,27 @@ + +script. + (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ + (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), + m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) + })(window,document,'script','//www.google-analytics.com/analytics.js','ga'); + + ga('create', 'UA-8594346-15', 'auto'); + ga('send', 'pageview') + + +if current.path[0] == "docs" || current.path[0] == "search" +script. + (function(w,d,t,u,n,s,e){w['SwiftypeObject']=n;w[n]=w[n]||function(){ + (w[n].q=w[n].q||[]).push(arguments);};s=d.createElement(t); + e=d.getElementsByTagName(t)[0];s.async=1;s.src=u;e.parentNode.insertBefore(s,e); + })(window,document,'script','//s.swiftypecdn.com/install/v2/st.js','_st'); + + _st('install','VsuU7kH5Hnnj9tfyNvfK','2.0.0'); + + + +script(src="//www.gstatic.com/feedback/api.js" type="text/javascript") + + +script. + (function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+"://platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}})(document,"script","twitter-wjs"); diff --git a/public/_layout.jade b/public/_layout.jade index aef7728caa..358f4c1ccd 100644 --- a/public/_layout.jade +++ b/public/_layout.jade @@ -19,4 +19,5 @@ html(lang="en" ng-app="angularIOApp" itemscope itemtype="http://schema.org/Frame != yield != partial("/_includes/_footer") - != partial("/_includes/_scripts-include") \ No newline at end of file + != partial("/_includes/_scripts-include") + != partial("/_includes/_scripts-minimum") \ No newline at end of file diff --git a/public/docs/_includes/_side-nav.jade b/public/docs/_includes/_side-nav.jade index f34ad29074..13c432ce08 100644 --- a/public/docs/_includes/_side-nav.jade +++ b/public/docs/_includes/_side-nav.jade @@ -63,9 +63,9 @@ nav(class="sidenav l-pinned-left l-layer-4 l-offset-nav" ng-class="appCtrl.showDocsNav ? 'is-visible' : ''") // SEARCH BAR header.sidenav-search.st-input-wrapper - form.st-input-inner + .st-input-inner label(for="search-io" class="is-hidden") Search Docs - input(type="search" id="search-io" placeholder="SEARCH DOCS...") + input(type="text" class="st-default-search-input" placeholder="SEARCH DOCS...") button(class="mobile-trigger button" aria-label="View Docs Menu" ng-click="appCtrl.toggleDocsMenu($event)" md-button) Docs ul(class="sidenav-links") diff --git a/public/docs/_layout-dart-api.jade b/public/docs/_layout-dart-api.jade index a27d63b577..cded545a26 100644 --- a/public/docs/_layout-dart-api.jade +++ b/public/docs/_layout-dart-api.jade @@ -49,3 +49,4 @@ else include ../_includes/_footer include ../_includes/_scripts-include + include ../_includes/_scripts-minimum \ No newline at end of file diff --git a/public/docs/_layout.jade b/public/docs/_layout.jade index 0e5c83f7bb..b1f38cc12a 100644 --- a/public/docs/_layout.jade +++ b/public/docs/_layout.jade @@ -5,7 +5,7 @@ if jade2ng != partial("../_includes/_hero") != partial("../_includes/_banner") .l-content-small.grid-fluid.docs-content - != yield + != yield else doctype html(lang="en" ng-app="angularIOApp" itemscope itemtype="http://schema.org/Framework") @@ -41,4 +41,5 @@ else != partial("../_includes/_next-item") != partial("../_includes/_footer") - != partial("../_includes/_scripts-include") \ No newline at end of file + != partial("../_includes/_scripts-include") + != partial("../_includes/_scripts-minimum") \ No newline at end of file diff --git a/public/resources/css/main.scss b/public/resources/css/main.scss index f755527f14..5c729664c9 100644 --- a/public/resources/css/main.scss +++ b/public/resources/css/main.scss @@ -48,6 +48,7 @@ @import 'module/card'; @import 'module/hover-card'; @import 'module/modal'; +@import 'module/search'; @import 'module/shadow'; @import 'module/showcase'; @import 'module/statement'; diff --git a/public/resources/css/module/_search.scss b/public/resources/css/module/_search.scss new file mode 100644 index 0000000000..57655f242d --- /dev/null +++ b/public/resources/css/module/_search.scss @@ -0,0 +1,47 @@ +/* +* Search Module +* +* Module for search input and results +* +*/ + + +/* +* Variables +*/ + +$unit: 8px !default; +$search-field: '.search-field'; +$search-results: '.search-results'; +$search-height: 104px; +$search-width: 752px; + + +/* +* Class +*/ + +#{$search-results} { + + #{$search-field} { + background: $white; + border: 1px solid $blue-grey-100; + border-radius: 2px; + box-sizing: border-box; + color: $blue-grey-500; + font-size: 16px; + height: $unit * 5; + margin-bottom: $unit * 4; + padding: 0 $unit; + width: 100%; + + &:active, + &:focus { + background: rgba($amber-50, .24); + border: 1px solid $blue-500; + color: $blue-500; + } + } + + +} \ No newline at end of file diff --git a/public/resources/css/module/_side-nav.scss b/public/resources/css/module/_side-nav.scss index 74734a2240..789c0359c1 100644 --- a/public/resources/css/module/_side-nav.scss +++ b/public/resources/css/module/_side-nav.scss @@ -80,6 +80,7 @@ $sidenav-width: 240px; } input { + background: $white; border: none; border-radius: 200px; box-sizing: border-box; diff --git a/public/search/_data.json b/public/search/_data.json new file mode 100644 index 0000000000..008dc88fe8 --- /dev/null +++ b/public/search/_data.json @@ -0,0 +1,6 @@ +{ + "index": { + "title": "Search Results", + "subtitle": "Developer Documentation" + } +} diff --git a/public/search/_layout.jade b/public/search/_layout.jade new file mode 100644 index 0000000000..17c73545b2 --- /dev/null +++ b/public/search/_layout.jade @@ -0,0 +1,16 @@ +doctype html public +html(lang="en") + head + != partial("../_includes/_head-include") + + body.l-offset-nav + != partial("../_includes/_main-nav") + != partial("../_includes/_hero") + + + + article(class="l-docs-content") + != yield + + != partial("../_includes/_footer") + != partial("../_includes/_scripts-minimum") \ No newline at end of file diff --git a/public/search/index.jade b/public/search/index.jade new file mode 100644 index 0000000000..5a88e395f9 --- /dev/null +++ b/public/search/index.jade @@ -0,0 +1,3 @@ +.search-results + input(type="text" class="st-default-search-input search-field" placeholder="SEARCH DOCS...") + .st-search-container \ No newline at end of file