init
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
{%- set request = grav.request -%}
|
||||
{%- set object_context = object ?? {} -%}
|
||||
{%- set object_layout = object_context.layout ?? ('list-' ~ layout) -%}
|
||||
{% if blacklist %}
|
||||
{% set collection = collection.unselect(blacklist) %}
|
||||
{% endif %}
|
||||
|
||||
<div id="flex-objects">
|
||||
{% if title %}
|
||||
<h2>{{ title|e }}</h2>
|
||||
{% endif %}
|
||||
|
||||
{% if content %}
|
||||
<div>{{ content|markdown }}</div>
|
||||
{% endif %}
|
||||
|
||||
<ul class="list">
|
||||
{% for object in collection.filterBy({ enabled: true }) %}
|
||||
{% set link = request.uri ~ '/id:' ~ object.key %}
|
||||
<li>
|
||||
{% render object layout: object_layout with object_context|merge({link: link}) %}
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
@@ -0,0 +1,14 @@
|
||||
<h4>
|
||||
{% if object.icon %}<i class="fa fa-{{ object.icon|e }}"></i>{% endif %}
|
||||
{{ object.readableName|e }}
|
||||
</h4>
|
||||
{% if object.description %}
|
||||
<div>
|
||||
{{ object.description|e }}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if link %}
|
||||
<div>
|
||||
<a href="{{ link }}">See Details</a>
|
||||
</div>
|
||||
{% endif %}
|
||||
@@ -0,0 +1,16 @@
|
||||
<div class="entry-details">
|
||||
<h4>
|
||||
{% if object.icon %}<i class="fa fa-{{ object.icon|e }}"></i>{% endif %}
|
||||
{{ object.readableName|e }}
|
||||
</h4>
|
||||
{% if object.description %}
|
||||
<div>
|
||||
{{ object.description|e }}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if link %}
|
||||
<div>
|
||||
<a href="{{ link }}">See Details</a>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
Reference in New Issue
Block a user