diff --git a/static/main.css b/static/main.css index 9f2c798..86106d7 100644 --- a/static/main.css +++ b/static/main.css @@ -96,11 +96,20 @@ div #reset:hover { } .sound a:hover { - background-color: #ff4136; - box-shadow: inset 5px 5px 5px rgba(0, 0, 0, 0.6); cursor: pointer; } +.sound a:active { + background-color: #ff4136; + box-shadow: inset 5px 5px 5px rgba(0, 0, 0, 0.6); + cursor: pointer; +} + +.sound-pressed { + background-color: #ff4136 !important; + box-shadow: inset 5px 5px 5px rgba(0, 0, 0, 0.6) !important; +} + .unselectable { -webkit-touch-callout: none; -webkit-user-select: none; diff --git a/static/main.js b/static/main.js index f5a682c..b33f0bd 100644 --- a/static/main.js +++ b/static/main.js @@ -6,6 +6,10 @@ function ready(fn) { } } +function sleep(ms) { + return new Promise(resolve => setTimeout(resolve, ms)); +} + ready(function() { hideSections(); @@ -52,12 +56,29 @@ ready(function() { reset.addEventListener("click", resetSearch, false); sounds_nav.addEventListener("click", resetSearch, false); + // keyboard listener for esc button document.onkeydown = function(evt) { evt = evt || window.event; if (evt.keyCode == 27) { resetSearch(); } }; + + // keyboard listener for enter key + var all_a_s = document.getElementsByTagName("a"); + for(i=0; i
тип
{% for sound in sounds %} -
{{ sound.split('.', 1)[0] }}
+
{{ sound.split('.', 1)[0] }}
{% endfor %}
@@ -67,4 +67,3 @@ -