atom-engine 5.0.2

A component-oriented template engine built on Tera with props, slots, and provide/inject context
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
{# Test: Stack System #}
{# Push to stack #}
{% call push(name="scripts", content="<script>console.log('a')</script>") %}
{% call push(name="scripts", content="<script>console.log('b')</script>") %}
{% call push(name="scripts", content="<script>console.log('c')</script>") %}

{# Prepend to stack #}
{% call prepend(name="styles", content="<link rel='stylesheet' href='a.css'>") %}
{% call prepend(name="styles", content="<link rel='stylesheet' href='b.css'>") %}

{# Render stacks #}
Scripts:
{{ "scripts" | stack }}

Styles:
{{ "styles" | stack }}