1
1
<!DOCTYPE HTML>
2
2
< html xmlns:ng ="http://angularjs.org/ " xmlns:doc ="http://docs.angularjs.org/ ">
3
3
< head >
4
+ < title > <Angular/> Docs</ title >
5
+ < link rel ="stylesheet " href ="wiki_widgets.css " type ="text/css " media ="screen ">
6
+ < link rel ="stylesheet " href ="doc_widgets.css " type ="text/css " media ="screen " />
7
+ < link rel ="stylesheet " href ="http://alexgorbatchev.com/pub/sh/current/styles/shCore.css " type ="text/css " media ="screen " />
8
+ < link rel ="stylesheet " href ="http://alexgorbatchev.com/pub/sh/current/styles/shThemeDefault.css " type ="text/css " media ="screen " />
4
9
< script type ="text/javascript " src ="https://ajax.googleapis.com/ajax/libs/jquery/1.4.3/jquery.min.js "> </ script >
5
- < script type ="text/javascript " src ="docs-data.js "> </ script >
6
10
< script type ="text/javascript " src ="../angular.min.js " ng:autobind > </ script >
7
11
< script type ="text/javascript " src ="doc_widgets.js "> </ script >
8
- < link rel ="stylesheet " href ="doc_widgets.css " type ="text/css " media ="screen " />
9
12
< script type ="text/javascript " src ="http://alexgorbatchev.com/pub/sh/current/scripts/shCore.js "> </ script >
10
13
< script type ="text/javascript " src ="http://alexgorbatchev.com/pub/sh/current/scripts/shBrushJScript.js "> </ script >
11
- < link rel ="stylesheet " href ="http://alexgorbatchev.com/pub/sh/current/styles/shCore.css " type ="text/css " media ="screen " />
12
- < link rel ="stylesheet " href ="http://alexgorbatchev.com/pub/sh/current/styles/shThemeDefault.css " type ="text/css " media ="screen " />
14
+ < script type ="text/javascript " src ="docs-data.js "> </ script >
13
15
< script type ="text/javascript ">
14
16
SyntaxHighlighter [ 'defaults' ] . toolbar = false ;
15
-
17
+
16
18
DocsController . $inject = [ '$location' ]
17
19
function DocsController ( $location ) {
18
20
this . docs = NG_DOC ;
19
21
window . $root = this . $root ;
20
-
22
+
21
23
this . getUrl = function ( page ) {
22
24
return '#' + encodeURIComponent ( page . name ) ;
23
- }
24
-
25
+ } ;
26
+
27
+ this . getTitle = function ( ) {
28
+ if ( $location . hashPath . match ( / ^ a n g u l a r \. / ) ) {
29
+ return $location . hashPath ;
30
+ }
31
+ return '' ;
32
+ } ;
33
+
25
34
this . getCurrentPartial = function ( ) {
26
35
if ( $location . hashPath . match ( / ^ a n g u l a r \. / ) ) {
27
36
this . partialUrl = './' + $location . hashPath + '.html' ;
28
37
}
29
38
return this . partialUrl ;
30
- }
39
+ } ;
31
40
}
32
41
</ script >
42
+ < style type ="text/css " media ="screen ">
43
+ body {
44
+ font-family : Arial, sans-serif;
45
+ font-size : 14px ;
46
+ margin : 0 ;
47
+ padding : 0 ;
48
+ }
49
+
50
+ # sidebar {
51
+ width : 15em ;
52
+ float : left;
53
+ }
54
+
55
+ # header {
56
+ background-color : # F2C200 ;
57
+ margin-bottom : 1em ;
58
+ }
59
+
60
+ # header h1 {
61
+ font-weight : normal;
62
+ font-size : 30px ;
63
+ line-height : 30px ;
64
+ margin : 0 ;
65
+ padding : 10px 10px ;
66
+ height : 30px ;
67
+ }
68
+
69
+ # header .angular {
70
+ font-family : Courier New, monospace;
71
+ font-weight : bold;
72
+ }
73
+
74
+ # header h1 a {
75
+ color : black;
76
+ text-decoration : none;
77
+ }
78
+
79
+ # header h1 a : hover {
80
+ text-decoration : underline;
81
+ }
82
+
83
+ # section {
84
+ position : absolute;
85
+ z-index : -1 ;
86
+ width : 100% ;
87
+ }
88
+
89
+ # section ng \:include {
90
+ margin : 0 1em 1em 15em ;
91
+ display : block;
92
+ }
93
+
94
+ # section h1 {
95
+ font-family : monospace;
96
+ margin-top : 0 ;
97
+ }
98
+
99
+ # sidebar h2 {
100
+ font-size : 1.2em ;
101
+ margin : 5px 5px 5px 0.8em ;
102
+ }
103
+
104
+ # sidebar ul {
105
+ list-style-type : none;
106
+ /*TODO(esprehn): Can we just reset globally and not break examples?*/
107
+ margin : 0 ;
108
+ padding : 0 ;
109
+ }
110
+
111
+ # sidebar ul li {
112
+ margin : 0 ;
113
+ padding : 1px 1px 1px 1.5em ;
114
+ }
115
+
116
+ .nav-section {
117
+ margin-left : 1em ;
118
+ margin-top : 0.5em ;
119
+ }
120
+
121
+ .section-title {
122
+ float : right;
123
+ }
124
+ </ style >
33
125
</ head >
34
126
< body ng:controller ="DocsController ">
35
- < table >
36
- < tr >
37
- < td valign ="top ">
38
- < div ng:repeat ="(name, type) in docs.section ">
39
- < b > {{name}}</ b >
40
- < div ng:repeat ="page in type ">
41
- < a href ="{{getUrl(page)}} "> < tt > {{page.shortName}}</ tt > </ a >
42
- </ div >
43
- </ div >
44
- </ td >
45
- < td valign ="top "> < ng:include src =" getCurrentPartial() "> </ ng:include > </ td >
46
- </ tr >
47
- </ table >
127
+ < div id ="header ">
128
+ < h1 >
129
+ < span class ="section-title "> {{getTitle()}}</ span >
130
+ < a href ="index.html "> < span class ="angular "> <angular/></ span > Docs</ a >
131
+ </ h1 >
132
+ </ div >
133
+ < div id ="sidebar " class ="nav ">
134
+ < div ng:repeat ="(name, type) in docs.section " class ="nav-section ">
135
+ < h2 > {{name}}</ h2 >
136
+ < ul >
137
+ < li ng:repeat ="page in type ">
138
+ < a href ="{{getUrl(page)}} " ng:click =""> {{page.shortName}}</ a >
139
+ </ li >
140
+ </ ul >
141
+ </ div >
142
+ </ div >
143
+ < div id ="section ">
144
+ < ng:include src ="getCurrentPartial() "> </ ng:include >
145
+ </ div >
48
146
</ body >
49
- </ html >
147
+ </ html >
0 commit comments