Skip to content

Instantly share code, notes, and snippets.

View antiden's full-sized avatar
🎯
Focusing

antiden antiden

🎯
Focusing
View GitHub Profile
h1, h2, h3 {font-family: FuturaBookC !important;}
hr { display: none; }
.Slot {display:flex; align-items:center; justify-content: center; flex-direction: column; top: initial; left: initial; transform: initial; width: 100%; height: 100vh; padding: 50px 30px;}
.Widget {width: 100%;}
.Widget:first-child {display: none;}
h1, h2, h3 {font-family: FuturaBookC !important;}
hr { display: none; }
.Weather { font-family: FuturaDemiC !important;}
.Unsplash .credit {opacity: 0.5;}
.Time h1 {font-size: 6em;}
@antiden
antiden / drupal twig template translate
Created April 14, 2018 06:48
drupal twig template translate
{% trans %}
Submitted by {{ author.username }} on {{ node.created }}
{% endtrans %}
@antiden
antiden / stylus grid system
Created April 14, 2018 06:47
Stylus grid system
/************Grid****************/
grid()
display flex
flex-flow row wrap
margin -15px
grid_item(arguments)
flex-basis "calc(%s - (15px * 2))" % arguments
margin 15px
@antiden
antiden / jquery-start.txt
Created October 19, 2017 09:26
jquery start
var $ = jQuery.noConflict();
$(document).ready(function($) {
'use strict';
/*Your scripts start here*/
});
@antiden
antiden / ACF Rule All children cats from parent
Created October 2, 2017 05:41
ACF Rule for all children categories from parent
/*ACF taxonomy parent*/
// category ancestor location rule
add_filter('acf/location/rule_types', 'acf_location_types_category_ancestor');
function acf_location_types_category_ancestor($choices)
{
if (!isset($choices['Post']['post_category_ancestor'])) {
$choices['Post']['post_category_ancestor'] = 'Post Category Ancestor';
}
return $choices;
}
@antiden
antiden / emailcheck.txt
Created July 4, 2017 08:42
Email check
<?php mail('ваша@почта.ru', 'Test send from hosting', 'If I can read this letter - my hosting are supported php send mail!'); ?>
$(function() {
var timer;
$(window).resize(function() {
clearTimeout(timer);
timer = setTimeout(function() {
$('.main').css("min-height", $(window).height() + "px" );
}, 40);
}).resize();
});
@antiden
antiden / learn_pass_data.txt
Created February 1, 2017 12:03
Lern data from page and pass in field
$('.products__box .order_product').click(function(){
var know_title = $(this).parents('.products__box').find('.products__box--title').text();
$('.wpcf7').find('input[name=text-172]').val(know_title);
});
@antiden
antiden / count_addclass.txt
Created February 1, 2017 12:01
Count elements and add Classes
/*Count*/
var $this = $('.page_content__content .menu > li');
if ($this.length == 1) {
$this.addClass('one');
} else if ($this.length == 2) {
$this.addClass('two');
} else if ($this.length == 3) {
$this.addClass('three');
} else if ($this.length == 4) {
$this.addClass('four');