Skip to content

Instantly share code, notes, and snippets.

View Grawl's full-sized avatar
🔨
work work

Даниил Пронин Grawl

🔨
work work
View GitHub Profile
@Grawl
Grawl / bem.html
Last active February 11, 2016 11:17
<body class="light">
<article class="modal wide open">
<div class="modal__content">
...
</div>
<div class="modal__foot">
<p class="layout">
<span class="layout__item 1/3">
<a href="btn btn--negative">Cancel</a>
</span>
//с alert работает без alert нет
$(document).ready(function() {
var color;
var i = 0;
function col(i) {
color = "rgb(255," + i +',' + i + ")";
$('#y1').css('background-color', color);
}
@Grawl
Grawl / SassMeister-input.scss
Created September 18, 2015 08:56
Generated by SassMeister.com.
// ----
// libsass (v3.2.5)
// ----
.category {
.category-dropdown {
button {
visibility: hidden;
@extend %category-hovered-button;
}
@Grawl
Grawl / .htaccess
Created June 27, 2015 06:56
L10n on php + gettext
Options +Includes +FollowSymLinks -Indexes
AddHandler server-parsed .shtml
DirectoryIndex index.php index.html
AddDefaultCharset UTF-8
CookieTracking on
CookieExpires "1 years"
# default php version is 5.x.x
# uncomment next line to use 4.4.9
# AddType application/x-httpd-php44 php
@Grawl
Grawl / SassMeister-input-HTML.html
Last active August 29, 2015 14:19
Generated by SassMeister.com.
<fieldset class="rating"><input id="star0" name="rating" type="radio" value="5" /><label for="star0" title="5">0 stars</label><input id="star1" name="rating" type="radio" value="4" /><label for="star1" title="4">1 stars</label><input id="star2" name="rating" type="radio" value="3" /><label for="star2" title="3">2 stars</label><input id="star3" name="rating" type="radio" value="2" /><label for="star3" title="2">3 stars</label><input id="star4" name="rating" type="radio" value="1" /><label for="star4" title="1">4 stars</label></fieldset>
@Grawl
Grawl / SassMeister-input-HTML.html
Created April 14, 2015 06:08
Generated by SassMeister.com.
<fieldset class="rating"><input id="star0" name="rating" type="radio" value="5" /><label for="star0" title="5">0 stars</label><input id="star1" name="rating" type="radio" value="4" /><label for="star1" title="4">1 stars</label><input id="star2" name="rating" type="radio" value="3" /><label for="star2" title="3">2 stars</label><input id="star3" name="rating" type="radio" value="2" /><label for="star3" title="2">3 stars</label><input id="star4" name="rating" type="radio" value="1" /><label for="star4" title="1">4 stars</label></fieldset>
$(function(){
var unscrolled = 'unscrolled'
$('body').addClass(unscrolled);
$(window).scroll(function(){
if( $(window).scrollTop() > 0 ) {
$('body').removeClass(unscrolled);
} else {
$('body').addClass(unscrolled);
}
});
@Grawl
Grawl / SassMeister-input.sass
Created January 30, 2015 06:41
Generated by SassMeister.com.
// ----
// Sass (v3.4.9)
// Compass (v1.0.1)
// ----
.datalist
&-float
%float-item
display: inline-block
&:not(:last-of-type)
@Grawl
Grawl / tabs_hover_change.coffee
Created October 3, 2014 05:02
Zurb Foundation Tabs addon to change tab pairs with hover
# Function to preview tabs content on navigation element hover and return to selected (clicked or predefined) tab on mouseout from navigation container
# Attach it to tabs navigation container and content container elements
tabs_hover_change=(navigation, content)->
# Get string from Foundation settings
tabs_class_active=Foundation.libs.tab.settings.active_class
# Assign tabs objects
tabs_navigation=navigation
tabs_content=content
tab_title_class='.tab-title'
# Function to get tab ID based on anchor href as interaction element
@Grawl
Grawl / gruntfile.coffee
Last active August 29, 2015 14:01
grunt file with path variables
direction=
source:'./source/'
public:'./public/'
path=
source:
dir:direction.source
styles:
dir:direction.source+'styles/'
files:'*.sass'
templates: