diff --git a/sandbox/fenom.php b/sandbox/fenom.php index e76845b..4aff4aa 100644 --- a/sandbox/fenom.php +++ b/sandbox/fenom.php @@ -1,19 +1,8 @@ compile("concat-bug.tpl", false)->getBody()); -} \ No newline at end of file +$fenom->display('greeting.tpl'); \ No newline at end of file diff --git a/sandbox/templates/concat-bug.tpl b/sandbox/templates/concat-bug.tpl deleted file mode 100644 index 4f9fa48..0000000 --- a/sandbox/templates/concat-bug.tpl +++ /dev/null @@ -1,2 +0,0 @@ -Some eval: -{$dop_content = ": some texta"} \ No newline at end of file diff --git a/sandbox/templates/extends/75-child.tpl b/sandbox/templates/extends/75-child.tpl deleted file mode 100644 index e99ff4b..0000000 --- a/sandbox/templates/extends/75-child.tpl +++ /dev/null @@ -1,13 +0,0 @@ -{extends 'extends/75-parent.tpl'} -{block 'child'} - {macro child_test(v, i)} - child test - {$v}, i = {$i};
- {var $i = $i -1} - {if $i > 0} - {macro.child_test v=$v i=$i} - {/if} - {/macro} - - child call:
- {macro.child_test v = 'ok' i = 5} -{/block} \ No newline at end of file diff --git a/sandbox/templates/extends/75-parent.tpl b/sandbox/templates/extends/75-parent.tpl deleted file mode 100644 index 3f360b0..0000000 --- a/sandbox/templates/extends/75-parent.tpl +++ /dev/null @@ -1,12 +0,0 @@ -{macro parent_test(v, i)} - parent test - {$v}, i = {$i};
-{var $i = $i -1} -{if $i > 0} - {macro.parent_test v=$v i=$i} -{/if} -{/macro} - -{block 'child'}{/block} - -parent call:
-{macro.parent_test v = 'ok' i = 5}
\ No newline at end of file diff --git a/sandbox/templates/extends/parent.tpl b/sandbox/templates/extends/parent.tpl deleted file mode 100644 index e69de29..0000000 diff --git a/sandbox/templates/greeting.tpl b/sandbox/templates/greeting.tpl index 925f85a..b9c2e84 100644 --- a/sandbox/templates/greeting.tpl +++ b/sandbox/templates/greeting.tpl @@ -1,7 +1,40 @@ -{var:escape $a} -asdasd -{/var} +{include "header.tpl" title=""} -{*{Ts\Math::multi x=34 y=44}*} -{*{$a + Ts\Math::multi(34, 44)}*} -{*{34|Ts\Math::multi:44}*} \ No newline at end of file + {import 'macros.tpl' as menu} + + {menu.pills active='sandbox' items=$items} + +
+

Jumbotron heading

+

Cras justo odio, dapibus ac facilisis in, egestas eget quam. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus.

+

Sign up today

+
+ +
+ {set $text} +
+

Subheading

+

Donec id elit non mi porta gravida at eget metus. Maecenas faucibus mollis interdum.

+ +

Subheading

+

Morbi leo risus, porta ac consectetur ac, vestibulum at eros. Cras mattis consectetur purus sit amet fermentum.

+ +

Subheading

+

Maecenas sed diam eget risus varius blandit sit amet non magna.

+
+ {/set} + + {$text} + +
+

Subheading

+

Donec id elit non mi porta gravida at eget metus. Maecenas faucibus mollis interdum.

+ +

Subheading

+

Morbi leo risus, porta ac consectetur ac, vestibulum at eros. Cras mattis consectetur purus sit amet fermentum.

+ +

Subheading

+

Maecenas sed diam eget risus varius blandit sit amet non magna.

+
+
+{include "footer.tpl"} \ No newline at end of file diff --git a/sandbox/templates/macros.tpl b/sandbox/templates/macros.tpl index b7b91ba..95911e7 100644 --- a/sandbox/templates/macros.tpl +++ b/sandbox/templates/macros.tpl @@ -1,5 +1,14 @@ -{macro factorial(num)} -{if $num} - {$num} {macro.factorial num=$num-1} {$num} -{/if} +{macro pills($title, $items, $active)} +
+ +

{$title}

+
{/macro} \ No newline at end of file