Open michaelpb opened 1 year ago
{% paginate navigation %}
{% for link in navigation.visible %}
<a href="{{ link.url }}">{{ link.title }}</a>
{% endfor %}
{% if navigation.next %}
<a href="{{ navigation.next }}">Next</a>
{% endif %}
{% if navigation.previous %}
<a href="{{ navigation.previous }}">Previous</a>
{% endif %}
1327 'with': (text, tmplt) => {
1328 const code = text.split(/s+/g).map(tmplt.parseAssign).join('\n');
1329 return { start: 'if(1){\n' + code, end: '}' };
1330 },
1151
1152 parseAssign(text) {
1153 const index = text.indexOf('=') + 1; // Index at 1 (0 if missing)
1154 const expr = this.parseExpr(text.slice(index)); // Parse on the right
1155 return `CTX.${ text.slice(0, index - 1) } = ${ expr }`;
1156 }
{% when ready a is 10%}
{% when next-page b is 100 %}
{% if ready and next-page %}
{% endif %}
(alternative for complex expressions?)
{% condition ready = a is 10%}
{% condition next-page = b is 100 %}