mirror of
https://github.com/fenom-template/fenom.git
synced 2023-08-10 21:13:07 +03:00
Merge branch 'master' into develop
Conflicts: docs/ru/syntax.md sandbox/fenom.php
This commit is contained in:
@@ -1,2 +0,0 @@
|
||||
Some eval:
|
||||
{$dop_content = ": some texta"}
|
||||
@@ -1,13 +0,0 @@
|
||||
{extends 'extends/75-parent.tpl'}
|
||||
{block 'child'}
|
||||
{macro child_test(v, i)}
|
||||
child test - {$v}, i = {$i};<br/>
|
||||
{var $i = $i -1}
|
||||
{if $i > 0}
|
||||
{macro.child_test v=$v i=$i}
|
||||
{/if}
|
||||
{/macro}
|
||||
|
||||
child call: <br/>
|
||||
{macro.child_test v = 'ok' i = 5}
|
||||
{/block}
|
||||
@@ -1,12 +0,0 @@
|
||||
{macro parent_test(v, i)}
|
||||
parent test - {$v}, i = {$i};<br/>
|
||||
{var $i = $i -1}
|
||||
{if $i > 0}
|
||||
{macro.parent_test v=$v i=$i}
|
||||
{/if}
|
||||
{/macro}
|
||||
|
||||
{block 'child'}{/block}
|
||||
|
||||
parent call:<br/>
|
||||
{macro.parent_test v = 'ok' i = 5} <br/>
|
||||
8
sandbox/templates/footer.tpl
Normal file
8
sandbox/templates/footer.tpl
Normal file
@@ -0,0 +1,8 @@
|
||||
|
||||
<div class="footer">
|
||||
<p>© Company 2014</p>
|
||||
</div>
|
||||
|
||||
</div> <!-- /container -->
|
||||
</body>
|
||||
</html>
|
||||
@@ -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}*}
|
||||
{import 'macros.tpl' as menu}
|
||||
|
||||
{menu.pills active='sandbox' items=$items}
|
||||
|
||||
<div class="jumbotron">
|
||||
<h1>Jumbotron heading</h1>
|
||||
<p class="lead">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.</p>
|
||||
<p><a class="btn btn-lg btn-success" href="#" role="button">Sign up today</a></p>
|
||||
</div>
|
||||
|
||||
<div class="row marketing">
|
||||
{set $text}
|
||||
<div class="col-lg-6">
|
||||
<h4>Subheading</h4>
|
||||
<p>Donec id elit non mi porta gravida at eget metus. Maecenas faucibus mollis interdum.</p>
|
||||
|
||||
<h4>Subheading</h4>
|
||||
<p>Morbi leo risus, porta ac consectetur ac, vestibulum at eros. Cras mattis consectetur purus sit amet fermentum.</p>
|
||||
|
||||
<h4>Subheading</h4>
|
||||
<p>Maecenas sed diam eget risus varius blandit sit amet non magna.</p>
|
||||
</div>
|
||||
{/set}
|
||||
|
||||
{$text}
|
||||
|
||||
<div class="col-lg-6">
|
||||
<h4>Subheading</h4>
|
||||
<p>Donec id elit non mi porta gravida at eget metus. Maecenas faucibus mollis interdum.</p>
|
||||
|
||||
<h4>Subheading</h4>
|
||||
<p>Morbi leo risus, porta ac consectetur ac, vestibulum at eros. Cras mattis consectetur purus sit amet fermentum.</p>
|
||||
|
||||
<h4>Subheading</h4>
|
||||
<p>Maecenas sed diam eget risus varius blandit sit amet non magna.</p>
|
||||
</div>
|
||||
</div>
|
||||
{include "footer.tpl"}
|
||||
22
sandbox/templates/header.tpl
Normal file
22
sandbox/templates/header.tpl
Normal file
@@ -0,0 +1,22 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta name="description" content="">
|
||||
<meta name="author" content="Bzick">
|
||||
|
||||
<title>{$title}</title>
|
||||
|
||||
<!-- Bootstrap core CSS -->
|
||||
<link href="//yastatic.net/bootstrap/3.1.1/css/bootstrap.min.css" rel="stylesheet">
|
||||
<script src="//yastatic.net/bootstrap/3.1.1/js/bootstrap.min.js"></script>
|
||||
|
||||
<!-- Custom styles for this template -->
|
||||
<link href="jumbotron-narrow.css" rel="stylesheet">
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="container">
|
||||
@@ -1,5 +1,14 @@
|
||||
{macro factorial(num)}
|
||||
{if $num}
|
||||
{$num} {macro.factorial num=$num-1} {$num}
|
||||
{/if}
|
||||
{macro pills($title, $items, $active)}
|
||||
<div class="header">
|
||||
<ul class="nav nav-pills pull-right" role="tablist">
|
||||
{foreach $items as $code => $item}
|
||||
{if $code == $active}
|
||||
<li role="presentation" class="{$code}"><a href="">{$item.name}</a></li>
|
||||
{else}
|
||||
<li role="presentation" class="active {$code}"><a href="{$item.url}">{$item.name}</a></li>
|
||||
{/if}
|
||||
{/foreach}
|
||||
</ul>
|
||||
<h3 class="text-muted">{$title}</h3>
|
||||
</div>
|
||||
{/macro}
|
||||
Reference in New Issue
Block a user