portfolio/templates/home/projects_list.html.twig

54 lines
1.9 KiB
Twig
Raw Normal View History

2022-06-21 10:33:35 +00:00
<div class="projects">
{% for project in projects %}
<div class="project-card" data-id="{{ project.id }}">
<div class="project-top">
2022-08-02 20:09:45 +00:00
<div class="project-thumbnail">
{% if project.thumbnail is defined %}
<img
class="project-img"
src="imgs/{{ project.thumbnail.src }}"
alt="{{ getDynLocalizedStr(project.thumbnail.alt) }}"
/>
{% endif %}
</div>
<div class="project-content">
<h3 class="project-title">
2022-08-02 20:09:45 +00:00
{% if project.detailled %}
2022-08-03 10:19:51 +00:00
<a href="./projects/{{ project.id }}">
{{ getDynLocalizedStr(project.name) }}
</a>
{% else %}
{{ getDynLocalizedStr(project.name) }}
{% endif %}
</h3>
{% if project.description is defined %}
<p class="project-description">
{{ getDynLocalizedStr(project.description) }}
</p>
{% endif %}
</div>
</div>
<div class="project-bottom">
2022-08-02 20:09:45 +00:00
{% if project.link is defined %}
<a href="{{ project.link}}">
{% if project.action is defined %}
{{ getDynLocalizedStr(project.action) }}
{% else %}
{{ getLocalizedStr('external-website') }}
{% endif %}
2022-06-21 10:33:35 +00:00
</a>
2022-08-02 20:09:45 +00:00
{% else %}
<div></div>
{% endif %}
{% if project.date is defined %}
<div class="project-date-container">
{{ source('@imgs/icons/calendar-event.svg') }}
{{ project.date }}
</div>
{% endif %}
</div>
2022-06-21 10:33:35 +00:00
</div>
{% endfor %}
</div>