twig et css /node-site block third projet lié
This commit is contained in:
@@ -62,65 +62,45 @@
|
||||
* @ingroup themeable
|
||||
*/
|
||||
#}
|
||||
{# <article{{ attributes }}>
|
||||
<article{{ attributes }}>
|
||||
|
||||
{{ title_prefix }}
|
||||
{% if label and not page %}
|
||||
<h2{{ title_attributes }}>
|
||||
<a href="{{ url }}" rel="bookmark">{{ label }}</a>
|
||||
</h2>
|
||||
{% endif %}
|
||||
{{ title_suffix }}
|
||||
{{ title_prefix }}
|
||||
{% if label and not page %}
|
||||
<h2{{ title_attributes }}>
|
||||
<a href="{{ url }}" rel="bookmark">{{ label }}</a>
|
||||
</h2>
|
||||
{% endif %}
|
||||
{{ title_suffix }}
|
||||
|
||||
{% if display_submitted %}
|
||||
<footer>
|
||||
{{ author_picture }}
|
||||
<div{{ author_attributes }}>
|
||||
{% trans %}Submitted by {{ author_name }} on {{ date }}{% endtrans %}
|
||||
{{ metadata }}
|
||||
</div>
|
||||
</footer>
|
||||
{% endif %}
|
||||
|
||||
<div{{ content_attributes }}>
|
||||
{{ content }}
|
||||
</div>
|
||||
{% if display_submitted %}
|
||||
<footer>
|
||||
{{ author_picture }}
|
||||
<div{{ author_attributes }}>
|
||||
{% trans %}Submitted by {{ author_name }} on {{ date }}{% endtrans %}
|
||||
{{ metadata }}
|
||||
</div>
|
||||
</footer>
|
||||
{% endif %}
|
||||
|
||||
</article> #}
|
||||
|
||||
<div{{ content_attributes }}>
|
||||
{% set node_title = node.label %}
|
||||
{% set node_url = (url is defined and url) ? url : path('entity.node.canonical', {'node': node.id}) %}
|
||||
|
||||
{% if node_title %}
|
||||
{{ title_prefix }}
|
||||
<h3{{ title_attributes }} class="node-projet-title">
|
||||
<a href="{{ node_url }}" rel="bookmark">{{ node_title }}</a>
|
||||
</h3>
|
||||
{{ title_suffix }}
|
||||
{% endif %}
|
||||
{{ content }}
|
||||
</div>
|
||||
|
||||
|
||||
</article>
|
||||
|
||||
|
||||
|
||||
{# node--projets-lies.html.twig #}
|
||||
|
||||
{# On détecte si le node est lauréat via le champ field_laureats #}
|
||||
{% set is_laureat = content.field_laureats is defined
|
||||
and content.field_laureats['#items'] is defined
|
||||
and content.field_laureats['#items']|length > 0
|
||||
%}
|
||||
|
||||
<article{{ attributes.addClass('node-type-projet', is_laureat ? 'is-laureat' : '') }}>
|
||||
|
||||
{{ title_prefix }}
|
||||
{% if label and not page %}
|
||||
<h2{{ title_attributes }}>
|
||||
<a href="{{ url }}" rel="bookmark">{{ label }}</a>
|
||||
</h2>
|
||||
{% endif %}
|
||||
{{ title_suffix }}
|
||||
|
||||
{% if display_submitted %}
|
||||
<footer>
|
||||
{{ author_picture }}
|
||||
<div{{ author_attributes }}>
|
||||
{% trans %}Submitted by {{ author_name }} on {{ date }}{% endtrans %}
|
||||
{{ metadata }}
|
||||
</div>
|
||||
</footer>
|
||||
{% endif %}
|
||||
|
||||
<div{{ content_attributes }}>
|
||||
{{ content }}
|
||||
</div>
|
||||
|
||||
</article>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user