Ein Projekt das es ermöglicht Beerpong über das Internet von zwei unabhängigen positionen aus zu spielen. Entstehung im Rahmen einer Praktikumsaufgabe im Fach Interaktion.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

README.md 4.8KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148
  1. # [![Jade - template engine ](http://i.imgur.com/5zf2aVt.png)](http://jade-lang.com/)
  2. Full documentation is at [jade-lang.com](http://jade-lang.com/)
  3. Jade is a high performance template engine heavily influenced by [Haml](http://haml-lang.com)
  4. and implemented with JavaScript for [node](http://nodejs.org). For discussion join the [Google Group](http://groups.google.com/group/jadejs).
  5. You can test drive Jade online [here](http://naltatis.github.com/jade-syntax-docs).
  6. [![Build Status](https://img.shields.io/travis/visionmedia/jade/master.svg)](https://travis-ci.org/visionmedia/jade)
  7. [![Dependency Status](https://img.shields.io/gemnasium/visionmedia/jade.svg)](https://gemnasium.com/visionmedia/jade)
  8. [![NPM version](https://img.shields.io/npm/v/jade.svg)](http://badge.fury.io/js/jade)
  9. ## Installation
  10. via npm:
  11. ```bash
  12. $ npm install jade
  13. ```
  14. ## Syntax
  15. Jade is a clean, whitespace sensitive syntax for writing html. Here is a simple example:
  16. ```jade
  17. doctype html
  18. html(lang="en")
  19. head
  20. title= pageTitle
  21. script(type='text/javascript').
  22. if (foo) bar(1 + 5)
  23. body
  24. h1 Jade - node template engine
  25. #container.col
  26. if youAreUsingJade
  27. p You are amazing
  28. else
  29. p Get on it!
  30. p.
  31. Jade is a terse and simple templating language with a
  32. strong focus on performance and powerful features.
  33. ```
  34. becomes
  35. ```html
  36. <!DOCTYPE html>
  37. <html lang="en">
  38. <head>
  39. <title>Jade</title>
  40. <script type="text/javascript">
  41. if (foo) bar(1 + 5)
  42. </script>
  43. </head>
  44. <body>
  45. <h1>Jade - node template engine</h1>
  46. <div id="container" class="col">
  47. <p>You are amazing</p>
  48. <p>Jade is a terse and simple templating language with a strong focus on performance and powerful features.</p>
  49. </div>
  50. </body>
  51. </html>
  52. ```
  53. The official [jade tutorial](http://jade-lang.com/tutorial/) is a great place to start. While that (and the syntax documentation) is being finished, you can view some of the old documentation [here](https://github.com/visionmedia/jade/blob/master/jade.md) and [here](https://github.com/visionmedia/jade/blob/master/jade-language.md)
  54. ## API
  55. For full API, see [jade-lang.com/api](http://jade-lang.com/api/)
  56. ```js
  57. var jade = require('jade');
  58. // compile
  59. var fn = jade.compile('string of jade', options);
  60. var html = fn(locals);
  61. // render
  62. var html = jade.render('string of jade', merge(options, locals));
  63. // renderFile
  64. var html = jade.renderFile('filename.jade', merge(options, locals));
  65. ```
  66. ### Options
  67. - `filename` Used in exceptions, and required when using includes
  68. - `compileDebug` When `false` no debug instrumentation is compiled
  69. - `pretty` Add pretty-indentation whitespace to output _(false by default)_
  70. ## Browser Support
  71. The latest version of jade can be download for the browser in standalone form from [here](https://github.com/visionmedia/jade/raw/master/jade.js). It only supports the very latest browsers though, and is a large file. It is recommended that you pre-compile your jade templates to JavaScript and then just use the [runtime.js](https://github.com/visionmedia/jade/raw/master/runtime.js) library on the client.
  72. To compile a template for use on the client using the command line, do:
  73. ```console
  74. $ jade --client --no-debug filename.jade
  75. ```
  76. which will produce `filename.js` containing the compiled template.
  77. ## Command Line
  78. After installing the latest version of [node](http://nodejs.org/), install with:
  79. ```console
  80. $ npm install jade -g
  81. ```
  82. and run with
  83. ```console
  84. $ jade --help
  85. ```
  86. ## Additional Resources
  87. Tutorials:
  88. - cssdeck interactive [Jade syntax tutorial](http://cssdeck.com/labs/learning-the-jade-templating-engine-syntax)
  89. - cssdeck interactive [Jade logic tutorial](http://cssdeck.com/labs/jade-templating-tutorial-codecast-part-2)
  90. - [Jade について。](https://gist.github.com/japboy/5402844) (A Japanese Tutorial)
  91. - [Jade - 模板引擎](https://github.com/visionmedia/jade/blob/master/Readme_zh-cn.md)
  92. Implementations in other languages:
  93. - [php](http://github.com/everzet/jade.php)
  94. - [scala](http://scalate.fusesource.org/versions/snapshot/documentation/scaml-reference.html)
  95. - [ruby](https://github.com/slim-template/slim)
  96. - [python](https://github.com/SyrusAkbary/pyjade)
  97. - [java](https://github.com/neuland/jade4j)
  98. Other:
  99. - [Emacs Mode](https://github.com/brianc/jade-mode)
  100. - [Vim Syntax](https://github.com/digitaltoad/vim-jade)
  101. - [TextMate Bundle](http://github.com/miksago/jade-tmbundle)
  102. - [Coda/SubEtha syntax Mode](https://github.com/aaronmccall/jade.mode)
  103. - [Screencasts](http://tjholowaychuk.com/post/1004255394/jade-screencast-template-engine-for-nodejs)
  104. - [html2jade](https://github.com/donpark/html2jade) converter
  105. - [Jade Server](https://github.com/ded/jade-server) Ideal for building local prototypes apart from any application
  106. ## License
  107. MIT