Skip to content
Snippets Groups Projects
Verified Commit 25963a0b authored by Jake's avatar Jake
Browse files

added card_from_link() macro

parent c8248929
No related branches found
No related tags found
No related merge requests found
......@@ -13,12 +13,16 @@
<li style="--category-color: {{ catcolor }}">{{ link.render(url, title, lang) }}</li>
{%- endmacro -%}
{%- macro card_from_page(page, lang) -%}
{%- call(cattitle, catcolor, caturl, catpage, catpages) get.tag_by_name(page.category, lang) -%}
{{ card(title=page.title, url=['slug',page.slug,page.lang]|join(':'), catcolor=catcolor, lang=lang) }}
{%- macro card_from_link(url, lang) -%}
{%- call(parsedurl, anchor, reflang, is_external, reftype, refid, refpage, tagcattitle, tagcatcolor) link.parse_url(url, lang) -%}
{{ card(title=None, url=url, catcolor=tagcatcolor, lang=lang) }}
{%- endcall -%}
{%- endmacro -%}
{%- macro card_from_page(page, lang) -%}
{{ card_from_link(url=['slug',page.slug,page.lang]|join(':'), lang=lang) }}
{%- endmacro -%}
{%- macro cards_from_pages(pages, lang, max = None, standalone = True) -%}
{%- if standalone -%}
{{ open() }}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment