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 / gist:10434160
Last active August 29, 2015 13:58
Тернарный оператор в стиле Маяковского
$format=
$GLOBALS['wp_rewrite']->using_index_permalinks()
&&
!strpos($pagenum_link,'index.php')
?
'index.php/'
:
'';
path=
dest:'./'
templates:'templates/'
styles:'styles/'
module.exports=(grunt) ->
grunt.initConfig
pkg:grunt.file.readJSON 'package.json'
sass:
compile:
options:
.mapjs-node,
.mapjs-node.droppable{
border: none !important;
border-radius: 3px;
padding: 0 !important;
box-shadow: 0 0 0 1px white !important;
}
.mapjs-node.dragging{
opacity: 0.9 !important;
}
@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:
@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 / 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)
$(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-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>
@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 / .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