Ajout icone de son custom avec un sprite SVG

This commit is contained in:
nyanloutre 2017-07-18 16:55:02 +02:00
parent 348b6642ce
commit 5cf74a1962
Signed by: nyanloutre
GPG key ID: F85D93686A3A9063
7 changed files with 89 additions and 5 deletions

View file

@ -73,7 +73,9 @@
</a>
<a id="video-sound" class="btn btn-default">
<i class="fa fa-volume-off fa-2x" aria-hidden="true"></i>
<svg class="icone icone-son" aria-hidden="true">
<use xlink:href="/vector/sprite.svg#sound-off"></use>
</svg>
</a>
<a id="youtube-link" class="btn btn-default" href="https://youtube.com">
@ -196,10 +198,10 @@
video_button.onclick = function () {
if (masthead_video.muted) {
masthead_video.muted = false;
video_button.children[0].className = 'fa fa-volume-up fa-2x';
video_button.children[0].children[0].setAttribute("xlink:href", "/vector/sprite.svg#sound-on");
} else {
masthead_video.muted = true;
video_button.children[0].className = 'fa fa-volume-off fa-2x';
video_button.children[0].children[0].setAttribute("xlink:href", "/vector/sprite.svg#sound-off");
}
};