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 / example.twig
Last active July 11, 2018 05:34 — forked from SimonSimCity/pagination.html.twig
A gist for pagination in Twig, based on the total number of pages, the current page and some URL-settings. UIkit design.
{% include 'modules/pagination.twig' with {
currentFilters: {
foo: 'bar',
},
currentPage: 43,
paginationPath: '/news',
showAlwaysFirstAndLast: true,
lastPage: 75,
urlType: 'slash',
} %}
//с 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 / jquery.tabs.js
Last active December 22, 2015 21:29 — forked from patrickberkeley/jquery.tabs.js
Simple and easy to use tabs with jQuery
$(document).ready(function(){
$(".tabs-menu li:first, .tabs-content:first").addClass("active");
$(".tabs-content:not(:first)").hide();
$(".tabs-menu > li > a").click(function(e){
var index = $('.tabs-menu li').index($(this).parent('li'));
$('.tabs-menu li.active, .tabs-content.active').removeClass('active');
$(this).parent('li').addClass('active');
$('.tabs-content').hide();
$('.tabs-content').eq(index).show();
return false;
@Grawl
Grawl / .htaccess
Created November 22, 2012 15:20 — forked from joshmvandercom/.htaccess
.htaccess redirect to hash
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{QUERY_STRING} !ajax
RewriteRule ^(.*)$ /#$1 [R=301,L,NE]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
@Grawl
Grawl / prefix-free.styl
Created February 4, 2012 08:29 — forked from sapegin/gist:1735915
-prefix-free for Stylus
// #### it's compilable -prefix-free
// © 2011 Artem Sapegin http://sapegin.ru
// + 2011 Grawl http://grawl.ru
// + radial-gradient and other rules with vendor prefixes added by Grawl.
// add your fixes to My table of vendor prefixes there: http://goo.gl/3hPfR
/* mask:
parameter()
-webkit-parameter arguments
-moz-parameter arguments
-ms-parameter arguments
@Grawl
Grawl / dabblet.css
Created January 4, 2012 16:51 — forked from kizu/dabblet.css
Centered heading with rules
/* Centered heading with rules*/
/*General:*/
h1 {
position: relative;
overflow: hidden;
text-align: center;
}
h1:before,
h1:after {
content: "";
<?php if (!defined('APPLICATION')) exit();
/*
Copyright 2008, 2009 Vanilla Forums Inc.
This file is part of Garden.
Garden is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
Garden is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with Garden. If not, see <http://www.gnu.org/licenses/>.
Contact Vanilla Forums Inc. at support [at] vanillaforums [dot] com
*/