Skip to content

njoyard/ist

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

285 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ist.js - Indented Selector Templating

Build Status

Selenium Test Status

Introduction

ist.js is a javascript DOM templating engine using a CSS selector-like syntax. Templates are text files, which are first parsed and compiled into a template object, and then rendered into a DOM document using a context object.

Head to the ist.js website for downloads and more information, including the complete documentation.

Here is a brief overview of an ist.js template:

div#content
    /* Article list */
    @each articles
        div.article
            h1 "{{ title }}"
            "{{ text }}"
            
        @unless comments.length
            "No comments yet !"
            
        @each comments
            div.comment "{{ this }}"
                
        form.newcomment
            label[for=name] "Name :"
            input.commentInput#name[type=text]
            textarea[cols=55]#commentArea "Enter your comment here"
                
@include "common/footer"

ist.js tries to reuse many syntax elements from CSS so that, in most cases, setting your editor to highlight CSS syntax will give nice results.

ist.js can be used either as a standalone script, as an AMD module or as a RequireJS plugin.

Feedback

Feedback is always welcome. Feel free to fork ist.js and send me pull requests, to report bugs using the issue tracker or to contact me on twitter as @njoyard.

License

ist.js is distributed under the MIT license. See the file LICENSE for more information.

Copyright (c) 2012-2014 Nicolas Joyard

About

Indented Selectors Templating - Javascript DOM templating engine using a CSS selector -like syntax

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors