Commit eb81782c authored by Mark Otto's avatar Mark Otto

Porting over all Blueprint styles to new Baseline repo

parents
This diff is collapsed.
$(document).ready(function(){
// Get Heights
windowHeight = $(window).height();
documentHeight = $(document).height();
sidebarHeight = windowHeight - 40;
containerHeight = windowHeight - 40;
// Get Widths
windowWidth = $(window).width();
containerWidth = windowWidth - 200;
if (windowHeight < containerHeight) {
// Set Dimensions for default state (before resize)
$('div#sidebar').css({
height: sidebarHeight
});
$('div#container').css({
width: containerWidth,
height: containerHeight
});
} else {
// During resize, set widths
$(window).resize(function() {
console.log('Window Height: ' + $(window).height() + ', Sidebar Height:' + ($(window).height() - 40));
// Get Heights
windowHeight = $(window).height();
sidebarHeight = windowHeight - 40;
containerHeight = windowHeight - 40;
// Get Widths
windowWidth = $(window).width();
containerWidth = windowWidth - 200;
// Set Dimensions for default state (before resize)
$('div#sidebar').css({
height: sidebarHeight
});
$('div#container').css({
width: containerWidth,
height: containerHeight
});
});
// console.log('omgz window is less than container so... fuck.');
$('div#sidebar').css({
height: documentHeight - 40
});
}
/*
// Toggle Calendars
$('div#sidebar ul li a').click(function() {
if ($(this).is('#toggleMonthView')) {
console.log('toggle month');
$(this).addClass('active');
$('#toggleListView').removeClass('active');
$('table#monthView').show();
$('table#listView').hide();
} else {
console.log('toggle list');
$(this).addClass('active');
$('#toggleMonthView').removeClass('active');
$('table#listView').show();
$('table#monthView').hide();
}
return false;
});
*/
});
/*
===============================================================================
Chili is the jQuery code highlighter plugin
...............................................................................
LICENSE: http://www.opensource.org/licenses/mit-license.php
WEBSITE: http://noteslog.com/chili/
Copyright 2008 / Andrea Ercolino
===============================================================================
*/
{
_name: 'css'
, _case: true
, _main: {
comment: {
_match: /\/\*[^*]*\*+(?:[^\/][^*]*\*+)*\//
, _style: "color: olive;"
}
, directive: {
_match: /@\w+/
, _style: "color: fuchsia;"
}
, url: {
_match: /\b(url\s*\()([^)]+)(\))/
, _replace: "<span class='url'>$1</span>$2<span class='url'>$3</span>"
, _style: "color: fuchsia;"
}
, block: {
_match: /\{([\w\W]*?)\}/
, _replace: function( all, pairs ) {
return '{' + this.x( pairs, '/definition' ) + '}';
}
}
, 'class': {
_match: /\.\w+/
, _style: "color: #CC0066;"
}
, id: {
_match: /#\w+/
, _style: "color: IndianRed;"
}
, pseudo: {
_match: /:\w+/
, _style: "color: #CC9900;"
}
, element: {
_match: /\w+/
, _style: "color: Purple;"
}
}
, definition: {
comment: {
_match: /\/\*[^*]*\*+(?:[^\/][^*]*\*+)*\//
}
, property: {
_match: /\b(?:zoom|z-index|writing-mode|word-wrap|word-spacing|word-break|width|widows|white-space|volume|voice-family|visibility|vertical-align|unicode-bidi|top|text-underline-position|text-transform|text-shadow|text-overflow|text-kashida-space|text-justify|text-indent|text-decoration|text-autospace|text-align-last|text-align|table-layout|stress|speech-rate|speak-punctuation|speak-numeral|speak-header|speak|size|scrollbar-track-color|scrollbar-shadow-color|scrollbar-highlight-color|scrollbar-face-color|scrollbar-dark-shadow-color|scrollbar-base-color|scrollbar-arrow-color|scrollbar-3d-light-color|ruby-position|ruby-overhang|ruby-align|right|richness|quotes|position|play-during|pitch-range|pitch|pause-before|pause-after|pause|page-break-inside|page-break-before|page-break-after|page|padding-top|padding-right|padding-left|padding-bottom|padding|overflow-Y|overflow-X|overflow|outline-width|outline-style|outline-color|outline|orphans|min-width|min-height|max-width|max-height|marks|marker-offset|margin-top|margin-right|margin-left|margin-bottom|margin|list-style-type|list-style-position|list-style-image|list-style|line-height|line-break|letter-spacing|left|layout-grid-type|layout-grid-mode|layout-grid-line|layout-grid-char-spacing|layout-grid-char|layout-grid|layout-flow|layer-background-image|layer-background-color|include-source|ime-mode|height|font-weight|font-variant|font-style|font-stretch|font-size-adjust|font-size|font-family|font|float|filter|empty-cells|elevation|display|direction|cursor|cue-before|cue-after|cue|counter-reset|counter-increment|content|color|clip|clear|caption-side|bottom|border-width|border-top-width|border-top-style|border-top-color|border-top|border-style|border-spacing|border-right-width|border-right-style|border-right-color|border-right|border-left-width|border-left-style|border-left-color|border-left|border-color|border-collapse|border-bottom-width|border-bottom-style|border-bottom-color|border-bottom|border|behavior|background-repeat|background-position-y|background-position-x|background-position|background-image|background-color|background-attachment|background|azimuth|accelerator)\s*:/
, _style: "color: #330066;"
}
, special: {
_match: /\b(?:-use-link-source|-set-link-source|-replace|-moz-user-select|-moz-user-modify|-moz-user-input|-moz-user-focus|-moz-outline-width|-moz-outline-style|-moz-outline-color|-moz-outline|-moz-opacity|-moz-border-top-colors|-moz-border-right-colors|-moz-border-radius-topright|-moz-border-radius-topleft|-moz-border-radius-bottomright|-moz-border-radius-bottomleft|-moz-border-radius|-moz-border-left-colors|-moz-border-bottom-colors|-moz-binding)\s*:/
, _style: "color: #330066; text-decoration: underline;"
}
, url: {
_match: /\b(url\s*\()([^)]+)(\))/
, _replace: "<span class='url'>$1</span>$2<span class='url'>$3</span>"
}
, value: {
_match: /\b(?:xx-small|xx-large|x-soft|x-small|x-slow|x-low|x-loud|x-large|x-high|x-fast|wider|wait|w-resize|visible|url|uppercase|upper-roman|upper-latin|upper-alpha|underline|ultra-expanded|ultra-condensed|tv|tty|transparent|top|thin|thick|text-top|text-bottom|table-row-group|table-row|table-header-group|table-footer-group|table-column-group|table-column|table-cell|table-caption|sw-resize|super|sub|status-bar|static|square|spell-out|speech|solid|soft|smaller|small-caption|small-caps|small|slower|slow|silent|show|separate|semi-expanded|semi-condensed|se-resize|scroll|screen|s-resize|run-in|rtl|rightwards|right-side|right|ridge|rgb|repeat-y|repeat-x|repeat|relative|projection|print|pre|portrait|pointer|overline|outside|outset|open-quote|once|oblique|nw-resize|nowrap|normal|none|no-repeat|no-open-quote|no-close-quote|ne-resize|narrower|n-resize|move|mix|middle|message-box|medium|marker|ltr|lowercase|lower-roman|lower-latin|lower-greek|lower-alpha|lower|low|loud|local|list-item|line-through|lighter|level|leftwards|left-side|left|larger|large|landscape|justify|italic|invert|inside|inset|inline-table|inline|icon|higher|high|hide|hidden|help|hebrew|handheld|groove|format|fixed|faster|fast|far-right|far-left|fantasy|extra-expanded|extra-condensed|expanded|embossed|embed|e-resize|double|dotted|disc|digits|default|decimal-leading-zero|decimal|dashed|cursive|crosshair|cross|crop|counters|counter|continuous|condensed|compact|collapse|code|close-quote|circle|center-right|center-left|center|caption|capitalize|braille|bottom|both|bolder|bold|block|blink|bidi-override|below|behind|baseline|avoid|auto|aural|attr|armenian|always|all|absolute|above)\b/
, _style: "color: #3366FF;"
}
, string: {
_match: /(?:\'[^\'\\\n]*(?:\\.[^\'\\\n]*)*\')|(?:\"[^\"\\\n]*(?:\\.[^\"\\\n]*)*\")/
, _style: "color: teal;"
}
, number: {
_match: /(?:\b[+-]?(?:\d*\.?\d+|\d+\.?\d*))(?:%|(?:(?:px|pt|em|)\b))/
, _style: "color: red;"
}
, color : {
_match: /(?:\#[a-fA-F0-9]{3,6})|\b(?:yellow|white|teal|silver|red|purple|olive|navy|maroon|lime|green|gray|fuchsia|blue|black|aqua|YellowGreen|Yellow|WhiteSmoke|White|Wheat|Violet|Turquoise|Tomato|Thistle|Teal|Tan|SteelBlue|SpringGreen|Snow|SlateGrey|SlateGray|SlateBlue|SkyBlue|Silver|Sienna|SeaShell|SeaGreen|SandyBrown|Salmon|SaddleBrown|RoyalBlue|RosyBrown|Red|Purple|PowderBlue|Plum|Pink|Peru|PeachPuff|PapayaWhip|PaleVioletRed|PaleTurquoise|PaleGreen|PaleGoldenRod|Orchid|OrangeRed|Orange|OliveDrab|Olive|OldLace|Navy|NavajoWhite|Moccasin|MistyRose|MintCream|MidnightBlue|MediumVioletRed|MediumTurquoise|MediumSpringGreen|MediumSlateBlue|MediumSeaGreen|MediumPurple|MediumOrchid|MediumBlue|MediumAquaMarine|Maroon|Magenta|Linen|LimeGreen|Lime|LightYellow|LightSteelBlue|LightSlateGrey|LightSlateGray|LightSkyBlue|LightSeaGreen|LightSalmon|LightPink|LightGrey|LightGreen|LightGray|LightGoldenRodYellow|LightCyan|LightCoral|LightBlue|LemonChiffon|LawnGreen|LavenderBlush|Lavender|Khaki|Ivory|Indigo|IndianRed|HotPink|HoneyDew|Grey|GreenYellow|Green|Gray|GoldenRod|Gold|GhostWhite|Gainsboro|Fuchsia|ForestGreen|FloralWhite|FireBrick|DodgerBlue|DimGrey|DimGray|DeepSkyBlue|DeepPink|Darkorange|DarkViolet|DarkTurquoise|DarkSlateGrey|DarkSlateGray|DarkSlateBlue|DarkSeaGreen|DarkSalmon|DarkRed|DarkOrchid|DarkOliveGreen|DarkMagenta|DarkKhaki|DarkGrey|DarkGreen|DarkGray|DarkGoldenRod|DarkCyan|DarkBlue|Cyan|Crimson|Cornsilk|CornflowerBlue|Coral|Chocolate|Chartreuse|CadetBlue|BurlyWood|Brown|BlueViolet|Blue|BlanchedAlmond|Black|Bisque|Beige|Azure|Aquamarine|Aqua|AntiqueWhite|AliceBlue)\b/
, _style: "color: green;"
}
}
}
/*
===============================================================================
Chili is the jQuery code highlighter plugin
...............................................................................
LICENSE: http://www.opensource.org/licenses/mit-license.php
WEBSITE: http://noteslog.com/chili/
Copyright 2008 / Andrea Ercolino
===============================================================================
*/
{
_name: 'html'
, _case: false
, _main: {
doctype: {
_match: /<!DOCTYPE\b[\w\W]*?>/
, _style: "color: #CC6600;"
}
, ie_style: {
_match: /(<!--\[[^\]]*\]>)([\w\W]*?)(<!\[[^\]]*\]-->)/
, _replace: function( all, open, content, close ) {
return "<span class='ie_style'>" + this.x( open ) + "</span>"
+ this.x( content, '//style' )
+ "<span class='ie_style'>" + this.x( close ) + "</span>";
}
, _style: "color: DarkSlateGray; font-weight: bold;"
}
, comment: {
_match: /<!--[\w\W]*?-->/
, _style: "color: #4040c2;"
}
, script: {
_match: /(<script\s+[^>]*>)([\w\W]*?)(<\/script\s*>)/
, _replace: function( all, open, content, close ) {
return this.x( open, '//tag_start' )
+ this.x( content, 'js' )
+ this.x( close, '//tag_end' );
}
}
, style: {
_match: /(<style\s+[^>]*>)([\w\W]*?)(<\/style\s*>)/
, _replace: function( all, open, content, close ) {
return this.x( open, '//tag_start' )
+ this.x( content, 'css' )
+ this.x( close, '//tag_end' );
}
}
// matches a starting tag of an element (with attrs)
// like "<div ... >" or "<img ... />"
, tag_start: {
_match: /(<\w+)((?:[?%]>|[\w\W])*?)(\/>|>)/
, _replace: function( all, open, content, close ) {
return "<span class='tag_start'>" + this.x( open ) + "</span>"
+ this.x( content, '/tag_attrs' )
+ "<span class='tag_start'>" + this.x( close ) + "</span>";
}
, _style: "color: navy; font-weight: bold;"
}
// matches an ending tag
// like "</div>"
, tag_end: {
_match: /<\/\w+\s*>|\/>/
, _style: "color: navy;"
}
, entity: {
_match: /&\w+?;/
, _style: "color: blue;"
}
}
, tag_attrs: {
// matches a name/value pair
attr: {
// before in $1, name in $2, between in $3, value in $4
_match: /(\W*?)([\w-]+)(\s*=\s*)((?:\'[^\']*(?:\\.[^\']*)*\')|(?:\"[^\"]*(?:\\.[^\"]*)*\"))/
, _replace: "$1<span class='attr_name'>$2</span>$3<span class='attr_value'>$4</span>"
, _style: { attr_name: "color: green;", attr_value: "color: maroon;" }
}
}
}
This diff is collapsed.
/*
===============================================================================
Chili is the jQuery code highlighter plugin
...............................................................................
LICENSE: http://www.opensource.org/licenses/mit-license.php
WEBSITE: http://noteslog.com/chili/
Copyright 2008 / Andrea Ercolino
===============================================================================
*/
{
_name: 'js'
, _case: true
, _main: {
ml_comment: {
_match: /\/\*[^*]*\*+(?:[^\/][^*]*\*+)*\//
, _style: 'color: gray;'
}
, sl_comment: {
_match: /\/\/.*/
, _style: 'color: green;'
}
, string: {
_match: /(?:\'[^\'\\\n]*(?:\\.[^\'\\\n]*)*\')|(?:\"[^\"\\\n]*(?:\\.[^\"\\\n]*)*\")/
, _style: 'color: teal;'
}
, num: {
_match: /\b[+-]?(?:\d*\.?\d+|\d+\.?\d*)(?:[eE][+-]?\d+)?\b/
, _style: 'color: red;'
}
, reg_not: { //this prevents "a / b / c" to be interpreted as a reg_exp
_match: /(?:\w+\s*)\/[^\/\\\n]*(?:\\.[^\/\\\n]*)*\/[gim]*(?:\s*\w+)/
, _replace: function( all ) {
return this.x( all, '//num' );
}
}
, reg_exp: {
_match: /\/[^\/\\\n]*(?:\\.[^\/\\\n]*)*\/[gim]*/
, _style: 'color: maroon;'
}
, brace: {
_match: /[\{\}]/
, _style: 'color: red; font-weight: bold;'
}
, statement: {
_match: /\b(with|while|var|try|throw|switch|return|if|for|finally|else|do|default|continue|const|catch|case|break)\b/
, _style: 'color: navy; font-weight: bold;'
}
, error: {
_match: /\b(URIError|TypeError|SyntaxError|ReferenceError|RangeError|EvalError|Error)\b/
, _style: 'color: Coral;'
}
, object: {
_match: /\b(String|RegExp|Object|Number|Math|Function|Date|Boolean|Array)\b/
, _style: 'color: DeepPink;'
}
, property: {
_match: /\b(undefined|arguments|NaN|Infinity)\b/
, _style: 'color: Purple; font-weight: bold;'
}
, 'function': {
_match: /\b(parseInt|parseFloat|isNaN|isFinite|eval|encodeURIComponent|encodeURI|decodeURIComponent|decodeURI)\b/
, _style: 'color: olive;'
}
, operator: {
_match: /\b(void|typeof|this|new|instanceof|in|function|delete)\b/
, _style: 'color: RoyalBlue; font-weight: bold;'
}
, liveconnect: {
_match: /\b(sun|netscape|java|Packages|JavaPackage|JavaObject|JavaClass|JavaArray|JSObject|JSException)\b/
, _style: 'text-decoration: overline;'
}
}
}
This diff is collapsed.
/*
===============================================================================
Chili is the jQuery code highlighter plugin
...............................................................................
LICENSE: http://www.opensource.org/licenses/mit-license.php
WEBSITE: http://noteslog.com/chili/
Copyright 2008 / Andrea Ercolino
===============================================================================
*/
/* ----------------------------------------------------------------------------
* this recipe uses a little trick for highlighting php code
* 1: replace each php snippet with a placeholder
* 2: highlight html without php and php snippets apart
* 3: replace each placeholder with its highlighted php snippet
*
* the trick is not perfect only if the html without php is broken
* however, in such a case many highlighters get fooled but Chili does not
*
* ---
* this recipe has been adapted for working with Safari
* in fact, Safari cannot match more than 101236 characters with a lazy star
* --------------------------------------------------------------------------*/
{
_name: "php"
, _case: true
, _main: {
all: {
_match: /[\w\W]*/
, _replace: function( all ) {
var placeholder = String.fromCharCode(0);
var blocks = [];
var that = this;
var no_php_1 = all.replace( /<\?[^?]*\?+(?:[^>][^?]*\?+)*>/g, function( block ) {
blocks.push( that.x( block, '/block/php_1' ) );
return placeholder;
} );
var no_php_2 = no_php_1.replace( /^[^?]*\?+(?:[^>][^?]*\?+)*>|<\?[\w\W]*$/g, function( block ) {
blocks.push( that.x( block, '/block/php_2' ) );
return placeholder;
} );
if( blocks.length ) {
var html = this.x( no_php_2, 'html' );
var count = 0;
return html.replace( new RegExp( placeholder, "g" ), function() {
return blocks[ count++ ];
} );
}
else {
return this.x( all, '/php' );
}
}
}
}
, block: {
php_1: { // --- <? +++ ?> ---
_match: /(<\?(?:php\b)?)([^?]*\?+(?:[^>][^?]*\?+)*>)/
, _replace: function( all, open, content ) {
return "<span class='start'>" + this.x( open ) + "</span>"
+ this.x( content.replace( /\?>$/, '' ), '/php' )
+ "<span class='end'>" + this.x( '?>' ) + "</span>";
}
, _style: {
start: "color: red; font-weight: bold"
, end: "color: red;"
}
}
, php_2: { // +++ ?> --- <? +++
_match: /([^?]*\?+(?:[^>][^?]*\?+)*>)|(<\?(?:php\b)?)([\w\W]*)/
, _replace: function( all, content, open2, content2 ) {
if( open2 ) {
return "<span class='start'>" + this.x( open2 ) + "</span>"
+ this.x( content2, '/php' );
}
else {
return this.x( content.replace( /\?>$/, '' ), '/php' )
+ "<span class='end'>" + this.x( '?>' ) + "</span>";
}
}
, _style: {
start: "color: red; font-weight: bold"
, end: "color: red;"
}
}
}
, php: {
mlcom: {
_match: /\/\*[^*]*\*+([^\/][^*]*\*+)*\//
, _style: "color: gray;"
}
, com: {
_match: /(?:\/\/.*)|(?:[^\\]\#.*)/
, _style: "color: green;"
}
, string1: {
_match: /\'[^\'\\]*(?:\\.[^\'\\]*)*\'/
, _style: "color: purple;"
}
, string2: {
_match: /\"[^\"\\]*(?:\\.[^\"\\]*)*\"/
, _style: "color: fuchsia;"
}
, value: {
_match: /\b(?:[Nn][Uu][Ll][Ll]|[Tt][Rr][Uu][Ee]|[Ff][Aa][Ll][Ss][Ee])\b/
, _style: "color: gray; font-weight: bold;"
}
, number: {
_match: /\b[+-]?(\d*\.?\d+|\d+\.?\d*)([eE][+-]?\d+)?\b/
, _style: "color: red;"
}
, const1: {
_match: /\b(?:DEFAULT_INCLUDE_PATH|E_(?:ALL|CO(?:MPILE_(?:ERROR|WARNING)|RE_(?:ERROR|WARNING))|ERROR|NOTICE|PARSE|STRICT|USER_(?:ERROR|NOTICE|WARNING)|WARNING)|P(?:EAR_(?:EXTENSION_DIR|INSTALL_DIR)|HP_(?:BINDIR|CONFIG_FILE_(?:PATH|SCAN_DIR)|DATADIR|E(?:OL|XTENSION_DIR)|INT_(?:MAX|SIZE)|L(?:IBDIR|OCALSTATEDIR)|O(?:S|UTPUT_HANDLER_(?:CONT|END|START))|PREFIX|S(?:API|HLIB_SUFFIX|YSCONFDIR)|VERSION))|__COMPILER_HALT_OFFSET__)\b/
, _style: "color: red;"
}
, const2: {
_match: /\b(?:A(?:B(?:DAY_(?:1|2|3|4|5|6|7)|MON_(?:1(?:0|1|2|)|2|3|4|5|6|7|8|9))|LT_DIGITS|M_STR|SSERT_(?:ACTIVE|BAIL|CALLBACK|QUIET_EVAL|WARNING))|C(?:ASE_(?:LOWER|UPPER)|HAR_MAX|O(?:DESET|NNECTION_(?:ABORTED|NORMAL|TIMEOUT)|UNT_(?:NORMAL|RECURSIVE))|R(?:EDITS_(?:ALL|DOCS|FULLPAGE|G(?:ENERAL|ROUP)|MODULES|QA|SAPI)|NCYSTR|YPT_(?:BLOWFISH|EXT_DES|MD5|S(?:ALT_LENGTH|TD_DES)))|URRENCY_SYMBOL)|D(?:AY_(?:1|2|3|4|5|6|7)|ECIMAL_POINT|IRECTORY_SEPARATOR|_(?:FMT|T_FMT))|E(?:NT_(?:COMPAT|NOQUOTES|QUOTES)|RA(?:_(?:D_(?:FMT|T_FMT)|T_FMT|YEAR)|)|XTR_(?:IF_EXISTS|OVERWRITE|PREFIX_(?:ALL|I(?:F_EXISTS|NVALID)|SAME)|SKIP))|FRAC_DIGITS|GROUPING|HTML_(?:ENTITIES|SPECIALCHARS)|IN(?:FO_(?:ALL|C(?:ONFIGURATION|REDITS)|ENVIRONMENT|GENERAL|LICENSE|MODULES|VARIABLES)|I_(?:ALL|PERDIR|SYSTEM|USER)|T_(?:CURR_SYMBOL|FRAC_DIGITS))|L(?:C_(?:ALL|C(?:OLLATE|TYPE)|M(?:ESSAGES|ONETARY)|NUMERIC|TIME)|O(?:CK_(?:EX|NB|SH|UN)|G_(?:A(?:LERT|UTH(?:PRIV|))|C(?:ONS|R(?:IT|ON))|D(?:AEMON|EBUG)|E(?:MERG|RR)|INFO|KERN|L(?:OCAL(?:0|1|2|3|4|5|6|7)|PR)|MAIL|N(?:DELAY|EWS|O(?:TICE|WAIT))|ODELAY|P(?:ERROR|ID)|SYSLOG|U(?:SER|UCP)|WARNING)))|M(?:ON_(?:1(?:0|1|2|)|2|3|4|5|6|7|8|9|DECIMAL_POINT|GROUPING|THOUSANDS_SEP)|_(?:1_PI|2_(?:PI|SQRTPI)|E|L(?:N(?:10|2)|OG(?:10E|2E))|PI(?:_(?:2|4)|)|SQRT(?:1_2|2)))|N(?:EGATIVE_SIGN|O(?:EXPR|STR)|_(?:CS_PRECEDES|S(?:EP_BY_SPACE|IGN_POSN)))|P(?:ATH(?:INFO_(?:BASENAME|DIRNAME|EXTENSION)|_SEPARATOR)|M_STR|OSITIVE_SIGN|_(?:CS_PRECEDES|S(?:EP_BY_SPACE|IGN_POSN)))|RADIXCHAR|S(?:EEK_(?:CUR|END|SET)|ORT_(?:ASC|DESC|NUMERIC|REGULAR|STRING)|TR_PAD_(?:BOTH|LEFT|RIGHT))|T(?:HOUS(?:ANDS_SEP|EP)|_FMT(?:_AMPM|))|YES(?:EXPR|STR))\b/
, _style: "color: red;"
}
, global: {
_match: /(?:\$GLOBALS|\$_COOKIE|\$_ENV|\$_FILES|\$_GET|\$_POST|\$_REQUEST|\$_SERVER|\$_SESSION|\$php_errormsg)\b/
, _style: "color: red;"
}
, keyword: {
_match: /\b(?:__CLASS__|__FILE__|__FUNCTION__|__LINE__|__METHOD__|abstract|and|array|as|break|case|catch|cfunction|class|clone|const|continue|declare|default|die|do|echo|else|elseif|empty|enddeclare|endfor|endforeach|endif|endswitch|endwhile|eval|exception|exit|extends|extends|final|for|foreach|function|global|if|implements|include|include_once|interface|isset|list|new|old_function|or|php_user_filter|print|private|protected|public|require|require_once|return|static|switch|this|throw|try|unset|use|var|while|xor)\b/
, _style: "color: navy; font-weight: bold;"
}
, variable: {
_match: /\$(\w+)/
, _replace: '<span class="keyword">$</span><span class="variable">$1</span>'
, _style: "color: #4040c2;"
}
, heredoc: {
_match: /(\<\<\<\s*)(\w+)((?:(?!\2).*\n)+)(\2)\b/
, _replace: '<span class="keyword">$1</span><span class="string1">$2</span><span class="string2">$3</span><span class="string1">$4</span>'
}
}
}
\ No newline at end of file
This diff is collapsed.
(function($) {
$.fn.tipsy = function(options) {
options = $.extend({}, $.fn.tipsy.defaults, options);
return this.each(function() {
var opts = $.fn.tipsy.elementOptions(this, options);
$(this).hover(function() {
$.data(this, 'cancel.tipsy', true);
var tip = $.data(this, 'active.tipsy');
if (!tip) {
tip = $('<div class="tipsy"><div class="tipsy-inner"/></div>');
tip.css({position: 'absolute', zIndex: 100000});
$.data(this, 'active.tipsy', tip);
}
if ($(this).attr('title') || typeof($(this).attr('original-title')) != 'string') {
$(this).attr('original-title', $(this).attr('title') || '').removeAttr('title');
}
var title;
if (typeof opts.title == 'string') {
title = $(this).attr(opts.title == 'title' ? 'original-title' : opts.title);
} else if (typeof opts.title == 'function') {
title = opts.title.call(this);
}
tip.find('.tipsy-inner')[opts.html ? 'html' : 'text'](title || opts.fallback);
var pos = $.extend({}, $(this).offset(), {width: this.offsetWidth, height: this.offsetHeight});
tip.get(0).className = 'tipsy'; // reset classname in case of dynamic gravity
tip.remove().css({top: 0, left: 0, visibility: 'hidden', display: 'block'}).appendTo(document.body);
var actualWidth = tip[0].offsetWidth, actualHeight = tip[0].offsetHeight;
var gravity = (typeof opts.gravity == 'function') ? opts.gravity.call(this) : opts.gravity;
switch (gravity.charAt(0)) {
case 'n':
tip.css({top: pos.top + pos.height, left: pos.left + pos.width / 2 - actualWidth / 2}).addClass('tipsy-north');
break;
case 's':
tip.css({top: pos.top - actualHeight, left: pos.left + pos.width / 2 - actualWidth / 2}).addClass('tipsy-south');
break;
case 'e':
tip.css({top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left - actualWidth}).addClass('tipsy-east');
break;
case 'w':
tip.css({top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left + pos.width}).addClass('tipsy-west');
break;
}
if (opts.fade) {
tip.css({opacity: 0, display: 'block', visibility: 'visible'}).animate({opacity: 0.8});
} else {
tip.css({visibility: 'visible'});
}
}, function() {
$.data(this, 'cancel.tipsy', false);
var self = this;
setTimeout(function() {
if ($.data(this, 'cancel.tipsy')) return;
var tip = $.data(self, 'active.tipsy');
if (opts.fade) {
tip.stop().fadeOut(function() { $(this).remove(); });
} else {
tip.remove();
}
}, 100);
});
});
};
// Overwrite this method to provide options on a per-element basis.
// For example, you could store the gravity in a 'tipsy-gravity' attribute:
// return $.extend({}, options, {gravity: $(ele).attr('tipsy-gravity') || 'n' });
// (remember - do not modify 'options' in place!)
$.fn.tipsy.elementOptions = function(ele, options) {
return $.metadata ? $.extend({}, options, $(ele).metadata()) : options;
};
$.fn.tipsy.defaults = {
fade: false,
fallback: '',
gravity: 'n',
html: false,
title: 'title'
};
$.fn.tipsy.autoNS = function() {
return $(this).offset().top > ($(document).scrollTop() + $(window).height() / 2) ? 's' : 'n';
};
$.fn.tipsy.autoWE = function() {
return $(this).offset().left > ($(document).scrollLeft() + $(window).width() / 2) ? 'e' : 'w';
};
})(jQuery);
This diff is collapsed.
/*
Master Stylesheet
This file is only for importing all required stylesheets for LESS to include and then compile.
*/
// CSS Reset
@import "reset.less";
// Core
@import "bootstrap.less";
@import "scaffolding.less";
// Styled patterns and elements
@import "type.less";
@import "forms.less";
@import "tables.less";
@import "patterns.less";
/* Add additional stylesheets below
-------------------------------------------------- */
// Documentation
@import "docs.less";
\ No newline at end of file
/*
Bootstrap v1.1
Variables and mixins to bootstrap any new web development project. Modified from original version for Twitter Blueprint.
*/
/* Variables
-------------------------------------------------- */
// Links
@link-color: #0069d6;
@link-hover-color: darken(@link-color, 10);
// Grays
@white: #fff;
@gray-lighter: #ccc;
@gray-light: #777;
@gray: #555;
@gray-dark: #333;
@black: #000;
// Accent Colors
@blue: #08b5fb;
@blue-dark: #0069d6;
@green: #46a546;
@red: #9d261d;
@yellow: #ffc40d;
@orange: #f89406;
@pink: #c3325f;
@purple: #7a43b6;
// Baseline grid
@baseline: 20px;
/* Mixins
-------------------------------------------------- */
// Clearfix for clearing floats like a boss
.clearfix {
zoom: 1;
&:after {
display: block;
visibility: hidden;
height: 0;
clear: both;
content: ".";
}
}
// Floats
.right {
float: right;
}
.left {
float: left;
}
// Input placeholder text
.placeholder(@color: @gray-light) {
:-moz-placeholder {
color: @color;
}
::-webkit-input-placeholder {
color: @color;
}
}
// Font Stacks
.font(@weight: normal, @size: 14px, @lineheight: 20px) {
font-size: @size;
font-weight: @weight;
line-height: @lineheight;
}
.sans-serif(@weight: normal, @size: 14px, @lineheight: 20px) {
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
font-size: @size;
font-weight: @weight;
line-height: @lineheight;
}
.serif(@weight: normal, @size: 14px, @lineheight: 20px) {
font-family: "Georgia", Times New Roman, Times, sans-serif;
font-size: @size;
font-weight: @weight;
line-height: @lineheight;
}
.monospace(@weight: normal, @size: 12px, @lineheight: 20px) {
font-family: "Monaco", Courier New, monospace;
font-size: @size;
font-weight: @weight;
line-height: @lineheight;
}
// Grid System
@grid_columns: 16;
@grid_column_width: 40px;
@grid_gutter_width: 20px;
.columns(@column_span: 1) {
display: inline;
float: left;
width: (@grid_column_width * @column_span) + (@grid_gutter_width * (@column_span - 1));
margin-left: @grid_gutter_width;
&:first-child {
margin-left: 0;
}
}
// Border Radius
.border-radius(@radius: 5px) {
-moz-border-radius: @radius;
border-radius: @radius;
}
// Drop shadows
.box-shadow(@shadow: 0 1px 3px rgba(0,0,0,.25)) {
-webkit-box-shadow: @shadow;
-moz-box-shadow: @shadow;
box-shadow: @shadow;
}
// Transitions
.transition(@transition) {
-webkit-transition: @transition;
-moz-transition: @transition;
transition: @transition;
}
// CSS3 Content Columns
.content-columns(@column_count, @column_gap: 20px) {
-webkit-column-count: @count;
-webkit-column-gap: @gap;
-moz-column-count: @count;
-moz-column-gap: @gap;
column-count: @count;
column-gap: @gap;
}
// Buttons
.button(@color: #f9f9f9, @padding: 4px 14px, @text_color: #555, @text_shadow: 0 1px 0 rgba(255,255,255,.75), @font_size: 13px, @border_color: rgba(0,0,0,.1), @rounded: 4px) {
display: inline-block;
#gradient > .vertical-three-colors(@color, @color, 0.25, darken(@color, 10%));
padding: @padding;
text-shadow: @text_shadow;
color: @text_color;
line-height: @baseline;
border: 1px solid @border_color;
border-bottom-color: fadein(@border_color, 15%);
.border-radius(@rounded);
@shadow: inset 0 1px 0 rgba(255,255,255,.25), 0 1px 2px rgba(0,0,0,.1);
.box-shadow(@shadow);
cursor: pointer;
&:hover {
background-position: 0 -15px;
color: darken(@text_color, 10%);
text-decoration: none;
}
}
// Add an alphatransparency value to any background or border color (via Elyse Holladay)
#translucent {
.background(@color: @white, @alpha: 1) {
background-color: hsla(hue(@color), saturation(@color), lightness(@color), @alpha);
}
.border(@color: @white, @alpha: 1) {
border-color: hsla(hue(@color), saturation(@color), lightness(@color), @alpha);
background-clip: padding-box;
}
}
// Gradients
#gradient {
.horizontal(@startColor: #555, @endColor: #333) {
background-color: @endColor;
background-repeat: no-repeat;
background-image: -webkit-gradient(linear, left top, right top, from(@startColor), to(@endColor));
background-image: -webkit-linear-gradient(right center, @startColor, @endColor);
background-image: -moz-linear-gradient(right center, @startColor, @endColor);
background-image: -o-linear-gradient(left, @startColor, @endColor);
background-image: -khtml-gradient(linear, left top, right top, from(@startColor), to(@endColor));
filter: e(%("progid:DXImageTransform.Microsoft.Gradient(StartColorStr='%d', EndColorStr='%d', GradientType=1)",@startColor,@endColor));
-ms-filter: %("progid:DXImageTransform.Microsoft.gradient(startColorStr='%d', EndColorStr='%d', GradientType=1))",@startColor,@endColor);
}
.vertical(@startColor: #555, @endColor: #333) {
background-color: @endColor;
background-repeat: no-repeat;
background-image: -webkit-gradient(linear, left top, left bottom, from(@startColor), to(@endColor));
background-image: -webkit-linear-gradient(@startColor, @endColor);
background-image: -moz-linear-gradient(@startColor, @endColor);
background-image: -o-linear-gradient(top, @startColor, @endColor);
background-image: -khtml-gradient(linear, left top, left bottom, from(@startColor), to(@endColor));
filter: e(%("progid:DXImageTransform.Microsoft.Gradient(StartColorStr='%d', EndColorStr='%d', GradientType=0)",@startColor,@endColor));
-ms-filter: %("progid:DXImageTransform.Microsoft.gradient(startColorStr='%d', EndColorStr='%d', GradientType=0))",@startColor,@endColor);
}
.vertical-three-colors(@startColor: #00b3ee, @midColor: #7a43b6, @colorStop: 0.5, @endColor: #c3325f) {
background-color: @endColor;
background-repeat: no-repeat;
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(@startColor), color-stop(@colorStop, @midColor), to(@endColor));
background-image: -webkit-linear-gradient(@startColor, color-stop(@colorStop, @midColor), @endColor);
background-image: -moz-linear-gradient(@startColor, color-stop(@midColor, @colorStop), @endColor);
}
}
// Give us some love
header,
section,
footer,
article,
aside {
display: block;
}
#masthead {
margin-top: @baseline * -1;
#gradient > .vertical(darken(@blue-dark, 5%), darken(@blue, 7.5%));
div.inner {
background: transparent url(../img/grid-20px.png) 0 -1px;
padding: 40px 0;
.box-shadow(inset 0 10px 30px rgba(0,0,0,.25));
}
h1 {
margin-bottom: 0;
}
h1, p {
color: #fff;
text-shadow: 0 1px 0 rgba(0,0,0,.25);
}
p {
.font(300,20px,30px);
margin: 5px 0;
}
a.btn {
#gradient > .vertical(@purple, darken(@purple, 15%));
display: block;
margin-bottom: 20px;
padding-top: 5px;
padding-bottom: 5px;
text-align: center;
border: 0;
@shadow: inset 0 1px 0 rgba(255,255,255,.25), inset 0 -1px 0 rgba(0,0,0,.25), 0 1px 2px rgba(0,0,0,.4);
.box-shadow(@shadow);
}
small {
display: block;
text-align: center;
font-size: 13px;
line-height: @baseline;
color: rgba(255,255,255,.5);
a {
color: #fff;
}
}
}
// Body
#body {
padding: 0 0 40px;
}
// Show the grids
.show-grid {
margin-top: 20px;
margin-bottom: 20px;
.column,
.columns {
background: rgba(0,0,0,.1);
text-align: center;
.border-radius(3px);
height: 30px;
line-height: 30px;
}
&:hover {
.column,
.columns {
background: rgba(0,0,0,.25);
}
}
}
// Break up sections
section {
margin-bottom: 40px;
}
/*
Forms
Base line styles for various input types, form layouts, and states
*/
/* Global form styles
-------------------------------------------------- */
form {
// Groups of fields with labels on top (legends)
fieldset {
margin-bottom: @baseline;
padding-top: @baseline;
legend {
display: block;
margin-left: 150px;
font-size: 20px;
line-height: 1;
color: @gray-dark;
}
}
// Parent element that clears floats and wraps labels and fields together
div.clearfix {
margin-bottom: @baseline;
}
// Set font for forms
label, input, select, textarea {
.sans-serif(normal,13px,normal);
}
// Float labels left
label {
padding-top: 6px;
font-size: 13px;
line-height: 18px;
float: left;
width: 130px;
text-align: right;
}
// Shift over the inside div to align all label's relevant content
div.input {
margin-left: 150px;
}
// Checkboxs and radio buttons
input[type=checkbox],
input[type=radio] {
cursor: pointer;
}
// Inputs, Textareas, Selects
input[type=text],
input[type=password],
textarea,
select,
.uneditable-input {
display: block;
width: 210px;
margin: 0;
padding: 4px;
font-size: 13px;
line-height: @baseline;
height: @baseline;
color: @gray;
border: 1px solid #bbb;
.border-radius(3px);
}
select,
input[type=file] {
height: @baseline * 1.5;
line-height: @baseline * 1.5;
}
textarea {
height: auto;
}
.uneditable-input {
background-color: #eee;
display: block;
border-color: #ccc;
.box-shadow(inset 0 1px 2px rgba(0,0,0,.075));
}
// Focus states
input[type=text],
input[type=password],
select, textarea {
@transition: border linear .2s, box-shadow linear .2s;
.transition(@transition);
}
input[type=text]:focus,
input[type=password]:focus,
textarea:focus {
outline: none;
border-color: rgba(82,168,236,.75);
.box-shadow(0 0 8px rgba(82,168,236,.5));
}
// Error styles
div.error {
background: lighten(@red, 57%);
padding: 10px 0;
margin: -10px 0 10px;
.border-radius(4px);
@error-text: desaturate(lighten(@red, 25%), 25%);
> label {
color: @red;
}
input[type=text],
input[type=password],
textarea {
border-color: @error-text;
.box-shadow(0 0 3px rgba(171,41,32,.25));
&:focus {
border-color: darken(@error-text, 10%);
.box-shadow(0 0 6px rgba(171,41,32,.5));
}
}
div.input-prepend,
div.input-append {
span.add-on {
background: lighten(@red, 50%);
border-color: @error-text;
color: darken(@error-text, 10%);
}
}
}
// Form element sizes
.input-mini, input.mini, textarea.mini, select.mini {
width: 60px;
}
.input-small, input.small, textarea.small, select.small {
width: 90px;
}
.input-medium, input.medium, textarea.medium, select.medium {
width: 150px;
}
.input-large, input.large, textarea.large, select.large {
width: 210px;
}
.input-xlarge, input.xlarge, textarea.xlarge, select.xlarge {
width: 270px;
}
.input-xxlarge, input.xxlarge, textarea.xxlarge, select.xxlarge {
width: 530px;
}
textarea.xxlarge {
overflow-y: scroll;
}
// Turn off focus for disabled (read-only) form elements
input[readonly]:focus,
textarea[readonly]:focus,
input.disabled {
background: #f5f5f5;
border-color: #ddd;
.box-shadow(none);
}
}
// Actions (the buttons)
div.actions {
background: #f5f5f5;
margin-top: @baseline;
margin-bottom: @baseline;
padding: (@baseline - 1) 20px @baseline 150px;
border-top: 1px solid #ddd;
.border-radius(0 0 3px 3px);
div.secondary-action {
float: right;
a {
line-height: 30px;
&:hover {
text-decoration: underline;
}
}
}
}
// Help Text
.help-inline,
.help-block {
font-size: 12px;
line-height: @baseline;
color: @gray-light;
}
.help-inline {
padding-left: 5px;
}
// Big blocks of help text
.help-block {
display: block;
max-width: 600px;
h5, p, ol li {
color: @gray;
}
p, ol li {
font-size: 12px;
}
p {
margin-bottom: 0;
font-size: 12px;
line-height: @baseline;
color: @gray-light;
}
ol {
margin-bottom: 10px;
margin-left: 25px;
}
}
// Inline Fields (input fields that appear as inline objects
div.inline-inputs {
color: @gray;
span, input[type=text] {
display: inline-block;
}
input.mini {
width: 60px;
}
input.small {
width: 90px;
}
span {
padding: 0 2px 0 1px;
}
}
// Allow us to put symbols and text within the input field for a cleaner look
div.input-prepend,
div.input-append {
input[type=text] {
.border-radius(0 3px 3px 0);
}
.add-on {
background: #f5f5f5;
float: left;
display: block;
width: auto;
min-width: 16px;
padding: 5px 4px 5px 5px;
color: @gray-light;
font-weight: normal;
line-height: 18px;
height: 18px;
text-align: center;
text-shadow: 0 1px 0 #fff;
border: 1px solid #bbb;
border-right-width: 0;
.border-radius(3px 0 0 3px);
}
.active {
background: lighten(@green, 30);
border-color: @green;
}
}
div.input-append {
input[type=text] {
float: left;
.border-radius(3px 0 0 3px);
}
.add-on {
.border-radius(0 3px 3px 0);
border-right-width: 1px;
border-left-width: 0;
}
}
// Stacked options for forms (radio buttons or checkboxes)
ul.inputs-list {
margin: 0 0 5px;
width: 100%;
li {
display: block;
padding: 0;
width: 100%;
label {
display: block;
float: none;
width: auto;
padding: 0;
line-height: @baseline;
text-align: left;
white-space: normal;
strong {
color: @gray;
}
small {
font-size: 12px;
font-weight: normal !important;
}
}
ul.inputs-list {
margin-left: 25px;
margin-bottom: 10px;
padding-top: 0;
}
&:first-child {
padding-top: 5px;
}
}
input[type=radio],
input[type=checkbox] {
margin-bottom: 0;
}
}
/* Disabled states for form elements, containing elements, and help text */
div.disabled span {
color: #aaa;
}
div.disabled input[type=text],
div.disabled input[type=passsword],
div.disabled textarea {
background: #f5f5f5;
}
ul.options label.disabled,
ul.options label.disabled span,
ul.options label.disabled small,
ul.options label.disabled strong {
color: #aaa !important;
}
// Stacked forms
form.stacked-form {
h4, p {
margin: 0 0 2px;
color: rgba(0,0,0,.5);
}
fieldset {
margin: 0;
padding: 19px 0 0;
border-top-color: rgba(0,0,0,.1);
}
div.actions {
margin-left: 0;
padding: 19px 0 30px 180px;
border-top: 1px solid rgba(0,0,0,.1);
}
legend {
margin: 0;
padding: 0;
}
label {
display: block;
float: none;
width: auto;
font-weight: bold;
text-align: left;
line-height: 20px;
padding-top: 1px;
}
div.input {
margin: 0;
}
div.clearfix {
margin-bottom: 10px;
}
div.six.columns input, div.six.columns textarea, div.six.columns select {
width: 320px;
}
div.three.columns input, div.three.columns textarea, div.three.columns select {
width: 150px;
}
}
/*
Patterns.less
Repeatable UI elements outside the base styles provided from the scaffolding
*/
/* Top bar
-------------------------------------------------- */
body {
padding-top: 60px;
background-position: 0 40px;
}
div.topbar {
#gradient > .vertical(#333, #222);
position: fixed;
top: 0;
left: 0;
right: 0;
z-index: 1000;
height: 40px;
.box-shadow(0 1px 3px rgba(0,0,0,.5));
a {
color: #999;
&:hover {
color: #fff;
text-decoration: none;
background-color: rgba(255,255,255,.05);
}
}
a#logo,
ul li a {
float: left;
padding: 0 10px;
line-height: 40px;
}
// Logo
a#logo {
margin-left: -10px;
margin-right: 10px;
color: @gray-light;
font-size: 20px;
font-weight: 200;
text-shadow: 0 -1px 0 rgba(0,0,0,.25);
img {
float: left;
margin-top: 9px;
margin-right: 6px;
}
span {
}
}
// Nav items
ul {
float: left;
margin: 0;
li {
display: inline;
a {
}
&.active a {
color: #fff;
background-color: rgba(0,0,0,.5);
}
}
}
}
/* Page Headers
-------------------------------------------------- */
div.page-header {
margin-bottom: @baseline - 1;
border-bottom: 1px solid #ddd;
.border-radius(6px 6px 0 0);
.box-shadow(0 1px 0 rgba(255,255,255,.5));
h1 {
margin-bottom: 0;
}
}
/* Error Styles
-------------------------------------------------- */
// One-liner alert bars
div.alert-message {
#gradient > .vertical(transparent, rgba(0,0,0,0.15));
background-color: @gray-lighter;
margin-bottom: @baseline;
padding: 10px 15px 9px;
.border-radius(6px);
color: #fff;
border-bottom: 1px solid rgba(0,0,0,.25);
text-shadow: 0 -1px 0 rgba(0,0,0,.25);
p {
color: #fff;
margin-bottom: 0;
+ p {
margin-top: 5px;
}
}
&.error {
background-color: lighten(@red, 25%);
}
&.warning {
background-color: lighten(@yellow, 15%);
}
&.success {
background-color: lighten(@green, 15%);
}
&.info {
background-color: lighten(@blue, 15%);
}
a.close {
float: right;
margin-top: -2px;
opacity: .5;
color: #fff;
font-size: 20px;
font-weight: bold;
text-shadow: 0 1px 0 rgba(0,0,0,.5);
.border-radius(3px);
&:hover {
opacity: 1;
text-decoration: none;
}
}
}
// Block-level Alerts
div.block-message {
margin-bottom: @baseline;
padding: 14px 19px;
color: #333;
color: rgba(0,0,0,.8);
text-shadow: 0 1px 0 rgba(255,255,255,.25);
.border-radius(6px);
p {
font-size: 13px;
line-height: 18px;
color: #333;
color: rgba(0,0,0,.8);
margin-right: 30px;
margin-bottom: 0;
}
ul {
margin-bottom: 0;
}
strong {
display: block;
}
a.close {
display: block;
color: #333;
color: rgba(0,0,0,.5);
text-shadow: 0 1px 1px rgba(255,255,255,.75);
}
&.error {
background: lighten(@red, 55%);
border: 1px solid lighten(@red, 50%);
}
&.warning {
background: lighten(@yellow, 35%);
border: 1px solid lighten(@yellow, 25%)
}
&.success {
background: lighten(@green, 45%);
border: 1px solid lighten(@green, 35%)
}
&.info {
background: lighten(@blue, 45%);
border: 1px solid lighten(@blue, 40%);
}
}
/* Navigation
-------------------------------------------------- */
// Common tab and pill styles
ul.tabs,
ul.pills {
margin: 0 0 20px;
padding: 0;
.clearfix();
li {
display: inline;
a {
display: inline;
float: left;
width: auto;
}
}
}
// Basic Tabs
ul.tabs {
width: 100%;
border-bottom: 1px solid #ccc;
li {
a {
margin-bottom: -1px;
margin-right: 2px;
padding: 0 15px;
line-height: (@baseline * 2) - 1;
.border-radius(3px 3px 0 0);
&:hover {
background: #f5f5f5;
border-bottom: 1px solid #ccc;
}
}
&.active a {
background: #fff;
padding: 0 14px;
border: 1px solid #ccc;
border-bottom: 0;
color: @gray;
}
}
}
// Basic pill nav
ul.pills {
li {
a {
margin: 5px 3px 5px 0;
padding: 0 15px;
text-shadow: 0 1px 1px #fff;
line-height: 30px;
.border-radius(15px);
&:hover {
background: @link-hover-color;
color: #fff;
text-decoration: none;
text-shadow: 0 1px 1px rgba(0,0,0,.25);
}
}
&.active a {
background: @link-color;
color: #fff;
text-shadow: 0 1px 1px rgba(0,0,0,.25);
}
}
}
/* Pagination
-------------------------------------------------- */
div.pagination {
height: @baseline * 2;
margin: @baseline 0;
ul {
float: left;
margin: 0;
border: 1px solid rgba(0,0,0,.15);
.border-radius(3px);
.box-shadow(0 1px 2px rgba(0,0,0,.075);
li {
display: inline;
a {
display: inline;
float: left;
padding: 0 14px;
line-height: (@baseline * 2) - 2;
border-right: 1px solid rgba(0,0,0,.15);
text-decoration: none;
}
a:hover,
&.active a {
background-color: lighten(@blue, 45%);
}
&.disabled a,
&.disabled a:hover {
background-color: none;
color: @gray-light;
}
&.next a,
&:last-child a {
border: 0;
}
}
}
}
/* Wells
-------------------------------------------------- */
div.well {
background: #f5f5f5;
margin-bottom: 20px;
padding: 19px;
min-height: 20px;
border: 1px solid #ddd;
.border-radius(4px);
.box-shadow(inset 0 1px 1px rgba(0,0,0,.075);
}
/*--------------------------------------------------
Global Reset
Props to Eric Meyer (meyerweb.com) for his CSS
reset file. We're using an adapted version here
that cuts out some of the reset HTML elements we
will never need here (i.e., dfn, samp, etc).
-------------------------------------------------- */
html, body { margin: 0; padding: 0; }
h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, cite, code, del, dfn, em, img, q, s, samp, small, strike, strong, sub, sup, tt, var, dd, dl, dt, li, ol, ul, fieldset, form, label, legend, button, table, caption, tbody, tfoot, thead, tr, th, td { margin: 0; padding: 0; border: 0; font-weight: normal; font-style: normal; font-size: 100%; line-height: 1; font-family: inherit; }
table { border-collapse: collapse; border-spacing: 0; }
ol, ul { list-style: none; }
q:before, q:after, blockquote:before, blockquote:after { content: ""; }
\ No newline at end of file
/*
Scaffolding
Basic and global styles for generating a grid system, structural layout, and page templates
*/
/* Baseline Grid System
-------------------------------------------------- */
div.row {
.clearfix;
div.span1 { .columns(1); }
div.span2 { .columns(2); }
div.span3 { .columns(3); }
div.span4 { .columns(4); }
div.span5 { .columns(5); }
div.span6 { .columns(6); }
div.span7 { .columns(7); }
div.span8 { .columns(8); }
div.span9 { .columns(9); }
div.span10 { .columns(10); }
div.span11 { .columns(11); }
div.span12 { .columns(12); }
div.span13 { .columns(13); }
div.span14 { .columns(14); }
div.span15 { .columns(15); }
div.span16 { .columns(16); }
}
/* Structural Layout
-------------------------------------------------- */
html, body {
background-color: #fff;
}
body {
#gradient > .vertical-three-colors(#eee, #fff, 0.25, #fff);
background-attachment: fixed;
margin: 0;
.sans-serif(normal,14px,20px);
color: @gray;
text-rendering: optimizeLegibility;
.box-shadow(inset 0 1px 0 #fff);
}
// Containers
div.container {
width: 940px;
margin: 0 auto;
}
/* Base Styles
-------------------------------------------------- */
// Links
a {
color: @link-color;
text-decoration: none;
line-height: inherit;
&:hover {
color: @link-hover-color;
text-decoration: underline;
}
}
// Buttons
.btn {
.button();
&.primary {
#gradient > .vertical(@blue, @blue-dark);
color: #fff;
text-shadow: 0 -1px 0 rgba(0,0,0,.25);
&:hover {
color: #fff;
}
}
&.large {
font-size: 16px;
line-height: 30px;
.border-radius(6px);
}
&.small {
padding-right: 9px;
padding-left: 9px;
font-size: 11px;
line-height: 16px;
}
}
// Help Firefox not be a douche about adding extra padding to buttons
button.btn,
input[type=submit].btn {
&::-moz-focus-inner {
padding: 0;
border: 0;
}
}
/*
Tables
*/
/* Baseline styles
-------------------------------------------------- */
table {
width: 100%;
margin-bottom: @baseline;
padding: 0;
text-align: left;
border-collapse: separate;
th, td {
// #translucent > .background(@green, .15);
padding: 10px 10px 9px;
line-height: @baseline;
vertical-align: middle;
border-bottom: 1px solid #ddd;
}
th {
padding-top: 9px;
font-weight: bold;
border-bottom-width: 2px;
}
}
/* Zebra-striping
-------------------------------------------------- */
// Default zebra-stripe styles (alternating gray and transparent backgrounds)
table.zebra-striped {
tbody {
tr:nth-child(odd) td {
background-color: #f5f5f5;
}
tr:hover td {
background-color: #f1f1f1;
}
}
// Tablesorting styles w/ jQuery plugin
th.header { // For tablesorter tables, make THs have a pointer on hover
cursor: pointer;
padding-right: 20px;
}
th.headerSortUp,
th.headerSortDown { // Style the sorted column headers (THs)
background-image: url(../img/tablesorter-indicators.png);
background-position: right -23px;
background-repeat: no-repeat;
background-color: rgba(141,192,219,.25);
.border-radius(3px 3px 0 0);
text-shadow: 0 1px 1px rgba(255,255,255,.75);
}
th.header:hover { // Style the ascending (reverse alphabetical) column header
background-image: url(../img/tablesorter-indicators.png);
background-position: right 15px;
background-repeat: no-repeat;
}
th.actions:hover {
background-image: none !important;
}
th.headerSortDown,
th.headerSortDown:hover { // Style the descending (alphabetical) column header
background-position: right -25px;
}
th.headerSortUp,
th.headerSortUp:hover { // Style the ascending (reverse alphabetical) column header
background-position: right -65px;
}
// Blue Table Headings
th.blue {
color: @blue;
border-bottom-color: @blue;
}
th.headerSortUp.blue, th.headerSortDown.blue {
background-color: lighten(@blue, 40%);
}
// Green Table Headings
th.green {
color: @green;
border-bottom-color: @green;
}
th.headerSortUp.green, th.headerSortDown.green { // backround color is 20% of border color
background-color: lighten(@green, 40%);
}
// Red Table Headings
th.red {
color: @red;
border-bottom-color: @red;
}
th.headerSortUp.red, th.headerSortDown.red { // backround color is 20% of border color
background-color: lighten(@red, 50%);
}
// Yellow Table Headings
th.yellow {
color: @yellow;
border-bottom-color: @yellow;
}
th.headerSortUp.yellow, th.headerSortDown.yellow { // backround color is 20% of border color
background-color: lighten(@yellow, 40%);
}
// Orange Table Headings
th.orange {
color: @orange;
border-bottom-color: @orange;
}
th.headerSortUp.orange, th.headerSortDown.orange { // backround color is 20% of border color
background-color: lighten(@orange, 40%);
}
// Purple Table Headings
th.purple {
color: @purple;
border-bottom-color: @purple;
}
th.headerSortUp.purple, th.headerSortDown.purple { // backround color is 20% of border color
background-color: lighten(@purple, 40%);
}
}
/*
Typography
Headings, body text, lists, code, and more for a versatile and durable typography system
*/
/* Body text
-------------------------------------------------- */
p {
.font(normal,14px,@baseline);
margin-bottom: @baseline;
small {
font-size: 12px;
color: @gray-light;
}
}
/* Headings
-------------------------------------------------- */
h1, h2, h3, h4, h5, h6 {
font-weight: 500;
color: @gray-dark;
small {
color: @gray-light;
}
}
h1 {
margin-bottom: @baseline;
font-size: 30px;
line-height: @baseline * 2;
small {
font-size: 18px;
}
}
h2 {
font-size: 24px;
line-height: @baseline * 2;
small {
font-size: 14px;
}
}
h3, h4, h5, h6 {
line-height: @baseline * 2;
}
h3 {
font-size: 18px;
small {
font-size: 14px;
}
}
h4 {
font-size: 16px;
small {
font-size: 12px;
}
}
h5 {
font-size: 14px;
}
h6 {
font-size: 13px;
color: @gray-light;
text-transform: uppercase;
}
/* Colors
-------------------------------------------------- */
// Unordered and Ordered lists
ul, ol {
margin: 0 0 @baseline 25px;
}
ul ul,
ul ol,
ol ol,
ol ul {
margin-bottom: 0;
}
ul {
list-style: disc;
}
ol {
list-style: decimal;
}
li {
line-height: @baseline;
color: @gray;
}
ul.unstyled {
list-style: none;
margin-left: 0;
}
// Description Lists
dl {
margin-bottom: @baseline;
dt, dd {
line-height: @baseline;
}
dt {
font-weight: bold;
}
dd {
margin-left: @baseline / 2;
}
}
/* Misc
-------------------------------------------------- */
// Labels
span.label {
background-color: #ccc;
padding: 3px 5px;
font-size: 10px;
font-weight: bold;
color: #fff;
text-shadow: 0 0 1px rgba(0,0,0,.01);
text-transform: uppercase;
.border-radius(3px);
&.expired {
background-color: #f5f5f5;
color: #999;
}
&.pending {
background-color: #48489b;
}
&.declined {
background-color: #9b4848;
}
&.active,
&.approved {
background-color: #59bf59;
}
&.disabled {
background-color: #faa226;
}
&.scheduled {
background-color: #f5f5f5;
color: #59bf59;
text-shadow: 0 1px 0 rgba(255,255,255,.5);
}
}
// Horizontal rules
hr {
margin: 0 0 19px;
border: 0;
border-bottom: 1px solid #eee;
}
// Emphasis
strong {
font-style: inherit;
font-weight: bold;
line-height: inherit;
}
em {
font-style: italic;
font-weight: inherit;
line-height: inherit;
}
.muted {
color: @gray-lighter;
}
// Blockquotes
blockquote {
margin-bottom: @baseline;
border-left: 5px solid #eee;
padding-left: 15px;
p {
.font(300,14px,@baseline);
margin-bottom: 0;
}
cite {
display: block;
.font(300,12px,@baseline);
color: @gray-light;
&:before {
content: '\2014 \00A0';
}
}
}
// Addresses
address {
display: block;
line-height: @baseline;
margin-bottom: @baseline;
}
// Inline and block code styles
code, pre {
padding: 0 3px 2px;
font-family: Monaco, Andale Mono, Courier New, monospace;
font-size: 12px;
.border-radius(3px);
}
code {
background-color: lighten(@orange, 40%);
color: rgba(0,0,0,.75);
padding: 2px 3px;
}
pre {
background-color: #f5f5f5;
display: block;
padding: @baseline - 1;
margin: 0 0 @baseline;
line-height: @baseline;
font-size: 12px;
border: 1px solid rgba(0,0,0,.15);
.border-radius(3px);
white-space: pre-wrap;
}
// Code block styling from Chili
pre.css, pre.html {
background-color: #fff;
}
pre ol {
background-color: lighten(@orange, 42%);
list-style: decimal;
margin: (@baseline - 1) * -1;
padding-left: 59px;
.border-radius(2px);
li {
background-color: #fff;
padding: 0 10px;
border-left: 1px solid rgba(0,0,0,.1);
border-left-color: lighten(@orange, 35%);
font-size: 11px;
line-height: @baseline;
color: @gray-light;
text-shadow: 0 1px 1px rgba(255,255,255,.5);
word-wrap: break-word;
&:hover {
}
&:first-child {
padding-top: 9px;
}
&:last-child {
padding-bottom: 9px;
}
}
}
// Language Styles
span.html__tag_start,
span.html__tag_end { color: #277ac1; font-weight: normal; }
span.html__attr_name { color: #d78b41; }
span.html__attr_value { color: #de4a3f; }
TODOS
* Write "Using Twitter BP" section
** Two ways to use: LESS.js or compiled
** Not meant to be 100% bulletproof, but is 90% bulletproof (stats?)
** Advanced framework for fast prototyping, internal app development, bootstraping new websites
** Can be easily modified to provide more legacy support
* Add grid examples back in
* Cross browser checks? Show this anywhere?
* Add layouts section back in
* Point JS libraries to public library links instead of within the repo
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment