Skip to content

Instantly share code, notes, and snippets.

<snippet>
<content><![CDATA[
<!-- begin $1 -->
<div class="$1">
$2
</div>
<!-- end $1 -->
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>di</tabTrigger>
@setmiks
setmiks / gulpfile.js
Created October 27, 2017 09:04 — forked from agragregra/gulpfile.js
Image Resize + Watermark + Thumbnails
var src = "___library/7-kazan/1/*";
var dst = "_ready";
var gulp = require('gulp'),
imagemin = require('gulp-imagemin'),
cache = require('gulp-cache'),
del = require('del'),
imageResize = require('gulp-image-resize'),
watermark = require("gulp-watermark"),
rename = require("gulp-rename");
@setmiks
setmiks / Animated Scroll jQuery
Last active October 30, 2017 13:30
Animated Scroll
(function($) {
$.fn.animated = function(params) {
var defaults = {str: 100};
var options;
return this.each(function() {
option = $.extend({},defaults ,options, params);
var ths = $(this);
var hw = $(window).height();
var nc = ths.data('animated');
var hb = ths.offset().top;
@setmiks
setmiks / scroll-top.html
Created November 10, 2017 10:33 — forked from agragregra/scroll-top.html
Scroll Top Button
<div class="top" title="Наверх"><i class="fa fa-angle-double-up"></i></div>
.top
position: fixed
bottom: 25px
background-color: #E0E0E0
border-radius: 10em
color: #666
font-size: 26px
width: 50px
@setmiks
setmiks / sitemap.xml
Created November 10, 2017 10:33 — forked from agragregra/sitemap.xml
Jekyll Sitemap Without Plugins
---
layout: null
---
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
{% for post in site.posts %}{% unless post.published == false %}<url>
<loc>{{ site.url }}{{ post.url }}</loc>
{% if post.date %}<lastmod>{{ post.date | date_to_xmlschema }}</lastmod>{% endif %}
</url>{% endunless %}
{{ post.content | strip_html | truncatewords: 28 }}
{% for post in site.categories.[page.category] limit: 8 %}
{% include photo-item.html %}
{% endfor %}
@setmiks
setmiks / .htaccess
Created November 10, 2017 12:13 — forked from agragregra/.htaccess
htaccess index.html & www redirect
RewriteCond %{HTTP_HOST} .
RewriteCond %{HTTP_HOST} www.placeburg.com [NC]
RewriteRule (.*) http://placeburg.com/$1 [R=301,L]
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /([^/]+/)*index\.(htm(l)?|php)\ HTTP/
RewriteRule ^(([^/]+/)*)index\.(htm(l)?|php)$ http://placeburg\.com/$1 [R=301,L]
@setmiks
setmiks / breadcrumbs.html
Created November 16, 2017 09:55
breadcrumb jekyll
<ol class="breadcrumb">
<li><a href="{{ site.baseurl }}/">Головна</a></li>
{% capture page_url %}{{ page.url | remove: "index.html" }}{% endcapture %}
{% assign url_parts = page_url | split: '/' %}
{% capture index %}{{ url_parts.size | minus:1 }}{% endcapture %}
{% for menu in site.menu %}
{% if index == '1' and menu.url == page_url %}
<li>{{page.title}}</li>
{% endif %}
{% if index == '2' and page_url contains menu.url %}
@setmiks
setmiks / title jekyll
Created November 20, 2017 16:59
title jekyll
{% capture page_url %}{{ page.url | remove: "index.html" }}{% endcapture %}
{% assign url_parts = page_url | split: '/' %}
{% capture index %}{{ url_parts.size | minus:1 }}{% endcapture %}
{% if page.categories %}
{% for menu in site.menu %}
{% if index == '1' and menu.url == page_url %}
<title>{{page.title}} - {{site.title}}</title>
{% endif %}
{% if index == '2' and page_url contains menu.url %}
<title>{{page.title}} - {{menu.name}}</title>