Skip to content

Instantly share code, notes, and snippets.

@jonathanpath
jonathanpath / _checklist.scss
Last active August 29, 2015 14:23
Checklist helper
.checklist {
list-style: none;
position: relative;
li {
padding-left: 0;
margin-bottom: 10px;
font-size: 20px;
i {
@jonathanpath
jonathanpath / _tags-input.scss
Created July 2, 2015 15:44
Angular Tags Input better design
/* ==|====================
Vendor/Angular Tags Input
Override https://github.com/mbenford/ngTagsInput
Dependance: Bootstrap Variables
======================= */
tags-input {
.tags {
padding: 6px 7px;
border-color: #ccc;
@jonathanpath
jonathanpath / bs-xs-max.sublime-snippet
Last active August 29, 2015 14:26
Boostrap Xsmall max media query snippet
<snippet>
<content><![CDATA[
@media (max-width: \$screen-xs-max) {
$1
}
]]></content>
<tabTrigger>bs-xsmall</tabTrigger>
<scope>source.scss</scope>
</snippet>
@jonathanpath
jonathanpath / full-clickable.jquery.js
Created August 18, 2015 12:05
jQuery all zone redirect to glogal link except links
// Teaser all zone clickable
$('.teaser').click(function(event){
if(!$(event.target).is('a')) {
document.location.href = $(this).find('.teaser-title a').attr('href');
return false;
}
});
@jonathanpath
jonathanpath / _title-border.scss
Created August 19, 2015 13:16
Title with line at left and right
.title-border {
font-size: 20px;
font-weight: 300;
border-bottom: solid 1px #eee;
text-align: center;
margin: 0 15px 40px;
padding-top: 20px;
clear: both;
span {
@jonathanpath
jonathanpath / placeholder_polyfill.js
Last active September 11, 2015 14:01
Placeholder Polyfill
/**
* Placeholders for old browsers
*/
function placeholderOldBrowsers() {
if (!Modernizr.input.autofocus) {
$('input').each(function(){
if ($(this).attr('autofocus'))
$(this).focus();
});
}
@jonathanpath
jonathanpath / retina-mixin.scss
Last active October 1, 2015 14:46
Retina Sass mixin
// Need autoprefixer to generate browser prefix needed
@mixin retina {
@media
(min-device-pixel-ratio: 2),
(min-resolution: 192dpi),
(min-resolution: 2dppx) {
@content;
}
}
@jonathanpath
jonathanpath / _or.scss
Last active November 10, 2015 13:38
Or line separation
.hr-or {
display: block;
border-bottom: solid 1px #eee;
margin-bottom: 30px;
text-align: center;
span {
display: inline-block;
padding: 5px 10px;
background-color: #fff;
@jonathanpath
jonathanpath / _customcheckbox.scss
Created May 27, 2016 10:01
Simple Custom Checkbox in Sass + Glyphicons
/* ==|====================
Module/Custom Checkbox
======================= */
.customcheckbox {
display: block;
position: relative;
cursor: pointer;
font-weight: 300;
@jonathanpath
jonathanpath / share.js
Last active June 8, 2016 13:35
Share Twitter/Facebook/Googleplus Custom
$('a.js-share-facebook').click(function(e){
e.preventDefault();
var loc = encodeURIComponent($(this).attr('href'));
window.open('https://www.facebook.com/sharer/sharer.php?&u=' + loc, 'twitterwindow', 'height=450, width=550, top='+($(window).height() - 450)/2 +', left='+($(window).width() - 550)/2 +', toolbar=0, location=0, menubar=0, directories=0, scrollbars=0');
});
$('a.js-share-tweet').click(function(e){
e.preventDefault();
var loc = $(this).attr('href');
var text = $(this).data('text'); // Need title encoding http://stackoverflow.com/questions/10771728/encoding-get-the-title-for-twitter-share-url