mirror of
https://github.com/KevinMidboe/linguist.git
synced 2025-10-29 17:50:22 +00:00
Add Closure Templates (#3634)
* Add Closure Templates to languages.yml * Run script/add-grammar * Add sample * Run script/set-language-ids * Add codemirror_mime_type
This commit is contained in:
committed by
Colin Seymour
parent
234ee8b6d2
commit
20fdac95f6
24
samples/Closure Templates/example.soy
Normal file
24
samples/Closure Templates/example.soy
Normal file
@@ -0,0 +1,24 @@
|
||||
{namespace Exmaple}
|
||||
|
||||
/**
|
||||
* Example
|
||||
*/
|
||||
{template .foo}
|
||||
{@param count: string}
|
||||
{@param? name: int}
|
||||
|
||||
{if isNonnull($name)}
|
||||
<h1>{$name}</h1>
|
||||
{/if}
|
||||
|
||||
<div class="content">
|
||||
{switch count}
|
||||
{case 0}
|
||||
{call Empty.view}
|
||||
{param count: $count /}
|
||||
{/call}
|
||||
{default}
|
||||
<h2>Wow, so many!</h2>
|
||||
{/switch}
|
||||
</div>
|
||||
{/template}
|
||||
Reference in New Issue
Block a user