RSSHub/lib/v2/dlnews/templates/description.art

24 lines
814 B
Plaintext

{{ each $data d }}
{{ if d.type == 'custom_embed' }}
<ul>
{{ each d.data.split('\n') line }}
<li>{{@ line }}</li>
{{ /each }}
</ul>
{{ else if d.type == 'header' }}
<h2>{{@ d.data }}</h2>
{{ else if d.type == 'list' }}
{{ if d.list_type == 'unordered' }}<ul>{{ else }}<ol>{{ /if }}
{{ each d.items item }}
<li>{{@ item.content }}</li>
{{ /each }}
{{ if d.list_type == 'unordered' }}</ul>{{ else }}</ol>{{ /if }}
{{ else if d.type == 'image' }}
<figure>
<img src="{{ d.src }}" alt="{{ d.alt }}">
<figcaption>{{@ d.caption }}</figcaption>
</figure>
{{ else if d.type == 'text' }}
<p>{{@ d.data }}</p>
{{ /if }}
{{ /each }}