Skip to content

Instantly share code, notes, and snippets.

View sioniks's full-sized avatar
👻
...

Oleksandr sioniks

👻
...
View GitHub Profile
@sioniks
sioniks / reset.css
Created October 24, 2016 14:44
reset.css
/* --------------- reset.css --------------- */
html, body, div, span, h1, h2, h3, h4, h5, h6, p, em, img, strong, sub, sup, b, u, i, dl, dt, dd, ol, ul, li, fieldset, form, label, table, tbody, tfoot, thead, tr, th, td, article, aside, canvas, details, figcaption, figure, footer, header, hgroup, menu, nav, section, summary, time, mark, audio, video {
margin: 0;
padding: 0;
border: 0;
outline: 0; /* обнуляем отступы и убираем бордюры */
vertical-align: baseline; /* приводим все к одной базовой линии */
background: transparent; /* чтобы не проскакивали левые фоны, установленные по умолчанию */
font-size: 100%; /* размер шрифта всем одинаковый */
}
@sioniks
sioniks / test-task.md
Last active August 30, 2017 08:17 — forked from krambertech/test-task.md
Intern / Junior Front-End Developer Position

Test Task for Intern / Junior Front-End Developer Position

Основная задача тестового не узнать как сильно вы знаете React, а посмотреть насколько хорошо вы сможете разобраться с новыми технологиями в относительно короткий срок. В идеале, на него нужно потратить не более 3 дней. А так - делайте сколько делается, пока мы не закроем вакансию ;)

Описание

Нужно написать одностраничное приложения для просмотра фильмов с помощью The Movie Database API.

При открытии приложения, должен отображаться список популярных фильмов с пагинацией или динамической подгрузкой (на выбор). Также на странице должно быть поле для поиска. Когда ты вводишь туда какой-то текст, должны отобразиться фильмы которые ему соответствуют. Для каждого фильма в списке должен отображаться список жанров (названий жанров, не айдишек), к которым он принадлежит.

@sioniks
sioniks / Palindromes in JavaScript
Created February 2, 2017 12:41
Palindromes in JavaScript
function palindrome(str) {
// Step 1. Lowercase the string and use the RegExp to remove unwanted characters from it
var re = /[\W_]/g; // or var re = /[^A-Za-z0-9]/g;
var lowRegStr = str.toLowerCase().replace(re, '');
// str.toLowerCase() = "A man, a plan, a canal. Panama".toLowerCase() = "a man, a plan, a canal. panama"
// str.replace(/[\W_]/g, '') = "a man, a plan, a canal. panama".replace(/[\W_]/g, '') = "amanaplanacanalpanama"
// var lowRegStr = "amanaplanacanalpanama";
// Step 2. Use the same chaining methods with built-in functions from the previous article 'Three Ways to Reverse a String in JavaScript'
//Easy Form Validator
//Example: $("form").evalid("Error message");
//Author URL: http://webdesign-master.ru
(function($) {
$.fn.evalid = function(req_text) {
$(this).find("input[type], textarea").each(function() {
$(this).after("<p class='form_error_message'>" + req_text + "").next().hide();
});
.loader {
background: none repeat scroll 0 0 #ffffff;
bottom: 0;
height: 100%;
left: 0;
position: fixed;
right: 0;
top: 0;
width: 100%;
z-index: 9999;
$(document).ready(function() {
function heigthDetect() {
$(".main_head").css("height", $(window).height());
};
heigthDetect();
$(window).resize(function () {
heigthDetect();
});
<?php if ( have_posts() ) : query_posts('p=1');
while (have_posts()) : the_post(); ?>
<?php the_title(); ?>
<?php the_content(); ?>
<?php the_post_thumbnail(array(100, 100)); ?>
<? endwhile; endif; wp_reset_query(); ?>
@sioniks
sioniks / CSS: media queries.css
Created July 10, 2017 14:13 — forked from kovaldn/CSS: media queries.css
CSS: media queries.css
/* Smartphones (portrait and landscape) ----------- */
@media only screen
and (min-device-width : 320px)
and (max-device-width : 480px) {
/* Styles */
}
/* Smartphones (landscape) ----------- */
@media only screen
and (min-width : 321px) {
/*
* запрещаем вводить цифры
* http://learn.javascript.ru/keyboard-events
*/
// keydown event
e = (e) ? e : window.event;
var charCode = (e.which) ? e.which : e.keyCode;
// если от 0 до 9
@sioniks
sioniks / Javascript: scrollto().js
Created July 10, 2017 14:14 — forked from kovaldn/Javascript: scrollto().js
Javascript: scrollto()
(function () {
jQuery('#top_menu li a').on('click', function(){
var item = $(this).parent().attr('class'),
tar = $(this).attr('data');
$("html, body").animate({ scrollTop: jQuery(tar).offset().top }, 1000);
});
})()