Skip to content

Instantly share code, notes, and snippets.

@morontt
Created April 7, 2015 12:48
Show Gist options
  • Save morontt/60c71231a33a9b66c826 to your computer and use it in GitHub Desktop.
Save morontt/60c71231a33a9b66c826 to your computer and use it in GitHub Desktop.

Revisions

  1. morontt created this gist Apr 7, 2015.
    3 changes: 3 additions & 0 deletions app.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,3 @@
    var html = twig({ ref: "user-profile" }).render({
    list: ["a", "b", "c"]
    });
    15 changes: 15 additions & 0 deletions template_profile.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,15 @@
    twig({
    id: "user-profile",
    data: "<div class=\"discount-splash-action-details-outer\">\
    <div class=\"discount-splash _{{ percentDiscount|number_format }}\">\
    bis\
    <strong>-{% if percentDiscount is defined %}{{ percentDiscount }}%{% endif %}</strong>\
    </div>\
    </div>\
    <div class=\"discount-splash-action-details-outer display-none\">\
    <div class=\"discount-splash _{{ crossPrice|number_format }}\">\
    &nbsp;\
    <strong><s>{% if crossPrice is defined %}{{ crossPrice |number_format(0, ',', '.') }} &euro;{% endif %}</s></strong>\
    </div>\
    </div>"
    });