Nouvelle vidéo et bouton de volume

This commit is contained in:
nyanloutre 2017-07-14 20:30:10 +02:00
parent 91646d43c8
commit 401650e7f5
No known key found for this signature in database
GPG Key ID: 4177A74B460FAFD2
6 changed files with 30 additions and 2 deletions

1
TODO Normal file
View File

@ -0,0 +1 @@
- Corriger lien vers portfolio

View File

@ -180,6 +180,8 @@ header.masthead {
header.masthead a { header.masthead a {
position: absolute; position: absolute;
bottom: 2rem; } bottom: 2rem; }
header.masthead .video-sound {
right: 1rem; }
@media (min-width: 768px) { @media (min-width: 768px) {
header.masthead { header.masthead {
height: 100%; } height: 100%; }

File diff suppressed because one or more lines are too long

View File

@ -65,12 +65,16 @@
<header class="masthead"> <header class="masthead">
<video autoplay loop muted> <video autoplay loop muted>
<source src="video/intro.webm" type="video/webm"> <source src="video/1_Compilation_Graphique.webm" type="video/webm">
</video> </video>
<a class="btn btn-default btn-xl" href="#about"> <a class="btn btn-default btn-xl" href="#about">
<i class="fa fa-angle-down" aria-hidden="true"></i> <i class="fa fa-angle-down" aria-hidden="true"></i>
</a> </a>
<a class="btn btn-default video-sound">
<i class="fa fa-volume-off" aria-hidden="true"></i>
</a>
</header> </header>
@ -214,6 +218,24 @@
<!-- Custom scripts for this template --> <!-- Custom scripts for this template -->
<script src="js/creative.min.js"></script> <script src="js/creative.min.js"></script>
<script>
$("video").prop('muted', true);
$(".video-sound").click(function () {
if ($("video").prop('muted')) {
$("video").prop('muted', false);
$(this) > $(".fa").addClass('fa-volume-up');
$(this) > $(".fa").removeClass('fa-volume-off');
} else {
$("video").prop('muted', true);
$(this) > $(".fa").removeClass('fa-volume-up');
$(this) > $(".fa").addClass('fa-volume-off');
}
console.log($("video").prop('muted'))
});
</script>
</body> </body>

View File

@ -43,6 +43,9 @@ header.masthead {
position: absolute; position: absolute;
bottom: 2rem; bottom: 2rem;
} }
.video-sound {
right: 1rem;
}
@media (min-width: 768px) { @media (min-width: 768px) {
height: 100%; height: 100%;
.header-content { .header-content {

Binary file not shown.