forked from hunvreus/carte
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Quick update to support categories of methods
- Loading branch information
Showing
9 changed files
with
28 additions
and
625 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,8 @@ | ||
.DS_Store | ||
_site/ | ||
.* | ||
!.gitignore | ||
!.gitmodules | ||
*~ | ||
|
||
components/ | ||
|
||
_site/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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' | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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' | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
--- | ||
category: Stuff | ||
path: '/stuff' | ||
title: 'Post a thing' | ||
type: 'POST' | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
--- | ||
category: Stuff | ||
path: '/stuff' | ||
title: 'Get stuff' | ||
type: 'GET' | ||
|
Oops, something went wrong.