docs: update examples + readme

This commit is contained in:
relikd
2022-12-20 01:26:17 +01:00
parent 85df707d63
commit f32046dffb
10 changed files with 124 additions and 53 deletions

View File

@@ -1,4 +1,5 @@
<h2>Path: {{ this | url(absolute=True) }}</h2>
<p>This is: {{this}}</p>
<p>Custom field, desc: "{{this.desc}}"</p>
<p>Custom static, seen objects: {{this.custom_attr}}</p>
<p>Children: {{this.children.all()}}</p>

View File

@@ -1,7 +1,7 @@
<h2>Path: {{ this | url(absolute=True) }}</h2>
<p>This is: {{this}}</p>
<p>Group: "{{this.group}}", Key: "{{this.key}}"</p>
<p>Custom field title: {{this.title}}</p>
<p>Object: "{{this.key_obj}}", Key: "{{this.key}}"</p>
<p>Custom field title: "{{this.title}}"</p>
<ul>
{%- for child in this.children %}
<li>Child: <a href="{{child|url}}">{{child.title}}</a> ({{child.path}})</li>

View File

@@ -1,5 +1,7 @@
<h2>Path: {{ this | url(absolute=True) }}</h2>
<p>This is: {{this}}</p>
<p>Key: {{this.key}}</p>
<p>Object: {{this.key_obj}}</p>
<p>Custom field date: {{this.date}}</p>
<ul>
{%- for child in this.children %}

View File

@@ -20,7 +20,7 @@ main { margin: 3em; }
<footer>
{%- for k, v in [('testA','Config'),('testB','Simple'),('testC','Advanced')] %}
<div>{{v}} Tags:
{%- for x in this|vgroups(k, recursive=True, order_by='group') %}
{%- for x in this|vgroups(k, recursive=True, order_by='key_obj') %}
<a href="{{ x|url }}">({{x.key}})</a>
{%- endfor %}
</div>