JSFiddle - React, Tailwind, and code Playground
HTML
<!DOCTYPE html>
<html lang="ru">
<head>
<meta charset="UTF-8">
<link href='https://fonts.googleapis.com/css?family=Roboto:400,100,100italic,300,300italic,400italic,500,500italic,700,700italic&subset=latin,cyrillic' rel='stylesheet' type='text/css'>
<link rel="stylesheet" href="css/style.css">
<link rel="stylesheet" type="text/css" href="css/symbols-nerds.css">
<title>Nerds market</title>
</head>
<body>
<!-- HEADER -->
<header>
<div class="container">
<div class="logo">
<a href="index.html"><img src="../nerd/img/logo.png" alt="logo"></a>
</div>
<ul class="menu">
<li><a href="index.html">Студия</a></li>
<li><a href="#">Клиенты</a></li>
<li class="active"><a href="market.html">Магазин</a></li>
<li><a href="#">Контакты</a></li>
</ul>
<div class="basket">
<a href="#" class="basket-enter"><i class="icon-basket active"></i> Корзина</a>
</div>
<div class="hello clearfix">Добро пожаловать в магазин<br> готовых макетов</div>
</div>
</header>
<!-- HEADER END -->
<!-- SIDE BAR -->
<main class="market">
<div class="container">
<div class="catalog clearfix">
<div class="side-bar">
<h2>Стоимость:</h2>
<div class="range-filter">
<div class="range-controls">
<div class="scale"><div style="margin-left: 50px; width: 100px" class="bar"></div></div>
<div class="toggle min-toggle"></div>
<div class="toggle max-toggle"></div>
</div>
<div class="price-controls">
от <input class="min-price" type="text" value="5000">
до <input class="max-price" type="text" value="15000">
</div>
</div>
<div class="filters">
<h2>Сетка:</h2>
<form method="get" action="/echo">
<input type="radio" name="type" id="adaptive" checked>
<label for="adaptive">Адаптивная</label>
<input type="radio" name="type" id="fixed">
<label for="fixed">Фиксированная</label>
<input type="radio" name="type" id="stretch">
<label...
CSS
html, body{
padding:0;
margin:0;
font-family: 'Roboto', sans-serif;
}
.container {
width: 900px;
padding: 0 10px;
min-height: 110px;
margin: 0 auto;
}
.clearfix {
content: '';
display: table;
clear: both;
}
/* HEADER */
header {
min-width: 900px;
padding-top: 30px;
background: #eeeeee;
}
.logo {
float: left;
width: 140px;
height: 55px;
margin-right: 180px;
}
ul.menu {
margin-top: 10px;
}
.menu {
float: left;
padding: 0;
margin-bottom: 45px;
}
.menu li {
display: inline-block;
list-style: none;
margin-top: 15px;
margin-right: 40px;
}
.menu a {
display: block;
font: 14px/30px 'Roboto', sans-serif;
font-weight: 500;
color: #000;
text-transform: uppercase;
text-decoration: none;
}
.basket-enter {
float: right;
position: relative;
margin-top: 25px;
margin-bottom: 10px;
padding-left: 30px;
font: 14px/30px 'Roboto', sans-serif;
font-weight: 500;
color: #000;
text-transform: uppercase;
text-decoration: none;
}
.menu a:hover, .basket-enter:hover {
color: #fb565a;
}
.menu a:active, .basket-enter:active {
color: #cbcbcb;
}
li.active {
border-bottom: 2px solid #fb565a;
}
/* HEADER END */
/* SLIDER */
.slider{
position: relative;
width: 880px;
height: 310px;
margin: 0 auto;
}
.slider input[type=radio] {
position: absolute;
opacity: 0;
}
.slider-controls{
position: absolute;
bottom: 95px;
left: 50%;
width: 200px;
height: 10px;
margin-left: -100px;
text-align: center;
z-index: 1000;
}
.slider-controls label{
display: inline-block;
width: 4px;
height: 4px;
margin: 0 3px;
background: white;
border: 3px solid white;
vertical-align: top;
border-radius: 50%;
cursor: pointer;
}
#btn-1:checked ~ .slider-controls label[for="btn-1"],
#btn-2:checked ~ .slider-controls label[for="btn-2"],
#btn-3:checked ~ .slider-controls label[for="btn-3"] {
background: #c1c1c1;
}
.slide{
position: absolute;
top: 0;
...
JavaScript
var link = document.querySelector('.send-us-btn');
var popup = document.querySelector('.write-us');
var close = popup.querySelector('.write-us-close');
var form = popup.querySelector('form');
var login = form.querySelector('.login-field');
var password = form.querySelector('.email-field');
var storage = localStorage.getItem('login');
link.addEventListener('click', function(event) {
event.preventDefault();
popup.classList.add('write-us-show');
if (storage) {
login.value = storage;
email.focus();
} else {
login.focus();
}
}, false);
close.addEventListener('click', function(event) {
event.preventDefault();
popup.classList.remove('write-us-show');
}, false);
form.addEventListener('submit', function(event) {
if (!login.value || !password.value) {
event.preventDefault();
popup.classList.add('login-popup-error');
} else {
localStorage.setItem('login', login.value);
}
}, false);
window.addEventListener('keydown', function(event) {
if (event.keyCode == 27 && popup.classList.contains('write-us-show')) {
popup.classList.remove('write-us-show');
}
}, false);