fediglam/src/template/test.tmp.html

64 lines
1.4 KiB
HTML
Raw Normal View History

2022-11-16 03:10:16 +00:00
<!DOCTYPE html>
<html>
<head>
2022-11-18 08:09:10 +00:00
<title> {= .community.name =} </title>
2022-11-16 03:10:16 +00:00
</head>
<body>
<h1> TITLE </h1>
<h2> {{ REAL BRACKETS }} </h2>
<section>
{#for .baz |$f| =}
2022-11-18 11:24:25 +00:00
{= #for $f |$b| =}
{$b}:
{= /for =}
{= /for}
2022-12-14 10:35:23 +00:00
{#for .baz |$f, $i| =}{$i}{/for}
2022-12-10 08:02:04 +00:00
{#if .quxx == .quxx2}eql{#else}neq{/if}
{#if .quxx == .qux}eql{#else}neq{/if}
2022-12-10 08:32:24 +00:00
{#if @isTag(.snap, foo)}foo{/if}
{#if @isTag(.snap, bar)}bar{/if}
{#if .qux=}
qux
{=#elif .quxx=}
quxx
{=#else=}
neither
{=/if}
2022-12-08 07:24:32 +00:00
2022-12-14 08:46:24 +00:00
sliced: {#for @slice(.foo, .start, .end) |$s|}{$s}, {/for}
2022-12-14 10:08:07 +00:00
sliced: {#for @slice(.foo, 1, 3) |$s|}{$s}, {/for}
2022-12-14 08:46:24 +00:00
2022-12-12 06:50:44 +00:00
format: {#format "s" .x}
2022-12-10 09:21:39 +00:00
{#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}
2022-12-08 10:54:36 +00:00
{#if .maybe_foo |$_|}abcd{#else}null{/if}
2022-12-14 09:36:58 +00:00
{.maybe_foo.?}
This causes an error: {{.maybe_bar.?}}
<template>{#template test_tmpl .bar}</template>
2022-12-08 10:58:18 +00:00
<template>{#template test_tmpl .}</template>
2022-12-08 07:47:07 +00:00
2022-12-08 11:21:18 +00:00
{%context_foo}
2022-11-16 03:10:16 +00:00
</section>
</body>
</html>