fediglam/src/template/test.tmp.html

64 lines
1.4 KiB
HTML

<!DOCTYPE html>
<html>
<head>
<title> {= .community.name =} </title>
</head>
<body>
<h1> TITLE </h1>
<h2> {{ REAL BRACKETS }} </h2>
<section>
{#for .baz |$f| =}
{= #for $f |$b| =}
{$b}:
{= /for =}
{= /for}
{#for .baz |$f, $i| =}{$i}{/for}
{#if .quxx == .quxx2}eql{#else}neq{/if}
{#if .quxx == .qux}eql{#else}neq{/if}
{#if @isTag(.snap, foo)}foo{/if}
{#if @isTag(.snap, bar)}bar{/if}
{#if .qux=}
qux
{=#elif .quxx=}
quxx
{=#else=}
neither
{=/if}
sliced: {#for @slice(.foo, .start, .end) |$s|}{$s}, {/for}
sliced: {#for @slice(.foo, 1, 3) |$s|}{$s}, {/for}
format: {#format "s" .x}
{#switch .snap case foo =}
foo
{= #case bar =}
bar
{= #else =}
other
{= /switch}
crackle: {#switch .crackle case foo |$foo|=}
foo:{$foo}
{= #case bar |$bar|=}
bar:{$bar}
{= #else =}
other
{= /switch}
{#if .maybe_foo |$v|}{$v}{#else}null{/if}
{#if .maybe_bar |$v|}{$v}{#else}null{/if}
{#if .maybe_foo |$_|}abcd{#else}null{/if}
{.maybe_foo.?}
This causes an error: {{.maybe_bar.?}}
<template>{#template test_tmpl .bar}</template>
<template>{#template test_tmpl .}</template>
{%context_foo}
</section>
</body>
</html>