Skip to content

Commit

Permalink
Added a search box to the docs, now there's a full table of contents …
Browse files Browse the repository at this point in the history
…in the documentation page
  • Loading branch information
jeremydmiller committed Sep 15, 2015
1 parent f956ee3 commit 70ed862
Show file tree
Hide file tree
Showing 3 changed files with 57 additions and 24 deletions.
20 changes: 1 addition & 19 deletions documentation/documentation.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,6 @@
The documentation may never be exhaustive, but here are the major sections so far:

* <[linkto:roadmap]>
* <[linkto:quickstart]>
* <[linkto:glossary]>
* <[linkto:get-structuremap]>
* <[linkto:features]>
* <[linkto:concepts]>
* <[linkto:registration]>
* <[linkto:resolving]>
* <[linkto:the-container]>
* <[linkto:object-lifecycle]>
* <[linkto:interception-and-decorators]>
* <[linkto:interpreting-exceptions]>
* <[linkto:diagnostics]>
* <[linkto:integrations]>
* <[linkto:architecture]>
* <[linkto:best-practices]>
* <[linkto:faq]>
* <[linkto:history]>
* <[linkto:roadmap]>
<[FullTableOfContents]>



Expand Down
34 changes: 30 additions & 4 deletions documentation/layout.htm
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
<a href="<[RootUrl]>" class="navbar-brand">StructureMap</a>
</div>
<nav class="collapse navbar-collapse" role="navigation">
<ul class="nav navbar-nav">
<ul class="nav navbar-nav pull-right">
<li>
<[linkto:quickstart]>
</li>
Expand All @@ -46,12 +46,15 @@
<li>
<a href="https://gitter.im/structuremap/structuremap?utm_source=badge&amp;utm_medium=badge&amp;utm_campaign=pr-badge&amp;utm_content=badge"><img src="https://camo.githubusercontent.com/da2edb525cde1455a622c58c0effc3a90b9a181c/68747470733a2f2f6261646765732e6769747465722e696d2f4a6f696e253230436861742e737667" alt="Join the chat at https://gitter.im/structuremap/structuremap" data-canonical-src="https://badges.gitter.im/Join%20Chat.svg" style="max-width:100%;"></a>
</li>
</ul>

<ul class="nav navbar-nav navbar-right">
<[linkto:{previous};<li><a href="{href}" title="{title}">Previous</a></li>]>
<[linkto:{next};<li><a href="{href}" title="{title}">Next</a></li>]>
</ul>
<div class="navbar-form navbar-left" role="search">
<div class="form-group">
<input id="search" type="search" class="form-control" placeholder="Search">
</div>
</div>

</nav>

</div>
Expand Down Expand Up @@ -122,6 +125,29 @@ <h1><[title]></h1>
<[script:content/prism.js]>
<[script:content/sidebar.js]>
<[script:content/affix.js]>

<script>
$('#search').keyup(function(e){
if(e.keyCode == 13) {
var search = $('#search').val();

var url = 'https://www.google.com/#q=site:structuremap.github.io ' + search;
url = encodeURI(url);

//alert(url);

window.location.href = url;

e.stopPropagation();
if (e.cancelBubble!=null) e.cancelBubble = true;
return false;
}



});

</script>
</foot>
</html>

27 changes: 26 additions & 1 deletion documentation/splash.htm
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,11 @@
<a href="https://gitter.im/structuremap/structuremap?utm_source=badge&amp;utm_medium=badge&amp;utm_campaign=pr-badge&amp;utm_content=badge"><img src="https://camo.githubusercontent.com/da2edb525cde1455a622c58c0effc3a90b9a181c/68747470733a2f2f6261646765732e6769747465722e696d2f4a6f696e253230436861742e737667" alt="Join the chat at https://gitter.im/structuremap/structuremap" data-canonical-src="https://badges.gitter.im/Join%20Chat.svg" style="max-width:100%;"></a>
</li>
</ul>

<div class="navbar-form navbar-left" role="search">
<div class="form-group">
<input id="search" type="search" class="form-control" placeholder="Search">
</div>
</div>
</nav>

</div>
Expand Down Expand Up @@ -83,7 +87,28 @@ <h2>Integrations</h2>

<script type='text/javascript' src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<script type='text/javascript' src="http://netdna.bootstrapcdn.com/bootstrap/3.1.1/js/bootstrap.min.js"></script>
<script>
$('#search').keyup(function(e){
if(e.keyCode == 13) {
var search = $('#search').val();

var url = 'https://www.google.com/#q=site:structuremap.github.io ' + search;
url = encodeURI(url);

//alert(url);

window.location.href = url;

e.stopPropagation();
if (e.cancelBubble!=null) e.cancelBubble = true;
return false;
}



});

</script>

</body>

Expand Down

0 comments on commit 70ed862

Please sign in to comment.