Skip to content

Commit

Permalink
...
Browse files Browse the repository at this point in the history
  • Loading branch information
RobinDev committed Jan 26, 2022
1 parent e7848d0 commit fc75fc6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
12 changes: 6 additions & 6 deletions packages/core/src/templates/component/card.html.twig
Expand Up @@ -4,11 +4,11 @@
hLevel
title
#}
{% if page is defined %}
{% set image = page.mainImage %}
{% set date = page.createdAt %}
{% set title = pw(page).h1 %}
{% set link = page(page) %}
{% if p is defined %}
{% set image = p.mainImage %}
{% set date = p.createdAt %}
{% set title = pw(p).h1 %}
{% set link = p(p) %}
{% endif %}


Expand All @@ -17,7 +17,7 @@
<article class="overflow-hidden rounded-lg shadow-lg">

{% if image is defined and image is not null %}
{{ helper.thumb(media_from_string(image), page ?? null, 'thumb', {'class': 'block w-full h-auto m-0'}) }}
{{ helper.thumb(media_from_string(image), p ?? null, 'thumb', {'class': 'block w-full h-auto m-0'}) }}
{% endif %}
{% if page.showCardDate|default('true') %}
<span class="block p-2 text-sm text-white bg-primary">
Expand Down
Expand Up @@ -3,7 +3,7 @@
<ul class="flex flex-row my-5 max-w-screen-md flex-wrap justify-center mx-auto">
{% for p in pages %}
<li class="w-full px-1 my-1 sm:w-1/2 md:w-1/3">
{% include view('/component/card.html.twig') with {'page': p} only %}
{% include view('/component/card.html.twig') with {'p': p} %}
</li>
{% endfor %}
</ul>
Expand Down

0 comments on commit fc75fc6

Please sign in to comment.