Book Image

Web Development with Jade

By : Sean Lang
Book Image

Web Development with Jade

By: Sean Lang

Overview of this book

Table of Contents (16 chapters)

Examples


Because of the vast number of languages that can be used in filters, I'm not going to give examples for all of them (that would get really redundant). But the most popular ones are explained in the next sections.

Markdown

Jade

HTML

:markdown
  Markdown is **much** easier to write than that _ugly_ [HTML](http://www.w3.org/html/?).
<p>Markdown is <strong>much</strong> easier to write than that <em>ugly</em> <a href="http://www.w3.org/html/?">HTML</a>.</p>

CoffeeScript

:coffeescript
  square = (x) -> x * x
  cube = (x) ->
    square(x) * x

  (function() {
  var cube, square;

  square = function(x) {
    return x * x;
  };

  cube = function(x) {
    return square(x) * x;
  };
  }).call(this);

Stylus

:stylus
  border-radius()
    -webkit-border-radius arguments
    -moz-border-radius arguments
    border-radius arguments

  body
    font 12px Helvetica, Arial, sans-serif

  a
    color purple

    .button
      border-radius 5px

 ...