Skip to content

Commit

Permalink
Quick update to support categories of methods
Browse files Browse the repository at this point in the history
  • Loading branch information
hunvreus committed Feb 1, 2013
1 parent c0a4baa commit 951aafa
Show file tree
Hide file tree
Showing 9 changed files with 28 additions and 625 deletions.
10 changes: 8 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,8 @@
.DS_Store
_site/
.*
!.gitignore
!.gitmodules
*~

components/

_site/
65 changes: 15 additions & 50 deletions _layouts/default.html
Original file line number Diff line number Diff line change
@@ -1,58 +1,23 @@
<!DOCTYPE html>
<head>
<title>{{ site.title }}</title>

<!-- Meta -->
<meta charset="utf-8">
<meta name="description" content="Documentation website">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">

<!-- CSS -->
<link href="./css/normalize.css" rel="stylesheet" type="text/css">
<link href="./css/style.css" rel="stylesheet" type="text/css">
<meta charset='utf-8'/>
<meta name='description' content='Documentation website'/>
<meta name='viewport' content='width=device-width, initial-scale=1, maximum-scale=1'/>
<link href='http://fonts.googleapis.com/css?family=Open+Sans' rel='stylesheet' type='text/css'/>
<link href='assets.css' rel='stylesheet' type='text/css'>
</head>
<body>
{{ content }}
<header id='header'>
{% include header.html %}
</header>

<!-- JS -->
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js" type="text/javascript"></script>
<script type="text/javascript">
(function($) {
// Collapsible articles
$('article').each(function () {
var that = $(this);
var header = that.children('a');
var body = that.children('.body');
body.hide();
header.toggle(
function () { body.slideDown('fast'); that.addClass('active'); },
function () { body.slideUp('fast'); that.removeClass('active'); }
);
});

// Expanding the article on link click and scrolling down to it
$('#links a').each(function () {
var that = $(this);
var id = that.attr('href').substring(1);
that.click(function (e) {
e.preventDefault();
var header = $('article a[name="'+ id +'"]')
if (!header.parent().hasClass('active')) header.trigger('click');
$('html, body').animate({
scrollTop: header.offset().top
}, 'fast');
});

// If we find a link in the body with similar anchor, add the same behavior
$('.body a[href=#'+ id +']').click(function (e) {
e.preventDefault();
$('#links a[href=#'+ id +']').trigger('click');
});
});
})(jQuery);
</script>
<!--[if lt IE 9]>
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<section id='content'>
{{ content }}
</section>

<!--[if lt IE 9]><script src='http://html5shim.googlecode.com/svn/trunk/html5.js'></script><![endif]-->
<script src='assets.js' type='text/javascript'></script>
<script>require('boot');</script>
</body>
</html>
1 change: 1 addition & 0 deletions _posts/2012-12-24-delete-a-thing.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
---
category: Stuff
path: '/stuff/:id'
title: 'Delete a thing'
type: 'DELETE'
Expand Down
1 change: 1 addition & 0 deletions _posts/2012-12-25-put-a-thing.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
---
category: Stuff
path: '/stuff/:id'
title: 'Update a thing'
type: 'PUT'
Expand Down
1 change: 1 addition & 0 deletions _posts/2012-12-26-post-a-thing.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
---
category: Stuff
path: '/stuff'
title: 'Post a thing'
type: 'POST'
Expand Down
1 change: 1 addition & 0 deletions _posts/2012-12-27-get-stuff.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
---
category: Stuff
path: '/stuff'
title: 'Get stuff'
type: 'GET'
Expand Down
Loading

0 comments on commit 951aafa

Please sign in to comment.