This file contains 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
//== Media queries breakpoints | |
// Extra small screen / phone | |
$screen-xs: 480px; | |
$screen-xs-min: $screen-xs; | |
// Small screen / tablet | |
$screen-sm: 768px; | |
$screen-sm-min: $screen-sm; |
This file contains 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
.mouse-icon { | |
position: relative; | |
border: 2px solid #fff; | |
border-radius: 16px; | |
height: 50px; | |
width: 30px; | |
margin: 0 auto; | |
display: block; | |
z-index: 10; | |
} |
This file contains 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
'use strict'; | |
const express = require('express'); | |
const vhost = require('vhost'); | |
const site = require('./site'); | |
const app = require('./app'); | |
const api = require('./api'); | |
const admin = require('./admin'); |
This file contains 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 path = require('path'); | |
const webpack = require('webpack'); | |
const ExtractTextPlugin = require('extract-text-webpack-plugin'); | |
const HtmlWebpackPlugin = require('html-webpack-plugin'); | |
module.exports = { | |
entry: { | |
library: './src/library/index.jsx', | |
player: './src/player/index.jsx', | |
vendor: ['react', 'react-dom'] |
This file contains 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
import React from 'react'; | |
let cachedToken; | |
function setToken(token) { | |
cachedToken = token; | |
localStorage.setItem('authToken', token); | |
} | |
function getToken() { |
This file contains 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
{ | |
"env": { | |
"es6": true, | |
"node": true | |
}, | |
"extends": "eslint:recommended", | |
"parserOptions": { | |
"ecmaVersion": 2017 | |
}, | |
"rules": { |
This file contains 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
form#login-form(method='post') | |
input(type='hidden' name='_csrf' value=_csrfToken) | |
+input('text', 'username', 'Имя пользователя', null, 'Только маленькие латинские буквы и цифры без пробелов')(minlength='2' maxlength='32' pattern='^[a-z0-9]+$') | |
+input('password', 'password', 'Пароль')(required maxlength='128') | |
button#submit(type='submit').mdc-button.mdc-button--accent.mdc-button--raised.mdc-button--full-width Войти | |
a(href='/auth/reset-password').mdc-button Забыли пароль? | |
a(href='/auth/register').mdc-button Зарегистрироваться |
This file contains 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
describe('Функции:', () => { | |
[].forEach((filename, index) => { | |
let exercise = require(`../exercises/${filename}/test`); | |
describe(`Упражнение ${index + 1}: ${exercise.title}`, () => { | |
let solution; | |
beforeEach(() => solution = require(`../exercises/${filename}`)); | |
exercise.tests.forEach(({ description, assertion, async }) => { |
This file contains 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
class Promise { | |
static state = { | |
PENDING: 'PENDING', | |
FULFILLED: 'FULFILLED', | |
REJECTED: 'REJECTED' | |
}; | |
static defer(fn) { | |
setTimeout(fn, 0); | |
} |
This file contains 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
export function createElement(tag, props, ...children) { | |
const element = document.createElement(tag); | |
if (props) { | |
Object.entries(props).forEach(([key, value]) => { | |
if (key.startsWith('on') && typeof value === 'function') { | |
element.addEventListener(key.substring(2), value); | |
} else if (key.startsWith('data-')) { | |
element.setAttribute(key, value); | |
} else { |
OlderNewer