This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// get All forms | |
const filtersForms = document.querySelectorAll(`.filter-form`); | |
// Create all filters | |
const filterByType = (type, arr) => arr.filter((car) => car.characteristics.type === type || type === `car-type-any`); | |
const filterByPower = (power, arr) => arr.filter((car) => car.characteristics.power >= +power || power === `power-all`); | |
const filterByFuel = (fuel, arr) => arr.filter((car) => car.characteristics.engine === fuel || fuel === `fuel-all`); | |
const filterByPrice = (price, arr) => arr.filter((car) => car.minPrice >= price); | |
const filterByClass = (carClass, arr) => arr.filter((car) => car.class === carClass); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const addState = (initialState, newState) => { | |
return initialState | newState; | |
}; | |
const removeState = (initialState, stateToRemove) => { | |
return ~initialState & stateToRemove; | |
}; | |
const hasState = (initialState, stateToCheck) => { | |
return Boolean(initialState & stateToCheck); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.Accordion-trigger { | |
border: 0; | |
background: 0; | |
font: inherit; | |
} | |
.Accordion-trigger:focus { | |
box-shadow: 0 0 10px rgba(255, 128, 0, 0.5); | |
outline: 0; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html lang="ru" class="page"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<link rel="stylesheet" href="./main.css"> | |
<link rel="stylesheet" href="./accordion.css"> | |
<meta property="og:type" content="website"> | |
<meta property="og:title" content="OneBootcamp"> | |
<meta property="og:site_name" content="Онлайн-буткемп по веб-разработке"> | |
<meta property="og:site_url" content="https://onebootcamp.typeform.com/to/KqN0Ak"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let sectionToAnimate = document.querySelector('.section_special'); | |
window.addEventListener('scroll', function() { | |
sectionToAnimate.style.backgroundPosition = `-${document.body.scrollTop}px 0`; | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Main content */ | |
.section { | |
padding: 10px 30px; | |
} | |
.section_special { | |
background: repeating-linear-gradient( | |
-55deg, | |
#fff, | |
#fff 20px, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html lang="ru" class="page"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<link rel="stylesheet" href="./main.css"> | |
<meta property="og:type" content="website"> | |
<meta property="og:title" content="OneBootcamp"> | |
<meta property="og:site_name" content="Онлайн-буткемп по веб-разработке"> | |
<meta property="og:site_url" content="https://onebootcamp.typeform.com/to/KqN0Ak"> | |
<title>OneBootcamp</title> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Header */ | |
.header { | |
border-bottom: solid 1px #eee; | |
padding: 30px; | |
} | |
.logo { | |
display: grid; | |
grid-template-columns: min-content 1fr; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.page { | |
font: 18px sans-serif; | |
} | |
.page__body { | |
background: #fff; | |
box-shadow: 0 0 20px rgba(0, 128, 99, 0.5); | |
box-sizing: border-box; | |
margin: 0 auto; | |
max-width: 600px; |
NewerOlder