Skip to content

Instantly share code, notes, and snippets.

@sokoljr
sokoljr / grid.scss
Created July 14, 2017 13:36
grid sass
$gridColumnCount : 24; // Total column count
$gridGutterWidth : 32; // [in pixels]
$gridColumnPadding : 0; // [in pixels]
$gridMaxWidth : 1504; // [in pixels]
$gridMargin : 0; // [in pixels] Space outside the grid
@function gridColumnWidth() {
@return $gridMaxWidth / $gridColumnCount;
}
// Grid calculations
@sokoljr
sokoljr / slider_full_bg.js
Created February 6, 2017 09:18
Slider full bg image
/*BG slider*/
var bgImgSlide = [
'images/gm_slot_bg.jpg',
'images/gms_deluxe_bg.jpg',
'images/million_bg.jpg',
'images/vulkan_bg.jpg'
], i=1;
function slideBg(){
@sokoljr
sokoljr / script_modal.js
Created January 18, 2017 14:48
Modal with JSON
/*Modal*/
$("#slick_slider div.top_slider_image").click( function(event) {
event.preventDefault();
$('#overlay').fadeIn(400,
function() {
$('#modal_form')
.css('display', 'block')
.animate({opacity: 1}, 200);
});
@sokoljr
sokoljr / index.php
Created January 18, 2017 14:47
Modal on wp whith JSON
<script>
<?php
$slotIds = array(46, 98); //id pages
$modals = array();
foreach( $slotIds as $current_id ) {
$cntnt = '';
$post = get_post($current_id);
$cntnt .= $post->post_content;
$cntnt .= do_shortcode('[_moneyGame]');
;
@sokoljr
sokoljr / seen.js
Created January 18, 2017 14:40
seen
function seen( prop_val, arr, prop_name=null ) {
if( prop_name == null ) {
for ( var i = 0; i < arr.length; i++ ) {
if ( prop_val == arr[i] ) {
return i;
}
}
}
else {
for( var i = 0; i < arr.length; i++) {
@sokoljr
sokoljr / getPost.php
Last active December 4, 2016 09:00
Конвектор ucoz на wp
<?php
function getBlog() {
$data = file_get_contents('Z:\home\test2.ru\www\news.txt');
$data = preg_split( "/[^\\\]\n/m" ,$data);
$n = 0;
foreach ($data as $post)
{
if (!isset($post[1]))
break;
@sokoljr
sokoljr / Modal.css
Last active November 1, 2016 10:03
Modal css
#modal_form {
height: 300;
max-width: 700px;
margin-top: -150px;
width: 100%;
margin-left: -350px;
border-radius: 5px;
border: 3px #000 solid;
background: #fff;
position: fixed;
@sokoljr
sokoljr / Modal.html
Created November 1, 2016 08:37
Modal html
<div id="modal_form">
<button id="modal_success" type="button" class="btn btn-success">ДА</button>
<button id="modal_close" type="button" class="btn btn-danger">НЕТ</button>
</div>
@sokoljr
sokoljr / modal.js
Created November 1, 2016 08:35
Modal window whith cookie
$(window).load(function() {
var hideTheModal = $.cookie('hideTheModal');
if(hideTheModal == null) {
$('#overlay').fadeIn(400,function() {
$('#modal_form').css('display', 'block').animate({opacity: 1, top: '50%'}, 200);
});
$('#modal_close, #modal_success').click( function() {
var date = new Date();
var minutes = 1;