Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Prettyfied the documentation

  • Loading branch information...
commit a44595053a2218370f604d7160be5242e7579fd0 1 parent fa87f20
@hkjels authored
View
1  .gitignore
@@ -1,4 +1,5 @@
.todo
+docs/*.html
lib-cov
*.seed
View
10 Makefile
@@ -6,10 +6,10 @@
docs: docs/index.html
lint:
- ./node_modules/.bin/jshint crud.js
+ @./node_modules/.bin/jshint crud.js
test:
- ./node_modules/.bin/mocha test/*.test.js
+ @./node_modules/.bin/mocha test/*.test.js
clean: cleandocs
@@ -35,7 +35,7 @@ with:
# Compile
docs/index.html: docs/layout/head.html docs/Readme.html docs/layout/tail.html
- cat $^ > $@
+ @cat $^ > $@
-docs/%.html: docs/%.md
- ./node_modules/.bin/marked $< > $@
+docs/%.html: %.md
+ @./node_modules/.bin/marked $< > $@
View
2  Readme.md
@@ -1,6 +1,6 @@
# crud
-__Crud functionality for mongoose-models. Fits well with express.js__
+__Crud-functionality for mongoose-models. Fits well with express.js__
## Install
View
65 docs/Readme.md
@@ -1,65 +0,0 @@
-# crud
-
-__Crud functionality for mongoose-models. Fits well with express.js__
-
-
-## Install
-
- λ npm install crud
-
-
-## With express.js magic
-
- var express = require('express')
- , app = module.exports = express.createServer()
- , models = require('./models')
- , crud = require('crud')
-
- app.get('/crud/:model', crud.middleware, function (req, res) {
- res.render('crud')
- })
-
-
-## Without express.js magic
-
- var mongoose = require('mongoose')
- , Model = mongoose.model('Model')
- , crud = require('crud').form
-
- crud(Model, function (err, form) {
- if (err) return console.err(err)
- console.dir(form)
- })
-
-
-## Constributors
-
-* Henrik Kjelsberg <hkjels@me.com>
-[github](http://github.com/hkjels/ "Github account")
-[website](http://take.no/ "Development blog")
-
-
-## License
-
-> (The MIT License)
->
-> Copyright (c) 2012 Henrik Kjelsberg &lt;henrik@kjelsberg.net&gt;
->
-> Permission is hereby granted, free of charge, to any person obtaining
-> a copy of this software and associated documentation files (the
-> 'Software'), to deal in the Software without restriction, including
-> without limitation the rights to use, copy, modify, merge, publish,
-> distribute, sublicense, and/or sell copies of the Software, and to
-> permit persons to whom the Software is furnished to do so, subject to
-> the following conditions:
->
-> The above copyright notice and this permission notice shall be
-> included in all copies or substantial portions of the Software.
->
-> THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
-> EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-> MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-> IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
-> CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
-> TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
-> SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
View
48 docs/layout/head.html
@@ -1,16 +1,33 @@
<!DOCTYPE HTML>
<html lang="en">
<head>
- <meta charset="UTF-8">
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width">
<title>Crud</title>
+ <link rel="stylesheet" href="http://yandex.st/highlightjs/6.2/styles/github.min.css">
+ <link href='http://fonts.googleapis.com/css?family=Open+Sans' rel='stylesheet' type='text/css'>
<style type="text/css">
body {
- background-color: #eaeaea;
- color: #333;
- font-family: Helvetica, Arial;
+ background: #81878a;
+ color: #222;
+ font-family: 'Open sans', Helvetica, Arial;
+ margin: 0;
padding: 50px;
+ position: relative;
text-align: center;
- text-shadow: 0 1px 0 white;
+ text-shadow: 0 1px 0 #aaa;
+ }
+ a {
+ color: ghostWhite;
+ margin-left: 5px;
+ text-decoration: none;
+ text-shadow: 0 1px 0 #666;
+ -moz-transition: all 0.2s ease-in-out;
+ -webkit-transition: all 0.2s ease-in-out;
+ }
+ a:hover {
+ color: white;
+ text-shadow: 0 0 6px ghostWhite;
}
#wrapper {
margin: 0 auto;
@@ -18,20 +35,31 @@
text-align: left;
}
h1 {
- font-size: 4em;
+ font-size: 8em;
line-height: 0;
+ letter-spacing: -0.05em;
}
p strong, pre {
display: block;
margin-bottom: 50px;
}
+ pre, blockquote {
+ box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
+ padding: 10px;
+ text-shadow: none;
+ }
+ pre, code, blockquote {
+ background: white !important;
+ }
+ blockquote {
+ margin: 0;
+ padding: 30px 50px;
+ }
</style>
- <link rel="stylesheet" href="http://yandex.st/highlightjs/6.2/styles/github.min.css">
<script src="http://yandex.st/highlightjs/6.2/highlight.min.js"></script>
- <script type="text/javascript">
- hljs.initHighlightingOnLoad()
- </script>
+ <script type="text/javascript">hljs.initHighlightingOnLoad()</script>
</head>
<body>
+ <a href="https://github.com/hkjels/crud/"><img style="position: absolute; top: 0; right: 0; border: 0;" src="https://s3.amazonaws.com/github/ribbons/forkme_right_red_aa0000.png" alt="Fork me on GitHub"></a>
<div id="wrapper">
Please sign in to comment.
Something went wrong with that request. Please try again.