| @@ -0,0 +1,32 @@ | ||
| console.log(document, ' file') | ||
| var menu_opener = document.getElementById('menu-opener'); | ||
| console.log(menu_opener) | ||
| var menu = document.getElementById('menu'); | ||
| console.log(menu) | ||
| menu_opener.addEventListener('click', function(){ | ||
| console.log('click work') | ||
| console.log(menu_opener.classList.contains('active')) | ||
| if(menu_opener.classList.contains('active')){ | ||
| console.log('triggered true') | ||
| menu_opener.classList.remove("active"); | ||
| menu.classList.remove("active"); | ||
| }else{ | ||
| console.log('triggered false') | ||
| menu_opener.classList.add("active"); | ||
| menu.classList.add("active"); | ||
| } | ||
| }) | ||
| var tabNavItems = document.querySelectorAll('.tabs__nav [data-tab]') | ||
| console.log(tabNavItems) | ||
| tabNavItems.forEach( | ||
| function(item, index, arr){ | ||
| console.log(item === arr[index]) | ||
| console.log(item,index,arr) | ||
| item.addEventListener('click', function(event){ | ||
| event.preventDefault(); | ||
| console.log(event) | ||
| console.log(this) | ||
| console.log(this.dataset.tab) | ||
| }) | ||
| } | ||
| ) |
| @@ -1,23 +1,119 @@ | ||
| .sprite { | ||
| background-image: url(spritesheet.png); | ||
| background-repeat: no-repeat; | ||
| display: block; | ||
| } | ||
|
|
||
| .sprite-bookcase { | ||
| width: 26px; | ||
| height: 32px; | ||
| background-position: -5px -5px; | ||
| } | ||
|
|
||
| .sprite-bulb { | ||
| width: 39px; | ||
| height: 40px; | ||
| background-position: -41px -5px; | ||
| } | ||
|
|
||
| .sprite-bulb_hower { | ||
| width: 39px; | ||
| height: 40px; | ||
| background-position: -90px -5px; | ||
| } | ||
|
|
||
| .sprite-calendar { | ||
| width: 40px; | ||
| height: 38px; | ||
| background-position: -139px -5px; | ||
| } | ||
|
|
||
| .sprite-calendar_hower { | ||
| width: 40px; | ||
| height: 38px; | ||
| background-position: -139px -53px; | ||
| } | ||
|
|
||
| .sprite-clock { | ||
| width: 35px; | ||
| height: 40px; | ||
| background-position: -5px -101px; | ||
| } | ||
|
|
||
| .sprite-clock_hower { | ||
| width: 35px; | ||
| height: 40px; | ||
| background-position: -50px -101px; | ||
| } | ||
|
|
||
| .sprite-hat { | ||
| width: 36px; | ||
| height: 40px; | ||
| background-position: -95px -101px; | ||
| } | ||
|
|
||
| .sprite-hat-_hower { | ||
| width: 36px; | ||
| height: 40px; | ||
| background-position: -141px -101px; | ||
| } | ||
|
|
||
| .sprite-head { | ||
| width: 27px; | ||
| height: 32px; | ||
| background-position: -5px -151px; | ||
| } | ||
|
|
||
| .sprite-horn { | ||
| width: 29px; | ||
| height: 28px; | ||
| background-position: -42px -151px; | ||
| } | ||
|
|
||
| .sprite-icon-piople { | ||
| width: 32px; | ||
| height: 26px; | ||
| background-position: -81px -151px; | ||
| } | ||
|
|
||
| .sprite-icon-tie { | ||
| width: 17px; | ||
| height: 32px; | ||
| background-position: -5px -53px; | ||
| } | ||
|
|
||
| .sprite-icon-tv { | ||
| width: 25px; | ||
| height: 32px; | ||
| background-position: -123px -151px; | ||
| } | ||
|
|
||
| .sprite-opinion { | ||
| width: 30px; | ||
| height: 32px; | ||
| background-position: -158px -151px; | ||
| } | ||
|
|
||
| .sprite-person-half- { | ||
| width: 40px; | ||
| height: 36px; | ||
| background-position: -189px -5px; | ||
| } | ||
|
|
||
| .sprite-person-half_hower { | ||
| width: 40px; | ||
| height: 36px; | ||
| background-position: -189px -51px; | ||
| } | ||
|
|
||
| .sprite-standing-man { | ||
| width: 26px; | ||
| height: 40px; | ||
| background-position: -189px -97px; | ||
| } | ||
|
|
||
| .sprite-standing-man_hower { | ||
| width: 26px; | ||
| height: 40px; | ||
| background-position: -198px -147px; | ||
| } |