GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - trix/nano: Simplest Templating Engine

This repository was archived by the owner on Aug 19, 2020. It is now read-only.
BranchesTags
Open more actions menu

Latest commit

 

History

35 Commits
35 Commits

Folders and files

NameName
Last commit message
Last commit date
MIT-LICENSE
MIT-LICENSE
 
 
nano.js
nano.js
 
 
nano.min.js
nano.min.js
 
 
readme.md
readme.md
 
 
testPage.html
testPage.html
 
 

Repository files navigation

NANO - Simplest Template Engine

Basic Usage

Assuming you have following JSON response:

data = {
  user: {
    login: "tomek",
    first_name: "Thomas",
    last_name: "Mazur",
    account: {
      status: "active",
      expires_at: "2009-12-31"
    }
  }
}

you can make:

nano("<p>Hello {user.first_name} {user.last_name}! Your account is <strong>{user.account.status}</strong></p>", data)

and you get ready string:

<p>Hello Thomas Mazur! Your account is <strong>active</strong></p>

Test page: testPage.html

Simple huh?

More Advanced Example

Displaying list of twitter search results (JSONP API)

http://jsfiddle.net/UXZDy/86/

About

Simplest Templating Engine

trix.pl

Resources

Readme
MIT license
Activity
Custom properties

Stars

448 stars

Watchers

0 watching

Forks

68 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.