Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added a flush animation and a toilet flush sound effect for when a tab is clicked #38

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions artscrafts.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
<link rel="stylesheet" href="css/normalize.css">
<link rel="stylesheet" href="css/style.css">
<script src="js/jquery-3.2.0.min.js"></script>
<script src="js/howler.min.js"></script>
</head>
<body>
<div id=container>
Expand Down
62 changes: 52 additions & 10 deletions css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -107,15 +107,51 @@ ins {
}

li {
width: 125px;
float: left;
margin: 0 1%;
position: absolute;
top: 0px;
width: 187.5px;
margin: 0 1%;
}

li:nth-child(1) {
left: 0px;
}

li:nth-child(2) {
left: 135px;
}

li:nth-child(3) {
left: 270px;
}

li:nth-child(4) {
left: 405px;
}

li.flushed {
/* TO DO: add the webkit etc versions of transform */
animation-duration: 3s;
transform: rotate(-45deg);
-webkit-animation: spin 1s linear 1 forwards;
-moz-animation: spin 1s linear 1 forwards;
animation: spin 1s linear 1 forwards;
}

@-moz-keyframes spin {
100% {
-moz-transform: rotate(-45deg);
}
}

@-webkit-keyframes spin {
100% {
-webkit-transform: rotate(-45deg);
}
}

@keyframes spin {
100% {
-webkit-transform: rotate(-45deg);
transform: rotate(-45deg);
}
}

li a {
Expand All @@ -127,11 +163,12 @@ li a {
background-image: url("../images/flush.svg");
background-repeat: no-repeat;
background-position: bottom;
width: 125px;
width: 187.5px;
display: block;
font-weight: bold;
padding-top: 2px;
padding-bottom: 30px;
padding-right: 62.5px;
text-align: center;
}

Expand All @@ -140,7 +177,9 @@ nav {
}

header nav {
position: relative;
width: 545px;
height: 68px;
}

header h1 {
Expand Down Expand Up @@ -433,17 +472,20 @@ body {
margin: 0px;
}
#page-header li {
position: relative;
display: block;
width: 100%;
float: none;
margin: 0;
text-align: center;
padding: 10px 0;
left: 0px;
}

#page-header li.flushed {
/* TO DO: add the webkit etc versions of transform */
transform: none;
-webkit-animation: none;
-moz-animation: none;
animation: none;
}

#page-header li a {
Expand All @@ -464,7 +506,7 @@ body {
display: none;
margin-top: 5px;
width: 100%;

height: auto;
}

}
Expand Down
1 change: 1 addition & 0 deletions gallery.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
<link rel="stylesheet" href="css/normalize.css">
<link rel="stylesheet" href="css/style.css">
<script src="js/jquery-3.2.0.min.js"></script>
<script src="js/howler.min.js"></script>
</head>
<body>
<div id=container>
Expand Down
1 change: 1 addition & 0 deletions glossary.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
<link rel="stylesheet" href="css/normalize.css">
<link rel="stylesheet" href="css/style.css">
<script src="js/jquery-3.2.0.min.js"></script>
<script src="js/howler.min.js"></script>
</head>
<body>
<div id=container>
Expand Down
2 changes: 1 addition & 1 deletion images/flush.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
<link rel="stylesheet" href="css/normalize.css">
<link rel="stylesheet" href="css/style.css">
<script src="js/jquery-3.2.0.min.js"></script>
<script src="js/howler.min.js"></script>
</head>
<body>
<div id="container">
Expand Down
4 changes: 4 additions & 0 deletions js/howler.min.js

Large diffs are not rendered by default.

10 changes: 10 additions & 0 deletions js/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -608,4 +608,14 @@ function displayNav (){
$("#page-header").toggleClass("expanded");
});

//PLAY TOILET FLUSH SOUND EFFECT WHEN PAGE IS LOADED
function play_toilet_flush(){
var sound = new Howl({
src: ['sounds/toilet_flush.mp3'],
volume: 0.2
});
sound.play();
}
play_toilet_flush();

});
Binary file added sounds/toilet_flush.mp3
Binary file not shown.