From cd18967a6eeb4bd996f012ecd3a20bc80d07e1c0 Mon Sep 17 00:00:00 2001 From: Alex Wolfe Date: Tue, 3 Mar 2015 06:34:45 -0800 Subject: [PATCH] version menu & social icons --- harp.json | 3 +- public/_includes/_search-box.jade | 12 +++++ public/_includes/_social-icons.jade | 9 ++-- public/_includes/_version-dropdown.jade | 42 +++++++++------ public/resources/css/module/_hero.scss | 6 ++- .../css/vendor/icomoon/fonts/icomoon.eot | Bin 7144 -> 7440 bytes .../css/vendor/icomoon/fonts/icomoon.svg | 2 + .../css/vendor/icomoon/fonts/icomoon.ttf | Bin 6980 -> 7276 bytes .../css/vendor/icomoon/fonts/icomoon.woff | Bin 7056 -> 7352 bytes .../css/vendor/icomoon/selection.json | 50 ++++++++++++++++++ public/resources/css/vendor/icomoon/style.css | 18 +++++-- .../logos/license/open-sourcesvg .svg | 19 +++++++ 12 files changed, 136 insertions(+), 25 deletions(-) create mode 100644 public/_includes/_search-box.jade create mode 100644 public/resources/images/logos/license/open-sourcesvg .svg diff --git a/harp.json b/harp.json index 35baaf710e..60883c6753 100644 --- a/harp.json +++ b/harp.json @@ -1,7 +1,8 @@ { "globals": { "title": "Angular", - "description": "Angular is a modern javascript framework for building professional web applications.", + "description": "Angular is a development platform for building mobile and desktop web applications", + "siteURL": "http://angular.io", "jsLatest": "2.0.0-alpha.11", "dartLatest": "2.0.0-alpha.11", diff --git a/public/_includes/_search-box.jade b/public/_includes/_search-box.jade new file mode 100644 index 0000000000..1c07b5a20a --- /dev/null +++ b/public/_includes/_search-box.jade @@ -0,0 +1,12 @@ +gcse:search(type="search" placeholder="SEARCH DOCS...") +script + (function() { + var cx = '008420607850170258613:8o7h40u0v68'; + var gcse = document.createElement('script'); + gcse.type = 'text/javascript'; + gcse.async = true; + gcse.src = (document.location.protocol == 'https:' ? 'https:' : 'http:') + + '//www.google.com/cse/cse.js?cx=' + cx; + var s = document.getElementsByTagName('script')[0]; + s.parentNode.insertBefore(gcse, s); + })(); \ No newline at end of file diff --git a/public/_includes/_social-icons.jade b/public/_includes/_social-icons.jade index dfb8f3420a..1e7f6d9f06 100644 --- a/public/_includes/_social-icons.jade +++ b/public/_includes/_social-icons.jade @@ -1,4 +1,7 @@ .social-icons - a(href="#") - a(href="#") - a(href="#") \ No newline at end of file + button(onClick="window.open('https://www.facebook.com/sharer/sharer.php?u=#{siteURL}', '', 'height=500, width=600')" data-href="#{siteURL}" data-colorscheme="dark" data-layout="button_count" data-action="like" data-show-faces="false") + button(onClick="window.open('https://twitter.com/share?text=Angular%20-%20#{description}', '', 'height=250, width=600')") + button(onClick="window.open('https://plus.google.com/share?url=#{siteURL}', '', 'height=500, width=600')" class="googleplus") + button(onClick="window.open('http://www.linkedin.com/shareArticle?mini=true&url=#{siteURL}&title=Angular&summary=#{description}.', '', 'height=625, width=500')") + +p(style="color: black;") #{url} \ No newline at end of file diff --git a/public/_includes/_version-dropdown.jade b/public/_includes/_version-dropdown.jade index 8e8a2cc05b..2d86f2af96 100644 --- a/public/_includes/_version-dropdown.jade +++ b/public/_includes/_version-dropdown.jade @@ -1,29 +1,41 @@ language = current.path[1] -version = current.path[2] -title = "Some Version" +title = "Javascript " +filter = /(\.html$)/ +replace = /(\.html$)|(^index\.html$)/ + +version = current.path[2].replace(/\_+/gm, ".") + + + +mixin tree(directory, urlPrefix, name) + ul + for val, key in directory + if key !== '.git' && key !== '_data' + li #{name} #{key} + + + if language == 'js' if version == "latest" title = 'Javascript ' + jsLatest + else + title = 'Javascript ' + version + if language == 'dart' if version == "latest" title = 'Dart ' + dartLatest + else + title = 'Dart ' + version -filter = /(\.html$)/ -replace = /(\.html$)|(^index\.html$)/ - -mixin tree(head, tail) - for val, key in head - if key !== '.git' && key !== '_data' - li #{key} - - -mixin tree(public.docs.js, "") -mixin tree(public.docs.dart, "") - - + h2.hero-subtitle.text-subhead button(md-button ng-click="showVersionMenu($event)") #{title} + + +nav.dropdown + mixin tree(public.docs.js, "/docs/js", "Javascript") + mixin tree(public.docs.dart, "/docs/dart", "Dart") \ No newline at end of file diff --git a/public/resources/css/module/_hero.scss b/public/resources/css/module/_hero.scss index 0e80a455a4..17fec037f6 100644 --- a/public/resources/css/module/_hero.scss +++ b/public/resources/css/module/_hero.scss @@ -43,12 +43,16 @@ $hero-padding: $unit * 2; right: $unit * 3; z-index: $layer-1; - a { + button { color: $snow; opacity: .56; font-size: 18px; text-decoration: none; margin-left: $unit * 2; + padding: 0; + background: none; + border: none; + outline: none; } } diff --git a/public/resources/css/vendor/icomoon/fonts/icomoon.eot b/public/resources/css/vendor/icomoon/fonts/icomoon.eot index db20439971ab226b5f1e013ccb33a95ab5428849..f3f224b9a6af78e07f5929a7d5acec0dc7048412 100755 GIT binary patch delta 650 zcmYjNL1+^}6#cWigql#y(w)}qM%rXIxl|8sk`0t9QILQX^pL0r(Jpaqz@&{dhj=Ji zt(S;G>s}N*6$v%D2m5l*i%1CA77H8@m^qqt zo;VHXrSr<^S;s^Wo!)RT90D1B5jpySzNbyPMaw8B)~-Z5=NVz5$Uz?RY#SdB0tFGK z(JvD9QC65tL{u%sC*v|3NkwSN+oohb!L#|nP2~bn6{e-As?v97$te1*77MEEg2yr- ztAlo{)o-`^#B|NhMf!rR<8OvG2dq7Ei$eOujsMS$j69<8R8mW*lT`4@$Y2-P6ptl( ziFh>6<_5R3hLL5qz1=-$ni(k;le}QS^bV#e%thyOtZigZqzkD1Z4=wgFz{C@#atYn zcM0cYUzd`1uekd-R)T?Rym7E|@AUjn2w>;9cBO}({$=ainKaQXCDi4xn78&rf^{4+ jrn{$({Bi$YU@Tw;_E79SrNJ8by^Fx$=qEbsqCx%u%KfNG delta 357 zcmbPW^}?L(g){?$i}XY`GnNSxY!6O!D6ikcz`y{)3CX#M1@Dh8GGSm~lmYT{(i4jd zfV2RR-vOjK(sL@)*uP3F2l6K{Fo;dbNKH&(GkECEz#yRllsC%&3UDl9`3mI60Qo8z zxg`~c8ANn}{01QZLQZ~iVqZi1B?bn`03bgrH?g9C!CsA_9w-2EfI?nkZfdyXvUfoK z9iSzy1^LA#49q|o25FVaF^ukvlO``=Gv3J3w6#mvCOz{sHROzTzStIk)wuO|Kf z`~N>kHBgM + + \ No newline at end of file diff --git a/public/resources/css/vendor/icomoon/fonts/icomoon.ttf b/public/resources/css/vendor/icomoon/fonts/icomoon.ttf index 5cb6479ce2fd37da4459223a335a4804126c92f1..b8f33b71122382a16116f9e3e52f27db158201a7 100755 GIT binary patch delta 687 zcmY*XO=uHQ5T3Vh8)KrhYj=|-8)%YE0#ZS{X|^gwq99Qzv|wXBX_vY-VADn#As$NB zACL-yHWvj?J%pNE3iaS2hdp>GcoG}%X2sIOA|3?sVs@PuE9k(y+3%Z~o$vj;)xMsr z0s#O&m_Xsg#O32^?~w!Fk!hjN%og>M^`P|-fJ6|N=k%o##y-SPF?#3b@7`SAeLRWy zIY4l|VCXkInTP@q%3@wCAmLr(eF&(OZ1CV(fa=x^5|OCGM9nFKtM#q`I^w6|tMthUNavMEJ4GOB_0Ao2& z)K0U}Xg8Z}Vmc<1Mj;B*{0=<|J$Mgzw#ne;hIogf2yiVPsMQq_htYiz!apKNcXT|J z8PU>eKoUI)GAItU3Ye145Jn4hs&h4G7&&g8tMc& zODYaCi0A_O4M6^docv_V#J-01OAHK>0YHJQ+{B6k2788jARpuag}lVv)NsjV?|}R} zKucT;@{3D=4g~^fm5Dpt87EC*Gva)p47VrF0hdPd=y)~m)>ov(UdP5S@$|9_BL zpcuoe1|%`Y|Bt0uMAwV15M3&|5U7uFa-fXx=823V!kYy}JD8P0K>`E^Z6{2K=ePOF zz|8{YUzGGq1u;PMN0me{Dx;!e_J12)+tBJof+e<-C?p$&+T9vbUO4K+4k(pFlr9wck^ zQmJ5F4|?q()Z`+>Lk~gr;Gv)wX#*ZSR4hUE;6V^C$*ymrB0l(L_I>Z$_r95VlHNWe z-N{Z)0s)M`Hn@6wX+w%tzR#BPivXmE)G~+hp!skvzr?vum^=T#Jy*JW1GxhL?-s|s zgGW=vLjF2{Zyhx$j{amoDI$s7Tg<~8&Q0NGvAn#3+*iy$a=Zg+wX`scx-q|j#5~7~ zs(zuIU%|oh2ggWt*(5zaienF7X_z2#|vuty933 z4E%5$CkI3Qj7pw(P)#MpL{y={WRNBK;#I`BNORpw;nPG7J8EH74Y#Zq>7iAtQBV~N zIO_mK?bd6xR=wULnx%1D6wf*%?9-FbhcDv>hSvhg#ymew9EfWOBk+sjSuMUp>02f-t_#ofh{k!YW shSDUZzaMHI#$v7yub+$bb>A)4Jk%bD4(z#{F3q)vByX2$9QCh~U%q*fiRoFL-!1zAW&=tkgo#5 z9E(`KX5^Ms0L9J#`4>R=FoTG0PJS{_ot@+ypgU}lo|KI=rfpS0tpE0~@KoVp8|5%DebiL>b(WRmbf%+JMK_a~QE~AL>=2+1VW@T`I zF)$pooiHJu-{va=Hw)O9i;{jo=P)pU=*b%-%^6K5zmVL+!V0ut@&>6w=?$D8xaM(P a;`Rcn0U2S!P|Lst(!jt3wjfwKl@S1=rD}Bm diff --git a/public/resources/css/vendor/icomoon/selection.json b/public/resources/css/vendor/icomoon/selection.json index eb21ebdaeb..7068cea48e 100755 --- a/public/resources/css/vendor/icomoon/selection.json +++ b/public/resources/css/vendor/icomoon/selection.json @@ -142,6 +142,33 @@ "setIdx": 0, "iconIdx": 402 }, + { + "icon": { + "paths": [ + "M852 0h-680c-94.6 0-172 77.4-172 172v680c0 94.6 77.4 172 172 172h680c94.6 0 172-77.4 172-172v-680c0-94.6-77.4-172-172-172zM384 832h-128v-448h128v448zM320 320c-35.346 0-64-28.654-64-64s28.654-64 64-64 64 28.654 64 64-28.654 64-64 64zM832 832h-128v-256c0-35.346-28.654-64-64-64s-64 28.654-64 64v256h-128v-448h128v79.472c26.398-36.264 66.752-79.472 112-79.472 79.53 0 144 71.634 144 160v288z" + ], + "attrs": [], + "isMulticolor": false, + "tags": [ + "linkedin", + "brand", + "social" + ], + "defaultCode": 58575, + "grid": 16 + }, + "attrs": [], + "properties": { + "order": 55, + "id": 1581, + "prevSize": 32, + "code": 60104, + "ligatures": "linkedin, brand63", + "name": "linkedin" + }, + "setIdx": 0, + "iconIdx": 456 + }, { "icon": { "paths": [ @@ -718,6 +745,29 @@ "setIdx": 1, "iconIdx": 204 }, + { + "icon": { + "paths": [ + "M853.333 170.667h-682.667c-46.933 0-84.907 38.4-84.907 85.333l-0.427 512c0 46.933 38.4 85.333 85.333 85.333h682.667c46.933 0 85.333-38.4 85.333-85.333v-512c0-46.933-38.4-85.333-85.333-85.333zM640 768h-469.333v-170.667h469.333v170.667zM640 554.667h-469.333v-170.667h469.333v170.667zM853.333 768h-170.667v-384h170.667v384z" + ], + "attrs": [], + "isMulticolor": false, + "tags": [ + "web" + ], + "grid": 24 + }, + "attrs": [], + "properties": { + "id": 213, + "order": 56, + "prevSize": 24, + "code": 58923, + "name": "web" + }, + "setIdx": 1, + "iconIdx": 213 + }, { "icon": { "paths": [ diff --git a/public/resources/css/vendor/icomoon/style.css b/public/resources/css/vendor/icomoon/style.css index ad0a4d6abe..056efd3890 100755 --- a/public/resources/css/vendor/icomoon/style.css +++ b/public/resources/css/vendor/icomoon/style.css @@ -1,10 +1,10 @@ @font-face { font-family: 'icomoon'; - src:url('fonts/icomoon.eot?ay41rv'); - src:url('fonts/icomoon.eot?#iefixay41rv') format('embedded-opentype'), - url('fonts/icomoon.woff?ay41rv') format('woff'), - url('fonts/icomoon.ttf?ay41rv') format('truetype'), - url('fonts/icomoon.svg?ay41rv#icomoon') format('svg'); + src:url('fonts/icomoon.eot?ff1o1p'); + src:url('fonts/icomoon.eot?#iefixff1o1p') format('embedded-opentype'), + url('fonts/icomoon.woff?ff1o1p') format('woff'), + url('fonts/icomoon.ttf?ff1o1p') format('truetype'), + url('fonts/icomoon.svg?ff1o1p#icomoon') format('svg'); font-weight: normal; font-style: normal; } @@ -43,6 +43,10 @@ content: "\ea92"; } +.icon-linkedin:before { + content: "\eac8"; +} + .icon-accessibility:before { content: "\e614"; } @@ -143,6 +147,10 @@ content: "\e61d"; } +.icon-web:before { + content: "\e62b"; +} + .icon-call-split:before { content: "\e61e"; } diff --git a/public/resources/images/logos/license/open-sourcesvg .svg b/public/resources/images/logos/license/open-sourcesvg .svg new file mode 100644 index 0000000000..45144715ef --- /dev/null +++ b/public/resources/images/logos/license/open-sourcesvg .svg @@ -0,0 +1,19 @@ + + + + open-sourcesvg + Created with Sketch. + + + + + + + APACHE 2.O + + + OPEN SOURCE + + + + \ No newline at end of file