File tree 6 files changed +42
-18
lines changed
6 files changed +42
-18
lines changed Original file line number Diff line number Diff line change 38
38
< script src ="site/components/docs/docs-values.js "> </ script >
39
39
< script src ="site/components/authorization/authorization.js "> </ script >
40
40
< script src ="site/components/faq/faq.js "> </ script >
41
+ < script src ="site/components/language-switcher/language-switcher-directive.js "> </ script >
41
42
< script src ="site/components/subpage/subpage-directive.js "> </ script >
42
43
< script src ="site/components/header/header-directive.js "> </ script >
43
44
< script src ="site/components/troubleshooting/troubleshooting.js "> </ script >
Original file line number Diff line number Diff line change
1
+ angular
2
+ . module ( 'gcloud.language-switcher' , [ ] )
3
+ . directive ( 'languageSwitcher' , function ( ) {
4
+ 'use strict' ;
5
+
6
+ return {
7
+ templateUrl : 'site/components/language-switcher/language-switcher.html' ,
8
+ transclude : true ,
9
+
10
+ controller : function ( $scope ) {
11
+ $scope . showNavDropdown = false ;
12
+ }
13
+ } ;
14
+ } ) ;
Original file line number Diff line number Diff line change
1
+ < nav class ="main-nav " ng-class ="{ open: showNavDropdown } ">
2
+ < div class ="nav-current " ng-click ="showNavDropdown = !showNavDropdown "> Node.js</ div >
3
+ < ul class ="menu ">
4
+ < li >
5
+ < a href ="# " title ="gcloud-node Documentation ">
6
+ < img src ="site/img/icon-lang-nodejs-white.svg " alt ="gcloud-node " class ="menu-icon ">
7
+ Node.js
8
+ </ a >
9
+ </ li >
10
+ < li >
11
+ < a href ="https://googlecloudplatform.github.io/gcloud-python " title ="gcloud-python Documentation ">
12
+ < img src ="site/img/icon-lang-python.svg " alt ="gcloud-python " class ="menu-icon ">
13
+ Pythons
14
+ </ a >
15
+ </ li >
16
+ < li >
17
+ < a href ="https://googlecloudplatform.github.io/gcloud-ruby " title ="gcloud-ruby Documentation ">
18
+ < img src ="site/img/icon-lang-ruby.svg " alt ="gcloud-ruby " class ="menu-icon ">
19
+ Ruby
20
+ </ a >
21
+ </ li >
22
+ </ ul >
23
+ </ nav >
Original file line number Diff line number Diff line change @@ -6,23 +6,7 @@ <h1 class="logo">
6
6
< span class ="gcloud "> gcloud</ span >
7
7
</ a >
8
8
</ h1 >
9
- < nav class ="main-nav " ng-class ="{ open: showNavDropdown } ">
10
- < div class ="nav-current " ng-click ="showNavDropdown = !showNavDropdown "> Node.js</ div >
11
- < ul class ="menu ">
12
- < li >
13
- < a href ="# " title ="Node.js docs page ">
14
- < img src ="site/img/icon-lang-nodejs-white.svg " alt ="Node.js icon " class ="menu-icon ">
15
- Node.js
16
- </ a >
17
- </ li >
18
- < li >
19
- < a href ="https://googlecloudplatform.github.io/gcloud-python " title ="Python docs page ">
20
- < img src ="site/img/icon-lang-python.svg " alt ="Python icon " class ="menu-icon ">
21
- Python
22
- </ a >
23
- </ li >
24
- </ ul >
25
- </ nav >
9
+ < div language-switcher > </ div >
26
10
</ header >
27
11
28
12
< header ng-if ="headerTemplateUrl " ng-include ="headerTemplateUrl "> </ header >
Original file line number Diff line number Diff line change 1
1
< header class ="page-header " role ="banner ">
2
2
< h1 class ="logo "> < img src ="site/img/logo-full.svg " alt ="Google Cloud Platform " /> </ h1 >
3
+ < div language-switcher > </ div >
3
4
</ header > <!-- end of .page-header -->
4
5
5
6
< article class ="main " role ="main ">
Original file line number Diff line number Diff line change 4
4
'gcloud.authorization' ,
5
5
'gcloud.docs' ,
6
6
'gcloud.faq' ,
7
+ 'gcloud.language-switcher' ,
7
8
'gcloud.troubleshooting' ,
8
9
'config' ,
9
10
'hljs'
@@ -20,7 +21,7 @@ angular
20
21
controller : 'HomeCtrl'
21
22
} ) ;
22
23
} )
23
- . controller ( 'HomeCtrl' , function ( ) {
24
+ . controller ( 'HomeCtrl' , function ( $scope ) {
24
25
'use strict' ;
25
26
} )
26
27
. run ( function ( $rootScope , $location , versions ) {
You can’t perform that action at this time.
0 commit comments