Skip to content

Instantly share code, notes, and snippets.

View sxidsvit's full-sized avatar

Sergiy Antonyuk sxidsvit

View GitHub Profile
/* custom-reset.css | 27.08.2018 | https://yurch-html.github.io/dist/custom-reset.html */
*,
*:before,
*:after {
box-sizing: inherit;
}
html {
box-sizing: border-box;
@sxidsvit
sxidsvit / wpcf-redirect-NEW.php
Created August 28, 2018 01:36 — forked from campusboy87/wpcf-redirect-NEW.php
Contact Form 7 Redirect
<?php
/**
* Plugin Name: WPCF Redirect
*/
add_filter( 'shortcode_atts_wpcf7', 'shortcode_atts_wpcf7' );
add_filter( 'wpcf7_editor_panels', 'wpcf7_add_redirect_panels' );
add_action( 'wpcf7_after_save', 'wpcf7_redirect_save_field' );
add_action( 'wp_footer', 'wpcf7_redirect_enqueue_assets' );
@sxidsvit
sxidsvit / code_editor_for_contact_form_7.php
Created July 17, 2018 19:51 — forked from campusboy87/code_editor_for_contact_form_7.php
Code Editor for Contact Form 7 (WordPress / CodeMirror).
<?php
/**
* Plugin Name: Code Editor for Contact Form 7
* Plugin URI: https://gist.github.com/campusboy87/2daad24e45116721759991549b626977
* Author: Campusboy (wp-plus)
* Author URI: https://www.youtube.com/wp-plus
*/
add_action( 'admin_print_styles-toplevel_page_wpcf7', function () {
@sxidsvit
sxidsvit / filter_taxonomy_and_meta.php
Last active July 12, 2018 11:10
Фильтр для работы с таксономиями и мета данными - А.Сокирка. Интенсив 21.05-25.05.2018
// ********************************* PHP ********************************//
<?php
function filter_deals_example($data){
$args = array(
'posts_per_page' => '5',
'post_type' => 'deals',
'tax_query' => array(
'relation' => 'AND'
)
@sxidsvit
sxidsvit / wp-comment-callback
Created June 30, 2018 12:30 — forked from georgiecel/wp-comment-callback
Custom callback for HTML5 friendly WordPress comment. Also includes schema.org microdata. To use, insert the following into comments.php: <?php wp_list_comments('callback=better_comment&end-callback=better_comment_close'); ?>
// awesome semantic comment
function better_comment($comment, $args, $depth) {
$GLOBALS['comment'] = $comment;
extract($args, EXTR_SKIP);
if ( 'article' == $args['style'] ) {
$tag = 'article';
$add_below = 'comment';
} else {
@sxidsvit
sxidsvit / amimation_blocks_plugin
Created June 22, 2018 11:41 — forked from Scretch-1/amimation_blocks_plugin
Анимация блоков при скролле страницы
//Для начала подключаем animate_plugin
//Далее подключаем плагин waypoints https://github.com/imakewebthings/waypoints
//Далее на странице подключаем "animate" стили в
<head>
<link rel="stylesheet" href="libs/animate-plugin/animate.min.css">
</head>
//После в самом низу тега
<body>
<script type="text/javascript" src="libs/animate-plugin/animate-css.js"></script>
<script type="text/javascript" src="libs/animate-plugin/jquery.waypoints.min.js"></script>
@sxidsvit
sxidsvit / checked cirсle
Last active May 7, 2018 22:26
Checkbox in the form of a circle with a mark in the form of a bird inside
// Non-standard checkbox type: circle + birdie marker
// Подробнее - https://paulund.co.uk/how-to-style-a-checkbox-with-css
input[type="checkbox"] {
position: absolute;
opacity: 0;
+ label {
position: relative;
cursor: pointer;
padding: 0 0 0 22px;
@sxidsvit
sxidsvit / package.ison.bootstrap4
Last active April 23, 2018 00:15
File package.ison for using with Bootstrap4
{
"name": "bootstrap-4",
"version": "1.0.0",
"description": "Practical training with bootstrap 4",
"author": "sxidsvit",
"devDependencies": {
"bootstrap": "^4.1.0",
"browser-sync": "^2.23.7",
"gulp": "^3.9.1",
"gulp-autoprefixer": "^5.0.0",
@sxidsvit
sxidsvit / gulpfile_bootstrap4.js
Last active April 23, 2018 00:12 — forked from Insayt/gulpfile.js
D.Valak - gulpfile for Bootstrap 4
'use strict';
var gulp = require('gulp'),
watch = require('gulp-watch'),
prefixer = require('gulp-autoprefixer'),
uglify = require('gulp-uglify'),
sass = require('gulp-sass'),
sourcemaps = require('gulp-sourcemaps'),
rigger = require('gulp-rigger'),
cssmin = require('gulp-minify-css'),
@sxidsvit
sxidsvit / sclick-tab.txt
Last active April 11, 2018 15:36
Табы становятся slick-слайдером (http://kenwheeler.github.io/slick/) на малых разрешениях экрана (по мотивам TIP)
// Источник: https://www.youtube.com/playlist?list=PLbr5YJBVly_5cIevS7GPZTDH-oNntnqXK (урок 17) + https://github.com/pit6262/landing-1
// Документация по slick-слайдеру: http://kenwheeler.github.io/slick/
======================= js-код ===================
$nav_tabs_slider = $('.nav-tab-list');
settings = {
slidesToShow: 1,
prevArrow: '<button type="button" class="slick-prev"><i class="fa fa-chevron-left"></i></button>',