From b170d965461fe9c898898673e4c7dc7315de1f15 Mon Sep 17 00:00:00 2001 From: nyanloutre Date: Sun, 14 Jul 2019 12:33:35 +0200 Subject: [PATCH] ajout variable texte lien ArtStation --- index.html | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/index.html b/index.html index 44d3112..ae87cc2 100644 --- a/index.html +++ b/index.html @@ -148,7 +148,7 @@ -
+
@@ -386,6 +386,7 @@ var vimeo_id = button.data('vimeoid'); var sketchfab_id = button.data('sketchfabid'); var artstation_id = button.data('artstationid'); + var artstation_text = button.data('artstationtext'); var comment = button.data('comment'); var options = button.data('options'); @@ -423,18 +424,20 @@ var modal_comment = modal.find('.modal-body .modal-comment')[0]; + if (comment || artstation_id) { + modal_comment.appendChild(document.createElement('hr')); + } + if (comment) { var comment_object = document.createElement('p'); comment_object.innerText = comment; - modal_comment.appendChild(document.createElement('hr')); modal_comment.appendChild(comment_object); } if (artstation_id) { var artstation_link = document.createElement('a'); - artstation_link.title = "More details on ArtStation"; + artstation_link.text = artstation_text; artstation_link.href = "https://www.artstation.com/artwork/" + artstation_id; - modal_comment.appendChild(document.createElement('hr')); modal_comment.appendChild(artstation_link); } });