Skip to content

Commit 84b1ebb

Browse files
author
Manuel Mujica
committed
Add logo dropdown links and menu navigation
1 parent 50a73ff commit 84b1ebb

File tree

2 files changed

+29
-30
lines changed

2 files changed

+29
-30
lines changed

templates/helpers.js

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -345,28 +345,6 @@ module.exports = function(docMap, config, getCurrent, oldHelpers, OtherHandlebar
345345
}
346346
},
347347

348-
// stuff for creating urls
349-
ifCurrentFrom: function(url, options){
350-
351-
var name = docsFilename(getCurrent().name, config);
352-
var dir = path.dirname( getCurrent().docConfigDest );
353-
var loc = path.join(dir, name);
354-
355-
if( loc === url ) {
356-
return options.fn(this);
357-
} else {
358-
return options.inverse(this);
359-
}
360-
},
361-
/**
362-
* @function documentjs.generators.html.defaultHelpers.urlFromConfig
363-
*
364-
* Returns a url that is joined from the most parent `documentjs.json`.
365-
*/
366-
urlFromConfig: function (url) {
367-
var dir = path.dirname( getCurrent().docConfigDest );
368-
return path.join(dir,url);
369-
},
370348
/**
371349
* @function documentjs.generators.html.defaultHelpers.urlTest
372350
*

templates/layout.mustache

Lines changed: 29 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,31 +13,52 @@
1313
<!--[if IE 9]>
1414
<html class="no-js ie ie9" lang="en">
1515
<![endif]-->
16-
<!--[if gt IE 9]><!-->
16+
<!--[if gt IE 9]>
1717
<html class="no-js" lang="en">
18-
<!--<![endif]-->
18+
<![endif]-->
1919
<head>
2020
<meta charset="utf-8">
2121
<title>{{makeParentTitle}} {{#if title}}- {{title}} {{else}} {{#if name}}- {{name}}{{/if}}{{/if}}</title>
2222
<meta name="description" content="">
2323
<meta name="author" content="">
24-
{{^devBuild}}
25-
<link rel="stylesheet" type="text/css" href="{{pathToDest}}/static/bundles/bit-docs-site/static.css">
26-
{{/devBuild}}
24+
{{#unless devBuild}}
25+
<link rel="stylesheet" type="text/css" href="{{pathToDest}}/static/bundles/bit-docs-site/static.css">
26+
{{/unless}}
2727
<!--[if lt IE 9]>
28-
<script type="text/javascript" src="static/html5shiv.js"></script>
29-
<!--<![endif]-->
28+
<script type="text/javascript" src="static/html5shiv.js"></script>
29+
<![endif]-->
3030
</head>
3131

3232
<body class="docs">
3333
{{#unless hideHeader}}
3434
<header>
3535
<nav class="container">
36-
3736
<div class="logo-menu">
3837
<a class="brand" href="./index.html">{{makeParentTitle}}</a>
38+
39+
<ul class="dropdown-menu">
40+
<li><a href="https://donejs.com/">DoneJS</a></li>
41+
<li><a href="http://stealjs.com/">StealJS</a></li>
42+
<li><a href="http://jquerypp.com/">jQuery ++</a></li>
43+
<li><a href="https://funcunit.com/">FuncUnit</a></li>
44+
<li><a href="http://documentjs.com/">DocumentJS</a></li>
45+
</ul>
3946
</div>
4047

48+
<ul class="nav">
49+
<li><a href="http://stealjs.com">Home</a></li>
50+
51+
{{#ifEqual page "index"}}
52+
<li><a href="{{urlTo 'index'}}">Api</a></li>
53+
{{else}}
54+
<li class="active"><a href="{{urlTo 'index'}}">Api</a></li>
55+
{{/ifEqual}}
56+
57+
<li><a href="https://twitter.com/stealjs">Twitter</a></li>
58+
<li><a href="https://github.com/stealjs/steal">GitHub</a></li>
59+
<li><a href="https://gitter.im/stealjs/steal">Chat</a></li>
60+
</ul>
61+
4162
<div class="pull-right">
4263
<div class="bitovi-menu">
4364
<a href="http://bitovi.com" class="bitovi icon-bits">Bitovi</a>

0 commit comments

Comments
 (0)