aboutsummaryrefslogtreecommitdiffstats
path: root/docs
diff options
context:
space:
mode:
authorElliott Sprehn2010-11-10 10:09:48 -0800
committerElliott Sprehn2010-11-10 11:01:30 -0800
commitc57df3dc776f8a35aaad35fc399960f0d7fee06d (patch)
tree80aa4d1b563e208026fa193483bf1b2d1d693252 /docs
parent6d53808475c9e7d952a9d5e13049433f8cba6912 (diff)
downloadangular.js-c57df3dc776f8a35aaad35fc399960f0d7fee06d.tar.bz2
Make the docs look a little nicer
Diffstat (limited to 'docs')
-rw-r--r--docs/doc_widgets.css1
-rw-r--r--docs/filter.template2
-rw-r--r--docs/formatter.template2
-rw-r--r--docs/index.html144
-rw-r--r--docs/overview.template2
-rw-r--r--docs/validator.template2
-rw-r--r--docs/widget.template2
7 files changed, 126 insertions, 29 deletions
diff --git a/docs/doc_widgets.css b/docs/doc_widgets.css
index f4ef70bd..8361f105 100644
--- a/docs/doc_widgets.css
+++ b/docs/doc_widgets.css
@@ -7,7 +7,6 @@ doc\:example {
ul.doc-example {
list-style-type: none;
position: relative;
- width: 700px;
font-size: 14px;
}
diff --git a/docs/filter.template b/docs/filter.template
index 4875798e..2731f5a3 100644
--- a/docs/filter.template
+++ b/docs/filter.template
@@ -1,4 +1,4 @@
-<h1><tt>{{name}}</tt></h1>
+<h1>{{name}}</h1>
<h2>Description</h2>
{{{description}}}
diff --git a/docs/formatter.template b/docs/formatter.template
index dd8fcb99..af95f729 100644
--- a/docs/formatter.template
+++ b/docs/formatter.template
@@ -1,4 +1,4 @@
-<h1><tt>{{name}}</tt></h1>
+<h1>{{name}}</h1>
<h2>Description</h2>
{{{description}}}
diff --git a/docs/index.html b/docs/index.html
index 3495f6c8..4939dc9c 100644
--- a/docs/index.html
+++ b/docs/index.html
@@ -1,49 +1,147 @@
<!DOCTYPE HTML>
<html xmlns:ng="http://angularjs.org/" xmlns:doc="http://docs.angularjs.org/">
<head>
+ <title>&lt;Angular/&gt; Docs</title>
+ <link rel="stylesheet" href="wiki_widgets.css" type="text/css" media="screen">
+ <link rel="stylesheet" href="doc_widgets.css" type="text/css" media="screen" />
+ <link rel="stylesheet" href="http://alexgorbatchev.com/pub/sh/current/styles/shCore.css" type="text/css" media="screen" />
+ <link rel="stylesheet" href="http://alexgorbatchev.com/pub/sh/current/styles/shThemeDefault.css" type="text/css" media="screen" />
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.4.3/jquery.min.js"></script>
- <script type="text/javascript" src="docs-data.js"></script>
<script type="text/javascript" src="../angular.min.js" ng:autobind></script>
<script type="text/javascript" src="doc_widgets.js"></script>
- <link rel="stylesheet" href="doc_widgets.css" type="text/css" media="screen" />
<script type="text/javascript" src="http://alexgorbatchev.com/pub/sh/current/scripts/shCore.js"></script>
<script type="text/javascript" src="http://alexgorbatchev.com/pub/sh/current/scripts/shBrushJScript.js"></script>
- <link rel="stylesheet" href="http://alexgorbatchev.com/pub/sh/current/styles/shCore.css" type="text/css" media="screen" />
- <link rel="stylesheet" href="http://alexgorbatchev.com/pub/sh/current/styles/shThemeDefault.css" type="text/css" media="screen" />
+ <script type="text/javascript" src="docs-data.js"></script>
<script type="text/javascript">
SyntaxHighlighter['defaults'].toolbar = false;
-
+
DocsController.$inject = ['$location']
function DocsController($location) {
this.docs = NG_DOC;
window.$root = this.$root;
-
+
this.getUrl = function(page){
return '#' + encodeURIComponent(page.name);
- }
-
+ };
+
+ this.getTitle = function() {
+ if ($location.hashPath.match(/^angular\./)) {
+ return $location.hashPath;
+ }
+ return '';
+ };
+
this.getCurrentPartial = function(){
if ($location.hashPath.match(/^angular\./)) {
this.partialUrl = './' + $location.hashPath + '.html';
}
return this.partialUrl;
- }
+ };
}
</script>
+ <style type="text/css" media="screen">
+ body {
+ font-family: Arial, sans-serif;
+ font-size: 14px;
+ margin: 0;
+ padding: 0;
+ }
+
+ #sidebar {
+ width: 15em;
+ float: left;
+ }
+
+ #header {
+ background-color: #F2C200;
+ margin-bottom: 1em;
+ }
+
+ #header h1 {
+ font-weight: normal;
+ font-size: 30px;
+ line-height: 30px;
+ margin: 0;
+ padding: 10px 10px;
+ height: 30px;
+ }
+
+ #header .angular {
+ font-family: Courier New, monospace;
+ font-weight: bold;
+ }
+
+ #header h1 a {
+ color: black;
+ text-decoration: none;
+ }
+
+ #header h1 a:hover {
+ text-decoration: underline;
+ }
+
+ #section {
+ position: absolute;
+ z-index: -1;
+ width: 100%;
+ }
+
+ #section ng\:include {
+ margin: 0 1em 1em 15em;
+ display: block;
+ }
+
+ #section h1 {
+ font-family: monospace;
+ margin-top: 0;
+ }
+
+ #sidebar h2 {
+ font-size: 1.2em;
+ margin: 5px 5px 5px 0.8em;
+ }
+
+ #sidebar ul {
+ list-style-type: none;
+ /*TODO(esprehn): Can we just reset globally and not break examples?*/
+ margin: 0;
+ padding: 0;
+ }
+
+ #sidebar ul li {
+ margin: 0;
+ padding: 1px 1px 1px 1.5em;
+ }
+
+ .nav-section {
+ margin-left: 1em;
+ margin-top: 0.5em;
+ }
+
+ .section-title {
+ float: right;
+ }
+ </style>
</head>
<body ng:controller="DocsController">
- <table>
- <tr>
- <td valign="top">
- <div ng:repeat="(name, type) in docs.section">
- <b>{{name}}</b>
- <div ng:repeat="page in type">
- <a href="{{getUrl(page)}}"><tt>{{page.shortName}}</tt></a>
- </div>
- </div>
- </td>
- <td valign="top"><ng:include src=" getCurrentPartial() "></ng:include></td>
- </tr>
- </table>
+ <div id="header">
+ <h1>
+ <span class="section-title">{{getTitle()}}</span>
+ <a href="index.html"><span class="angular">&lt;angular/&gt;</span> Docs</a>
+ </h1>
+ </div>
+ <div id="sidebar" class="nav">
+ <div ng:repeat="(name, type) in docs.section" class="nav-section">
+ <h2>{{name}}</h2>
+ <ul>
+ <li ng:repeat="page in type">
+ <a href="{{getUrl(page)}}" ng:click="">{{page.shortName}}</a>
+ </li>
+ </ul>
+ </div>
+ </div>
+ <div id="section">
+ <ng:include src="getCurrentPartial()"></ng:include>
+ </div>
</body>
-</html> \ No newline at end of file
+</html>
diff --git a/docs/overview.template b/docs/overview.template
index 6207d41b..7af05ff4 100644
--- a/docs/overview.template
+++ b/docs/overview.template
@@ -1,4 +1,4 @@
-<h1><tt>{{name}}</tt></h1>
+<h1>{{name}}</h1>
{{{description}}}
{{#example}}
diff --git a/docs/validator.template b/docs/validator.template
index 124f35b9..63d17072 100644
--- a/docs/validator.template
+++ b/docs/validator.template
@@ -1,4 +1,4 @@
-<h1><tt>{{name}}</tt></h1>
+<h1>{{name}}</h1>
<h2>Description</h2>
{{{description}}}
diff --git a/docs/widget.template b/docs/widget.template
index 9b280775..4a20629e 100644
--- a/docs/widget.template
+++ b/docs/widget.template
@@ -1,4 +1,4 @@
-<h1><tt>{{name}}</tt></h1>
+<h1>{{name}}</h1>
<h2>Description</h2>
{{{description}}}