123 lines
13 KiB
HTML
123 lines
13 KiB
HTML
<!DOCTYPE html>
|
|
<html><head>
|
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
|
|
<title>test.mustache</title>
|
|
<meta name="generator" content="KF5::SyntaxHighlighting - Definition (Mustache/Handlebars (HTML)) - Theme (Breeze Dark)"/>
|
|
</head><body style="background-color:#232629;color:#cfcfc2"><pre>
|
|
<span style="color:#7a7c7d"><!-- Mustache / Handlebars / Ractive template --></span>
|
|
<span style="color:#2980b9;font-weight:bold"><!DOCTYPE</span> html<span style="color:#2980b9;font-weight:bold">></span>
|
|
<span style="font-weight:bold"><html></span>
|
|
<span style="font-weight:bold"><head></span>
|
|
<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>
|
|
<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>
|
|
<span style="font-weight:bold"></head></span>
|
|
<span style="color:#7a7c7d"><!-- CSS --></span>
|
|
<span style="font-weight:bold"><style></span>
|
|
<span style="color:#7a7c7d">/* Mustache variable support in CSS is incomplete */</span>
|
|
<span style="color:#27aeae">{{</span>mustache<span style="color:#27aeae">}}</span>
|
|
<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>
|
|
body {
|
|
<span style="color:#3daee9">{{{</span>other<span style="color:#3daee9">}}}</span>
|
|
<span style="font-weight:bold">font-size</span><span style="color:#3daee9">:</span> <span style="color:#f67400">15</span><span style="color:#2980b9">pt</span><span style="color:#3f8058">;</span>
|
|
<span style="font-weight:bold">font-family</span><span style="color:#3daee9">:</span> Verdana<span style="color:#3f8058">;</span>
|
|
}
|
|
<span style="font-weight:bold"></style></span>
|
|
<span style="color:#7a7c7d"><!-- JavaScript --></span>
|
|
<span style="font-weight:bold"><script></span>
|
|
<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>
|
|
<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>
|
|
<span style="font-weight:bold"></script></span>
|
|
|
|
<span style="font-weight:bold"><body></span>
|
|
<span style="color:#8e44ad;font-weight:bold">{{#movie}}</span>
|
|
<span style="font-weight:bold"><div></span>
|
|
<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>
|
|
<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>
|
|
<span style="font-weight:bold"></div></span>
|
|
<span style="font-weight:bold"><div></span>
|
|
Rating - <span style="color:#27aeae">{{</span>ratings<span style="color:#3f8058">.</span>critics_rating<span style="color:#27aeae">}}</span>
|
|
<span style="font-weight:bold"></div></span>
|
|
<span style="color:#8e44ad;font-weight:bold">{{/movie}}</span>
|
|
<span style="color:#8e44ad;font-weight:bold">{{^movie}}</span>
|
|
<span style="font-weight:bold"><div></span>
|
|
Movie Does Not Exist :(
|
|
<span style="font-weight:bold"></div></span>
|
|
<span style="color:#8e44ad;font-weight:bold">{{/movie}}</span>
|
|
<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>
|
|
|
|
This is a partial <span style="color:#27aeae">{{></span><span style="color:#3daee9"> partial1 </span><span style="color:#27aeae">}}</span>
|
|
<span style="color:#8e44ad;font-weight:bold">{{#block</span>
|
|
<span style="color:#27ae60"> param</span><span style="color:#3f8058">=</span>foo
|
|
<span style="color:#27ae60"> param2</span><span style="color:#3f8058">=</span>bar<span style="color:#8e44ad;font-weight:bold">}}</span>
|
|
<span style="color:#27aeae">{{</span>block<span style="color:#27ae60"> foo</span><span style="color:#3f8058">=</span>bar<span style="color:#27aeae">}}</span>
|
|
<span style="color:#8e44ad;font-weight:bold">{{/block}}</span>
|
|
|
|
<span style="color:#7a7c7d"><!-- Handlebars --></span>
|
|
|
|
<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>
|
|
<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>
|
|
<span style="color:#8e44ad;font-weight:bold">{{#with</span> story<span style="color:#8e44ad;font-weight:bold">}}</span>
|
|
<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>
|
|
<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>
|
|
<span style="color:#8e44ad;font-weight:bold">{{/with}}</span>
|
|
<span style="color:#8e44ad;font-weight:bold">{{#each</span> comments<span style="color:#8e44ad;font-weight:bold">}}</span>
|
|
<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>
|
|
<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>
|
|
<span style="color:#3daee9">{{{</span>body<span style="color:#3daee9">}}}</span>
|
|
<span style="font-weight:bold"></div></span>
|
|
<span style="color:#8e44ad;font-weight:bold">{{/each}}</span>
|
|
<span style="color:#8e44ad;font-weight:bold">{{#list</span> nav<span style="color:#8e44ad;font-weight:bold">}}</span>
|
|
<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>
|
|
<span style="color:#8e44ad;font-weight:bold">{{/list}}</span>
|
|
|
|
<span style="color:#7a7c7d">{{!-- Conditionals --}}</span>
|
|
<span style="color:#8e44ad;font-weight:bold">{{#if</span> isActive<span style="color:#8e44ad;font-weight:bold">}}</span>
|
|
<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>
|
|
<span style="color:#8e44ad;font-weight:bold">{{else if</span> isInactive<span style="color:#8e44ad;font-weight:bold">}}</span>
|
|
<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>
|
|
<span style="color:#8e44ad;font-weight:bold">{{else}}</span>
|
|
<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>
|
|
<span style="color:#8e44ad;font-weight:bold">{{/if}}</span>
|
|
|
|
<span style="color:#7a7c7d">{{!-- Escaping --}}</span>
|
|
\{{escaped}}
|
|
<span style="color:#8e44ad;font-weight:bold">{{{{raw}}}}</span>
|
|
{{escaped}}
|
|
<span style="color:#8e44ad;font-weight:bold">{{{{/raw}}}}</span>
|
|
|
|
<span style="color:#7a7c7d">{{!-- Whitespace Control --}}</span>
|
|
<span style="color:#8e44ad;font-weight:bold">{{#each</span> nav ~<span style="color:#8e44ad;font-weight:bold">}}</span>
|
|
<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:#8e44ad;font-weight:bold">{{~#if</span> test<span style="color:#8e44ad;font-weight:bold">}}</span>
|
|
<span style="color:#27aeae">{{</span>~title<span style="color:#27aeae">}}</span>
|
|
<span style="color:#8e44ad;font-weight:bold">{{~^</span>~<span style="color:#8e44ad;font-weight:bold">}}</span>
|
|
Empty
|
|
<span style="color:#8e44ad;font-weight:bold">{{~/if</span>~<span style="color:#8e44ad;font-weight:bold">}}</span>
|
|
<span style="font-weight:bold"></a></span>
|
|
<span style="color:#8e44ad;font-weight:bold">{{~/each}}</span>
|
|
|
|
<span style="color:#7a7c7d">{{!-- Helpers --}}</span>
|
|
<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>
|
|
<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>
|
|
|
|
<span style="color:#7a7c7d">{{!-- Partial --}}</span>
|
|
<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>
|
|
<span style="color:#8e44ad;font-weight:bold">{{#> myPartial</span> <span style="color:#8e44ad;font-weight:bold">}}</span>
|
|
Failover content
|
|
<span style="color:#8e44ad;font-weight:bold">{{/myPartial}}</span>
|
|
<span style="color:#8e44ad;font-weight:bold">{{#*inline</span> <span style="color:#f44f4f">"myPartial"</span><span style="color:#8e44ad;font-weight:bold">}}</span>
|
|
My Content
|
|
<span style="color:#8e44ad;font-weight:bold">{{/inline}}</span>
|
|
<span style="color:#8e44ad;font-weight:bold">{{#each</span> children<span style="color:#8e44ad;font-weight:bold">}}</span>
|
|
<span style="color:#27aeae">{{></span><span style="color:#3daee9"> myPartial</span><span style="color:#27aeae">}}</span>
|
|
<span style="color:#8e44ad;font-weight:bold">{{/each}}</span>
|
|
|
|
<span style="color:#7a7c7d"><!-- Delimiters in tags (folding) --></span>
|
|
word<span style="font-weight:bold"><div></span>word
|
|
|
|
word<span style="font-weight:bold"></div></span>word
|
|
|
|
<span style="font-weight:bold"></body></span>
|
|
<span style="font-weight:bold"></html></span>
|
|
</pre></body></html>
|