Pas de <hr> si pas de commentaire

This commit is contained in:
nyanloutre 2017-07-24 22:52:08 +02:00
parent 865794f209
commit b0f813d3bb
Signed by: nyanloutre
GPG Key ID: F85D93686A3A9063

View File

@ -120,7 +120,7 @@
<source src="video/portfolio/1.webm" type="video/webm"> <source src="video/portfolio/1.webm" type="video/webm">
</video> </video>
</div> </div>
<div class="element-portfolio clickable col-lg-4 col-sm-6" data-toggle="modal" data-target="#sketchFabModal" data-sketchfabid="7507e61126754169937a24858981b185" data-comment="Metal Carrot"> <div class="element-portfolio clickable col-lg-4 col-sm-6" data-toggle="modal" data-target="#sketchFabModal" data-sketchfabid="7507e61126754169937a24858981b185">
<div class="portfolio-container"> <div class="portfolio-container">
<img src="img/portfolio/Metal Carrot1.jpg" /> <img src="img/portfolio/Metal Carrot1.jpg" />
</div> </div>
@ -175,8 +175,8 @@
<div class="embed-responsive embed-responsive-16by9"> <div class="embed-responsive embed-responsive-16by9">
<iframe class="embed-responsive-item" src="" allowfullscreen></iframe> <iframe class="embed-responsive-item" src="" allowfullscreen></iframe>
</div> </div>
<hr> <div class="modal-comment">
<p></p> </div>
</div> </div>
</div> </div>
</div> </div>
@ -194,8 +194,8 @@
<div class="embed-responsive embed-responsive-16by9"> <div class="embed-responsive embed-responsive-16by9">
<iframe class="embed-responsive-item" src="" allowfullscreen></iframe> <iframe class="embed-responsive-item" src="" allowfullscreen></iframe>
</div> </div>
<hr> <div class="modal-comment">
<p></p> </div>
</div> </div>
</div> </div>
</div> </div>
@ -213,8 +213,8 @@
<div class="embed-responsive embed-responsive-16by9"> <div class="embed-responsive embed-responsive-16by9">
<iframe allowvr allowfullscreen mozallowfullscreen="true" webkitallowfullscreen="true" onmousewheel=""></iframe> <iframe allowvr allowfullscreen mozallowfullscreen="true" webkitallowfullscreen="true" onmousewheel=""></iframe>
</div> </div>
<hr> <div class="modal-comment">
<p></p> </div>
</div> </div>
</div> </div>
</div> </div>
@ -293,6 +293,8 @@
video_div.onmouseout = function() {this.children[0].load()}; video_div.onmouseout = function() {this.children[0].load()};
} }
var comment_header = "<br><p>"
$('#youtubeModal').on('show.bs.modal', function (event) { $('#youtubeModal').on('show.bs.modal', function (event) {
masthead_video_mute(true); masthead_video_mute(true);
var button = $(event.relatedTarget); var button = $(event.relatedTarget);
@ -308,7 +310,10 @@
} }
modal.find('.modal-body iframe')[0].src = youtube_url; modal.find('.modal-body iframe')[0].src = youtube_url;
modal.find('.modal-body p')[0].innerHTML = comment;
if (comment) {
modal.find('.modal-body .modal-comment')[0].innerHTML = comment_header + comment + '</p>';
}
}); });
$('#youtubeModal').on('hidden.bs.modal', function () { $('#youtubeModal').on('hidden.bs.modal', function () {
$(this).find('.modal-body iframe')[0].src = ""; $(this).find('.modal-body iframe')[0].src = "";
@ -322,7 +327,10 @@
var comment = button.data('comment'); var comment = button.data('comment');
var modal = $(this); var modal = $(this);
modal.find('.modal-body iframe')[0].src = 'https://player.vimeo.com/video/' + vimeo_id; modal.find('.modal-body iframe')[0].src = 'https://player.vimeo.com/video/' + vimeo_id;
modal.find('.modal-body p')[0].innerHTML = comment;
if (comment) {
modal.find('.modal-body .modal-comment')[0].innerHTML = comment_header + comment + '</p>';
}
}); });
$('#vimeoModal').on('hidden.bs.modal', function () { $('#vimeoModal').on('hidden.bs.modal', function () {
$(this).find('.modal-body iframe')[0].src = ""; $(this).find('.modal-body iframe')[0].src = "";
@ -336,7 +344,10 @@
var comment = button.data('comment'); var comment = button.data('comment');
var modal = $(this); var modal = $(this);
modal.find('.modal-body iframe')[0].src = 'https://sketchfab.com/models/' + sketchfab_id + '/embed?autostart=1'; modal.find('.modal-body iframe')[0].src = 'https://sketchfab.com/models/' + sketchfab_id + '/embed?autostart=1';
modal.find('.modal-body p')[0].innerHTML = comment;
if (comment) {
modal.find('.modal-body .modal-comment')[0].innerHTML = comment_header + comment + '</p>';
}
}); });
$('#sketchFabModal').on('hidden.bs.modal', function () { $('#sketchFabModal').on('hidden.bs.modal', function () {
$(this).find('.modal-body iframe')[0].src = ""; $(this).find('.modal-body iframe')[0].src = "";