Skip to content

Instantly share code, notes, and snippets.

View pafnuty's full-sized avatar
⚒️
No time for commit, just push!

Pavel Belousov pafnuty

⚒️
No time for commit, just push!
View GitHub Profile
<div class="container">
<div class="col-2">
<div class="cn-modal hotel-search">
<h2 class="cn-modal-header">Поиск отеля</h2>
<form>
<div class="hotel-search-inner clearfix">
<div class="clearfix">
<div class="col-2">
<p>Город</p>
<select name="4654987654654" class="styler">
@pafnuty
pafnuty / 12121212.html
Created February 15, 2014 17:05
popover
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Twitter Bootstrap Popover Example</title>
<meta name="description" content="This is an example to create Popover with Twitter Bootstrap.">
<link href="http://www.w3resource.com/twitter-bootstrap/twitter-bootstrap-v2/docs/assets/css/bootstrap.css" rel="stylesheet"></head>
<body>
<div class="container">
<h2>Example of creating Popover with Twitter Bootstrap</h2>
@pafnuty
pafnuty / grid.less
Created February 20, 2014 10:35
grid
// Config
// .content - обёртка для колонок
// .col - общий класс для всех колонок
// X - чисто от 1 до 12
// .col-mb-X - мобильники и выше
// .col-X - планшеты и выше
// .col-dt-X - десктопы
// .col-ld-X - большие десктопы
<?php
/*
=============================================================================
AutoRSS для DLE - автоматический парсинг и импорт RSS-лент в DLE.
=============================================================================
Автор: ПафНутиЙ
URL: http://pafnuty.name/
twitter: https://twitter.com/pafnuty_name
google+: http://gplus.to/pafnuty
email: pafnuty10@gmail.com
/* http://css-tricks.com/equal-height-blocks-in-rows/ */
equalheight = function (container) {
var maxHeight = 0,
currentRowStart = 0,
rowEls = new Array(),
$el,
topPosition = 0;
$(container).each(function () {
$el = $(this);
/* ==========================================================================
Chrome Frame prompt */
/* ========================================================================== */
.chromeframe {
margin: 0;
background: #f7f3d6;
color: #2c2c2c;
font: normal 1em/1.3 Arial, sans-serif;
@pafnuty
pafnuty / tabs.js
Created March 14, 2014 07:41
tabs + event
// Табы с генерацией события (на всякий случай)
$('body').on('click touch', 'ul.tabs li:not(.current):not(.disabled)', function(callback) {
thisTab = $(this); // Определяем переменную текущего таба
thisTab
.addClass('current') // добавляем класс текущему табу
.siblings().removeClass('current') // Удаляем класс у остальных табов в блоке
.parents('.tab-section') // Находим родительский блок
.find('.box').eq(thisTab.index()) // Находим нужный блок
.fadeIn(150, function () { // Показываем его
thisTab.trigger('tabClick'); // и генерируем событие tabClick
@pafnuty
pafnuty / text.php
Created March 21, 2014 09:01
задание
<?php
/**
* Суть задания:
*
* Из произвольной строки, разделённой запятыми и пробелами
* надо сформировать строку разбитую на подстроки тэгом <br/>,
* максимальная длина каждой подстроки задается параметром,
* каждая подстрока формируется объединением слов,
* разделенных запятой с пробелом.
<style>
.top-bigblock .block2,
.top-bigblock.notshow .block1 {
display: none;
}
.top-bigblock .block1,
.top-bigblock.notshow .block2 {
display: block;
}
@pafnuty
pafnuty / xfields.php
Last active August 29, 2015 14:02
Управление строчными допполями
<?php
/*
=============================================================================
Управление строчными допполями
=============================================================================
Автор: ПафНутиЙ
URL: http://pafnuty.name/
twitter: https://twitter.com/pafnuty_name
google+: http://gplus.to/pafnuty
email: pafnuty10@gmail.com