This file contains hidden or 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 Railsyard::Backend | |
class FormBuilder < SimpleForm::FormBuilder | |
def group(group_name, options = {}, &block) | |
group_legend = template.link_to translate(:groups, group_name, group_name.to_s.titleize), "##{group_name}", data: { behaviour: "dom-toggle" } | |
group_hint = translate(:group_hints, group_name) | |
[ | |
template.content_tag(:h3, group_legend, class: 'group-header', data: { translation_keys: translate_lookups(:groups, group_name, group_name.to_s.titleize) }), | |
template.content_tag(:div, id: group_name, class: 'group-content') do |
This file contains hidden or 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
.box_{ | |
/* | |
* un box non può avere caratteristiche se non il colore di sfondo | |
* niente border, niente margini o padding, nè altro che alteri al sua struttura | |
* tutto il contenuto deve stare dentro una section che eredita alcune proprietà | |
* dalla libreria LEGO | |
*/ | |
background-color: $cBoxBackground; | |
$box_gap: 5px; // dare coerenza agli spazi | |
$fontFactor: 1.2; // fattore di scala per font, line-height ecc. |
This file contains hidden or 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
.clearfix { | |
display: block; | |
&:after { | |
clear: both; | |
content: ' '; | |
display: block; | |
font-size: 0; | |
line-height: 0; | |
visibility: hidden; | |
width: 0; |
This file contains hidden or 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
# I like to have a PATH in my shell | |
# to show the last 3 dirs of the whole PATH and the git (or hg) repo at the end (if exists) | |
# here an example: | |
# | |
# ../jobs/mywebsite/www(git::master)> | |
# | |
# Put these few lines in your .bash_profile: | |
hg_ps1() { | |
hg prompt " [{rev}{;{rev|merge}}{ on {branch|quiet}}{ {status|modified}}]" 2> /dev/null |
This file contains hidden or 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
<meta property="og:title" content=""> | |
<meta property="og:type" content="website"> | |
<meta property="og:url" content="http://"> | |
<meta property="og:image" content=""> | |
<meta property="og:site_name" content=""> | |
<meta property="og:description" content=""> |
This file contains hidden or 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
setTimeout(function(){ | |
// Hide the address bar! | |
window.scrollTo(0, 1); | |
}, 100); |
This file contains hidden or 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
detectOrientation(); | |
window.onorientationchange = detectOrientation; | |
function detectOrientation(){ | |
if(typeof window.onorientationchange != 'undefined'){ | |
if ( orientation == 0 ) { | |
//Do Something In Portrait Mode | |
} | |
else if ( orientation == 90 ) { | |
//Do Something In Landscape Mode | |
} |
This file contains hidden or 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
(function(doc) { | |
var addEvent = 'addEventListener', | |
type = 'gesturestart', | |
qsa = 'querySelectorAll', | |
scales = [1, 1], | |
meta = qsa in doc ? doc[qsa]('meta[name=viewport]') : []; | |
function fix() { | |
meta.content = 'width=device-width,minimum-scale=' + scales[0] + ',maximum-scale=' + scales[1]; | |
doc.removeEventListener(type, fix, true); |
NewerOlder