Skip to content

Commit c57df3d

Browse files
committed
Make the docs look a little nicer
1 parent 6d53808 commit c57df3d

File tree

7 files changed

+126
-29
lines changed

7 files changed

+126
-29
lines changed

docs/doc_widgets.css

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ doc\:example {
77
ul.doc-example {
88
list-style-type: none;
99
position: relative;
10-
width: 700px;
1110
font-size: 14px;
1211
}
1312

docs/filter.template

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<h1><tt>{{name}}</tt></h1>
1+
<h1>{{name}}</h1>
22
<h2>Description</h2>
33
{{{description}}}
44

docs/formatter.template

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<h1><tt>{{name}}</tt></h1>
1+
<h1>{{name}}</h1>
22
<h2>Description</h2>
33
{{{description}}}
44

docs/index.html

Lines changed: 121 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,49 +1,147 @@
11
<!DOCTYPE HTML>
22
<html xmlns:ng="http://angularjs.org/" xmlns:doc="http://docs.angularjs.org/">
33
<head>
4+
<title>&lt;Angular/&gt; 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" />
49
<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>
610
<script type="text/javascript" src="../angular.min.js" ng:autobind></script>
711
<script type="text/javascript" src="doc_widgets.js"></script>
8-
<link rel="stylesheet" href="doc_widgets.css" type="text/css" media="screen" />
912
<script type="text/javascript" src="http://alexgorbatchev.com/pub/sh/current/scripts/shCore.js"></script>
1013
<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>
1315
<script type="text/javascript">
1416
SyntaxHighlighter['defaults'].toolbar = false;
15-
17+
1618
DocsController.$inject = ['$location']
1719
function DocsController($location) {
1820
this.docs = NG_DOC;
1921
window.$root = this.$root;
20-
22+
2123
this.getUrl = function(page){
2224
return '#' + encodeURIComponent(page.name);
23-
}
24-
25+
};
26+
27+
this.getTitle = function() {
28+
if ($location.hashPath.match(/^angular\./)) {
29+
return $location.hashPath;
30+
}
31+
return '';
32+
};
33+
2534
this.getCurrentPartial = function(){
2635
if ($location.hashPath.match(/^angular\./)) {
2736
this.partialUrl = './' + $location.hashPath + '.html';
2837
}
2938
return this.partialUrl;
30-
}
39+
};
3140
}
3241
</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>
33125
</head>
34126
<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">&lt;angular/&gt;</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>
48146
</body>
49-
</html>
147+
</html>

docs/overview.template

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<h1><tt>{{name}}</tt></h1>
1+
<h1>{{name}}</h1>
22
{{{description}}}
33

44
{{#example}}

docs/validator.template

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<h1><tt>{{name}}</tt></h1>
1+
<h1>{{name}}</h1>
22

33
<h2>Description</h2>
44
{{{description}}}

docs/widget.template

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<h1><tt>{{name}}</tt></h1>
1+
<h1>{{name}}</h1>
22

33
<h2>Description</h2>
44
{{{description}}}

0 commit comments

Comments
 (0)