2015-10-26 14:52:42 +03:00
|
|
|
|
2015-10-14 18:52:04 +03:00
|
|
|
</ul>
|
|
|
|
</main>
|
2015-10-28 17:57:38 +03:00
|
|
|
<script>
|
|
|
|
var searchField = document.getElementById("search");
|
|
|
|
searchField.addEventListener('input', function (evt) {
|
|
|
|
search();
|
|
|
|
});
|
2015-10-28 18:47:31 +03:00
|
|
|
|
2015-10-28 18:53:06 +03:00
|
|
|
hashSearch();
|
|
|
|
window.addEventListener('hashchange', function (evt) {
|
|
|
|
hashSearch();
|
|
|
|
});
|
|
|
|
|
|
|
|
function hashSearch() {
|
|
|
|
var query = window.location.hash.substring(1);
|
|
|
|
document.getElementById("search").value = query;
|
|
|
|
search();
|
|
|
|
}
|
2015-10-28 18:47:31 +03:00
|
|
|
|
2015-10-28 17:57:38 +03:00
|
|
|
function search() {
|
|
|
|
var searchTerm = searchField.value.toLowerCase();
|
|
|
|
var icons = document.getElementsByClassName("tiles__item");
|
|
|
|
for (var i = 0; i < icons.length; i++) {
|
|
|
|
icons[i].style.display = "inline-block";
|
|
|
|
var index = icons[i].dataset.search.indexOf(searchTerm);
|
|
|
|
if (index == -1) {
|
|
|
|
icons[i].style.display = "none";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2015-12-24 16:16:51 +03:00
|
|
|
|
|
|
|
function toggleNames() {
|
|
|
|
var list = document.getElementsByClassName("tiles tiles--icons");
|
|
|
|
if(list.length == 1) {
|
|
|
|
list[0].className = "tiles tiles--full";
|
|
|
|
} else {
|
|
|
|
var list = document.getElementsByClassName("tiles tiles--full");
|
|
|
|
list[0].className = "tiles tiles--icons";
|
|
|
|
}
|
|
|
|
}
|
2015-10-28 17:57:38 +03:00
|
|
|
</script>
|
2015-10-18 21:23:16 +03:00
|
|
|
<script>
|
2015-10-28 20:31:48 +03:00
|
|
|
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
|
|
|
|
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
|
|
|
|
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
|
|
|
|
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
|
2015-10-18 21:23:16 +03:00
|
|
|
ga('create', 'UA-46210978-2', 'auto');
|
|
|
|
ga('send', 'pageview');
|
2015-10-20 16:05:55 +03:00
|
|
|
</script>
|
2015-10-14 18:52:04 +03:00
|
|
|
</body>
|
|
|
|
</html>
|