This helper has finally been moved into a gem called nav_lynx!
https://github.com/vigetlabs/nav_lynx
http://rubygems.org/gems/nav_lynx
Thanks to @brianjlandau and @reagent for getting that set up and tested!
This helper has finally been moved into a gem called nav_lynx!
https://github.com/vigetlabs/nav_lynx
http://rubygems.org/gems/nav_lynx
Thanks to @brianjlandau and @reagent for getting that set up and tested!
| @mixin background-image-retina($file, $type, $width, $height) { | |
| background-image: url($file + '.' + $type); | |
| @media (-webkit-min-device-pixel-ratio: 2), (-moz-min-device-pixel-ratio: 2) { | |
| & { | |
| background-image: url($file + '@2x.' + $type); | |
| -webkit-background-size: $width $height; | |
| } | |
| } | |
| } |
| function ShortenText($text) { | |
| // Change to the number of characters you want to display | |
| $chars_limit = 100; | |
| $chars_text = strlen($text); | |
| $text = $text." "; | |
| $text = substr($text,0,$chars_limit); | |
| $text = substr($text,0,strrpos($text,' ')); | |
| // If the text has more characters that your limit, | |
| //add ... so the user knows the text is actually longer |
| =Navigating= | |
| visit('/projects') | |
| visit(post_comments_path(post)) | |
| =Clicking links and buttons= | |
| click_link('id-of-link') | |
| click_link('Link Text') | |
| click_button('Save') | |
| click('Link Text') # Click either a link or a button | |
| click('Button Value') |