header
nav
ul
li
a
li.active
a
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module UiHelper | |
def lorem(paras) | |
paras = around(paras) if paras.is_a?(Range) | |
Faker::Lorem.paragraphs(paras).map{|p| "<p>#{p}</p>"}.join.html_safe | |
end | |
def lorem_words(num) | |
num = around(num) if num.is_a?(Range) | |
Faker::Lorem.words(num).join(' ').html_safe |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$.fn.clickableTableRows = function() { | |
return this.each(function() { | |
var $table = $(this); | |
var bindEvents = true; | |
$table.find("tbody tr").each(function() { | |
var $tr = $(this); | |
if ($tr.find("a").length != 1 || $tr.find("input:visible").length) { | |
bindEvents = false; | |
return; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// prefix support | |
$prefixes: webkit, moz, ms, o, khtml | |
= border-box | |
box-sizing: border-box | |
@each $prefix in $prefixes | |
-#{$prefix}-box-sizing: border-box | |
= border-top-radius($radius) | |
border-top-left-radius: $radius | |
border-top-right-radius: $radius |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Implementation for a plugin that allows vaguely-Tweetbot-style @mention autofills. | |
# Finds the index of the @ symbol that should trigger a mention: the @ closest to the typing cursor | |
# that is preceded by a non-word character or the beginning of the string | |
# | |
# "@dave hey" | |
# ^ | |
# | |
# "@john, I thought you should talk to @tony" | |
# ^ | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Refactor of shane_riley's issue | |
$("dl.card :text").change -> | |
$e = $(@) | |
val = $e.val() | |
odd = [] | |
even = [] | |
for v, i in val.split("") | |
if !(i % 2) then odd.push(v) | |
else |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
li | |
content: 'I.' | |
& + li | |
content: 'II.' | |
& + li | |
content: 'III.' | |
& + li | |
content: 'IV.' | |
& + li | |
content: 'V.' |
NewerOlder