| 1 |
<!DOCTYPE html> |
| 2 |
<html><head> |
| 3 |
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> |
| 4 |
<title>test.mustache</title> |
| 5 |
<meta name="generator" content="KF5::SyntaxHighlighting - Definition (Mustache/Handlebars (HTML)) - Theme (Breeze Dark)"/> |
| 6 |
</head><body style="background-color:#232629;color:#cfcfc2"><pre> |
| 7 |
<span style="color:#7a7c7d;"><!-- Mustache / Handlebars / Ractive template --></span> |
| 8 |
<span style="color:#2980b9;font-weight:bold;"><!DOCTYPE </span>html<span style="color:#2980b9;font-weight:bold;">></span> |
| 9 |
<span style="font-weight:bold;"><html></span> |
| 10 |
<span style="font-weight:bold;"><head></span> |
| 11 |
<span style="font-weight:bold;"><meta</span><span style="color:#27ae60;"> charset</span><span style="color:#3f8058;">=</span><span style="color:#f44f4f;">"UTF-8"</span> <span style="font-weight:bold;">/></span> |
| 12 |
<span style="font-weight:bold;"><title></span><span style="color:#27aeae;">{{</span>title<span style="color:#27aeae;">}}</span><span style="font-weight:bold;"></title></span> |
| 13 |
<span style="font-weight:bold;"></head></span> |
| 14 |
<span style="color:#7a7c7d;"><!-- CSS --></span> |
| 15 |
<span style="font-weight:bold;"><style></span> |
| 16 |
<span style="color:#7a7c7d;">/* Mustache variable support in CSS is incomplete */</span> |
| 17 |
<span style="color:#27aeae;">{{</span>mustache<span style="color:#27aeae;">}}</span> |
| 18 |
<span style="color:#0099ff;font-weight:bold;">[ </span><span style="color:#27aeae;">{{</span>other<span style="color:#27aeae;">}}</span><span style="color:#0099ff;font-weight:bold;"> ]</span> |
| 19 |
body { |
| 20 |
<span style="color:#3daee9;">{{{</span>other<span style="color:#3daee9;">}}}</span> |
| 21 |
<span style="font-weight:bold;">font-size</span>: <span style="color:#f67400;">15</span><span style="color:#2980b9;">pt</span><span style="color:#3f8058;">;</span> |
| 22 |
<span style="font-weight:bold;">font-family</span>: Verdana<span style="color:#3f8058;">;</span> |
| 23 |
} |
| 24 |
<span style="font-weight:bold;"></style></span> |
| 25 |
<span style="color:#7a7c7d;"><!-- JavaScript --></span> |
| 26 |
<span style="font-weight:bold;"><script></span> |
| 27 |
<span style="font-weight:bold;">var</span> foo <span style="color:#3f8058;">=</span> <span style="color:#27aeae;">{{</span>bar<span style="color:#27aeae;">}}</span><span style="color:#3f8058;">;</span> |
| 28 |
<span style="color:#da4453;">`template </span><span style="color:#27aeae;">{{</span>foo<span style="color:#27aeae;">}}</span><span style="color:#da4453;"> </span><span style="color:#3daee9;">${</span> <span style="font-weight:bold;">var</span> a <span style="color:#3f8058;">=</span> <span style="color:#27aeae;">{{</span>b<span style="color:#27aeae;">}}</span> <span style="color:#3daee9;">}</span><span style="color:#da4453;">`</span> |
| 29 |
<span style="font-weight:bold;"></script></span> |
| 30 |
|
| 31 |
<span style="font-weight:bold;"><body></span> |
| 32 |
<span style="color:#8e44ad;font-weight:bold;">{{#movie}}</span> |
| 33 |
<span style="font-weight:bold;"><div></span> |
| 34 |
<span style="font-weight:bold;"><h1></span><span style="color:#27aeae;">{{</span>title<span style="color:#27aeae;">}}</span><span style="font-weight:bold;"></h1></span> |
| 35 |
<span style="font-weight:bold;"><img</span><span style="color:#27ae60;"> src</span><span style="color:#3f8058;">=</span><span style="color:#f44f4f;">"</span><span style="color:#27aeae;">{{</span>poster<span style="color:#27aeae;">}}</span><span style="color:#f44f4f;">"</span><span style="color:#27ae60;"> alt</span><span style="color:#3f8058;">=</span><span style="color:#f44f4f;">"</span><span style="color:#27aeae;">{{</span>title<span style="color:#27aeae;">}}</span><span style="color:#f44f4f;">"</span><span style="font-weight:bold;">/></span> |
| 36 |
<span style="font-weight:bold;"></div></span> |
| 37 |
<span style="font-weight:bold;"><div></span> |
| 38 |
Rating - <span style="color:#27aeae;">{{</span>ratings<span style="color:#3f8058;">.</span>critics_rating<span style="color:#27aeae;">}}</span> |
| 39 |
<span style="font-weight:bold;"></div></span> |
| 40 |
<span style="color:#8e44ad;font-weight:bold;">{{/movie}}</span> |
| 41 |
<span style="color:#8e44ad;font-weight:bold;">{{^movie}}</span> |
| 42 |
<span style="font-weight:bold;"><div></span> |
| 43 |
Movie Does Not Exist :( |
| 44 |
<span style="font-weight:bold;"></div></span> |
| 45 |
<span style="color:#8e44ad;font-weight:bold;">{{/movie}}</span> |
| 46 |
<span style="color:#7a7c7d;">{{! this is a comment </span><span style="color:#ca9219;background-color:#451e1a;font-weight:bold;">TODO</span><span style="color:#7a7c7d;"> </span><span style="color:#e85848;background-color:#451e1a;font-weight:bold;">ALERT</span><span style="color:#7a7c7d;"> }}</span> |
| 47 |
|
| 48 |
This is a partial <span style="color:#27aeae;">{{></span><span style="color:#3daee9;"> partial1 </span><span style="color:#27aeae;">}}</span> |
| 49 |
<span style="color:#8e44ad;font-weight:bold;">{{#block</span> |
| 50 |
<span style="color:#27ae60;"> param</span><span style="color:#3f8058;">=</span>foo |
| 51 |
<span style="color:#27ae60;"> param2</span><span style="color:#3f8058;">=</span>bar<span style="color:#8e44ad;font-weight:bold;">}}</span> |
| 52 |
<span style="color:#27aeae;">{{</span>block<span style="color:#27ae60;"> foo</span><span style="color:#3f8058;">=</span>bar<span style="color:#27aeae;">}}</span> |
| 53 |
<span style="color:#8e44ad;font-weight:bold;">{{/block}}</span> |
| 54 |
|
| 55 |
<span style="color:#7a7c7d;"><!-- Handlebars --></span> |
| 56 |
|
| 57 |
<span style="color:#8e44ad;font-weight:bold;">{{#list</span> people<span style="color:#8e44ad;font-weight:bold;">}}</span><span style="color:#27aeae;">{{</span>firstName<span style="color:#27aeae;">}}</span> <span style="color:#27aeae;">{{</span>lastName<span style="color:#27aeae;">}}</span><span style="color:#8e44ad;font-weight:bold;">{{/list}}</span> |
| 58 |
<span style="color:#8e44ad;font-weight:bold;">{{#noop}}</span><span style="color:#27aeae;">{{</span>body<span style="color:#27aeae;">}}</span><span style="color:#8e44ad;font-weight:bold;">{{/noop}}</span> |
| 59 |
<span style="color:#8e44ad;font-weight:bold;">{{#with</span> story<span style="color:#8e44ad;font-weight:bold;">}}</span> |
| 60 |
<span style="font-weight:bold;"><div</span><span style="color:#27ae60;"> class</span><span style="color:#3f8058;">=</span><span style="color:#f44f4f;">"intro"</span><span style="font-weight:bold;">></span><span style="color:#3daee9;">{{{</span>intro<span style="color:#3daee9;">}}}</span><span style="font-weight:bold;"></div></span> |
| 61 |
<span style="font-weight:bold;"><div</span><span style="color:#27ae60;"> class</span><span style="color:#3f8058;">=</span><span style="color:#f44f4f;">"body"</span><span style="font-weight:bold;">></span><span style="color:#3daee9;">{{{</span>body<span style="color:#3daee9;">}}}</span><span style="font-weight:bold;"></div></span> |
| 62 |
<span style="color:#8e44ad;font-weight:bold;">{{/with}}</span> |
| 63 |
<span style="color:#8e44ad;font-weight:bold;">{{#each</span> comments<span style="color:#8e44ad;font-weight:bold;">}}</span> |
| 64 |
<span style="font-weight:bold;"><div</span><span style="color:#27ae60;"> class</span><span style="color:#3f8058;">=</span><span style="color:#f44f4f;">"comment"</span><span style="font-weight:bold;">></span> |
| 65 |
<span style="font-weight:bold;"><h2></span><span style="color:#27aeae;">{{</span>subject<span style="color:#27aeae;">}}</span><span style="font-weight:bold;"></h2></span> |
| 66 |
<span style="color:#3daee9;">{{{</span>body<span style="color:#3daee9;">}}}</span> |
| 67 |
<span style="font-weight:bold;"></div></span> |
| 68 |
<span style="color:#8e44ad;font-weight:bold;">{{/each}}</span> |
| 69 |
<span style="color:#8e44ad;font-weight:bold;">{{#list</span> nav<span style="color:#8e44ad;font-weight:bold;">}}</span> |
| 70 |
<span style="font-weight:bold;"><a</span><span style="color:#27ae60;"> href</span><span style="color:#3f8058;">=</span><span style="color:#f44f4f;">"</span><span style="color:#27aeae;">{{</span>url<span style="color:#27aeae;">}}</span><span style="color:#f44f4f;">"</span><span style="font-weight:bold;">></span><span style="color:#27aeae;">{{</span>title<span style="color:#27aeae;">}}</span><span style="font-weight:bold;"></a></span> |
| 71 |
<span style="color:#8e44ad;font-weight:bold;">{{/list}}</span> |
| 72 |
|
| 73 |
<span style="color:#7a7c7d;">{{!-- Conditionals --}}</span> |
| 74 |
<span style="color:#8e44ad;font-weight:bold;">{{#if</span> isActive<span style="color:#8e44ad;font-weight:bold;">}}</span> |
| 75 |
<span style="font-weight:bold;"><img</span><span style="color:#27ae60;"> src</span><span style="color:#3f8058;">=</span><span style="color:#f44f4f;">"star.gif"</span><span style="color:#27ae60;"> alt</span><span style="color:#3f8058;">=</span><span style="color:#f44f4f;">"Active"</span><span style="font-weight:bold;">></span> |
| 76 |
<span style="color:#8e44ad;font-weight:bold;">{{else if</span> isInactive<span style="color:#8e44ad;font-weight:bold;">}}</span> |
| 77 |
<span style="font-weight:bold;"><img</span><span style="color:#27ae60;"> src</span><span style="color:#3f8058;">=</span><span style="color:#f44f4f;">"cry.gif"</span><span style="color:#27ae60;"> alt</span><span style="color:#3f8058;">=</span><span style="color:#f44f4f;">"Inactive"</span><span style="font-weight:bold;">></span> |
| 78 |
<span style="color:#8e44ad;font-weight:bold;">{{else}}</span> |
| 79 |
<span style="font-weight:bold;"><img</span><span style="color:#27ae60;"> src</span><span style="color:#3f8058;">=</span><span style="color:#f44f4f;">"cry.gif"</span><span style="color:#27ae60;"> alt</span><span style="color:#3f8058;">=</span><span style="color:#f44f4f;">""</span><span style="font-weight:bold;">></span> |
| 80 |
<span style="color:#8e44ad;font-weight:bold;">{{/if}}</span> |
| 81 |
|
| 82 |
<span style="color:#7a7c7d;">{{!-- Escaping --}}</span> |
| 83 |
\{{escaped}} |
| 84 |
<span style="color:#8e44ad;font-weight:bold;">{{{{raw}}}}</span> |
| 85 |
{{escaped}} |
| 86 |
<span style="color:#8e44ad;font-weight:bold;">{{{{/raw}}}}</span> |
| 87 |
|
| 88 |
<span style="color:#7a7c7d;">{{!-- Whitespace Control --}}</span> |
| 89 |
<span style="color:#8e44ad;font-weight:bold;">{{#each</span> nav ~<span style="color:#8e44ad;font-weight:bold;">}}</span> |
| 90 |
<span style="font-weight:bold;"><a</span><span style="color:#27ae60;"> href</span><span style="color:#3f8058;">=</span><span style="color:#f44f4f;">"</span><span style="color:#27aeae;">{{</span>url<span style="color:#27aeae;">}}</span><span style="color:#f44f4f;">"</span><span style="font-weight:bold;">></span> |
| 91 |
<span style="color:#8e44ad;font-weight:bold;">{{~#if</span> test<span style="color:#8e44ad;font-weight:bold;">}}</span> |
| 92 |
<span style="color:#27aeae;">{{</span>~title<span style="color:#27aeae;">}}</span> |
| 93 |
<span style="color:#8e44ad;font-weight:bold;">{{~^</span>~<span style="color:#8e44ad;font-weight:bold;">}}</span> |
| 94 |
Empty |
| 95 |
<span style="color:#8e44ad;font-weight:bold;">{{~/if</span>~<span style="color:#8e44ad;font-weight:bold;">}}</span> |
| 96 |
<span style="font-weight:bold;"></a></span> |
| 97 |
<span style="color:#8e44ad;font-weight:bold;">{{~/each}}</span> |
| 98 |
|
| 99 |
<span style="color:#7a7c7d;">{{!-- Helpers --}}</span> |
| 100 |
<span style="color:#27aeae;">{{link</span> <span style="color:#f44f4f;">"See more..."</span> story<span style="color:#3f8058;">.</span>url<span style="color:#27aeae;">}}</span> |
| 101 |
<span style="color:#27aeae;">{{log</span> <span style="color:#f44f4f;">"Look at me!"</span><span style="color:#27ae60;"> level</span><span style="color:#3f8058;">=</span><span style="color:#f44f4f;">"error"</span><span style="color:#27aeae;">}}</span> |
| 102 |
|
| 103 |
<span style="color:#7a7c7d;">{{!-- Partial --}}</span> |
| 104 |
<span style="color:#27aeae;">{{></span><span style="color:#3daee9;"> myPartial</span><span style="color:#27ae60;"> name</span><span style="color:#3f8058;">=..</span><span style="color:#3daee9;">/name </span><span style="color:#27aeae;">}}</span> |
| 105 |
<span style="color:#8e44ad;font-weight:bold;">{{#> myPartial</span> <span style="color:#8e44ad;font-weight:bold;">}}</span> |
| 106 |
Failover content |
| 107 |
<span style="color:#8e44ad;font-weight:bold;">{{/myPartial}}</span> |
| 108 |
<span style="color:#8e44ad;font-weight:bold;">{{#*inline</span> <span style="color:#f44f4f;">"myPartial"</span><span style="color:#8e44ad;font-weight:bold;">}}</span> |
| 109 |
My Content |
| 110 |
<span style="color:#8e44ad;font-weight:bold;">{{/inline}}</span> |
| 111 |
<span style="color:#8e44ad;font-weight:bold;">{{#each</span> children<span style="color:#8e44ad;font-weight:bold;">}}</span> |
| 112 |
<span style="color:#27aeae;">{{></span><span style="color:#3daee9;"> myPartial</span><span style="color:#27aeae;">}}</span> |
| 113 |
<span style="color:#8e44ad;font-weight:bold;">{{/each}}</span> |
| 114 |
|
| 115 |
<span style="color:#7a7c7d;"><!-- Delimiters in tags (folding) --></span> |
| 116 |
word<span style="font-weight:bold;"><div></span>word |
| 117 |
|
| 118 |
word<span style="font-weight:bold;"></div></span>word |
| 119 |
|
| 120 |
<span style="font-weight:bold;"></body></span> |
| 121 |
<span style="font-weight:bold;"></html></span> |
| 122 |
</pre></body></html> |