Skip to content

Instantly share code, notes, and snippets.

View kvnol's full-sized avatar

Kevin Oliveira kvnol

View GitHub Profile
@kvnol
kvnol / grid.sass
Last active November 25, 2016 12:37
Sass Grid
$grid-gutter: 30px/2
$grid-columns: 12
$grid-max: 1440px // variable value
.row
margin:
left: auto
right: auto
[class*="col-"]
@kvnol
kvnol / structure1.txt
Last active February 5, 2017 01:53
Structure for front-end projects
Projeto
└ /css
└ style.css
index.html
Projeto
└ assets
└ sass
└ atoms
- buttons.sass
- labels.sass
- inputs.sass
└ molecules
- searchbox.sass
└ organisms
@kvnol
kvnol / _config.yml
Created March 30, 2017 13:58 — forked from adamjspooner/_config.yml
A Jekyll plugin to convert .styl to .css.
stylus:
compress: true
path: ./path/to/styl
@kvnol
kvnol / gh-pages-deploy.md
Created April 15, 2017 03:58 — forked from cobyism/gh-pages-deploy.md
Deploy to `gh-pages` from a `dist` folder on the master branch. Useful for use with [yeoman](http://yeoman.io).

Deploying a subfolder to GitHub Pages

Sometimes you want to have a subdirectory on the master branch be the root directory of a repository’s gh-pages branch. This is useful for things like sites developed with Yeoman, or if you have a Jekyll site contained in the master branch alongside the rest of your code.

For the sake of this example, let’s pretend the subfolder containing your site is named dist.

Step 1

Remove the dist directory from the project’s .gitignore file (it’s ignored by default by Yeoman).

@kvnol
kvnol / filterBar.js
Created June 14, 2017 12:57
Filter bar
(function(win, doc) {
'use strict';
var state = doc.querySelector('[data-id="estado"]');
var city = doc.querySelector('[data-id="cidades"]');
var district = doc.querySelector('[data-id="regioes"]');
if (win.location.pathname === '/bares.html') {
city.addEventListener('change', barFilter, 'false');
city.addEventListener('change', disableSiblings, 'false');
@kvnol
kvnol / titleSplit.html
Created September 1, 2017 20:09
Jekyll: Split title to url
{% assign
url = question.title |
downcase |
replace: ' ', '-' |
replace: '?', '' |
replace: ',', '' |
replace: 'á', 'a' |
replace: 'à', 'a' |
replace: 'é', 'e' |
replace: 'í', 'i' |
// BEM.min.js v1.0.2
function BEM(element,patchBEM){if(element==undefined){element=$('[bem]')};if(patchBEM==undefined){patchBEM=getPatchBEM(element)};element.each(function(){if(typeof $(this).attr('bem')!='undefined'){patchBEM=getPatchBEM($(this));$(this).removeAttr('bem')};let thisChildrens=$(this).children();thisChildrens.each(function(){let thisClass=$(this).attr('class');if(typeof thisClass!='undefined'){if(!!thisClass.match(/^__/)){let thisBEMName='';for(i=0;i<thisClass.length;i++){thisLetter=thisClass[i];if(!thisLetter.match(/\s/)){thisBEMName+=thisLetter}else{break}};$(this).attr('class',thisClass.replace(thisBEMName,patchBEM+thisBEMName));let newPatchBEM=patchBEM+thisBEMName;BEM($(this),newPatchBEM);return!0}};BEM($(this),patchBEM)})})};function getPatchBEM(element){let thisClass=element.attr('class');let thisBEMName='';for(i=0;i<thisClass.length;i++){thisLetter=thisClass[i];if(!!!thisLetter.match(/\s/)){thisBEMName+=thisLetter}else{break}};patchBEM=thisBEMName;return patchBEM}
{"lastUpload":"2019-10-21T14:25:29.950Z","extensionVersion":"v3.4.3"}
<link rel="apple-touch-icon" sizes="57x57" href="/apple-icon-57x57.png">
<link rel="apple-touch-icon" sizes="60x60" href="/apple-icon-60x60.png">
<link rel="apple-touch-icon" sizes="72x72" href="/apple-icon-72x72.png">
<link rel="apple-touch-icon" sizes="76x76" href="/apple-icon-76x76.png">
<link rel="apple-touch-icon" sizes="114x114" href="/apple-icon-114x114.png">
<link rel="apple-touch-icon" sizes="120x120" href="/apple-icon-120x120.png">
<link rel="apple-touch-icon" sizes="144x144" href="/apple-icon-144x144.png">
<link rel="apple-touch-icon" sizes="152x152" href="/apple-icon-152x152.png">
<link rel="apple-touch-icon" sizes="180x180" href="/apple-icon-180x180.png">
<link rel="icon" type="image/png" sizes="192x192" href="/android-icon-192x192.png">