forked from rebillar/site-accueil-insa
Improved css and animations
This commit is contained in:
parent
3680857183
commit
6a964693f4
7 changed files with 95 additions and 36 deletions
|
@ -1,37 +1,70 @@
|
||||||
#hamburger {
|
#hamburger {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
|
position: relative;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
z-index: 2;
|
|
||||||
color: white;
|
|
||||||
font-size: 32px;
|
font-size: 32px;
|
||||||
margin: 5px;
|
margin: 5px;
|
||||||
|
height: 40px;
|
||||||
|
width: 40px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.bar1, .bar2, .bar3 {
|
#bar1, #bar2-1, #bar2-2, #bar3 {
|
||||||
width: 35px;
|
position: absolute;
|
||||||
|
width: 40px;
|
||||||
height: 5px;
|
height: 5px;
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
margin: 6px 0;
|
margin: 5px 0;
|
||||||
transition: 0.4s;
|
transition: 0.3s;
|
||||||
box-shadow: 1px 1px 3px #333;
|
box-shadow: 1px 1px 3px #333;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#bar1 {
|
||||||
|
top: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
#bar2-1, #bar2-2 {
|
||||||
|
margin: 0;
|
||||||
|
width: 20px;
|
||||||
|
top: 50%;
|
||||||
|
transform: translateY(-50%);
|
||||||
|
}
|
||||||
|
|
||||||
|
#bar2-1 {
|
||||||
|
left: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
#bar2-2 {
|
||||||
|
right: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
#bar3 {
|
||||||
|
bottom: 0;
|
||||||
|
}
|
||||||
|
|
||||||
/* Rotate first bar */
|
/* Rotate first bar */
|
||||||
|
|
||||||
.change .bar1 {
|
.change #bar1 {
|
||||||
-webkit-transform: rotate(-45deg) translate(-9px, 6px);
|
-webkit-transform: rotate(-45deg) translate(-10px, 10px);
|
||||||
transform: rotate(-45deg) translate(-9px, 6px);
|
transform: rotate(-45deg) translate(-8px, 8px);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Fade out the second bar */
|
/* Fade out the second bar */
|
||||||
|
|
||||||
.change .bar2 {
|
.change #bar2-1 {
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
|
-webkit-transform: translateX(-50%);
|
||||||
|
transform: translateX(-50%);
|
||||||
|
}
|
||||||
|
|
||||||
|
.change #bar2-2 {
|
||||||
|
opacity: 0;
|
||||||
|
-webkit-transform: translateX(50%);
|
||||||
|
transform: translateX(50%);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Rotate last bar */
|
/* Rotate last bar */
|
||||||
|
|
||||||
.change .bar3 {
|
.change #bar3 {
|
||||||
-webkit-transform: rotate(45deg) translate(-8px, -8px);
|
-webkit-transform: rotate(45deg) translate(-10px, -10px);
|
||||||
transform: rotate(45deg) translate(-8px, -8px);
|
transform: rotate(45deg) translate(-10px, -10px);
|
||||||
}
|
}
|
||||||
|
|
|
@ -58,27 +58,21 @@
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
transition: 0.3s;
|
transition: 0.3s;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
|
margin: 10px 2px 0 2px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.photos img:hover {
|
.photos img:hover {
|
||||||
box-shadow: 0 0 5px #000;
|
box-shadow: 0 0 5px #000;
|
||||||
|
-webkit-filter: blur(1px); /* Safari 6.0 - 9.0 */
|
||||||
|
filter: blur(1px);
|
||||||
opacity: 0.7;
|
opacity: 0.7;
|
||||||
|
border-radius: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.photos img:active {
|
.photos img:active {
|
||||||
box-shadow: 0 0 10px #000;
|
box-shadow: 0 0 10px #000;
|
||||||
}
|
}
|
||||||
|
|
||||||
.no_photo {
|
|
||||||
font-size: 25px;
|
|
||||||
text-decoration: none;
|
|
||||||
border-radius: 10px;
|
|
||||||
width: 100%;
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
.photos_path {
|
.photos_path {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
display: flex;
|
display: flex;
|
||||||
|
@ -97,6 +91,7 @@
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
background-color: #1a1a1a;
|
background-color: #1a1a1a;
|
||||||
box-shadow: 0 0 4px #000;
|
box-shadow: 0 0 4px #000;
|
||||||
|
text-shadow: 0 0 5px #1c1c1c;
|
||||||
transition: 0.3s;
|
transition: 0.3s;
|
||||||
color: #e0e0e0;
|
color: #e0e0e0;
|
||||||
}
|
}
|
||||||
|
@ -204,6 +199,7 @@
|
||||||
position: fixed;
|
position: fixed;
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
right: 50%;
|
right: 50%;
|
||||||
|
-webkit-transform: translateX(50%);
|
||||||
transform: translateX(50%);
|
transform: translateX(50%);
|
||||||
background: #1c1c1c;
|
background: #1c1c1c;
|
||||||
height: 25px;
|
height: 25px;
|
||||||
|
@ -251,6 +247,7 @@
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
background-color: #1a1a1a;
|
background-color: #1a1a1a;
|
||||||
box-shadow: 0 0 4px #000;
|
box-shadow: 0 0 4px #000;
|
||||||
|
text-shadow: 0 0 5px #1c1c1c;
|
||||||
transition: 0.3s;
|
transition: 0.3s;
|
||||||
color: #28ca2a;
|
color: #28ca2a;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
|
|
@ -18,19 +18,30 @@
|
||||||
/* The navigation menu links */
|
/* The navigation menu links */
|
||||||
|
|
||||||
.sidenav a {
|
.sidenav a {
|
||||||
padding: 8px 0 8px 32px;
|
padding: 8px 0 8px 0;
|
||||||
margin-right: 30px;
|
margin: 0 30px 0 30px;
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
font-size: 20px;
|
font-size: 20px;
|
||||||
font-family: 'Rubik', sans-serif;
|
font-family: 'Rubik', sans-serif;
|
||||||
color: #f0f0f0;
|
color: #f0f0f0;
|
||||||
display: block;
|
display: inline-flex;
|
||||||
transition: 0.3s;
|
transition: 0.3s;
|
||||||
|
height: 30px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sidenav-icon {
|
||||||
|
left: 0;
|
||||||
|
margin-right: 5px;
|
||||||
|
-webkit-transform: translateY(5px);
|
||||||
|
transform: translateY(5px);
|
||||||
|
height: 20px;
|
||||||
|
width: 20px !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.sidenav a:hover {
|
.sidenav a:hover {
|
||||||
color: #c5af86;
|
color: #c5af86;
|
||||||
text-shadow: 0 0 5px #c5af86;
|
text-shadow: 0 0 5px #c5af86;
|
||||||
|
margin-left: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Style page content - use this if you want to push the page content to the right when you open the side navigation */
|
/* Style page content - use this if you want to push the page content to the right when you open the side navigation */
|
||||||
|
|
|
@ -67,3 +67,20 @@ manager.on('swipe', function(e) {
|
||||||
closeNav();
|
closeNav();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// Animate hamburger on hover
|
||||||
|
hamburger.hover(function(){
|
||||||
|
$("#bar1").css("background-color", "#c5af86");
|
||||||
|
$("#bar2-1").css("background-color", "#73b795");
|
||||||
|
$("#bar2-2").css("background-color", "#73b795");
|
||||||
|
$("#bar2-1").css("left", "-5px");
|
||||||
|
$("#bar2-2").css("right", "-5px");
|
||||||
|
$("#bar3").css("background-color", "#c5af86");
|
||||||
|
}, function(){
|
||||||
|
$("#bar1").css("background-color", "white");
|
||||||
|
$("#bar2-1").css("background-color", "white");
|
||||||
|
$("#bar2-2").css("background-color", "white");
|
||||||
|
$("#bar2-1").css("left", "0");
|
||||||
|
$("#bar2-2").css("right", "0");
|
||||||
|
$("#bar3").css("background-color", "white");
|
||||||
|
});
|
BIN
favicon.ico
BIN
favicon.ico
Binary file not shown.
Before Width: | Height: | Size: 4.2 KiB After Width: | Height: | Size: 17 KiB |
|
@ -1,10 +1,10 @@
|
||||||
<div id="menuSidenav" class="sidenav">
|
<div id="menuSidenav" class="sidenav">
|
||||||
<a href="index.php" id="index" class="page-link"><i class="fas fa-home"></i> L'Accueil</a>
|
<a href="index.php" id="index" class="page-link"><i class="fas fa-home sidenav-icon"></i> L'Accueil</a>
|
||||||
<a href="planning.php" id="planning" class="page-link"><i class="fas fa-calendar-alt"></i> Le Planning</a>
|
<a href="planning.php" id="planning" class="page-link"><i class="fas fa-calendar-alt sidenav-icon"></i> Le Planning</a>
|
||||||
<a href="prevs.php" id="prevs" class="page-link"><i class="fas fa-medkit"></i> La Prévention</a>
|
<a href="prevs.php" id="prevs" class="page-link"><i class="fas fa-medkit sidenav-icon"></i> La Prévention</a>
|
||||||
<a href="parrainage.php" id="parrainage" class="page-link"><i class="fas fa-user-plus"></i> Le Parrainage</a>
|
<a href="parrainage.php" id="parrainage" class="page-link"><i class="fas fa-user-plus sidenav-icon"></i> Le Parrainage</a>
|
||||||
<a href="photos.php" id="photos" class="page-link"><i class="fas fa-camera"></i> Les Photos</a>
|
<a href="photos.php" id="photos" class="page-link"><i class="fas fa-camera sidenav-icon"></i> Les Photos</a>
|
||||||
<br>
|
<br>
|
||||||
<a href="coms.php" id="coms" class="page-link"><i class="fas fa-users"></i> Les Coms</a>
|
<a href="coms.php" id="coms" class="page-link"><i class="fas fa-users sidenav-icon"></i> Les Coms</a>
|
||||||
<a href="infos.php" id="contact" class="page-link"><i class="fas fa-info"></i> Les Infos</a>
|
<a href="infos.php" id="contact" class="page-link"><i class="fas fa-info sidenav-icon"></i> Les Infos</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,8 +1,9 @@
|
||||||
<div id="header_top">
|
<div id="header_top">
|
||||||
<div id="hamburger" onclick="toggleNav()">
|
<div id="hamburger" onclick="toggleNav()">
|
||||||
<div class="bar1"></div>
|
<div id="bar1"></div>
|
||||||
<div class="bar2"></div>
|
<div id="bar2-1"></div>
|
||||||
<div class="bar3"></div>
|
<div id="bar2-2"></div>
|
||||||
|
<div id="bar3"></div>
|
||||||
</div>
|
</div>
|
||||||
<h4 id="menu_title">INSA Toulouse 2018</h4>
|
<h4 id="menu_title">INSA Toulouse 2018</h4>
|
||||||
</div>
|
</div>
|
Loading…
Reference in a new issue