video embed

This commit is contained in:
Tessier 2020-09-22 19:59:57 +02:00
parent e119663877
commit deb272daea
3 changed files with 6 additions and 7 deletions

View File

@ -38,6 +38,9 @@ $args = array (
'numberposts' => 3 'numberposts' => 3
); );
$context['video_url'] = get_field('video_la_mine', FALSE, FALSE);
$context['projet'] = Timber::get_posts( $projet ); $context['projet'] = Timber::get_posts( $projet );
$context['posts'] = Timber::get_posts( $args ); $context['posts'] = Timber::get_posts( $args );
$context['tpsF'] = Timber::get_posts( $tpsF ); $context['tpsF'] = Timber::get_posts( $tpsF );

View File

@ -47,7 +47,7 @@
<h3>Transition urbaine</h3> <h3>Transition urbaine</h3>
{% if post.video_la_mine %} {% if post.video_la_mine %}
<figure class="row mx-0"> <figure class="row mx-0">
<iframe id="playVideo" src="{{post.video_la_mine}}" frameborder="0" allowfullscreen></iframe> {{post.get_field('video_la_mine', FALSE, FALSE)}}
</figure> </figure>
{% endif %} {% endif %}
</div> </div>

View File

@ -15,11 +15,7 @@
</header> </header>
<figure class="__img_event col-lg-6 col-12"> <figure class="__img_event col-lg-6 col-12">
{% if post.ajouter_un_media_0_image_event %} <img src="{{Image(post.image_event).src|resize(600,500)}}" alt="{{Image(post.image_event).alt}}" title="{{Image(post.image_event).title}}">
<img src="{{ Image(post.ajouter_un_media_0_image_event).src }}" />
{% else %}
<iframe width="560" height="315" src="{{post.ajouter_un_media_0_video}}" frameborder="0" allowfullscreen></iframe>
{% endif %}
</figure> </figure>
<div class="article-content col-lg-6 col-12 my-3 my-lg-0"> <div class="article-content col-lg-6 col-12 my-3 my-lg-0">