├── favicon.ico ├── core ├── config.php ├── banned.php ├── daily.php ├── dnsbl.php ├── wallet.php ├── functions.php ├── adscaptchalib.inc ├── faucet.sql ├── address.inc └── recaptchalib.inc ├── lib ├── db.sql ├── bootstrap.less ├── variables.less ├── scaffolding.less ├── type.less ├── reset.less ├── tables.less ├── mixins.less ├── forms.less └── patterns.less ├── update ├── updateaddresses.php ├── updateround.php ├── updatetotal.php └── updateroundltc.php ├── templates ├── footer.php ├── sidebar.php ├── servsidebar.php └── header.php ├── .gitattributes ├── readme.txt ├── index.php ├── js ├── tests │ ├── unit │ │ ├── bootstrap-scrollspy.js │ │ ├── bootstrap-alerts.js │ │ ├── bootstrap-buttons.js │ │ ├── bootstrap-dropdown.js │ │ ├── bootstrap-tabs.js │ │ ├── bootstrap-popover.js │ │ ├── bootstrap-twipsy.js │ │ └── bootstrap-modal.js │ ├── index.html │ └── vendor │ │ └── qunit.css ├── bootstrap-buttons.js ├── bootstrap-tabs.js ├── bootstrap-popover.js ├── bootstrap-dropdown.js ├── bootstrap-scrollspy.js ├── bootstrap-alerts.js ├── bootstrap-modal.js ├── bootstrap-twipsy.js └── less-1.1.5.min.js ├── .gitignore ├── submitted.php └── server.php /favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Greedi/litecoin-faucet/HEAD/favicon.ico -------------------------------------------------------------------------------- /core/config.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Greedi/litecoin-faucet/HEAD/core/config.php -------------------------------------------------------------------------------- /lib/db.sql: -------------------------------------------------------------------------------- 1 | CREATE TABLE `litecoin`.`instaltc` ( 2 | `id` INT( 5 ) NOT NULL AUTO_INCREMENT , 3 | `ltcaddress` CHAR( 34 ) NOT NULL , 4 | `salt` CHAR( 10 ) NOT NULL , 5 | `url` CHAR( 64 ) NOT NULL , 6 | PRIMARY KEY ( `id` ) 7 | ) ENGINE = MYISAM ; -------------------------------------------------------------------------------- /core/banned.php: -------------------------------------------------------------------------------- 1 | You are banned sucka!
12 | #litecoin @ FreeNode"); 13 | } 14 | ?> -------------------------------------------------------------------------------- /update/updateaddresses.php: -------------------------------------------------------------------------------- 1 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /update/updateround.php: -------------------------------------------------------------------------------- 1 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /update/updatetotal.php: -------------------------------------------------------------------------------- 1 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /update/updateroundltc.php: -------------------------------------------------------------------------------- 1 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /core/daily.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /templates/footer.php: -------------------------------------------------------------------------------- 1 |
2 | 3 | 4 | 5 | 9 |
10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | 4 | # Custom for Visual Studio 5 | *.cs diff=csharp 6 | *.sln merge=union 7 | *.csproj merge=union 8 | *.vbproj merge=union 9 | *.fsproj merge=union 10 | *.dbproj merge=union 11 | 12 | # Standard to msysgit 13 | *.doc diff=astextplain 14 | *.DOC diff=astextplain 15 | *.docx diff=astextplain 16 | *.DOCX diff=astextplain 17 | *.dot diff=astextplain 18 | *.DOT diff=astextplain 19 | *.pdf diff=astextplain 20 | *.PDF diff=astextplain 21 | *.rtf diff=astextplain 22 | *.RTF diff=astextplain 23 | -------------------------------------------------------------------------------- /core/dnsbl.php: -------------------------------------------------------------------------------- 1 | setBlacklists(array( 10 | 'sbl-xbl.spamhaus.org', 11 | 'bl.spamcop.net', 12 | 'dnsbl-1.uceprotect.net', 13 | 'dnsbl-2.uceprotect.net', 14 | 'dnsbl-3.uceprotect.net', 15 | 'zen.spamhaus.org', 16 | 'rbl.efnetrbl.org')); 17 | 18 | function checkIP($ip) 19 | { 20 | global $dnsbl; 21 | if ($dnsbl->isListed($ip)) { 22 | return true; 23 | } else { 24 | return false; 25 | } 26 | } 27 | ?> -------------------------------------------------------------------------------- /lib/bootstrap.less: -------------------------------------------------------------------------------- 1 | /*! 2 | * Bootstrap @VERSION 3 | * 4 | * Copyright 2011 Twitter, Inc 5 | * Licensed under the Apache License v2.0 6 | * http://www.apache.org/licenses/LICENSE-2.0 7 | * 8 | * Designed and built with all the love in the world @twitter by @mdo and @fat. 9 | * Date: @DATE 10 | */ 11 | 12 | // CSS Reset 13 | @import "reset.less"; 14 | 15 | // Core variables and mixins 16 | @import "variables.less"; // Modify this for custom colors, font-sizes, etc 17 | @import "mixins.less"; 18 | 19 | // Grid system and page structure 20 | @import "scaffolding.less"; 21 | 22 | // Styled patterns and elements 23 | @import "type.less"; 24 | @import "forms.less"; 25 | @import "tables.less"; 26 | @import "patterns.less"; -------------------------------------------------------------------------------- /templates/sidebar.php: -------------------------------------------------------------------------------- 1 |
2 | 6 |

Faucet statistics

7 | 8 | 9 | 10 | 11 | 12 |
Submitted This Round: ' . $rows2 . '
Current Payout: ' . $roundltc . ' LTC
Current Round: ' . $round . ' LTC
Total Payout: ' . $dailytotal . ' LTC
'; 13 | ?> 14 | 15 |
16 |

Put your own stuff here.

17 | 18 |
19 | 20 | 21 |
22 | -------------------------------------------------------------------------------- /readme.txt: -------------------------------------------------------------------------------- 1 | litecoin faucet public release 2 | ------------------------------------------ 3 | Forum Thread: http://forum.litecoin.net/index.php/topic,533.0.html 4 | this is the simplest version of it, other might get released in time 5 | 6 | made by Greedi 2012 (c) 7 | 8 | 9 | INSTALL: 10 | put files in www dir, edit config.php with proper values 11 | and dont forget faucet.sql for the db... 12 | in templates/header.php you have to set you're IP, so you can see server link. 13 | the same in server.php, set you're IP, so you can access to page. 14 | 15 | NOTE: Some wil maybe have to create the faucet donation account in there litecoind 16 | account have to be FaucetDonations and/or SendOut 17 | 18 | 19 | Donate: 20 | LTC: Lh4c3cYcmvoksUNJLFT2Z5zsUmKUFgAUF5 21 | BTC: 1MFH5dY85Ve4Q6KYPGJnfPmiHP2UxmXend -------------------------------------------------------------------------------- /core/wallet.php: -------------------------------------------------------------------------------- 1 | getinfo(); 22 | 23 | //$this->PDO_Conn = new PDO("mysql:host={$sqllogin['host']};dbname={$sqllogin['dbname']}", $sqllogin['username'], $sqllogin['password']); 24 | $dbconn = mysql_connect($sqlogin['host'],$sqlogin['username'],$sqlogin['password']); 25 | mysql_select_db($sqlogin['dbname']); 26 | 27 | // time for pages .. 28 | 29 | 30 | 31 | 32 | ?> -------------------------------------------------------------------------------- /index.php: -------------------------------------------------------------------------------- 1 | 13 |
14 |
15 |
Payout will happen when there are atleast ** submitted!
17 | You can only enter once per round, if we detect the same IP or a proxy, you\'ll not be paid.'; 18 | ?> 19 | 20 | 23 |

24 |
25 | Your Litecoin Address Here: 26 | 27 | 30 | 31 |
32 |
33 | 37 | 38 | -------------------------------------------------------------------------------- /core/functions.php: -------------------------------------------------------------------------------- 1 |

' . $srserror . '

'; 30 | } 31 | function srserr($srserror) { 32 | return '

' . $srserror . '

'; 33 | } 34 | ?> -------------------------------------------------------------------------------- /js/tests/unit/bootstrap-scrollspy.js: -------------------------------------------------------------------------------- 1 | $(function () { 2 | 3 | module("bootstrap-scrollspy") 4 | 5 | test("should be defined on jquery object", function () { 6 | ok($(document.body).scrollspy, 'scrollspy method is defined') 7 | }) 8 | 9 | test("should return element", function () { 10 | ok($(document.body).scrollspy()[0] == document.body, 'document.body returned') 11 | }) 12 | 13 | test("should switch active class on scroll", function () { 14 | var sectionHTML = '
' 15 | , $section = $(sectionHTML).append('#qunit-runoff') 16 | , topbarHTML ='
' 17 | + '
' 18 | + '
' 19 | + '

Bootstrap

' 20 | + '' 23 | + '
' 24 | + '
' 25 | + '
' 26 | , $topbar = $(topbarHTML).topbar() 27 | 28 | ok(topbar.find('.active', true) 29 | }) 30 | 31 | }) -------------------------------------------------------------------------------- /templates/servsidebar.php: -------------------------------------------------------------------------------- 1 | 9 |
10 | 11 | 14 |

Litecoin statistics

15 | 16 | 18 | 19 |
Block count: ' . number_format($derp['blocks']) . 17 | '
Difficulty: ' . $derp['difficulty'] . '
'; 20 | ?> 21 |
22 | 25 |

Faucet statistics

26 | 27 | 28 | 29 | 30 | 31 | 32 |
Submitted This Round: ' . $rows2 . '
Current Payout: ' . $roundltc . ' LTC
Current Round: ' . $round . ' LTC
Total Payout: ' . $dailytotal . ' LTC
Total Submitted: ' . $subrows . '
'; 33 | 34 | ?> 35 | -------------------------------------------------------------------------------- /js/tests/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Bootstrap Plugin Test Suite 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 |
33 |

Bootstrap Plugin Test Suite

34 |

35 |

36 |
    37 |
    38 |
    39 | 40 | -------------------------------------------------------------------------------- /js/tests/unit/bootstrap-alerts.js: -------------------------------------------------------------------------------- 1 | $(function () { 2 | 3 | module("bootstrap-alerts") 4 | 5 | test("should be defined on jquery object", function () { 6 | ok($(document.body).alert, 'alert method is defined') 7 | }) 8 | 9 | test("should return element", function () { 10 | ok($(document.body).alert()[0] == document.body, 'document.body returned') 11 | }) 12 | 13 | test("should fade element out on clicking .close", function () { 14 | var alertHTML = '
    ' 15 | + '×' 16 | + '

    Holy guacamole! Best check yo self, you’re not looking too good.

    ' 17 | + '
    ' 18 | , alert = $(alertHTML).alert() 19 | 20 | alert.find('.close').click() 21 | 22 | ok(!alert.hasClass('in'), 'remove .in class on .close click') 23 | }) 24 | 25 | test("should remove element when clicking .close", function () { 26 | $.support.transition = false 27 | 28 | var alertHTML = '
    ' 29 | + '×' 30 | + '

    Holy guacamole! Best check yo self, you’re not looking too good.

    ' 31 | + '
    ' 32 | , alert = $(alertHTML).appendTo('#qunit-runoff').alert() 33 | 34 | ok($('#qunit-runoff').find('.alert-message').length, 'element added to dom') 35 | 36 | alert.find('.close').click() 37 | 38 | ok(!$('#qunit-runoff').find('.alert-message').length, 'element removed from dom') 39 | }) 40 | 41 | }) -------------------------------------------------------------------------------- /js/tests/unit/bootstrap-buttons.js: -------------------------------------------------------------------------------- 1 | $(function () { 2 | 3 | module("bootstrap-buttons") 4 | 5 | test("should be defined on jquery object", function () { 6 | ok($(document.body).button, 'tabs method is defined') 7 | }) 8 | 9 | test("should return element", function () { 10 | ok($(document.body).button()[0] == document.body, 'document.body returned') 11 | }) 12 | 13 | test("should return set state to loading", function () { 14 | var btn = $('') 15 | equals(btn.html(), 'mdo', 'btn text equals mdo') 16 | btn.button('loading') 17 | equals(btn.html(), 'fat', 'btn text equals fat') 18 | ok(btn.attr('disabled'), 'btn is disabled') 19 | ok(btn.hasClass('disabled'), 'btn has disabled class') 20 | }) 21 | 22 | test("should return reset state", function () { 23 | var btn = $('') 24 | equals(btn.html(), 'mdo', 'btn text equals mdo') 25 | btn.button('loading') 26 | equals(btn.html(), 'fat', 'btn text equals fat') 27 | ok(btn.attr('disabled'), 'btn is disabled') 28 | ok(btn.hasClass('disabled'), 'btn is disabled') 29 | btn.button('reset') 30 | equals(btn.html(), 'mdo', 'btn text equals mdo') 31 | ok(!btn.attr('disabled'), 'btn is not disabled') 32 | ok(!btn.hasClass('disabled'), 'btn does not have disabled class') 33 | }) 34 | 35 | test("should toggle active", function () { 36 | var btn = $('') 37 | ok(!btn.hasClass('active'), 'btn does not have active class') 38 | btn.button('toggle') 39 | ok(btn.hasClass('active'), 'btn has class active') 40 | }) 41 | 42 | }) -------------------------------------------------------------------------------- /js/bootstrap-buttons.js: -------------------------------------------------------------------------------- 1 | /* ============================================================ 2 | * bootstrap-buttons.js v1.4.0 3 | * http://twitter.github.com/bootstrap/javascript.html#buttons 4 | * ============================================================ 5 | * Copyright 2011 Twitter, Inc. 6 | * 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | * ============================================================ */ 19 | 20 | !function( $ ){ 21 | 22 | "use strict" 23 | 24 | function setState(el, state) { 25 | var d = 'disabled' 26 | , $el = $(el) 27 | , data = $el.data() 28 | 29 | state = state + 'Text' 30 | data.resetText || $el.data('resetText', $el.html()) 31 | 32 | $el.html( data[state] || $.fn.button.defaults[state] ) 33 | 34 | setTimeout(function () { 35 | state == 'loadingText' ? 36 | $el.addClass(d).attr(d, d) : 37 | $el.removeClass(d).removeAttr(d) 38 | }, 0) 39 | } 40 | 41 | function toggle(el) { 42 | $(el).toggleClass('active') 43 | } 44 | 45 | $.fn.button = function(options) { 46 | return this.each(function () { 47 | if (options == 'toggle') { 48 | return toggle(this) 49 | } 50 | options && setState(this, options) 51 | }) 52 | } 53 | 54 | $.fn.button.defaults = { 55 | loadingText: 'loading...' 56 | } 57 | 58 | $(function () { 59 | $('body').delegate('.btn[data-toggle]', 'click', function () { 60 | $(this).button('toggle') 61 | }) 62 | }) 63 | 64 | }( window.jQuery || window.ender ); -------------------------------------------------------------------------------- /js/tests/unit/bootstrap-dropdown.js: -------------------------------------------------------------------------------- 1 | $(function () { 2 | 3 | module("bootstrap-dropdowns") 4 | 5 | test("should be defined on jquery object", function () { 6 | ok($(document.body).dropdown, 'dropdown method is defined') 7 | }) 8 | 9 | test("should return element", function () { 10 | ok($(document.body).dropdown()[0] == document.body, 'document.body returned') 11 | }) 12 | 13 | test("should add class open to menu if clicked", function () { 14 | var dropdownHTML = '' 25 | , dropdown = $(dropdownHTML).dropdown() 26 | 27 | dropdown.find('.dropdown-toggle').click() 28 | ok(dropdown.find('.dropdown').hasClass('open'), 'open class added on click') 29 | }) 30 | 31 | test("should remove open class if body clicked", function () { 32 | var dropdownHTML = '' 43 | , dropdown = $(dropdownHTML).dropdown().appendTo('#qunit-runoff') 44 | 45 | dropdown.find('.dropdown-toggle').click() 46 | ok(dropdown.find('.dropdown').hasClass('open'), 'open class added on click') 47 | $('body').click() 48 | ok(!dropdown.find('.dropdown').hasClass('open'), 'open class removed') 49 | dropdown.remove() 50 | }) 51 | 52 | }) -------------------------------------------------------------------------------- /lib/variables.less: -------------------------------------------------------------------------------- 1 | /* Variables.less 2 | * Variables to customize the look and feel of Bootstrap 3 | * ----------------------------------------------------- */ 4 | 5 | 6 | // Links 7 | @linkColor: #0069d6; 8 | @linkColorHover: darken(@linkColor, 15); 9 | 10 | // Grays 11 | @black: #000; 12 | @grayDark: lighten(@black, 25%); 13 | @gray: lighten(@black, 50%); 14 | @grayLight: lighten(@black, 75%); 15 | @grayLighter: lighten(@black, 90%); 16 | @white: #fff; 17 | 18 | // Accent Colors 19 | @blue: #049CDB; 20 | @blueDark: #0064CD; 21 | @green: #46a546; 22 | @red: #9d261d; 23 | @yellow: #ffc40d; 24 | @orange: #f89406; 25 | @pink: #c3325f; 26 | @purple: #7a43b6; 27 | 28 | // Baseline grid 29 | @basefont: 13px; 30 | @baseline: 18px; 31 | 32 | // Griditude 33 | // Modify the grid styles in mixins.less 34 | @gridColumns: 16; 35 | @gridColumnWidth: 40px; 36 | @gridGutterWidth: 20px; 37 | @extraSpace: (@gridGutterWidth * 2); // For our grid calculations 38 | @siteWidth: (@gridColumns * @gridColumnWidth) + (@gridGutterWidth * (@gridColumns - 1)); 39 | 40 | // Color Scheme 41 | // Use this to roll your own color schemes if you like (unused by Bootstrap by default) 42 | @baseColor: @blue; // Set a base color 43 | @complement: spin(@baseColor, 180); // Determine a complementary color 44 | @split1: spin(@baseColor, 158); // Split complements 45 | @split2: spin(@baseColor, -158); 46 | @triad1: spin(@baseColor, 135); // Triads colors 47 | @triad2: spin(@baseColor, -135); 48 | @tetra1: spin(@baseColor, 90); // Tetra colors 49 | @tetra2: spin(@baseColor, -90); 50 | @analog1: spin(@baseColor, 22); // Analogs colors 51 | @analog2: spin(@baseColor, -22); 52 | 53 | 54 | 55 | // More variables coming soon: 56 | // - @basefont to @baseFontSize 57 | // - @baseline to @baseLineHeight 58 | // - @baseFontFamily 59 | // - @primaryButtonColor 60 | // - anything else? File an issue on GitHub -------------------------------------------------------------------------------- /js/bootstrap-tabs.js: -------------------------------------------------------------------------------- 1 | /* ======================================================== 2 | * bootstrap-tabs.js v1.4.0 3 | * http://twitter.github.com/bootstrap/javascript.html#tabs 4 | * ======================================================== 5 | * Copyright 2011 Twitter, Inc. 6 | * 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | * ======================================================== */ 19 | 20 | 21 | !function( $ ){ 22 | 23 | "use strict" 24 | 25 | function activate ( element, container ) { 26 | container 27 | .find('> .active') 28 | .removeClass('active') 29 | .find('> .dropdown-menu > .active') 30 | .removeClass('active') 31 | 32 | element.addClass('active') 33 | 34 | if ( element.parent('.dropdown-menu') ) { 35 | element.closest('li.dropdown').addClass('active') 36 | } 37 | } 38 | 39 | function tab( e ) { 40 | var $this = $(this) 41 | , $ul = $this.closest('ul:not(.dropdown-menu)') 42 | , href = $this.attr('href') 43 | , previous 44 | , $href 45 | 46 | if ( /^#\w+/.test(href) ) { 47 | e.preventDefault() 48 | 49 | if ( $this.parent('li').hasClass('active') ) { 50 | return 51 | } 52 | 53 | previous = $ul.find('.active a').last()[0] 54 | $href = $(href) 55 | 56 | activate($this.parent('li'), $ul) 57 | activate($href, $href.parent()) 58 | 59 | $this.trigger({ 60 | type: 'change' 61 | , relatedTarget: previous 62 | }) 63 | } 64 | } 65 | 66 | 67 | /* TABS/PILLS PLUGIN DEFINITION 68 | * ============================ */ 69 | 70 | $.fn.tabs = $.fn.pills = function ( selector ) { 71 | return this.each(function () { 72 | $(this).delegate(selector || '.tabs li > a, .pills > li > a', 'click', tab) 73 | }) 74 | } 75 | 76 | $(document).ready(function () { 77 | $('body').tabs('ul[data-tabs] li > a, ul[data-pills] > li > a') 78 | }) 79 | 80 | }( window.jQuery || window.ender ); 81 | -------------------------------------------------------------------------------- /core/adscaptchalib.inc: -------------------------------------------------------------------------------- 1 | \n"; 15 | $result .= "\n"; 22 | 23 | return $result; 24 | } 25 | 26 | function ValidateCaptcha($captchaId, $privateKey, $challengeValue, $responseValue, $remoteAddress) { 27 | global $ADSCAPTCHA_API; 28 | 29 | $host = $ADSCAPTCHA_API; 30 | $path = "/Validate.aspx"; 31 | 32 | $params = "CaptchaId=" . $captchaId . "&PrivateKey=" . $privateKey . "&ChallengeCode=" . $challengeValue . "&UserResponse=" . $responseValue . "&RemoteAddress=" . $remoteAddress; 33 | 34 | $result = HttpPost($host, $path, $params); 35 | 36 | return $result; 37 | } 38 | 39 | function FixEncoding($str) { 40 | $curr_encoding = mb_detect_encoding($str) ; 41 | 42 | if($curr_encoding == "UTF-8" && mb_check_encoding($str,"UTF-8")) { 43 | return $str; 44 | } else { 45 | return utf8_encode($str); 46 | } 47 | } 48 | 49 | function HttpPost($host, $path, $data, $port = 80) { 50 | $data = FixEncoding($data); 51 | 52 | $http_request = "POST $path HTTP/1.0\r\n"; 53 | $http_request .= "Host: $host\r\n"; 54 | $http_request .= "Content-Type: application/x-www-form-urlencoded\r\n"; 55 | $http_request .= "Content-Length: " . strlen($data) . "\r\n"; 56 | $http_request .= "\r\n"; 57 | $http_request .= $data; 58 | 59 | $response = ''; 60 | if (($fs = @fsockopen($host, $port, $errno, $errstr, 10)) == false) { 61 | die ('Could not open socket! ' . $errstr); 62 | } 63 | 64 | fwrite($fs, $http_request); 65 | 66 | while (!feof($fs)) 67 | $response .= fgets($fs, 1160); 68 | fclose($fs); 69 | 70 | $response = explode("\r\n\r\n", $response, 2); 71 | return $response[1]; 72 | } 73 | ?> -------------------------------------------------------------------------------- /js/tests/unit/bootstrap-tabs.js: -------------------------------------------------------------------------------- 1 | $(function () { 2 | 3 | module("bootstrap-tabs") 4 | 5 | test("should be defined on jquery object", function () { 6 | ok($(document.body).tabs, 'tabs method is defined') 7 | }) 8 | 9 | test("should return element", function () { 10 | ok($(document.body).tabs()[0] == document.body, 'document.body returned') 11 | }) 12 | 13 | test("should activate element by tab id", function () { 14 | var $tabsHTML = $('') 18 | 19 | 20 | $('').appendTo("#qunit-runoff") 21 | 22 | $tabsHTML.tabs().find('a').last().click() 23 | equals($("#qunit-runoff").find('.active').attr('id'), "profile") 24 | 25 | $tabsHTML.tabs().find('a').first().click() 26 | equals($("#qunit-runoff").find('.active').attr('id'), "home") 27 | 28 | $("#qunit-runoff").empty() 29 | }) 30 | 31 | test("should activate element by pill id", function () { 32 | var $pillsHTML = $('') 36 | 37 | 38 | $('').appendTo("#qunit-runoff") 39 | 40 | $pillsHTML.pills().find('a').last().click() 41 | equals($("#qunit-runoff").find('.active').attr('id'), "profile") 42 | 43 | $pillsHTML.pills().find('a').first().click() 44 | equals($("#qunit-runoff").find('.active').attr('id'), "home") 45 | 46 | $("#qunit-runoff").empty() 47 | }) 48 | 49 | test( "should trigger change event on activate", function () { 50 | var $tabsHTML = $('') 54 | , $target 55 | , count = 0 56 | , relatedTarget 57 | , target 58 | 59 | $tabsHTML 60 | .tabs() 61 | .bind( "change", function (e) { 62 | target = e.target 63 | relatedTarget = e.relatedTarget 64 | count++ 65 | }) 66 | 67 | $target = $tabsHTML 68 | .find('a') 69 | .last() 70 | .click() 71 | 72 | equals(relatedTarget, $tabsHTML.find('a').first()[0]) 73 | equals(target, $target[0]) 74 | equals(count, 1) 75 | }) 76 | 77 | }) -------------------------------------------------------------------------------- /core/faucet.sql: -------------------------------------------------------------------------------- 1 | -- phpMyAdmin SQL Dump 2 | -- version 3.3.7deb7 3 | -- http://www.phpmyadmin.net 4 | -- 5 | -- Host: localhost 6 | -- Generation Time: Aug 17, 2012 at 02:48 PM 7 | -- Server version: 5.1.63 8 | -- PHP Version: 5.3.3-7+squeeze13 9 | 10 | SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; 11 | 12 | 13 | /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; 14 | /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; 15 | /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; 16 | /*!40101 SET NAMES utf8 */; 17 | 18 | -- 19 | -- Database: `faucet` 20 | -- 21 | 22 | -- -------------------------------------------------------- 23 | 24 | -- 25 | -- Table structure for table `dailyltc` 26 | -- 27 | 28 | CREATE TABLE IF NOT EXISTS `dailyltc` ( 29 | `id` int(5) NOT NULL AUTO_INCREMENT, 30 | `ltcaddress` char(34) NOT NULL, 31 | `ip` char(64) NOT NULL, 32 | PRIMARY KEY (`id`) 33 | ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=5 ; 34 | 35 | -- 36 | -- Dumping data for table `dailyltc` 37 | -- 38 | 39 | 40 | -- -------------------------------------------------------- 41 | 42 | -- 43 | -- Table structure for table `dailytotal` 44 | -- 45 | 46 | CREATE TABLE IF NOT EXISTS `dailytotal` ( 47 | `dailytotal` char(34) NOT NULL 48 | ) ENGINE=MyISAM DEFAULT CHARSET=latin1; 49 | 50 | -- 51 | -- Dumping data for table `dailytotal` 52 | -- 53 | 54 | INSERT INTO `dailytotal` (`dailytotal`) VALUES 55 | ('0'); 56 | 57 | -- -------------------------------------------------------- 58 | 59 | -- 60 | -- Table structure for table `round` 61 | -- 62 | 63 | CREATE TABLE IF NOT EXISTS `round` ( 64 | `round` char(34) NOT NULL 65 | ) ENGINE=MyISAM DEFAULT CHARSET=latin1; 66 | 67 | -- 68 | -- Dumping data for table `round` 69 | -- 70 | 71 | INSERT INTO `round` (`round`) VALUES 72 | ('0'); 73 | 74 | -- -------------------------------------------------------- 75 | 76 | -- 77 | -- Table structure for table `roundltc` 78 | -- 79 | 80 | CREATE TABLE IF NOT EXISTS `roundltc` ( 81 | `roundltc` char(34) NOT NULL 82 | ) ENGINE=MyISAM DEFAULT CHARSET=latin1; 83 | 84 | -- 85 | -- Dumping data for table `roundltc` 86 | -- 87 | 88 | INSERT INTO `roundltc` (`roundltc`) VALUES 89 | ('0'); 90 | 91 | -- -------------------------------------------------------- 92 | 93 | -- 94 | -- Table structure for table `subtotal` 95 | -- 96 | 97 | CREATE TABLE IF NOT EXISTS `subtotal` ( 98 | `id` int(5) NOT NULL AUTO_INCREMENT, 99 | `ltcaddress` char(34) NOT NULL, 100 | `ip` char(64) NOT NULL, 101 | PRIMARY KEY (`id`) 102 | ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ; 103 | 104 | -- 105 | -- Dumping data for table `subtotal` 106 | -- 107 | 108 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | ################# 2 | ## Eclipse 3 | ################# 4 | 5 | *.pydevproject 6 | .project 7 | .metadata 8 | bin/ 9 | tmp/ 10 | *.tmp 11 | *.bak 12 | *.swp 13 | *~.nib 14 | local.properties 15 | .classpath 16 | .settings/ 17 | .loadpath 18 | 19 | # External tool builders 20 | .externalToolBuilders/ 21 | 22 | # Locally stored "Eclipse launch configurations" 23 | *.launch 24 | 25 | # CDT-specific 26 | .cproject 27 | 28 | # PDT-specific 29 | .buildpath 30 | 31 | 32 | ################# 33 | ## Visual Studio 34 | ################# 35 | 36 | ## Ignore Visual Studio temporary files, build results, and 37 | ## files generated by popular Visual Studio add-ons. 38 | 39 | # User-specific files 40 | *.suo 41 | *.user 42 | *.sln.docstates 43 | 44 | # Build results 45 | [Dd]ebug/ 46 | [Rr]elease/ 47 | *_i.c 48 | *_p.c 49 | *.ilk 50 | *.meta 51 | *.obj 52 | *.pch 53 | *.pdb 54 | *.pgc 55 | *.pgd 56 | *.rsp 57 | *.sbr 58 | *.tlb 59 | *.tli 60 | *.tlh 61 | *.tmp 62 | *.vspscc 63 | .builds 64 | *.dotCover 65 | 66 | ## TODO: If you have NuGet Package Restore enabled, uncomment this 67 | #packages/ 68 | 69 | # Visual C++ cache files 70 | ipch/ 71 | *.aps 72 | *.ncb 73 | *.opensdf 74 | *.sdf 75 | 76 | # Visual Studio profiler 77 | *.psess 78 | *.vsp 79 | 80 | # ReSharper is a .NET coding add-in 81 | _ReSharper* 82 | 83 | # Installshield output folder 84 | [Ee]xpress 85 | 86 | # DocProject is a documentation generator add-in 87 | DocProject/buildhelp/ 88 | DocProject/Help/*.HxT 89 | DocProject/Help/*.HxC 90 | DocProject/Help/*.hhc 91 | DocProject/Help/*.hhk 92 | DocProject/Help/*.hhp 93 | DocProject/Help/Html2 94 | DocProject/Help/html 95 | 96 | # Click-Once directory 97 | publish 98 | 99 | # Others 100 | [Bb]in 101 | [Oo]bj 102 | sql 103 | TestResults 104 | *.Cache 105 | ClientBin 106 | stylecop.* 107 | ~$* 108 | *.dbmdl 109 | Generated_Code #added for RIA/Silverlight projects 110 | 111 | # Backup & report files from converting an old project file to a newer 112 | # Visual Studio version. Backup files are not needed, because we have git ;-) 113 | _UpgradeReport_Files/ 114 | Backup*/ 115 | UpgradeLog*.XML 116 | 117 | 118 | 119 | ############ 120 | ## Windows 121 | ############ 122 | 123 | # Windows image file caches 124 | Thumbs.db 125 | 126 | # Folder config file 127 | Desktop.ini 128 | 129 | 130 | ############# 131 | ## Python 132 | ############# 133 | 134 | *.py[co] 135 | 136 | # Packages 137 | *.egg 138 | *.egg-info 139 | dist 140 | build 141 | eggs 142 | parts 143 | bin 144 | var 145 | sdist 146 | develop-eggs 147 | .installed.cfg 148 | 149 | # Installer logs 150 | pip-log.txt 151 | 152 | # Unit test / coverage reports 153 | .coverage 154 | .tox 155 | 156 | #Translations 157 | *.mo 158 | 159 | #Mr Developer 160 | .mr.developer.cfg 161 | 162 | # Mac crap 163 | .DS_Store 164 | -------------------------------------------------------------------------------- /js/tests/unit/bootstrap-popover.js: -------------------------------------------------------------------------------- 1 | $(function () { 2 | 3 | module("bootstrap-popover") 4 | 5 | test("should be defined on jquery object", function () { 6 | var div = $('
    ') 7 | ok(div.popover, 'popover method is defined') 8 | }) 9 | 10 | test("should return element", function () { 11 | var div = $('
    ') 12 | ok(div.popover() == div, 'document.body returned') 13 | }) 14 | 15 | test("should render popover element", function () { 16 | $.support.transition = false 17 | var popover = $('@mdo') 18 | .appendTo('#qunit-runoff') 19 | .popover() 20 | .popover('show') 21 | 22 | ok($('.popover').length, 'popover was inserted') 23 | popover.popover('hide') 24 | ok(!$(".popover").length, 'popover removed') 25 | $('#qunit-runoff').empty() 26 | }) 27 | 28 | test("should store popover instance in popover data object", function () { 29 | $.support.transition = false 30 | var popover = $('@mdo') 31 | .popover() 32 | 33 | ok(!!popover.data('popover'), 'popover instance exists') 34 | }) 35 | 36 | test("should get title and content from options", function () { 37 | $.support.transition = false 38 | var popover = $('@fat') 39 | .appendTo('#qunit-runoff') 40 | .popover({ 41 | title: function () { 42 | return '@fat' 43 | } 44 | , content: function () { 45 | return 'loves writing tests (╯°□°)╯︵ ┻━┻' 46 | } 47 | }) 48 | 49 | popover.popover('show') 50 | 51 | ok($('.popover').length, 'popover was inserted') 52 | equals($('.popover .title').text(), '@fat', 'title correctly inserted') 53 | equals($('.popover .content').text(), 'loves writing tests (╯°□°)╯︵ ┻━┻', 'content correctly inserted') 54 | 55 | popover.popover('hide') 56 | ok(!$('.popover').length, 'popover was removed') 57 | $('#qunit-runoff').empty() 58 | }) 59 | 60 | test("should get title and content from attributes", function () { 61 | $.support.transition = false 62 | var popover = $('@mdo') 63 | .appendTo('#qunit-runoff') 64 | .popover() 65 | .popover('show') 66 | 67 | ok($('.popover').length, 'popover was inserted') 68 | equals($('.popover .title').text(), '@mdo', 'title correctly inserted') 69 | equals($('.popover .content').text(), "loves data attributes (づ。◕‿‿◕。)づ ︵ ┻━┻", 'content correctly inserted') 70 | 71 | popover.popover('hide') 72 | ok(!$('.popover').length, 'popover was removed') 73 | $('#qunit-runoff').empty() 74 | }) 75 | 76 | }) 77 | -------------------------------------------------------------------------------- /js/bootstrap-popover.js: -------------------------------------------------------------------------------- 1 | /* =========================================================== 2 | * bootstrap-popover.js v1.4.0 3 | * http://twitter.github.com/bootstrap/javascript.html#popover 4 | * =========================================================== 5 | * Copyright 2011 Twitter, Inc. 6 | * 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | * =========================================================== */ 19 | 20 | 21 | !function( $ ) { 22 | 23 | "use strict" 24 | 25 | var Popover = function ( element, options ) { 26 | this.$element = $(element) 27 | this.options = options 28 | this.enabled = true 29 | this.fixTitle() 30 | } 31 | 32 | /* NOTE: POPOVER EXTENDS BOOTSTRAP-TWIPSY.js 33 | ========================================= */ 34 | 35 | Popover.prototype = $.extend({}, $.fn.twipsy.Twipsy.prototype, { 36 | 37 | setContent: function () { 38 | var $tip = this.tip() 39 | $tip.find('.title')[this.options.html ? 'html' : 'text'](this.getTitle()) 40 | $tip.find('.content > *')[this.options.html ? 'html' : 'text'](this.getContent()) 41 | $tip[0].className = 'popover' 42 | } 43 | 44 | , hasContent: function () { 45 | return this.getTitle() || this.getContent() 46 | } 47 | 48 | , getContent: function () { 49 | var content 50 | , $e = this.$element 51 | , o = this.options 52 | 53 | if (typeof this.options.content == 'string') { 54 | content = $e.attr(this.options.content) 55 | } else if (typeof this.options.content == 'function') { 56 | content = this.options.content.call(this.$element[0]) 57 | } 58 | 59 | return content 60 | } 61 | 62 | , tip: function() { 63 | if (!this.$tip) { 64 | this.$tip = $('
    ') 65 | .html(this.options.template) 66 | } 67 | return this.$tip 68 | } 69 | 70 | }) 71 | 72 | 73 | /* POPOVER PLUGIN DEFINITION 74 | * ======================= */ 75 | 76 | $.fn.popover = function (options) { 77 | if (typeof options == 'object') options = $.extend({}, $.fn.popover.defaults, options) 78 | $.fn.twipsy.initWith.call(this, options, Popover, 'popover') 79 | return this 80 | } 81 | 82 | $.fn.popover.defaults = $.extend({} , $.fn.twipsy.defaults, { 83 | placement: 'right' 84 | , content: 'data-content' 85 | , template: '

    ' 86 | }) 87 | 88 | $.fn.twipsy.rejectAttrOptions.push( 'content' ) 89 | 90 | }( window.jQuery || window.ender ); 91 | -------------------------------------------------------------------------------- /js/bootstrap-dropdown.js: -------------------------------------------------------------------------------- 1 | /* ============================================================ 2 | * bootstrap-dropdown.js v2.0.4 3 | * http://twitter.github.com/bootstrap/javascript.html#dropdowns 4 | * ============================================================ 5 | * Copyright 2012 Twitter, Inc. 6 | * 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | * ============================================================ */ 19 | 20 | 21 | !function ($) { 22 | 23 | "use strict"; // jshint ;_; 24 | 25 | 26 | /* DROPDOWN CLASS DEFINITION 27 | * ========================= */ 28 | 29 | var toggle = '[data-toggle="dropdown"]' 30 | , Dropdown = function (element) { 31 | var $el = $(element).on('click.dropdown.data-api', this.toggle) 32 | $('html').on('click.dropdown.data-api', function () { 33 | $el.parent().removeClass('open') 34 | }) 35 | } 36 | 37 | Dropdown.prototype = { 38 | 39 | constructor: Dropdown 40 | 41 | , toggle: function (e) { 42 | var $this = $(this) 43 | , $parent 44 | , selector 45 | , isActive 46 | 47 | if ($this.is('.disabled, :disabled')) return 48 | 49 | selector = $this.attr('data-target') 50 | 51 | if (!selector) { 52 | selector = $this.attr('href') 53 | selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7 54 | } 55 | 56 | $parent = $(selector) 57 | $parent.length || ($parent = $this.parent()) 58 | 59 | isActive = $parent.hasClass('open') 60 | 61 | clearMenus() 62 | 63 | if (!isActive) $parent.toggleClass('open') 64 | 65 | return false 66 | } 67 | 68 | } 69 | 70 | function clearMenus() { 71 | $(toggle).parent().removeClass('open') 72 | } 73 | 74 | 75 | /* DROPDOWN PLUGIN DEFINITION 76 | * ========================== */ 77 | 78 | $.fn.dropdown = function (option) { 79 | return this.each(function () { 80 | var $this = $(this) 81 | , data = $this.data('dropdown') 82 | if (!data) $this.data('dropdown', (data = new Dropdown(this))) 83 | if (typeof option == 'string') data[option].call($this) 84 | }) 85 | } 86 | 87 | $.fn.dropdown.Constructor = Dropdown 88 | 89 | 90 | /* APPLY TO STANDARD DROPDOWN ELEMENTS 91 | * =================================== */ 92 | 93 | $(function () { 94 | $('html').on('click.dropdown.data-api', clearMenus) 95 | $('body') 96 | .on('click.dropdown', '.dropdown form', function (e) { e.stopPropagation() }) 97 | .on('click.dropdown.data-api', toggle, Dropdown.prototype.toggle) 98 | }) 99 | 100 | }(window.jQuery); -------------------------------------------------------------------------------- /js/tests/unit/bootstrap-twipsy.js: -------------------------------------------------------------------------------- 1 | $(function () { 2 | 3 | module("bootstrap-twipsy") 4 | 5 | test("should be defined on jquery object", function () { 6 | var div = $("
    ") 7 | ok(div.twipsy, 'popover method is defined') 8 | }) 9 | 10 | test("should return element", function () { 11 | var div = $("
    ") 12 | ok(div.twipsy() == div, 'document.body returned') 13 | }) 14 | 15 | test("should expose default settings", function () { 16 | ok(!!$.fn.twipsy.defaults, 'defaults is defined') 17 | }) 18 | 19 | test("should remove title attribute", function () { 20 | var twipsy = $('').twipsy() 21 | ok(!twipsy.attr('title'), 'title tag was removed') 22 | }) 23 | 24 | test("should add data attribute for referencing original title", function () { 25 | var twipsy = $('').twipsy() 26 | equals(twipsy.attr('data-original-title'), 'Another twipsy', 'original title preserved in data attribute') 27 | }) 28 | 29 | test("should place tooltips relative to placement option", function () { 30 | $.support.transition = false 31 | var twipsy = $('') 32 | .appendTo('#qunit-runoff') 33 | .twipsy({placement: 'below'}) 34 | .twipsy('show') 35 | 36 | ok($(".twipsy").hasClass('fade below in'), 'has correct classes applied') 37 | twipsy.twipsy('hide') 38 | ok(!$(".twipsy").length, 'twipsy removed') 39 | $('#qunit-runoff').empty() 40 | }) 41 | 42 | test("should add a fallback in cases where elements have no title tag", function () { 43 | $.support.transition = false 44 | var twipsy = $('') 45 | .appendTo('#qunit-runoff') 46 | .twipsy({fallback: '@fat'}) 47 | .twipsy('show') 48 | 49 | equals($(".twipsy").text(), "@fat", 'has correct default text') 50 | twipsy.twipsy('hide') 51 | ok(!$(".twipsy").length, 'twipsy removed') 52 | $('#qunit-runoff').empty() 53 | }) 54 | 55 | test("should not allow html entities", function () { 56 | $.support.transition = false 57 | var twipsy = $('') 58 | .appendTo('#qunit-runoff') 59 | .twipsy() 60 | .twipsy('show') 61 | 62 | ok(!$('.twipsy b').length, 'b tag was not inserted') 63 | twipsy.twipsy('hide') 64 | ok(!$(".twipsy").length, 'twipsy removed') 65 | $('#qunit-runoff').empty() 66 | }) 67 | 68 | test("should allow html entities if html option set to true", function () { 69 | $.support.transition = false 70 | var twipsy = $('') 71 | .appendTo('#qunit-runoff') 72 | .twipsy({html: true}) 73 | .twipsy('show') 74 | 75 | ok($('.twipsy b').length, 'b tag was inserted') 76 | twipsy.twipsy('hide') 77 | ok(!$(".twipsy").length, 'twipsy removed') 78 | $('#qunit-runoff').empty() 79 | }) 80 | 81 | }) -------------------------------------------------------------------------------- /js/bootstrap-scrollspy.js: -------------------------------------------------------------------------------- 1 | /* ============================================================= 2 | * bootstrap-scrollspy.js v1.4.0 3 | * http://twitter.github.com/bootstrap/javascript.html#scrollspy 4 | * ============================================================= 5 | * Copyright 2011 Twitter, Inc. 6 | * 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | * ============================================================== */ 19 | 20 | 21 | !function ( $ ) { 22 | 23 | "use strict" 24 | 25 | var $window = $(window) 26 | 27 | function ScrollSpy( topbar, selector ) { 28 | var processScroll = $.proxy(this.processScroll, this) 29 | this.$topbar = $(topbar) 30 | this.selector = selector || 'li > a' 31 | this.refresh() 32 | this.$topbar.delegate(this.selector, 'click', processScroll) 33 | $window.scroll(processScroll) 34 | this.processScroll() 35 | } 36 | 37 | ScrollSpy.prototype = { 38 | 39 | refresh: function () { 40 | this.targets = this.$topbar.find(this.selector).map(function () { 41 | var href = $(this).attr('href') 42 | return /^#\w/.test(href) && $(href).length ? href : null 43 | }) 44 | 45 | this.offsets = $.map(this.targets, function (id) { 46 | return $(id).offset().top 47 | }) 48 | } 49 | 50 | , processScroll: function () { 51 | var scrollTop = $window.scrollTop() + 10 52 | , offsets = this.offsets 53 | , targets = this.targets 54 | , activeTarget = this.activeTarget 55 | , i 56 | 57 | for (i = offsets.length; i--;) { 58 | activeTarget != targets[i] 59 | && scrollTop >= offsets[i] 60 | && (!offsets[i + 1] || scrollTop <= offsets[i + 1]) 61 | && this.activateButton( targets[i] ) 62 | } 63 | } 64 | 65 | , activateButton: function (target) { 66 | this.activeTarget = target 67 | 68 | this.$topbar 69 | .find(this.selector).parent('.active') 70 | .removeClass('active') 71 | 72 | this.$topbar 73 | .find(this.selector + '[href="' + target + '"]') 74 | .parent('li') 75 | .addClass('active') 76 | } 77 | 78 | } 79 | 80 | /* SCROLLSPY PLUGIN DEFINITION 81 | * =========================== */ 82 | 83 | $.fn.scrollSpy = function( options ) { 84 | var scrollspy = this.data('scrollspy') 85 | 86 | if (!scrollspy) { 87 | return this.each(function () { 88 | $(this).data('scrollspy', new ScrollSpy( this, options )) 89 | }) 90 | } 91 | 92 | if ( options === true ) { 93 | return scrollspy 94 | } 95 | 96 | if ( typeof options == 'string' ) { 97 | scrollspy[options]() 98 | } 99 | 100 | return this 101 | } 102 | 103 | $(document).ready(function () { 104 | $('body').scrollSpy('[data-scrollspy] li > a') 105 | }) 106 | 107 | }( window.jQuery || window.ender ); -------------------------------------------------------------------------------- /lib/scaffolding.less: -------------------------------------------------------------------------------- 1 | /* 2 | * Scaffolding 3 | * Basic and global styles for generating a grid system, structural layout, and page templates 4 | * ------------------------------------------------------------------------------------------- */ 5 | 6 | 7 | // STRUCTURAL LAYOUT 8 | // ----------------- 9 | 10 | body { 11 | background-color: @white; 12 | margin: 0; 13 | #font > .sans-serif(normal,@basefont,@baseline); 14 | color: @grayDark; 15 | } 16 | 17 | // Container (centered, fixed-width layouts) 18 | .container { 19 | .fixed-container(); 20 | } 21 | 22 | // Fluid layouts (left aligned, with sidebar, min- & max-width content) 23 | .container-fluid { 24 | position: relative; 25 | min-width: 940px; 26 | padding-left: 20px; 27 | padding-right: 20px; 28 | .clearfix(); 29 | > .sidebar { 30 | position: absolute; 31 | top: 0; 32 | left: 20px; 33 | width: 220px; 34 | } 35 | // TODO in v2: rename this and .popover .content to be more specific 36 | > .content { 37 | margin-left: 240px; 38 | } 39 | } 40 | 41 | 42 | // BASE STYLES 43 | // ----------- 44 | 45 | // Links 46 | a { 47 | color: @linkColor; 48 | text-decoration: none; 49 | line-height: inherit; 50 | font-weight: inherit; 51 | &:hover { 52 | color: @linkColorHover; 53 | text-decoration: underline; 54 | } 55 | } 56 | 57 | // Quick floats 58 | .pull-right { 59 | float: right; 60 | } 61 | .pull-left { 62 | float: left; 63 | } 64 | 65 | // Toggling content 66 | .hide { 67 | display: none; 68 | } 69 | .show { 70 | display: block; 71 | } 72 | 73 | 74 | // GRID SYSTEM 75 | // ----------- 76 | // To customize the grid system, bring up the variables.less file and change the column count, size, and gutter there 77 | 78 | .row { 79 | .clearfix(); 80 | margin-left: -@gridGutterWidth; 81 | } 82 | 83 | // Find all .span# classes within .row and give them the necessary properties for grid columns (supported by all browsers back to IE7) 84 | // Credit to @dhg for the idea 85 | .row > [class*="span"] { 86 | .gridColumn(); 87 | } 88 | 89 | // Default columns 90 | .span1 { .columns(1); } 91 | .span2 { .columns(2); } 92 | .span3 { .columns(3); } 93 | .span4 { .columns(4); } 94 | .span5 { .columns(5); } 95 | .span6 { .columns(6); } 96 | .span7 { .columns(7); } 97 | .span8 { .columns(8); } 98 | .span9 { .columns(9); } 99 | .span10 { .columns(10); } 100 | .span11 { .columns(11); } 101 | .span12 { .columns(12); } 102 | .span13 { .columns(13); } 103 | .span14 { .columns(14); } 104 | .span15 { .columns(15); } 105 | .span16 { .columns(16); } 106 | 107 | // For optional 24-column grid 108 | .span17 { .columns(17); } 109 | .span18 { .columns(18); } 110 | .span19 { .columns(19); } 111 | .span20 { .columns(20); } 112 | .span21 { .columns(21); } 113 | .span22 { .columns(22); } 114 | .span23 { .columns(23); } 115 | .span24 { .columns(24); } 116 | 117 | // Offset column options 118 | .row { 119 | > .offset1 { .offset(1); } 120 | > .offset2 { .offset(2); } 121 | > .offset3 { .offset(3); } 122 | > .offset4 { .offset(4); } 123 | > .offset5 { .offset(5); } 124 | > .offset6 { .offset(6); } 125 | > .offset7 { .offset(7); } 126 | > .offset8 { .offset(8); } 127 | > .offset9 { .offset(9); } 128 | > .offset10 { .offset(10); } 129 | > .offset11 { .offset(11); } 130 | > .offset12 { .offset(12); } 131 | } 132 | 133 | // Unique column sizes for 16-column grid 134 | .span-one-third { width: 300px; } 135 | .span-two-thirds { width: 620px; } 136 | .row { 137 | > .offset-one-third { margin-left: 340px; } 138 | > .offset-two-thirds { margin-left: 660px; } 139 | } -------------------------------------------------------------------------------- /lib/type.less: -------------------------------------------------------------------------------- 1 | /* Typography.less 2 | * Headings, body text, lists, code, and more for a versatile and durable typography system 3 | * ---------------------------------------------------------------------------------------- */ 4 | 5 | 6 | // BODY TEXT 7 | // --------- 8 | 9 | p { 10 | #font > .shorthand(normal,@basefont,@baseline); 11 | margin-bottom: @baseline / 2; 12 | small { 13 | font-size: @basefont - 2; 14 | color: @grayLight; 15 | } 16 | } 17 | 18 | 19 | // HEADINGS 20 | // -------- 21 | 22 | h1, h2, h3, h4, h5, h6 { 23 | font-weight: bold; 24 | color: @grayDark; 25 | small { 26 | color: @grayLight; 27 | } 28 | } 29 | h1 { 30 | margin-bottom: @baseline; 31 | font-size: 30px; 32 | line-height: @baseline * 2; 33 | small { 34 | font-size: 18px; 35 | } 36 | } 37 | h2 { 38 | font-size: 24px; 39 | line-height: @baseline * 2; 40 | small { 41 | font-size: 14px; 42 | } 43 | } 44 | h3, h4, h5, h6 { 45 | line-height: @baseline * 2; 46 | } 47 | h3 { 48 | font-size: 18px; 49 | small { 50 | font-size: 14px; 51 | } 52 | } 53 | h4 { 54 | font-size: 16px; 55 | small { 56 | font-size: 12px; 57 | } 58 | } 59 | h5 { 60 | font-size: 14px; 61 | } 62 | h6 { 63 | font-size: 13px; 64 | color: @grayLight; 65 | text-transform: uppercase; 66 | } 67 | 68 | 69 | // COLORS 70 | // ------ 71 | 72 | // Unordered and Ordered lists 73 | ul, ol { 74 | margin: 0 0 @baseline 25px; 75 | } 76 | ul ul, 77 | ul ol, 78 | ol ol, 79 | ol ul { 80 | margin-bottom: 0; 81 | } 82 | ul { 83 | list-style: disc; 84 | } 85 | ol { 86 | list-style: decimal; 87 | } 88 | li { 89 | line-height: @baseline; 90 | color: @gray; 91 | } 92 | ul.unstyled { 93 | list-style: none; 94 | margin-left: 0; 95 | } 96 | 97 | // Description Lists 98 | dl { 99 | margin-bottom: @baseline; 100 | dt, dd { 101 | line-height: @baseline; 102 | } 103 | dt { 104 | font-weight: bold; 105 | } 106 | dd { 107 | margin-left: @baseline / 2; 108 | } 109 | } 110 | 111 | // MISC 112 | // ---- 113 | 114 | // Horizontal rules 115 | hr { 116 | margin: 20px 0 19px; 117 | border: 0; 118 | border-bottom: 1px solid #eee; 119 | } 120 | 121 | // Emphasis 122 | strong { 123 | font-style: inherit; 124 | font-weight: bold; 125 | } 126 | em { 127 | font-style: italic; 128 | font-weight: inherit; 129 | line-height: inherit; 130 | } 131 | .muted { 132 | color: @grayLight; 133 | } 134 | 135 | // Blockquotes 136 | blockquote { 137 | margin-bottom: @baseline; 138 | border-left: 5px solid #eee; 139 | padding-left: 15px; 140 | p { 141 | #font > .shorthand(300,14px,@baseline); 142 | margin-bottom: 0; 143 | } 144 | small { 145 | display: block; 146 | #font > .shorthand(300,12px,@baseline); 147 | color: @grayLight; 148 | &:before { 149 | content: '\2014 \00A0'; 150 | } 151 | } 152 | } 153 | 154 | // Addresses 155 | address { 156 | display: block; 157 | line-height: @baseline; 158 | margin-bottom: @baseline; 159 | } 160 | 161 | // Inline and block code styles 162 | code, pre { 163 | padding: 0 3px 2px; 164 | font-family: Monaco, Andale Mono, Courier New, monospace; 165 | font-size: 12px; 166 | .border-radius(3px); 167 | } 168 | code { 169 | background-color: lighten(@orange, 40%); 170 | color: rgba(0,0,0,.75); 171 | padding: 1px 3px; 172 | } 173 | pre { 174 | background-color: #f5f5f5; 175 | display: block; 176 | padding: (@baseline - 1) / 2; 177 | margin: 0 0 @baseline; 178 | line-height: @baseline; 179 | font-size: 12px; 180 | border: 1px solid #ccc; 181 | border: 1px solid rgba(0,0,0,.15); 182 | .border-radius(3px); 183 | white-space: pre; 184 | white-space: pre-wrap; 185 | word-wrap: break-word; 186 | 187 | } -------------------------------------------------------------------------------- /js/bootstrap-alerts.js: -------------------------------------------------------------------------------- 1 | /* ========================================================== 2 | * bootstrap-alerts.js v1.4.0 3 | * http://twitter.github.com/bootstrap/javascript.html#alerts 4 | * ========================================================== 5 | * Copyright 2011 Twitter, Inc. 6 | * 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | * ========================================================== */ 19 | 20 | 21 | !function( $ ){ 22 | 23 | "use strict" 24 | 25 | /* CSS TRANSITION SUPPORT (https://gist.github.com/373874) 26 | * ======================================================= */ 27 | 28 | var transitionEnd 29 | 30 | $(document).ready(function () { 31 | 32 | $.support.transition = (function () { 33 | var thisBody = document.body || document.documentElement 34 | , thisStyle = thisBody.style 35 | , support = thisStyle.transition !== undefined || thisStyle.WebkitTransition !== undefined || thisStyle.MozTransition !== undefined || thisStyle.MsTransition !== undefined || thisStyle.OTransition !== undefined 36 | return support 37 | })() 38 | 39 | // set CSS transition event type 40 | if ( $.support.transition ) { 41 | transitionEnd = "TransitionEnd" 42 | if ( $.browser.webkit ) { 43 | transitionEnd = "webkitTransitionEnd" 44 | } else if ( $.browser.mozilla ) { 45 | transitionEnd = "transitionend" 46 | } else if ( $.browser.opera ) { 47 | transitionEnd = "oTransitionEnd" 48 | } 49 | } 50 | 51 | }) 52 | 53 | /* ALERT CLASS DEFINITION 54 | * ====================== */ 55 | 56 | var Alert = function ( content, options ) { 57 | if (options == 'close') return this.close.call(content) 58 | this.settings = $.extend({}, $.fn.alert.defaults, options) 59 | this.$element = $(content) 60 | .delegate(this.settings.selector, 'click', this.close) 61 | } 62 | 63 | Alert.prototype = { 64 | 65 | close: function (e) { 66 | var $element = $(this) 67 | , className = 'alert-message' 68 | 69 | $element = $element.hasClass(className) ? $element : $element.parent() 70 | 71 | e && e.preventDefault() 72 | $element.removeClass('in') 73 | 74 | function removeElement () { 75 | $element.remove() 76 | } 77 | 78 | $.support.transition && $element.hasClass('fade') ? 79 | $element.bind(transitionEnd, removeElement) : 80 | removeElement() 81 | } 82 | 83 | } 84 | 85 | 86 | /* ALERT PLUGIN DEFINITION 87 | * ======================= */ 88 | 89 | $.fn.alert = function ( options ) { 90 | 91 | if ( options === true ) { 92 | return this.data('alert') 93 | } 94 | 95 | return this.each(function () { 96 | var $this = $(this) 97 | , data 98 | 99 | if ( typeof options == 'string' ) { 100 | 101 | data = $this.data('alert') 102 | 103 | if (typeof data == 'object') { 104 | return data[options].call( $this ) 105 | } 106 | 107 | } 108 | 109 | $(this).data('alert', new Alert( this, options )) 110 | 111 | }) 112 | } 113 | 114 | $.fn.alert.defaults = { 115 | selector: '.close' 116 | } 117 | 118 | $(document).ready(function () { 119 | new Alert($('body'), { 120 | selector: '.alert-message[data-alert] .close' 121 | }) 122 | }) 123 | 124 | }( window.jQuery || window.ender ); -------------------------------------------------------------------------------- /core/address.inc: -------------------------------------------------------------------------------- 1 | ltc = $btcclient; 23 | 24 | try 25 | { 26 | $this->PDO_Conn = new PDO("mysql:host={$sqllogin['host']};dbname={$sqllogin['dbname']}", $sqllogin['username'], $sqllogin['password']); 27 | $this->PDO_Conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); 28 | } 29 | catch (exception $e) 30 | { 31 | echo die("An error has occured while connecting to the database, please contact an admin and let them know: " . $e->getMessage()); 32 | } 33 | } 34 | function verKey($key) 35 | { 36 | $prepkey = $this->PDO_Conn->prepare('SELECT ltcaddress FROM instaltc WHERE url=?'); 37 | if ($key) 38 | { 39 | $prepkey->execute(array($key)); 40 | switch ($prepkey->rowCount()) 41 | { 42 | case 1: 43 | $b = $prepkey->fetchAll(); 44 | return $b[0]['ltcaddress']; 45 | break; 46 | case 0: 47 | return false; 48 | break; 49 | default: 50 | return "DUPLICATE OR STRANGE ERROR!"; 51 | } 52 | } else 53 | return false; 54 | } 55 | function newAddr() 56 | { 57 | $this->securl = substr(str_shuffle(str_repeat('ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789',5)),0,20); // Generate salt (20 chars)) 58 | $this->genaddr = $this->ltc->getaccountaddress($this->securl); // Generate a new address and shove it in a variable 59 | // $this->securl = hash('sha512', $this->secret . $this->genaddr . $this->secret); 60 | try 61 | { 62 | $prepd = $this->PDO_Conn->prepare('INSERT INTO instaltc (ltcaddress, url) VALUES (?, ?)'); // Prepare PDO query 63 | $prepd->execute(array($this->genaddr, $this->securl)); 64 | return $this->genaddr; 65 | } 66 | catch (exception $e) 67 | { 68 | echo die("Unable to insert into database, please contact an admin and let them know: " . $e->getMessage()); 69 | } 70 | } 71 | 72 | function sanitizedSend($to_address, $ltcaddr, $key, $amount, $minleft = 0.1, $minfee = 0, $feeperc = 2.5, $feeacc = "Fees") 73 | { 74 | if (filter_var($amount, FILTER_VALIDATE_FLOAT)) 75 | { 76 | 77 | $balance = $this->ltc->getbalance("$key"); 78 | if($balance - $amount - $minleft <= 0) { throw new Exception('LOW_BALANCE'); } 79 | 80 | $valid = $this->ltc->validateaddress($to_address); 81 | if ($valid['isvalid'] == true) 82 | { 83 | try 84 | { // Can we send it? 85 | $this->ltc->sendfrom($key, $to_address, $amount); 86 | return array( 'address' => $to_address, 87 | 'account' => $key, 88 | 'amount' => $amount); 89 | } 90 | catch (BitcoinClientException $e) 91 | { 92 | throw new Exception("SEND_FAILED"); 93 | $btclog = fopen("ltcerror.txt", a); 94 | fwrite($btclog, "[ {$ltcaddr} ] - " . $e . "\r\n"); 95 | } 96 | } else 97 | { 98 | throw new Exception("INVALID_ADDR"); 99 | $btclog = fopen("ltcerror.txt", 'a'); 100 | fwrite($btclog, "[ {$ltcaddr} ] ENTERED {$to_address}] - INVALID ADDRESS\r\n"); 101 | } 102 | } else 103 | { 104 | throw new Exception("INVALID_AMT"); 105 | $btclog = fopen("ltcerror.txt", 'a'); 106 | fwrite($btclog, "[ {$ltcaddr} ] ENTERED {$amount}] - INVALID AMOUNT\r\n"); 107 | } 108 | } 109 | } 110 | ?> -------------------------------------------------------------------------------- /templates/header.php: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | 7 | 8 | 9 | Litecoin Faucet 10 | 11 | 12 | 13 | 14 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 75 | 76 | 77 | 78 | 79 | 80 |
    81 |
    82 |
    83 | Faucet 84 | 110 |
    Blockcount: - Difficulty: - version with p2p nodes
    111 |
    112 | 113 |
    114 |
    115 |
    116 |
    117 | 118 | -------------------------------------------------------------------------------- /submitted.php: -------------------------------------------------------------------------------- 1 | getaccountaddress($don_faucet); 14 | $don = $btclient->getbalance($don_faucet, 0); 15 | 16 | ?> 17 |
    18 |
    19 |
    20 |
    21 | 4) ? 'th' : (($c < 4) ? ($c < 3) ? ($c < 2) ? 31 | ($c < 1) ? 'th' : 'st' : 'nd' : 'rd' : 'th')); 32 | return $a . $e; 33 | } 34 | if (strtolower(ValidateCaptcha($adscaptchaID, $adsprivkey, $challengeValue, $responseValue, 35 | $remoteAddress)) == "true") { 36 | $isvalid = $btclient->validateaddress($_POST['LTC']); 37 | if ($isvalid['isvalid'] != '1') { 38 | 39 | echo "Invalid Address: {$_POST['LTC']}"; 40 | echo "
    "; 41 | include ('templates/sidebar.php'); 42 | include ('templates/footer.php'); 43 | die(); 44 | } else { 45 | $ltcaddress = $_POST['LTC']; 46 | mysql_query("INSERT INTO dailyltc (ltcaddress, ip) 47 | SELECT * FROM (SELECT '$ltcaddress', '$ip') AS tmp 48 | WHERE NOT EXISTS ( 49 | SELECT ip FROM dailyltc WHERE ip = '$ip' 50 | ) LIMIT 1;") or die(mysql_error()); 51 | 52 | mysql_query("INSERT INTO subtotal (ltcaddress, ip) VALUES('$ltcaddress', '$ip' ) ") or 53 | die(mysql_error()); 54 | $command = "SELECT * FROM dailyltc"; 55 | $q = mysql_query($command); 56 | $rows = mysql_num_rows($q); 57 | $entries_needed = 150; 58 | if ($rows > $entries_needed) { 59 | $command = "SELECT * FROM roundltc"; 60 | $q = mysql_query($command); 61 | $res = mysql_fetch_array($q); 62 | $list = mysql_query("SELECT * FROM dailyltc"); 63 | 64 | $coins_in_account = $btclient->getbalance("SendOut", 0); 65 | if ($coins_in_account >= ($res['roundltc'] * $rows)) { 66 | while ($listw = mysql_fetch_array($list)) { 67 | $btclient->sendfrom("SendOut", $listw['btcaddres'], $res['roundltc']); 68 | } 69 | $n = ordinal(mysql_num_rows($list)); 70 | echo srsnot("Congratulations, you were the {$n} in the round, the round has been reset and payouts have been sent."); 71 | mysql_query("TRUNCATE dailyltc"); 72 | mysql_query("UPDATE round set round=round+1"); 73 | $totalc = $res['roundltc'] * $rows; 74 | mysql_query("UPDATE dailytotal set total=total+{$totalc}"); 75 | echo "
    "; 76 | include ('templates/sidebar.php'); 77 | include ('templates/footer.php'); 78 | die(); 79 | } else { 80 | echo srserr("Uh oh, looks like we haven't got enough donations to pay out. The round will continue until there's enough to pay out."); 81 | echo "
    "; 82 | include ('templates/sidebar.php'); 83 | include ('templates/footer.php'); 84 | die(); 85 | } 86 | } 87 | 88 | //echo "printan."; 89 | 90 | //echo "printed."; 91 | // echo ""; 92 | echo "You will get your LTC at the end of this round
    There are $rows submitted addresses in this round!
    "; 93 | echo "
    If you want to donate to the Faucet: $donaddress (recv: $don)"; 94 | } 95 | 96 | } else { // Wrong answer, you may display a new AdsCaptcha and add an error message 97 | echo srserr("INVALID CAPTCHA. Go back"); 98 | } 99 | ?> 100 | 101 |
    102 | 106 | 107 | 108 | 109 | 110 | -------------------------------------------------------------------------------- /lib/reset.less: -------------------------------------------------------------------------------- 1 | /* Reset.less 2 | * 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). 3 | * ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- */ 4 | 5 | 6 | // ERIC MEYER RESET 7 | // -------------------------------------------------- 8 | 9 | html, body { margin: 0; padding: 0; } 10 | 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; } 11 | table { border-collapse: collapse; border-spacing: 0; } 12 | ol, ul { list-style: none; } 13 | q:before, q:after, blockquote:before, blockquote:after { content: ""; } 14 | 15 | 16 | // Normalize.css 17 | // Pulling in select resets form the normalize.css project 18 | // -------------------------------------------------- 19 | 20 | // Display in IE6-9 and FF3 21 | // ------------------------- 22 | // Source: http://github.com/necolas/normalize.css 23 | html { 24 | overflow-y: scroll; 25 | font-size: 100%; 26 | -webkit-text-size-adjust: 100%; 27 | -ms-text-size-adjust: 100%; 28 | } 29 | // Focus states 30 | a:focus { 31 | outline: thin dotted; 32 | } 33 | // Hover & Active 34 | a:hover, 35 | a:active { 36 | outline: 0; 37 | } 38 | 39 | // Display in IE6-9 and FF3 40 | // ------------------------- 41 | // Source: http://github.com/necolas/normalize.css 42 | article, 43 | aside, 44 | details, 45 | figcaption, 46 | figure, 47 | footer, 48 | header, 49 | hgroup, 50 | nav, 51 | section { 52 | display: block; 53 | } 54 | 55 | // Display block in IE6-9 and FF3 56 | // ------------------------- 57 | // Source: http://github.com/necolas/normalize.css 58 | audio, 59 | canvas, 60 | video { 61 | display: inline-block; 62 | *display: inline; 63 | *zoom: 1; 64 | } 65 | 66 | // Prevents modern browsers from displaying 'audio' without controls 67 | // ------------------------- 68 | // Source: http://github.com/necolas/normalize.css 69 | audio:not([controls]) { 70 | display: none; 71 | } 72 | 73 | // Prevents sub and sup affecting line-height in all browsers 74 | // ------------------------- 75 | // Source: http://github.com/necolas/normalize.css 76 | sub, 77 | sup { 78 | font-size: 75%; 79 | line-height: 0; 80 | position: relative; 81 | vertical-align: baseline; 82 | } 83 | sup { 84 | top: -0.5em; 85 | } 86 | sub { 87 | bottom: -0.25em; 88 | } 89 | 90 | // Img border in a's and image quality 91 | // ------------------------- 92 | // Source: http://github.com/necolas/normalize.css 93 | img { 94 | border: 0; 95 | -ms-interpolation-mode: bicubic; 96 | } 97 | 98 | // Forms 99 | // ------------------------- 100 | // Source: http://github.com/necolas/normalize.css 101 | 102 | // Font size in all browsers, margin changes, misc consistency 103 | button, 104 | input, 105 | select, 106 | textarea { 107 | font-size: 100%; 108 | margin: 0; 109 | vertical-align: baseline; 110 | *vertical-align: middle; 111 | } 112 | button, 113 | input { 114 | line-height: normal; // FF3/4 have !important on line-height in UA stylesheet 115 | *overflow: visible; // Inner spacing ie IE6/7 116 | } 117 | button::-moz-focus-inner, 118 | input::-moz-focus-inner { // Inner padding and border oddities in FF3/4 119 | border: 0; 120 | padding: 0; 121 | } 122 | button, 123 | input[type="button"], 124 | input[type="reset"], 125 | input[type="submit"] { 126 | cursor: pointer; // Cursors on all buttons applied consistently 127 | -webkit-appearance: button; // Style clicable inputs in iOS 128 | } 129 | input[type="search"] { // Appearance in Safari/Chrome 130 | -webkit-appearance: textfield; 131 | -webkit-box-sizing: content-box; 132 | -moz-box-sizing: content-box; 133 | box-sizing: content-box; 134 | } 135 | input[type="search"]::-webkit-search-decoration { 136 | -webkit-appearance: none; // Inner-padding issues in Chrome OSX, Safari 5 137 | } 138 | textarea { 139 | overflow: auto; // Remove vertical scrollbar in IE6-9 140 | vertical-align: top; // Readability and alignment cross-browser 141 | } -------------------------------------------------------------------------------- /js/tests/unit/bootstrap-modal.js: -------------------------------------------------------------------------------- 1 | $(function () { 2 | 3 | module("bootstrap-modal") 4 | 5 | test("should be defined on jquery object", function () { 6 | var div = $("") 7 | ok(div.modal, 'modal method is defined') 8 | }) 9 | 10 | test("should return element", function () { 11 | var div = $("") 12 | ok(div.modal() == div, 'div element returned') 13 | }) 14 | 15 | test("should expose defaults var for settings", function () { 16 | ok($.fn.modal.defaults, 'default object exposed') 17 | }) 18 | 19 | test("should insert into dom when show method is called", function () { 20 | stop() 21 | $.support.transition = false 22 | var div = $("") 23 | div 24 | .modal() 25 | .bind("shown", function () { 26 | ok($('#modal-test').length, 'modal insterted into dom') 27 | start() 28 | div.remove() 29 | }) 30 | .modal("show") 31 | }) 32 | 33 | test("should hide modal when hide is called", function () { 34 | stop() 35 | $.support.transition = false 36 | var div = $("") 37 | div 38 | .modal() 39 | .bind("shown", function () { 40 | ok($('#modal-test').is(":visible"), 'modal visible') 41 | ok($('#modal-test').length, 'modal insterted into dom') 42 | div.modal("hide") 43 | }) 44 | .bind("hidden", function() { 45 | ok(!$('#modal-test').is(":visible"), 'modal hidden') 46 | start() 47 | div.remove() 48 | }) 49 | .modal("show") 50 | }) 51 | 52 | test("should toggle when toggle is called", function () { 53 | stop() 54 | $.support.transition = false 55 | var div = $("") 56 | div 57 | .modal() 58 | .bind("shown", function () { 59 | ok($('#modal-test').is(":visible"), 'modal visible') 60 | ok($('#modal-test').length, 'modal insterted into dom') 61 | div.modal("toggle") 62 | }) 63 | .bind("hidden", function() { 64 | ok(!$('#modal-test').is(":visible"), 'modal hidden') 65 | start() 66 | div.remove() 67 | }) 68 | .modal("toggle") 69 | }) 70 | 71 | test("should remove from dom when click .close", function () { 72 | stop() 73 | $.support.transition = false 74 | var div = $("") 75 | div 76 | .modal() 77 | .bind("shown", function () { 78 | ok($('#modal-test').is(":visible"), 'modal visible') 79 | ok($('#modal-test').length, 'modal insterted into dom') 80 | div.find('.close').click() 81 | }) 82 | .bind("hidden", function() { 83 | ok(!$('#modal-test').is(":visible"), 'modal hidden') 84 | start() 85 | div.remove() 86 | }) 87 | .modal("toggle") 88 | }) 89 | 90 | test("should add backdrop when desired", function () { 91 | stop() 92 | $.support.transition = false 93 | var div = $("") 94 | div 95 | .modal({ backdrop:true }) 96 | .bind("shown", function () { 97 | equal($('.modal-backdrop').length, 1, 'modal backdrop inserted into dom') 98 | start() 99 | div.remove() 100 | $('.modal-backdrop').remove() 101 | }) 102 | .modal("show") 103 | }) 104 | 105 | test("should not add backdrop when not desired", function () { 106 | stop() 107 | $.support.transition = false 108 | var div = $("") 109 | div 110 | .modal({backdrop:false}) 111 | .bind("shown", function () { 112 | equal($('.modal-backdrop').length, 0, 'modal backdrop not inserted into dom') 113 | start() 114 | div.remove() 115 | }) 116 | .modal("show") 117 | }) 118 | 119 | test("should close backdrop when clicked", function () { 120 | stop() 121 | $.support.transition = false 122 | var div = $("") 123 | div 124 | .modal({backdrop:true}) 125 | .bind("shown", function () { 126 | equal($('.modal-backdrop').length, 1, 'modal backdrop inserted into dom') 127 | $('.modal-backdrop').click() 128 | equal($('.modal-backdrop').length, 0, 'modal backdrop removed from dom') 129 | start() 130 | div.remove() 131 | }) 132 | .modal("show") 133 | }) 134 | 135 | test("should not close backdrop when click disabled", function () { 136 | stop() 137 | $.support.transition = false 138 | var div = $("") 139 | div 140 | .modal({backdrop: 'static'}) 141 | .bind("shown", function () { 142 | equal($('.modal-backdrop').length, 1, 'modal backdrop inserted into dom') 143 | $('.modal-backdrop').click() 144 | equal($('.modal-backdrop').length, 1, 'modal backdrop still in dom') 145 | start() 146 | div.remove() 147 | $('.modal-backdrop').remove() 148 | }) 149 | .modal("show") 150 | }) 151 | }) 152 | -------------------------------------------------------------------------------- /lib/tables.less: -------------------------------------------------------------------------------- 1 | /* 2 | * Tables.less 3 | * Tables for, you guessed it, tabular data 4 | * ---------------------------------------- */ 5 | 6 | 7 | // BASELINE STYLES 8 | // --------------- 9 | 10 | table { 11 | width: 100%; 12 | margin-bottom: @baseline; 13 | padding: 0; 14 | font-size: @basefont; 15 | border-collapse: collapse; 16 | th, 17 | td { 18 | padding: 10px 10px 9px; 19 | line-height: @baseline; 20 | text-align: left; 21 | } 22 | th { 23 | padding-top: 9px; 24 | font-weight: bold; 25 | vertical-align: middle; 26 | } 27 | td { 28 | vertical-align: top; 29 | border-top: 1px solid #ddd; 30 | } 31 | // When scoped to row, fix th in tbody 32 | tbody th { 33 | border-top: 1px solid #ddd; 34 | vertical-align: top; 35 | } 36 | } 37 | 38 | 39 | // CONDENSED VERSION 40 | // ----------------- 41 | .condensed-table { 42 | th, 43 | td { 44 | padding: 5px 5px 4px; 45 | } 46 | } 47 | 48 | 49 | // BORDERED VERSION 50 | // ---------------- 51 | 52 | .bordered-table { 53 | border: 1px solid #ddd; 54 | border-collapse: separate; // Done so we can round those corners! 55 | *border-collapse: collapse; /* IE7, collapse table to remove spacing */ 56 | .border-radius(4px); 57 | th + th, 58 | td + td, 59 | th + td { 60 | border-left: 1px solid #ddd; 61 | } 62 | thead tr:first-child th:first-child, 63 | tbody tr:first-child td:first-child { 64 | .border-radius(4px 0 0 0); 65 | } 66 | thead tr:first-child th:last-child, 67 | tbody tr:first-child td:last-child { 68 | .border-radius(0 4px 0 0); 69 | } 70 | tbody tr:last-child td:first-child { 71 | .border-radius(0 0 0 4px); 72 | } 73 | tbody tr:last-child td:last-child { 74 | .border-radius(0 0 4px 0); 75 | } 76 | } 77 | 78 | 79 | // TABLE CELL SIZES 80 | // ---------------- 81 | 82 | // This is a duplication of the main grid .columns() mixin, but subtracts 20px to account for input padding and border 83 | .tableColumns(@columnSpan: 1) { 84 | width: ((@gridColumnWidth - 20) * @columnSpan) + ((@gridColumnWidth - 20) * (@columnSpan - 1)); 85 | } 86 | table { 87 | // Default columns 88 | .span1 { .tableColumns(1); } 89 | .span2 { .tableColumns(2); } 90 | .span3 { .tableColumns(3); } 91 | .span4 { .tableColumns(4); } 92 | .span5 { .tableColumns(5); } 93 | .span6 { .tableColumns(6); } 94 | .span7 { .tableColumns(7); } 95 | .span8 { .tableColumns(8); } 96 | .span9 { .tableColumns(9); } 97 | .span10 { .tableColumns(10); } 98 | .span11 { .tableColumns(11); } 99 | .span12 { .tableColumns(12); } 100 | .span13 { .tableColumns(13); } 101 | .span14 { .tableColumns(14); } 102 | .span15 { .tableColumns(15); } 103 | .span16 { .tableColumns(16); } 104 | } 105 | 106 | 107 | // ZEBRA-STRIPING 108 | // -------------- 109 | 110 | // Default zebra-stripe styles (alternating gray and transparent backgrounds) 111 | .zebra-striped { 112 | tbody { 113 | tr:nth-child(odd) td, 114 | tr:nth-child(odd) th { 115 | background-color: #f9f9f9; 116 | } 117 | tr:hover td, 118 | tr:hover th { 119 | background-color: #f5f5f5; 120 | } 121 | } 122 | } 123 | 124 | table { 125 | // Tablesorting styles w/ jQuery plugin 126 | .header { 127 | cursor: pointer; 128 | &:after { 129 | content: ""; 130 | float: right; 131 | margin-top: 7px; 132 | border-width: 0 4px 4px; 133 | border-style: solid; 134 | border-color: #000 transparent; 135 | visibility: hidden; 136 | } 137 | } 138 | // Style the sorted column headers (THs) 139 | .headerSortUp, 140 | .headerSortDown { 141 | background-color: rgba(141,192,219,.25); 142 | text-shadow: 0 1px 1px rgba(255,255,255,.75); 143 | } 144 | // Style the ascending (reverse alphabetical) column header 145 | .header:hover { 146 | &:after { 147 | visibility:visible; 148 | } 149 | } 150 | // Style the descending (alphabetical) column header 151 | .headerSortDown, 152 | .headerSortDown:hover { 153 | &:after { 154 | visibility:visible; 155 | .opacity(60); 156 | } 157 | } 158 | // Style the ascending (reverse alphabetical) column header 159 | .headerSortUp { 160 | &:after { 161 | border-bottom: none; 162 | border-left: 4px solid transparent; 163 | border-right: 4px solid transparent; 164 | border-top: 4px solid #000; 165 | visibility:visible; 166 | .box-shadow(none); //can't add boxshadow to downward facing arrow :( 167 | .opacity(60); 168 | } 169 | } 170 | // Blue Table Headings 171 | .blue { 172 | color: @blue; 173 | border-bottom-color: @blue; 174 | } 175 | .headerSortUp.blue, 176 | .headerSortDown.blue { 177 | background-color: lighten(@blue, 40%); 178 | } 179 | // Green Table Headings 180 | .green { 181 | color: @green; 182 | border-bottom-color: @green; 183 | } 184 | .headerSortUp.green, 185 | .headerSortDown.green { 186 | background-color: lighten(@green, 40%); 187 | } 188 | // Red Table Headings 189 | .red { 190 | color: @red; 191 | border-bottom-color: @red; 192 | } 193 | .headerSortUp.red, 194 | .headerSortDown.red { 195 | background-color: lighten(@red, 50%); 196 | } 197 | // Yellow Table Headings 198 | .yellow { 199 | color: @yellow; 200 | border-bottom-color: @yellow; 201 | } 202 | .headerSortUp.yellow, 203 | .headerSortDown.yellow { 204 | background-color: lighten(@yellow, 40%); 205 | } 206 | // Orange Table Headings 207 | .orange { 208 | color: @orange; 209 | border-bottom-color: @orange; 210 | } 211 | .headerSortUp.orange, 212 | .headerSortDown.orange { 213 | background-color: lighten(@orange, 40%); 214 | } 215 | // Purple Table Headings 216 | .purple { 217 | color: @purple; 218 | border-bottom-color: @purple; 219 | } 220 | .headerSortUp.purple, 221 | .headerSortDown.purple { 222 | background-color: lighten(@purple, 40%); 223 | } 224 | } -------------------------------------------------------------------------------- /js/tests/vendor/qunit.css: -------------------------------------------------------------------------------- 1 | /** 2 | * QUnit - A JavaScript Unit Testing Framework 3 | * 4 | * http://docs.jquery.com/QUnit 5 | * 6 | * Copyright (c) 2011 John Resig, Jörn Zaefferer 7 | * Dual licensed under the MIT (MIT-LICENSE.txt) 8 | * or GPL (GPL-LICENSE.txt) licenses. 9 | */ 10 | 11 | /** Font Family and Sizes */ 12 | 13 | #qunit-tests, #qunit-header, #qunit-banner, #qunit-testrunner-toolbar, #qunit-userAgent, #qunit-testresult { 14 | font-family: "Helvetica Neue Light", "HelveticaNeue-Light", "Helvetica Neue", Calibri, Helvetica, Arial, sans-serif; 15 | } 16 | 17 | #qunit-testrunner-toolbar, #qunit-userAgent, #qunit-testresult, #qunit-tests li { font-size: small; } 18 | #qunit-tests { font-size: smaller; } 19 | 20 | 21 | /** Resets */ 22 | 23 | #qunit-tests, #qunit-tests ol, #qunit-header, #qunit-banner, #qunit-userAgent, #qunit-testresult { 24 | margin: 0; 25 | padding: 0; 26 | } 27 | 28 | 29 | /** Header */ 30 | 31 | #qunit-header { 32 | padding: 0.5em 0 0.5em 1em; 33 | 34 | color: #8699a4; 35 | background-color: #0d3349; 36 | 37 | font-size: 1.5em; 38 | line-height: 1em; 39 | font-weight: normal; 40 | 41 | border-radius: 15px 15px 0 0; 42 | -moz-border-radius: 15px 15px 0 0; 43 | -webkit-border-top-right-radius: 15px; 44 | -webkit-border-top-left-radius: 15px; 45 | } 46 | 47 | #qunit-header a { 48 | text-decoration: none; 49 | color: #c2ccd1; 50 | } 51 | 52 | #qunit-header a:hover, 53 | #qunit-header a:focus { 54 | color: #fff; 55 | } 56 | 57 | #qunit-banner { 58 | height: 5px; 59 | } 60 | 61 | #qunit-testrunner-toolbar { 62 | padding: 0.5em 0 0.5em 2em; 63 | color: #5E740B; 64 | background-color: #eee; 65 | } 66 | 67 | #qunit-userAgent { 68 | padding: 0.5em 0 0.5em 2.5em; 69 | background-color: #2b81af; 70 | color: #fff; 71 | text-shadow: rgba(0, 0, 0, 0.5) 2px 2px 1px; 72 | } 73 | 74 | 75 | /** Tests: Pass/Fail */ 76 | 77 | #qunit-tests { 78 | list-style-position: inside; 79 | } 80 | 81 | #qunit-tests li { 82 | padding: 0.4em 0.5em 0.4em 2.5em; 83 | border-bottom: 1px solid #fff; 84 | list-style-position: inside; 85 | } 86 | 87 | #qunit-tests.hidepass li.pass, #qunit-tests.hidepass li.running { 88 | display: none; 89 | } 90 | 91 | #qunit-tests li strong { 92 | cursor: pointer; 93 | } 94 | 95 | #qunit-tests li a { 96 | padding: 0.5em; 97 | color: #c2ccd1; 98 | text-decoration: none; 99 | } 100 | #qunit-tests li a:hover, 101 | #qunit-tests li a:focus { 102 | color: #000; 103 | } 104 | 105 | #qunit-tests ol { 106 | margin-top: 0.5em; 107 | padding: 0.5em; 108 | 109 | background-color: #fff; 110 | 111 | border-radius: 15px; 112 | -moz-border-radius: 15px; 113 | -webkit-border-radius: 15px; 114 | 115 | box-shadow: inset 0px 2px 13px #999; 116 | -moz-box-shadow: inset 0px 2px 13px #999; 117 | -webkit-box-shadow: inset 0px 2px 13px #999; 118 | } 119 | 120 | #qunit-tests table { 121 | border-collapse: collapse; 122 | margin-top: .2em; 123 | } 124 | 125 | #qunit-tests th { 126 | text-align: right; 127 | vertical-align: top; 128 | padding: 0 .5em 0 0; 129 | } 130 | 131 | #qunit-tests td { 132 | vertical-align: top; 133 | } 134 | 135 | #qunit-tests pre { 136 | margin: 0; 137 | white-space: pre-wrap; 138 | word-wrap: break-word; 139 | } 140 | 141 | #qunit-tests del { 142 | background-color: #e0f2be; 143 | color: #374e0c; 144 | text-decoration: none; 145 | } 146 | 147 | #qunit-tests ins { 148 | background-color: #ffcaca; 149 | color: #500; 150 | text-decoration: none; 151 | } 152 | 153 | /*** Test Counts */ 154 | 155 | #qunit-tests b.counts { color: black; } 156 | #qunit-tests b.passed { color: #5E740B; } 157 | #qunit-tests b.failed { color: #710909; } 158 | 159 | #qunit-tests li li { 160 | margin: 0.5em; 161 | padding: 0.4em 0.5em 0.4em 0.5em; 162 | background-color: #fff; 163 | border-bottom: none; 164 | list-style-position: inside; 165 | } 166 | 167 | /*** Passing Styles */ 168 | 169 | #qunit-tests li li.pass { 170 | color: #5E740B; 171 | background-color: #fff; 172 | border-left: 26px solid #C6E746; 173 | } 174 | 175 | #qunit-tests .pass { color: #528CE0; background-color: #D2E0E6; } 176 | #qunit-tests .pass .test-name { color: #366097; } 177 | 178 | #qunit-tests .pass .test-actual, 179 | #qunit-tests .pass .test-expected { color: #999999; } 180 | 181 | #qunit-banner.qunit-pass { background-color: #C6E746; } 182 | 183 | /*** Failing Styles */ 184 | 185 | #qunit-tests li li.fail { 186 | color: #710909; 187 | background-color: #fff; 188 | border-left: 26px solid #EE5757; 189 | white-space: pre; 190 | } 191 | 192 | #qunit-tests > li:last-child { 193 | border-radius: 0 0 15px 15px; 194 | -moz-border-radius: 0 0 15px 15px; 195 | -webkit-border-bottom-right-radius: 15px; 196 | -webkit-border-bottom-left-radius: 15px; 197 | } 198 | 199 | #qunit-tests .fail { color: #000000; background-color: #EE5757; } 200 | #qunit-tests .fail .test-name, 201 | #qunit-tests .fail .module-name { color: #000000; } 202 | 203 | #qunit-tests .fail .test-actual { color: #EE5757; } 204 | #qunit-tests .fail .test-expected { color: green; } 205 | 206 | #qunit-banner.qunit-fail { background-color: #EE5757; } 207 | 208 | 209 | /** Result */ 210 | 211 | #qunit-testresult { 212 | padding: 0.5em 0.5em 0.5em 2.5em; 213 | 214 | color: #2b81af; 215 | background-color: #D2E0E6; 216 | 217 | border-bottom: 1px solid white; 218 | } 219 | 220 | /** Fixture */ 221 | 222 | #qunit-fixture { 223 | position: absolute; 224 | top: -10000px; 225 | left: -10000px; 226 | } 227 | 228 | /** Runoff */ 229 | 230 | #qunit-runoff { 231 | display:none; 232 | } -------------------------------------------------------------------------------- /js/bootstrap-modal.js: -------------------------------------------------------------------------------- 1 | /* ========================================================= 2 | * bootstrap-modal.js v1.4.0 3 | * http://twitter.github.com/bootstrap/javascript.html#modal 4 | * ========================================================= 5 | * Copyright 2011 Twitter, Inc. 6 | * 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | * ========================================================= */ 19 | 20 | 21 | !function( $ ){ 22 | 23 | "use strict" 24 | 25 | /* CSS TRANSITION SUPPORT (https://gist.github.com/373874) 26 | * ======================================================= */ 27 | 28 | var transitionEnd 29 | 30 | $(document).ready(function () { 31 | 32 | $.support.transition = (function () { 33 | var thisBody = document.body || document.documentElement 34 | , thisStyle = thisBody.style 35 | , support = thisStyle.transition !== undefined || thisStyle.WebkitTransition !== undefined || thisStyle.MozTransition !== undefined || thisStyle.MsTransition !== undefined || thisStyle.OTransition !== undefined 36 | return support 37 | })() 38 | 39 | // set CSS transition event type 40 | if ( $.support.transition ) { 41 | transitionEnd = "TransitionEnd" 42 | if ( $.browser.webkit ) { 43 | transitionEnd = "webkitTransitionEnd" 44 | } else if ( $.browser.mozilla ) { 45 | transitionEnd = "transitionend" 46 | } else if ( $.browser.opera ) { 47 | transitionEnd = "oTransitionEnd" 48 | } 49 | } 50 | 51 | }) 52 | 53 | 54 | /* MODAL PUBLIC CLASS DEFINITION 55 | * ============================= */ 56 | 57 | var Modal = function ( content, options ) { 58 | this.settings = $.extend({}, $.fn.modal.defaults, options) 59 | this.$element = $(content) 60 | .delegate('.close', 'click.modal', $.proxy(this.hide, this)) 61 | 62 | if ( this.settings.show ) { 63 | this.show() 64 | } 65 | 66 | return this 67 | } 68 | 69 | Modal.prototype = { 70 | 71 | toggle: function () { 72 | return this[!this.isShown ? 'show' : 'hide']() 73 | } 74 | 75 | , show: function () { 76 | var that = this 77 | this.isShown = true 78 | this.$element.trigger('show') 79 | 80 | escape.call(this) 81 | backdrop.call(this, function () { 82 | var transition = $.support.transition && that.$element.hasClass('fade') 83 | 84 | that.$element 85 | .appendTo(document.body) 86 | .show() 87 | 88 | if (transition) { 89 | that.$element[0].offsetWidth // force reflow 90 | } 91 | 92 | that.$element.addClass('in') 93 | 94 | transition ? 95 | that.$element.one(transitionEnd, function () { that.$element.trigger('shown') }) : 96 | that.$element.trigger('shown') 97 | 98 | }) 99 | 100 | return this 101 | } 102 | 103 | , hide: function (e) { 104 | e && e.preventDefault() 105 | 106 | if ( !this.isShown ) { 107 | return this 108 | } 109 | 110 | var that = this 111 | this.isShown = false 112 | 113 | escape.call(this) 114 | 115 | this.$element 116 | .trigger('hide') 117 | .removeClass('in') 118 | 119 | $.support.transition && this.$element.hasClass('fade') ? 120 | hideWithTransition.call(this) : 121 | hideModal.call(this) 122 | 123 | return this 124 | } 125 | 126 | } 127 | 128 | 129 | /* MODAL PRIVATE METHODS 130 | * ===================== */ 131 | 132 | function hideWithTransition() { 133 | // firefox drops transitionEnd events :{o 134 | var that = this 135 | , timeout = setTimeout(function () { 136 | that.$element.unbind(transitionEnd) 137 | hideModal.call(that) 138 | }, 500) 139 | 140 | this.$element.one(transitionEnd, function () { 141 | clearTimeout(timeout) 142 | hideModal.call(that) 143 | }) 144 | } 145 | 146 | function hideModal (that) { 147 | this.$element 148 | .hide() 149 | .trigger('hidden') 150 | 151 | backdrop.call(this) 152 | } 153 | 154 | function backdrop ( callback ) { 155 | var that = this 156 | , animate = this.$element.hasClass('fade') ? 'fade' : '' 157 | if ( this.isShown && this.settings.backdrop ) { 158 | var doAnimate = $.support.transition && animate 159 | 160 | this.$backdrop = $('"; 22 | $command = "SELECT * FROM roundltc,dailytotal,round"; 23 | $q = mysql_query($command); 24 | $dltc = mysql_query("SELECT * FROM `dailyltc`"); 25 | $rows = mysql_num_rows($q); 26 | $rows2 = mysql_num_rows($dltc); 27 | $subcommand = "SELECT * FROM subtotal"; 28 | $subq = mysql_query($subcommand); 29 | $subrows = mysql_num_rows($subq); 30 | $i = 0; 31 | while ($i < $rows) { 32 | $roundltc = mysql_result($q, $i, "roundltc"); 33 | $dailytotal = mysql_result($q, $i, "dailytotal"); 34 | $round = mysql_result($q, $i, "round"); 35 | $i++; 36 | } 37 | 38 | echo ' 39 |
    40 |

    Daily statistics

    41 | 42 | 43 | 44 | 45 | 46 | 47 | 49 | 51 |
    Submitted This Round: ' . $rows2 . '
    Current Round: ' . $round . '
    Payout This Round: ' . $roundltc . ' LTC
    Total Payout: ' . $dailytotal . ' LTC
    Total Submitted: ' . $subrows . '
    Donate: ' . $btclient->getbalance($don_faucet, 0) . 48 | ' LTC
    Donation address: ' . $btclient->getaccountaddress($don_faucet) . 50 | '
    '; 52 | $i++; 53 | 54 | ?> 55 |
    56 |

    Daily settings

    57 | 58 | 59 | 60 | Round Price: 61 | 62 |
    63 |
    64 | 65 | Total Paid Out: 66 | 67 |
    68 |
    69 | 70 | Current Round: 71 | 72 |
    73 |
    74 | 75 | Delete Round: 76 |
    77 |
    78 | 81 |

    Litecoind statistics

    82 | 83 | 85 | 87 | 88 | 90 | 92 | 94 | 96 | 98 | 99 | 100 |
    Server balance total: ' . $derp['balance'] . 84 | ' LTC
    Server connections: ' . $derp['connections'] . 86 | '
    Server version: ' . $derp['version'] . '
    Server protocolversion: ' . $derp['protocolversion'] . 89 | '
    Server keypoololdest: ' . $derp['keypoololdest'] . 91 | '
    Server keypoolsize: ' . $derp['keypoolsize'] . 93 | '
    Server paytxfee: ' . $derp['paytxfee'] . 95 | '
    Server minimun input: ' . $derp['mininput'] . 97 | '
    Server errors: ' . $derp['errors'] . '
    '; 101 | 102 | echo '

    Other information

    103 | 104 | 106 | 108 | 110 | 112 | 114 |
    Server Hostname: ' . $_SERVER['SERVER_NAME'] . 105 | '
    Server IP Address: ' . $_SERVER['SERVER_ADDR'] . 107 | '
    Server requested file: ' . $_SERVER['REQUEST_URI'] . 109 | '
    Server uptime/users online: ' . $uptime . 111 | '
    Server time: ' . date("D M j G:i:s T Y") . 113 | '
    Your IP/Host: ' . gethostbyaddr($_SERVER['REMOTE_ADDR']) . 115 | '
    116 | 117 | 118 |
    119 |

    All Recent transactions

    120 | 121 | '; 122 | $dump = array_reverse($btclient->listtransactions()); 123 | 124 | 125 | foreach ($dump as $herp) { 126 | echo ""; 130 | } 131 | echo "
    ConfirmsAddressAmountFeeTransaction ID
    " . $herp['confirmations'] . "" . $herp['amount'] . "" . ($herp['fee'] ? 128 | $herp["fee"] : 0) . "
    "; 132 | /** 133 | * foreach($dump as $ky) { 134 | * $z = array_keys($dump); 135 | * if(!$i) $i = 0; 136 | * echo "" . $z[$i] . "" . $ky[0] . ""; 137 | * $i++; 138 | * }*/ 139 | // print_r($dump); 140 | //foreach ($dump as $herp) { 141 | //echo "" . $herp['category'] . "". $herp['amount'] . "" . $herp['confirmations'] . "" . $herp['fee'] . ""; 142 | //} 143 | 144 | 145 | // $transactions = $btclient->query('listtransactions', '', '240'); 146 | //$numAccounts = count($transactions); 147 | // for ($i = 0; $i < $numAccounts; $i++) { 148 | //echo "lol"; 149 | // } 150 | 151 | echo "

    Submitted addresses in round


    "; 152 | ?> 153 |
    154 | 155 | 156 | 157 | 158 | 159 | 160 | 170 | 171 | 172 | 173 | 174 | 175 | 176 | 177 | "; 182 | 183 | 184 | ?> 185 | 191 | -------------------------------------------------------------------------------- /lib/mixins.less: -------------------------------------------------------------------------------- 1 | /* Mixins.less 2 | * Snippets of reusable CSS to develop faster and keep code readable 3 | * ----------------------------------------------------------------- */ 4 | 5 | 6 | // Clearfix for clearing floats like a boss h5bp.com/q 7 | .clearfix() { 8 | zoom: 1; 9 | &:before, 10 | &:after { 11 | display: table; 12 | content: ""; 13 | zoom: 1; 14 | } 15 | &:after { 16 | clear: both; 17 | } 18 | } 19 | 20 | // Center-align a block level element 21 | .center-block() { 22 | display: block; 23 | margin-left: auto; 24 | margin-right: auto; 25 | } 26 | 27 | // Sizing shortcuts 28 | .size(@height: 5px, @width: 5px) { 29 | height: @height; 30 | width: @width; 31 | } 32 | .square(@size: 5px) { 33 | .size(@size, @size); 34 | } 35 | 36 | // Input placeholder text 37 | .placeholder(@color: @grayLight) { 38 | :-moz-placeholder { 39 | color: @color; 40 | } 41 | ::-webkit-input-placeholder { 42 | color: @color; 43 | } 44 | } 45 | 46 | // Font Stacks 47 | #font { 48 | .shorthand(@weight: normal, @size: 14px, @lineHeight: 20px) { 49 | font-size: @size; 50 | font-weight: @weight; 51 | line-height: @lineHeight; 52 | } 53 | .sans-serif(@weight: normal, @size: 14px, @lineHeight: 20px) { 54 | font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; 55 | font-size: @size; 56 | font-weight: @weight; 57 | line-height: @lineHeight; 58 | } 59 | .serif(@weight: normal, @size: 14px, @lineHeight: 20px) { 60 | font-family: "Georgia", Times New Roman, Times, serif; 61 | font-size: @size; 62 | font-weight: @weight; 63 | line-height: @lineHeight; 64 | } 65 | .monospace(@weight: normal, @size: 12px, @lineHeight: 20px) { 66 | font-family: "Monaco", Courier New, monospace; 67 | font-size: @size; 68 | font-weight: @weight; 69 | line-height: @lineHeight; 70 | } 71 | } 72 | 73 | // Grid System 74 | .fixed-container() { 75 | width: @siteWidth; 76 | margin-left: auto; 77 | margin-right: auto; 78 | .clearfix(); 79 | } 80 | .columns(@columnSpan: 1) { 81 | width: (@gridColumnWidth * @columnSpan) + (@gridGutterWidth * (@columnSpan - 1)); 82 | } 83 | .offset(@columnOffset: 1) { 84 | margin-left: (@gridColumnWidth * @columnOffset) + (@gridGutterWidth * (@columnOffset - 1)) + @extraSpace; 85 | } 86 | // Necessary grid styles for every column to make them appear next to each other horizontally 87 | .gridColumn() { 88 | display: inline; 89 | float: left; 90 | margin-left: @gridGutterWidth; 91 | } 92 | // makeColumn can be used to mark any element (e.g., .content-primary) as a column without changing markup to .span something 93 | .makeColumn(@columnSpan: 1) { 94 | .gridColumn(); 95 | .columns(@columnSpan); 96 | } 97 | 98 | // Border Radius 99 | .border-radius(@radius: 5px) { 100 | -webkit-border-radius: @radius; 101 | -moz-border-radius: @radius; 102 | border-radius: @radius; 103 | } 104 | 105 | // Drop shadows 106 | .box-shadow(@shadow: 0 1px 3px rgba(0,0,0,.25)) { 107 | -webkit-box-shadow: @shadow; 108 | -moz-box-shadow: @shadow; 109 | box-shadow: @shadow; 110 | } 111 | 112 | // Transitions 113 | .transition(@transition) { 114 | -webkit-transition: @transition; 115 | -moz-transition: @transition; 116 | -ms-transition: @transition; 117 | -o-transition: @transition; 118 | transition: @transition; 119 | } 120 | 121 | // Background clipping 122 | .background-clip(@clip) { 123 | -webkit-background-clip: @clip; 124 | -moz-background-clip: @clip; 125 | background-clip: @clip; 126 | } 127 | 128 | // CSS3 Content Columns 129 | .content-columns(@columnCount, @columnGap: 20px) { 130 | -webkit-column-count: @columnCount; 131 | -moz-column-count: @columnCount; 132 | column-count: @columnCount; 133 | -webkit-column-gap: @columnGap; 134 | -moz-column-gap: @columnGap; 135 | column-gap: @columnGap; 136 | } 137 | 138 | // Make any element resizable for prototyping 139 | .resizable(@direction: both) { 140 | resize: @direction; // Options are horizontal, vertical, both 141 | overflow: auto; // Safari fix 142 | } 143 | 144 | // Add an alphatransparency value to any background or border color (via Elyse Holladay) 145 | #translucent { 146 | .background(@color: @white, @alpha: 1) { 147 | background-color: hsla(hue(@color), saturation(@color), lightness(@color), @alpha); 148 | } 149 | .border(@color: @white, @alpha: 1) { 150 | border-color: hsla(hue(@color), saturation(@color), lightness(@color), @alpha); 151 | background-clip: padding-box; 152 | } 153 | } 154 | 155 | // Gradient Bar Colors for buttons and allerts 156 | .gradientBar(@primaryColor, @secondaryColor) { 157 | #gradient > .vertical(@primaryColor, @secondaryColor); 158 | text-shadow: 0 -1px 0 rgba(0,0,0,.25); 159 | border-color: @secondaryColor @secondaryColor darken(@secondaryColor, 15%); 160 | border-color: rgba(0,0,0,.1) rgba(0,0,0,.1) fadein(rgba(0,0,0,.1), 15%); 161 | } 162 | 163 | // Gradients 164 | #gradient { 165 | .horizontal (@startColor: #555, @endColor: #333) { 166 | background-color: @endColor; 167 | background-repeat: repeat-x; 168 | background-image: -khtml-gradient(linear, left top, right top, from(@startColor), to(@endColor)); // Konqueror 169 | background-image: -moz-linear-gradient(left, @startColor, @endColor); // FF 3.6+ 170 | background-image: -ms-linear-gradient(left, @startColor, @endColor); // IE10 171 | background-image: -webkit-gradient(linear, left top, right top, color-stop(0%, @startColor), color-stop(100%, @endColor)); // Safari 4+, Chrome 2+ 172 | background-image: -webkit-linear-gradient(left, @startColor, @endColor); // Safari 5.1+, Chrome 10+ 173 | background-image: -o-linear-gradient(left, @startColor, @endColor); // Opera 11.10 174 | background-image: linear-gradient(left, @startColor, @endColor); // Le standard 175 | filter: e(%("progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=1)",@startColor,@endColor)); // IE9 and down 176 | } 177 | .vertical (@startColor: #555, @endColor: #333) { 178 | background-color: @endColor; 179 | background-repeat: repeat-x; 180 | background-image: -khtml-gradient(linear, left top, left bottom, from(@startColor), to(@endColor)); // Konqueror 181 | background-image: -moz-linear-gradient(top, @startColor, @endColor); // FF 3.6+ 182 | background-image: -ms-linear-gradient(top, @startColor, @endColor); // IE10 183 | background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, @startColor), color-stop(100%, @endColor)); // Safari 4+, Chrome 2+ 184 | background-image: -webkit-linear-gradient(top, @startColor, @endColor); // Safari 5.1+, Chrome 10+ 185 | background-image: -o-linear-gradient(top, @startColor, @endColor); // Opera 11.10 186 | background-image: linear-gradient(top, @startColor, @endColor); // The standard 187 | filter: e(%("progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=0)",@startColor,@endColor)); // IE9 and down 188 | } 189 | .directional (@startColor: #555, @endColor: #333, @deg: 45deg) { 190 | background-color: @endColor; 191 | background-repeat: repeat-x; 192 | background-image: -moz-linear-gradient(@deg, @startColor, @endColor); // FF 3.6+ 193 | background-image: -ms-linear-gradient(@deg, @startColor, @endColor); // IE10 194 | background-image: -webkit-linear-gradient(@deg, @startColor, @endColor); // Safari 5.1+, Chrome 10+ 195 | background-image: -o-linear-gradient(@deg, @startColor, @endColor); // Opera 11.10 196 | background-image: linear-gradient(@deg, @startColor, @endColor); // The standard 197 | } 198 | .vertical-three-colors(@startColor: #00b3ee, @midColor: #7a43b6, @colorStop: 50%, @endColor: #c3325f) { 199 | background-color: @endColor; 200 | background-repeat: no-repeat; 201 | background-image: -webkit-gradient(linear, 0 0, 0 100%, from(@startColor), color-stop(@colorStop, @midColor), to(@endColor)); 202 | background-image: -webkit-linear-gradient(@startColor, @midColor @colorStop, @endColor); 203 | background-image: -moz-linear-gradient(top, @startColor, @midColor @colorStop, @endColor); 204 | background-image: -ms-linear-gradient(@startColor, @midColor @colorStop, @endColor); 205 | background-image: -o-linear-gradient(@startColor, @midColor @colorStop, @endColor); 206 | background-image: linear-gradient(@startColor, @midColor @colorStop, @endColor); 207 | filter: e(%("progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=0)",@startColor,@endColor)); // IE9 and down, gets no color-stop at all for proper fallback 208 | } 209 | } 210 | 211 | // Reset filters for IE 212 | .reset-filter() { 213 | filter: e(%("progid:DXImageTransform.Microsoft.gradient(enabled = false)")); 214 | } 215 | 216 | // Opacity 217 | .opacity(@opacity: 100) { 218 | filter: e(%("alpha(opacity=%d)", @opacity)); 219 | -khtml-opacity: @opacity / 100; 220 | -moz-opacity: @opacity / 100; 221 | opacity: @opacity / 100; 222 | } -------------------------------------------------------------------------------- /js/bootstrap-twipsy.js: -------------------------------------------------------------------------------- 1 | /* ========================================================== 2 | * bootstrap-twipsy.js v1.4.0 3 | * http://twitter.github.com/bootstrap/javascript.html#twipsy 4 | * Adapted from the original jQuery.tipsy by Jason Frame 5 | * ========================================================== 6 | * Copyright 2011 Twitter, Inc. 7 | * 8 | * Licensed under the Apache License, Version 2.0 (the "License"); 9 | * you may not use this file except in compliance with the License. 10 | * You may obtain a copy of the License at 11 | * 12 | * http://www.apache.org/licenses/LICENSE-2.0 13 | * 14 | * Unless required by applicable law or agreed to in writing, software 15 | * distributed under the License is distributed on an "AS IS" BASIS, 16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 | * See the License for the specific language governing permissions and 18 | * limitations under the License. 19 | * ========================================================== */ 20 | 21 | 22 | !function( $ ) { 23 | 24 | "use strict" 25 | 26 | /* CSS TRANSITION SUPPORT (https://gist.github.com/373874) 27 | * ======================================================= */ 28 | 29 | var transitionEnd 30 | 31 | $(document).ready(function () { 32 | 33 | $.support.transition = (function () { 34 | var thisBody = document.body || document.documentElement 35 | , thisStyle = thisBody.style 36 | , support = thisStyle.transition !== undefined || thisStyle.WebkitTransition !== undefined || thisStyle.MozTransition !== undefined || thisStyle.MsTransition !== undefined || thisStyle.OTransition !== undefined 37 | return support 38 | })() 39 | 40 | // set CSS transition event type 41 | if ( $.support.transition ) { 42 | transitionEnd = "TransitionEnd" 43 | if ( $.browser.webkit ) { 44 | transitionEnd = "webkitTransitionEnd" 45 | } else if ( $.browser.mozilla ) { 46 | transitionEnd = "transitionend" 47 | } else if ( $.browser.opera ) { 48 | transitionEnd = "oTransitionEnd" 49 | } 50 | } 51 | 52 | }) 53 | 54 | 55 | /* TWIPSY PUBLIC CLASS DEFINITION 56 | * ============================== */ 57 | 58 | var Twipsy = function ( element, options ) { 59 | this.$element = $(element) 60 | this.options = options 61 | this.enabled = true 62 | this.fixTitle() 63 | } 64 | 65 | Twipsy.prototype = { 66 | 67 | show: function() { 68 | var pos 69 | , actualWidth 70 | , actualHeight 71 | , placement 72 | , $tip 73 | , tp 74 | 75 | if (this.hasContent() && this.enabled) { 76 | $tip = this.tip() 77 | this.setContent() 78 | 79 | if (this.options.animate) { 80 | $tip.addClass('fade') 81 | } 82 | 83 | $tip 84 | .remove() 85 | .css({ top: 0, left: 0, display: 'block' }) 86 | .prependTo(document.body) 87 | 88 | pos = $.extend({}, this.$element.offset(), { 89 | width: this.$element[0].offsetWidth 90 | , height: this.$element[0].offsetHeight 91 | }) 92 | 93 | actualWidth = $tip[0].offsetWidth 94 | actualHeight = $tip[0].offsetHeight 95 | 96 | placement = maybeCall(this.options.placement, this, [ $tip[0], this.$element[0] ]) 97 | 98 | switch (placement) { 99 | case 'below': 100 | tp = {top: pos.top + pos.height + this.options.offset, left: pos.left + pos.width / 2 - actualWidth / 2} 101 | break 102 | case 'above': 103 | tp = {top: pos.top - actualHeight - this.options.offset, left: pos.left + pos.width / 2 - actualWidth / 2} 104 | break 105 | case 'left': 106 | tp = {top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left - actualWidth - this.options.offset} 107 | break 108 | case 'right': 109 | tp = {top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left + pos.width + this.options.offset} 110 | break 111 | } 112 | 113 | $tip 114 | .css(tp) 115 | .addClass(placement) 116 | .addClass('in') 117 | } 118 | } 119 | 120 | , setContent: function () { 121 | var $tip = this.tip() 122 | $tip.find('.twipsy-inner')[this.options.html ? 'html' : 'text'](this.getTitle()) 123 | $tip[0].className = 'twipsy' 124 | } 125 | 126 | , hide: function() { 127 | var that = this 128 | , $tip = this.tip() 129 | 130 | $tip.removeClass('in') 131 | 132 | function removeElement () { 133 | $tip.remove() 134 | } 135 | 136 | $.support.transition && this.$tip.hasClass('fade') ? 137 | $tip.bind(transitionEnd, removeElement) : 138 | removeElement() 139 | } 140 | 141 | , fixTitle: function() { 142 | var $e = this.$element 143 | if ($e.attr('title') || typeof($e.attr('data-original-title')) != 'string') { 144 | $e.attr('data-original-title', $e.attr('title') || '').removeAttr('title') 145 | } 146 | } 147 | 148 | , hasContent: function () { 149 | return this.getTitle() 150 | } 151 | 152 | , getTitle: function() { 153 | var title 154 | , $e = this.$element 155 | , o = this.options 156 | 157 | this.fixTitle() 158 | 159 | if (typeof o.title == 'string') { 160 | title = $e.attr(o.title == 'title' ? 'data-original-title' : o.title) 161 | } else if (typeof o.title == 'function') { 162 | title = o.title.call($e[0]) 163 | } 164 | 165 | title = ('' + title).replace(/(^\s*|\s*$)/, "") 166 | 167 | return title || o.fallback 168 | } 169 | 170 | , tip: function() { 171 | return this.$tip = this.$tip || $('
    ').html(this.options.template) 172 | } 173 | 174 | , validate: function() { 175 | if (!this.$element[0].parentNode) { 176 | this.hide() 177 | this.$element = null 178 | this.options = null 179 | } 180 | } 181 | 182 | , enable: function() { 183 | this.enabled = true 184 | } 185 | 186 | , disable: function() { 187 | this.enabled = false 188 | } 189 | 190 | , toggleEnabled: function() { 191 | this.enabled = !this.enabled 192 | } 193 | 194 | , toggle: function () { 195 | this[this.tip().hasClass('in') ? 'hide' : 'show']() 196 | } 197 | 198 | } 199 | 200 | 201 | /* TWIPSY PRIVATE METHODS 202 | * ====================== */ 203 | 204 | function maybeCall ( thing, ctx, args ) { 205 | return typeof thing == 'function' ? thing.apply(ctx, args) : thing 206 | } 207 | 208 | /* TWIPSY PLUGIN DEFINITION 209 | * ======================== */ 210 | 211 | $.fn.twipsy = function (options) { 212 | $.fn.twipsy.initWith.call(this, options, Twipsy, 'twipsy') 213 | return this 214 | } 215 | 216 | $.fn.twipsy.initWith = function (options, Constructor, name) { 217 | var twipsy 218 | , binder 219 | , eventIn 220 | , eventOut 221 | 222 | if (options === true) { 223 | return this.data(name) 224 | } else if (typeof options == 'string') { 225 | twipsy = this.data(name) 226 | if (twipsy) { 227 | twipsy[options]() 228 | } 229 | return this 230 | } 231 | 232 | options = $.extend({}, $.fn[name].defaults, options) 233 | 234 | function get(ele) { 235 | var twipsy = $.data(ele, name) 236 | 237 | if (!twipsy) { 238 | twipsy = new Constructor(ele, $.fn.twipsy.elementOptions(ele, options)) 239 | $.data(ele, name, twipsy) 240 | } 241 | 242 | return twipsy 243 | } 244 | 245 | function enter() { 246 | var twipsy = get(this) 247 | twipsy.hoverState = 'in' 248 | 249 | if (options.delayIn == 0) { 250 | twipsy.show() 251 | } else { 252 | twipsy.fixTitle() 253 | setTimeout(function() { 254 | if (twipsy.hoverState == 'in') { 255 | twipsy.show() 256 | } 257 | }, options.delayIn) 258 | } 259 | } 260 | 261 | function leave() { 262 | var twipsy = get(this) 263 | twipsy.hoverState = 'out' 264 | if (options.delayOut == 0) { 265 | twipsy.hide() 266 | } else { 267 | setTimeout(function() { 268 | if (twipsy.hoverState == 'out') { 269 | twipsy.hide() 270 | } 271 | }, options.delayOut) 272 | } 273 | } 274 | 275 | if (!options.live) { 276 | this.each(function() { 277 | get(this) 278 | }) 279 | } 280 | 281 | if (options.trigger != 'manual') { 282 | binder = options.live ? 'live' : 'bind' 283 | eventIn = options.trigger == 'hover' ? 'mouseenter' : 'focus' 284 | eventOut = options.trigger == 'hover' ? 'mouseleave' : 'blur' 285 | this[binder](eventIn, enter)[binder](eventOut, leave) 286 | } 287 | 288 | return this 289 | } 290 | 291 | $.fn.twipsy.Twipsy = Twipsy 292 | 293 | $.fn.twipsy.defaults = { 294 | animate: true 295 | , delayIn: 0 296 | , delayOut: 0 297 | , fallback: '' 298 | , placement: 'above' 299 | , html: false 300 | , live: false 301 | , offset: 0 302 | , title: 'title' 303 | , trigger: 'hover' 304 | , template: '
    ' 305 | } 306 | 307 | $.fn.twipsy.rejectAttrOptions = [ 'title' ] 308 | 309 | $.fn.twipsy.elementOptions = function(ele, options) { 310 | var data = $(ele).data() 311 | , rejects = $.fn.twipsy.rejectAttrOptions 312 | , i = rejects.length 313 | 314 | while (i--) { 315 | delete data[rejects[i]] 316 | } 317 | 318 | return $.extend({}, options, data) 319 | } 320 | 321 | }( window.jQuery || window.ender ); -------------------------------------------------------------------------------- /core/recaptchalib.inc: -------------------------------------------------------------------------------- 1 | $value ) 50 | $req .= $key . '=' . urlencode( stripslashes($value) ) . '&'; 51 | 52 | // Cut the last '&' 53 | $req=substr($req,0,strlen($req)-1); 54 | return $req; 55 | } 56 | 57 | 58 | 59 | /** 60 | * Submits an HTTP POST to a reCAPTCHA server 61 | * @param string $host 62 | * @param string $path 63 | * @param array $data 64 | * @param int port 65 | * @return array response 66 | */ 67 | function _recaptcha_http_post($host, $path, $data, $port = 80) { 68 | 69 | $req = _recaptcha_qsencode ($data); 70 | 71 | $http_request = "POST $path HTTP/1.0\r\n"; 72 | $http_request .= "Host: $host\r\n"; 73 | $http_request .= "Content-Type: application/x-www-form-urlencoded;\r\n"; 74 | $http_request .= "Content-Length: " . strlen($req) . "\r\n"; 75 | $http_request .= "User-Agent: reCAPTCHA/PHP\r\n"; 76 | $http_request .= "\r\n"; 77 | $http_request .= $req; 78 | 79 | $response = ''; 80 | if( false == ( $fs = @fsockopen($host, $port, $errno, $errstr, 10) ) ) { 81 | die ('Could not open socket'); 82 | } 83 | 84 | fwrite($fs, $http_request); 85 | 86 | while ( !feof($fs) ) 87 | $response .= fgets($fs, 1160); // One TCP-IP packet 88 | fclose($fs); 89 | $response = explode("\r\n\r\n", $response, 2); 90 | 91 | return $response; 92 | } 93 | 94 | 95 | 96 | /** 97 | * Gets the challenge HTML (javascript and non-javascript version). 98 | * This is called from the browser, and the resulting reCAPTCHA HTML widget 99 | * is embedded within the HTML form it was called from. 100 | * @param string $pubkey A public key for reCAPTCHA 101 | * @param string $error The error given by reCAPTCHA (optional, default is null) 102 | * @param boolean $use_ssl Should the request be made over ssl? (optional, default is false) 103 | 104 | * @return string - The HTML to be embedded in the user's form. 105 | */ 106 | function recaptcha_get_html ($pubkey, $error = null, $use_ssl = false) 107 | { 108 | if ($pubkey == null || $pubkey == '') { 109 | die ("To use reCAPTCHA you must get an API key from https://www.google.com/recaptcha/admin/create"); 110 | } 111 | 112 | if ($use_ssl) { 113 | $server = RECAPTCHA_API_SECURE_SERVER; 114 | } else { 115 | $server = RECAPTCHA_API_SERVER; 116 | } 117 | 118 | $errorpart = ""; 119 | if ($error) { 120 | $errorpart = "&error=" . $error; 121 | } 122 | return ' 123 | 124 | '; 129 | } 130 | 131 | 132 | 133 | 134 | /** 135 | * A ReCaptchaResponse is returned from recaptcha_check_answer() 136 | */ 137 | class ReCaptchaResponse { 138 | var $is_valid; 139 | var $error; 140 | } 141 | 142 | 143 | /** 144 | * Calls an HTTP POST function to verify if the user's guess was correct 145 | * @param string $privkey 146 | * @param string $remoteip 147 | * @param string $challenge 148 | * @param string $response 149 | * @param array $extra_params an array of extra variables to post to the server 150 | * @return ReCaptchaResponse 151 | */ 152 | function recaptcha_check_answer ($privkey, $remoteip, $challenge, $response, $extra_params = array()) 153 | { 154 | if ($privkey == null || $privkey == '') { 155 | die ("To use reCAPTCHA you must get an API key from https://www.google.com/recaptcha/admin/create"); 156 | } 157 | 158 | if ($remoteip == null || $remoteip == '') { 159 | die ("For security reasons, you must pass the remote ip to reCAPTCHA"); 160 | } 161 | 162 | 163 | 164 | //discard spam submissions 165 | if ($challenge == null || strlen($challenge) == 0 || $response == null || strlen($response) == 0) { 166 | $recaptcha_response = new ReCaptchaResponse(); 167 | $recaptcha_response->is_valid = false; 168 | $recaptcha_response->error = 'incorrect-captcha-sol'; 169 | return $recaptcha_response; 170 | } 171 | 172 | $response = _recaptcha_http_post (RECAPTCHA_VERIFY_SERVER, "/recaptcha/api/verify", 173 | array ( 174 | 'privatekey' => $privkey, 175 | 'remoteip' => $remoteip, 176 | 'challenge' => $challenge, 177 | 'response' => $response 178 | ) + $extra_params 179 | ); 180 | 181 | $answers = explode ("\n", $response [1]); 182 | $recaptcha_response = new ReCaptchaResponse(); 183 | 184 | if (trim ($answers [0]) == 'true') { 185 | $recaptcha_response->is_valid = true; 186 | } 187 | else { 188 | $recaptcha_response->is_valid = false; 189 | $recaptcha_response->error = $answers [1]; 190 | } 191 | return $recaptcha_response; 192 | 193 | } 194 | 195 | /** 196 | * gets a URL where the user can sign up for reCAPTCHA. If your application 197 | * has a configuration page where you enter a key, you should provide a link 198 | * using this function. 199 | * @param string $domain The domain where the page is hosted 200 | * @param string $appname The name of your application 201 | */ 202 | function recaptcha_get_signup_url ($domain = null, $appname = null) { 203 | return "https://www.google.com/recaptcha/admin/create?" . _recaptcha_qsencode (array ('domains' => $domain, 'app' => $appname)); 204 | } 205 | 206 | function _recaptcha_aes_pad($val) { 207 | $block_size = 16; 208 | $numpad = $block_size - (strlen ($val) % $block_size); 209 | return str_pad($val, strlen ($val) + $numpad, chr($numpad)); 210 | } 211 | 212 | /* Mailhide related code */ 213 | 214 | function _recaptcha_aes_encrypt($val,$ky) { 215 | if (! function_exists ("mcrypt_encrypt")) { 216 | die ("To use reCAPTCHA Mailhide, you need to have the mcrypt php module installed."); 217 | } 218 | $mode=MCRYPT_MODE_CBC; 219 | $enc=MCRYPT_RIJNDAEL_128; 220 | $val=_recaptcha_aes_pad($val); 221 | return mcrypt_encrypt($enc, $ky, $val, $mode, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"); 222 | } 223 | 224 | 225 | function _recaptcha_mailhide_urlbase64 ($x) { 226 | return strtr(base64_encode ($x), '+/', '-_'); 227 | } 228 | 229 | /* gets the reCAPTCHA Mailhide url for a given email, public key and private key */ 230 | function recaptcha_mailhide_url($pubkey, $privkey, $email) { 231 | if ($pubkey == '' || $pubkey == null || $privkey == "" || $privkey == null) { 232 | die ("To use reCAPTCHA Mailhide, you have to sign up for a public and private key, " . 233 | "you can do so at http://www.google.com/recaptcha/mailhide/apikey"); 234 | } 235 | 236 | 237 | $ky = pack('H*', $privkey); 238 | $cryptmail = _recaptcha_aes_encrypt ($email, $ky); 239 | 240 | return "http://www.google.com/recaptcha/mailhide/d?k=" . $pubkey . "&c=" . _recaptcha_mailhide_urlbase64 ($cryptmail); 241 | } 242 | 243 | /** 244 | * gets the parts of the email to expose to the user. 245 | * eg, given johndoe@example,com return ["john", "example.com"]. 246 | * the email is then displayed as john...@example.com 247 | */ 248 | function _recaptcha_mailhide_email_parts ($email) { 249 | $arr = preg_split("/@/", $email ); 250 | 251 | if (strlen ($arr[0]) <= 4) { 252 | $arr[0] = substr ($arr[0], 0, 1); 253 | } else if (strlen ($arr[0]) <= 6) { 254 | $arr[0] = substr ($arr[0], 0, 3); 255 | } else { 256 | $arr[0] = substr ($arr[0], 0, 4); 257 | } 258 | return $arr; 259 | } 260 | 261 | /** 262 | * Gets html to display an email address given a public an private key. 263 | * to get a key, go to: 264 | * 265 | * http://www.google.com/recaptcha/mailhide/apikey 266 | */ 267 | function recaptcha_mailhide_html($pubkey, $privkey, $email) { 268 | $emailparts = _recaptcha_mailhide_email_parts ($email); 269 | $url = recaptcha_mailhide_url ($pubkey, $privkey, $email); 270 | 271 | return htmlentities($emailparts[0]) . "...@" . htmlentities ($emailparts [1]); 273 | 274 | } 275 | 276 | 277 | ?> 278 | -------------------------------------------------------------------------------- /lib/forms.less: -------------------------------------------------------------------------------- 1 | /* Forms.less 2 | * Base styles for various input types, form layouts, and states 3 | * ------------------------------------------------------------- */ 4 | 5 | 6 | // FORM STYLES 7 | // ----------- 8 | 9 | form { 10 | margin-bottom: @baseline; 11 | } 12 | 13 | // Groups of fields with labels on top (legends) 14 | fieldset { 15 | margin-bottom: @baseline; 16 | padding-top: @baseline; 17 | legend { 18 | display: block; 19 | padding-left: 150px; 20 | font-size: @basefont * 1.5; 21 | line-height: 1; 22 | color: @grayDark; 23 | *padding: 0 0 5px 145px; /* IE6-7 */ 24 | *line-height: 1.5; /* IE6-7 */ 25 | } 26 | } 27 | 28 | // Parent element that clears floats and wraps labels and fields together 29 | form .clearfix { 30 | margin-bottom: @baseline; 31 | .clearfix() 32 | } 33 | 34 | // Set font for forms 35 | label, 36 | input, 37 | select, 38 | textarea { 39 | #font > .sans-serif(normal,13px,normal); 40 | } 41 | 42 | // Float labels left 43 | label { 44 | padding-top: 6px; 45 | font-size: @basefont; 46 | line-height: @baseline; 47 | float: left; 48 | width: 130px; 49 | text-align: right; 50 | color: @grayDark; 51 | } 52 | 53 | // Shift over the inside div to align all labels relevant content 54 | form .input { 55 | margin-left: 150px; 56 | } 57 | 58 | // Checkboxs and radio buttons 59 | input[type=checkbox], 60 | input[type=radio] { 61 | cursor: pointer; 62 | } 63 | 64 | // Inputs, Textareas, Selects 65 | input, 66 | textarea, 67 | select, 68 | .uneditable-input { 69 | display: inline-block; 70 | width: 210px; 71 | height: @baseline; 72 | padding: 4px; 73 | font-size: @basefont; 74 | line-height: @baseline; 75 | color: @gray; 76 | border: 1px solid #ccc; 77 | .border-radius(3px); 78 | } 79 | 80 | // remove padding from select 81 | select { 82 | padding: initial; 83 | } 84 | 85 | // mini reset for non-html5 file types 86 | input[type=checkbox], 87 | input[type=radio] { 88 | width: auto; 89 | height: auto; 90 | padding: 0; 91 | margin: 3px 0; 92 | *margin-top: 0; /* IE6-7 */ 93 | line-height: normal; 94 | border: none; 95 | } 96 | 97 | input[type=file] { 98 | background-color: @white; 99 | padding: initial; 100 | border: initial; 101 | line-height: initial; 102 | .box-shadow(none); 103 | } 104 | 105 | input[type=button], 106 | input[type=reset], 107 | input[type=submit] { 108 | width: auto; 109 | height: auto; 110 | } 111 | 112 | select, 113 | input[type=file] { 114 | height: @baseline * 1.5; // In IE7, the height of the select element cannot be changed by height, only font-size 115 | *height: auto; // Reset for IE7 116 | line-height: @baseline * 1.5; 117 | *margin-top: 4px; /* For IE7, add top margin to align select with labels */ 118 | } 119 | 120 | // Make multiple select elements height not fixed 121 | select[multiple] { 122 | height: inherit; 123 | background-color: @white; // Fixes Chromium bug of unreadable items 124 | } 125 | 126 | textarea { 127 | height: auto; 128 | } 129 | 130 | // For text that needs to appear as an input but should not be an input 131 | .uneditable-input { 132 | background-color: @white; 133 | display: block; 134 | border-color: #eee; 135 | .box-shadow(inset 0 1px 2px rgba(0,0,0,.025)); 136 | cursor: not-allowed; 137 | } 138 | 139 | // Placeholder text gets special styles; cant be bundled together though for some reason 140 | :-moz-placeholder { 141 | color: @grayLight; 142 | } 143 | ::-webkit-input-placeholder { 144 | color: @grayLight; 145 | } 146 | 147 | // Focus states 148 | input, 149 | textarea { 150 | @transition: border linear .2s, box-shadow linear .2s; 151 | .transition(@transition); 152 | .box-shadow(inset 0 1px 3px rgba(0,0,0,.1)); 153 | } 154 | input:focus, 155 | textarea:focus { 156 | outline: 0; 157 | border-color: rgba(82,168,236,.8); 158 | @shadow: inset 0 1px 3px rgba(0,0,0,.1), 0 0 8px rgba(82,168,236,.6); 159 | .box-shadow(@shadow); 160 | } 161 | input[type=file]:focus, 162 | input[type=checkbox]:focus, 163 | select:focus { 164 | .box-shadow(none); // override for file inputs 165 | outline: 1px dotted #666; // Selet elements don't get box-shadow styles, so instead we do outline 166 | } 167 | 168 | 169 | // FORM FIELD FEEDBACK STATES 170 | // -------------------------- 171 | 172 | // Mixin for form field states 173 | .formFieldState(@textColor: #555, @borderColor: #ccc, @backgroundColor: #f5f5f5) { 174 | // Set the text color 175 | > label, 176 | .help-block, 177 | .help-inline { 178 | color: @textColor; 179 | } 180 | // Style inputs accordingly 181 | input, 182 | textarea { 183 | color: @textColor; 184 | border-color: @borderColor; 185 | &:focus { 186 | border-color: darken(@borderColor, 10%); 187 | .box-shadow(0 0 6px lighten(@borderColor, 20%)); 188 | } 189 | } 190 | // Give a small background color for input-prepend/-append 191 | .input-prepend .add-on, 192 | .input-append .add-on { 193 | color: @textColor; 194 | background-color: @backgroundColor; 195 | border-color: @textColor; 196 | } 197 | } 198 | // Error 199 | form .clearfix.error { 200 | .formFieldState(#b94a48, #ee5f5b, lighten(#ee5f5b, 30%)); 201 | } 202 | // Warning 203 | form .clearfix.warning { 204 | .formFieldState(#c09853, #ccae64, lighten(#CCAE64, 5%)); 205 | } 206 | // Success 207 | form .clearfix.success { 208 | .formFieldState(#468847, #57a957, lighten(#57a957, 30%)); 209 | } 210 | 211 | 212 | // Form element sizes 213 | // TODO v2: remove duplication here and just stick to .input-[size] in light of adding .spanN sizes 214 | .input-mini, 215 | input.mini, 216 | textarea.mini, 217 | select.mini { 218 | width: 60px; 219 | } 220 | .input-small, 221 | input.small, 222 | textarea.small, 223 | select.small { 224 | width: 90px; 225 | } 226 | .input-medium, 227 | input.medium, 228 | textarea.medium, 229 | select.medium { 230 | width: 150px; 231 | } 232 | .input-large, 233 | input.large, 234 | textarea.large, 235 | select.large { 236 | width: 210px; 237 | } 238 | .input-xlarge, 239 | input.xlarge, 240 | textarea.xlarge, 241 | select.xlarge { 242 | width: 270px; 243 | } 244 | .input-xxlarge, 245 | input.xxlarge, 246 | textarea.xxlarge, 247 | select.xxlarge { 248 | width: 530px; 249 | } 250 | textarea.xxlarge { 251 | overflow-y: auto; 252 | } 253 | 254 | // Grid style input sizes 255 | // This is a duplication of the main grid .columns() mixin, but subtracts 10px to account for input padding and border 256 | .formColumns(@columnSpan: 1) { 257 | display: inline-block; 258 | float: none; 259 | width: ((@gridColumnWidth) * @columnSpan) + (@gridGutterWidth * (@columnSpan - 1)) - 10; 260 | margin-left: 0; 261 | } 262 | input, 263 | textarea { 264 | // Default columns 265 | &.span1 { .formColumns(1); } 266 | &.span2 { .formColumns(2); } 267 | &.span3 { .formColumns(3); } 268 | &.span4 { .formColumns(4); } 269 | &.span5 { .formColumns(5); } 270 | &.span6 { .formColumns(6); } 271 | &.span7 { .formColumns(7); } 272 | &.span8 { .formColumns(8); } 273 | &.span9 { .formColumns(9); } 274 | &.span10 { .formColumns(10); } 275 | &.span11 { .formColumns(11); } 276 | &.span12 { .formColumns(12); } 277 | &.span13 { .formColumns(13); } 278 | &.span14 { .formColumns(14); } 279 | &.span15 { .formColumns(15); } 280 | &.span16 { .formColumns(16); } 281 | } 282 | 283 | // Disabled and read-only inputs 284 | input[disabled], 285 | select[disabled], 286 | textarea[disabled], 287 | input[readonly], 288 | select[readonly], 289 | textarea[readonly] { 290 | background-color: #f5f5f5; 291 | border-color: #ddd; 292 | cursor: not-allowed; 293 | } 294 | 295 | // Actions (the buttons) 296 | .actions { 297 | background: #f5f5f5; 298 | margin-top: @baseline; 299 | margin-bottom: @baseline; 300 | padding: (@baseline - 1) 20px @baseline 150px; 301 | border-top: 1px solid #ddd; 302 | .border-radius(0 0 3px 3px); 303 | .secondary-action { 304 | float: right; 305 | a { 306 | line-height: 30px; 307 | &:hover { 308 | text-decoration: underline; 309 | } 310 | } 311 | } 312 | } 313 | 314 | // Help Text 315 | // TODO: Do we need to set basefont and baseline here? 316 | .help-inline, 317 | .help-block { 318 | font-size: @basefont; 319 | line-height: @baseline; 320 | color: @grayLight; 321 | } 322 | .help-inline { 323 | padding-left: 5px; 324 | *position: relative; /* IE6-7 */ 325 | *top: -5px; /* IE6-7 */ 326 | } 327 | 328 | // Big blocks of help text 329 | .help-block { 330 | display: block; 331 | max-width: 600px; 332 | } 333 | 334 | // Inline Fields (input fields that appear as inline objects 335 | .inline-inputs { 336 | color: @gray; 337 | span { 338 | padding: 0 2px 0 1px; 339 | } 340 | } 341 | 342 | // Allow us to put symbols and text within the input field for a cleaner look 343 | .input-prepend, 344 | .input-append { 345 | input { 346 | .border-radius(0 3px 3px 0); 347 | } 348 | .add-on { 349 | position: relative; 350 | background: #f5f5f5; 351 | border: 1px solid #ccc; 352 | z-index: 2; 353 | float: left; 354 | display: block; 355 | width: auto; 356 | min-width: 16px; 357 | height: 18px; 358 | padding: 4px 4px 4px 5px; 359 | margin-right: -1px; 360 | font-weight: normal; 361 | line-height: 18px; 362 | color: @grayLight; 363 | text-align: center; 364 | text-shadow: 0 1px 0 @white; 365 | .border-radius(3px 0 0 3px); 366 | } 367 | .active { 368 | background: lighten(@green, 30); 369 | border-color: @green; 370 | } 371 | } 372 | .input-prepend { 373 | .add-on { 374 | *margin-top: 1px; /* IE6-7 */ 375 | } 376 | } 377 | .input-append { 378 | input { 379 | float: left; 380 | .border-radius(3px 0 0 3px); 381 | } 382 | .add-on { 383 | .border-radius(0 3px 3px 0); 384 | margin-right: 0; 385 | margin-left: -1px; 386 | } 387 | } 388 | 389 | // Stacked options for forms (radio buttons or checkboxes) 390 | .inputs-list { 391 | margin: 0 0 5px; 392 | width: 100%; 393 | li { 394 | display: block; 395 | padding: 0; 396 | width: 100%; 397 | } 398 | label { 399 | display: block; 400 | float: none; 401 | width: auto; 402 | padding: 0; 403 | margin-left: 20px; 404 | line-height: @baseline; 405 | text-align: left; 406 | white-space: normal; 407 | strong { 408 | color: @gray; 409 | } 410 | small { 411 | font-size: @basefont - 2; 412 | font-weight: normal; 413 | } 414 | } 415 | .inputs-list { 416 | margin-left: 25px; 417 | margin-bottom: 10px; 418 | padding-top: 0; 419 | } 420 | &:first-child { 421 | padding-top: 6px; 422 | } 423 | li + li { 424 | padding-top: 2px; 425 | } 426 | input[type=radio], 427 | input[type=checkbox] { 428 | margin-bottom: 0; 429 | margin-left: -20px; 430 | float: left; 431 | } 432 | } 433 | 434 | // Stacked forms 435 | .form-stacked { 436 | padding-left: 20px; 437 | fieldset { 438 | padding-top: @baseline / 2; 439 | } 440 | legend { 441 | padding-left: 0; 442 | } 443 | label { 444 | display: block; 445 | float: none; 446 | width: auto; 447 | font-weight: bold; 448 | text-align: left; 449 | line-height: 20px; 450 | padding-top: 0; 451 | } 452 | .clearfix { 453 | margin-bottom: @baseline / 2; 454 | div.input { 455 | margin-left: 0; 456 | } 457 | } 458 | .inputs-list { 459 | margin-bottom: 0; 460 | li { 461 | padding-top: 0; 462 | label { 463 | font-weight: normal; 464 | padding-top: 0; 465 | } 466 | } 467 | } 468 | div.clearfix.error { 469 | padding-top: 10px; 470 | padding-bottom: 10px; 471 | padding-left: 10px; 472 | margin-top: 0; 473 | margin-left: -10px; 474 | } 475 | .actions { 476 | margin-left: -20px; 477 | padding-left: 20px; 478 | } 479 | } 480 | -------------------------------------------------------------------------------- /lib/patterns.less: -------------------------------------------------------------------------------- 1 | /* Patterns.less 2 | * Repeatable UI elements outside the base styles provided from the scaffolding 3 | * ---------------------------------------------------------------------------- */ 4 | 5 | 6 | // TOPBAR 7 | // ------ 8 | 9 | // Topbar for Branding and Nav 10 | .topbar { 11 | height: 40px; 12 | position: fixed; 13 | top: 0; 14 | left: 0; 15 | right: 0; 16 | z-index: 10000; 17 | overflow: visible; 18 | 19 | // Links get text shadow 20 | a { 21 | color: @grayLight; 22 | text-shadow: 0 -1px 0 rgba(0,0,0,.25); 23 | } 24 | 25 | // Hover and active states 26 | // h3 for backwards compatibility 27 | h3 a:hover, 28 | .brand:hover, 29 | ul .active > a { 30 | background-color: #333; 31 | background-color: rgba(255,255,255,.05); 32 | color: @white; 33 | text-decoration: none; 34 | } 35 | 36 | // Website name 37 | // h3 left for backwards compatibility 38 | h3 { 39 | position: relative; 40 | } 41 | h3 a, 42 | .brand { 43 | float: left; 44 | display: block; 45 | padding: 8px 20px 12px; 46 | margin-left: -20px; // negative indent to left-align the text down the page 47 | color: @white; 48 | font-size: 20px; 49 | font-weight: 200; 50 | line-height: 1; 51 | } 52 | 53 | // Plain text in topbar 54 | p { 55 | margin: 0; 56 | line-height: 40px; 57 | a:hover { 58 | background-color: transparent; 59 | color: @white; 60 | } 61 | } 62 | 63 | // Search Form 64 | form { 65 | float: left; 66 | margin: 5px 0 0 0; 67 | position: relative; 68 | .opacity(100); 69 | } 70 | // Todo: remove from v2.0 when ready, added for legacy 71 | form.pull-right { 72 | float: right; 73 | } 74 | input { 75 | background-color: #444; 76 | background-color: rgba(255,255,255,.3); 77 | #font > .sans-serif(13px, normal, 1); 78 | padding: 4px 9px; 79 | color: @white; 80 | color: rgba(255,255,255,.75); 81 | border: 1px solid #111; 82 | .border-radius(4px); 83 | @shadow: inset 0 1px 2px rgba(0,0,0,.1), 0 1px 0px rgba(255,255,255,.25); 84 | .box-shadow(@shadow); 85 | .transition(none); 86 | 87 | // Placeholder text gets special styles; can't be bundled together though for some reason 88 | &:-moz-placeholder { 89 | color: @grayLighter; 90 | } 91 | &::-webkit-input-placeholder { 92 | color: @grayLighter; 93 | } 94 | // Hover states 95 | &:hover { 96 | background-color: @grayLight; 97 | background-color: rgba(255,255,255,.5); 98 | color: @white; 99 | } 100 | // Focus states (we use .focused since IE8 and down doesn't support :focus) 101 | &:focus, 102 | &.focused { 103 | outline: 0; 104 | background-color: @white; 105 | color: @grayDark; 106 | text-shadow: 0 1px 0 @white; 107 | border: 0; 108 | padding: 5px 10px; 109 | .box-shadow(0 0 3px rgba(0,0,0,.15)); 110 | } 111 | } 112 | } 113 | 114 | // gradient is applied to it's own element because overflow visible is not honored by ie when filter is present 115 | // For backwards compatibility, include .topbar .fill 116 | .topbar-inner, 117 | .topbar .fill { 118 | background-color: #222; 119 | #gradient > .vertical(#333, #222); 120 | @shadow: 0 1px 3px rgba(0,0,0,.25), inset 0 -1px 0 rgba(0,0,0,.1); 121 | .box-shadow(@shadow); 122 | } 123 | 124 | 125 | // NAVIGATION 126 | // ---------- 127 | 128 | // Topbar Nav 129 | // ul.nav for all topbar based navigation to avoid inheritance issues and over-specificity 130 | // For backwards compatibility, leave in .topbar div > ul 131 | .topbar div > ul, 132 | .nav { 133 | display: block; 134 | float: left; 135 | margin: 0 10px 0 0; 136 | position: relative; 137 | left: 0; 138 | > li { 139 | display: block; 140 | float: left; 141 | } 142 | a { 143 | display: block; 144 | float: none; 145 | padding: 10px 10px 11px; 146 | line-height: 19px; 147 | text-decoration: none; 148 | &:hover { 149 | color: @white; 150 | text-decoration: none; 151 | } 152 | } 153 | .active > a { 154 | background-color: #222; 155 | background-color: rgba(0,0,0,.5); 156 | } 157 | 158 | // Secondary (floated right) nav in topbar 159 | &.secondary-nav { 160 | float: right; 161 | margin-left: 10px; 162 | margin-right: 0; 163 | // backwards compatibility 164 | .menu-dropdown, 165 | .dropdown-menu { 166 | right: 0; 167 | border: 0; 168 | } 169 | } 170 | // Dropdowns within the .nav 171 | // a.menu:hover and li.open .menu for backwards compatibility 172 | a.menu:hover, 173 | li.open .menu, 174 | .dropdown-toggle:hover, 175 | .dropdown.open .dropdown-toggle { 176 | background: #444; 177 | background: rgba(255,255,255,.05); 178 | } 179 | // .menu-dropdown for backwards compatibility 180 | .menu-dropdown, 181 | .dropdown-menu { 182 | background-color: #333; 183 | // a.menu for backwards compatibility 184 | a.menu, 185 | .dropdown-toggle { 186 | color: @white; 187 | &.open { 188 | background: #444; 189 | background: rgba(255,255,255,.05); 190 | } 191 | } 192 | li a { 193 | color: #999; 194 | text-shadow: 0 1px 0 rgba(0,0,0,.5); 195 | &:hover { 196 | #gradient > .vertical(#292929,#191919); 197 | color: @white; 198 | } 199 | } 200 | .active a { 201 | color: @white; 202 | } 203 | .divider { 204 | background-color: #222; 205 | border-color: #444; 206 | } 207 | } 208 | } 209 | 210 | // For backwards compatibility with new dropdowns, redeclare dropdown link padding 211 | .topbar ul .menu-dropdown li a, 212 | .topbar ul .dropdown-menu li a { 213 | padding: 4px 15px; 214 | } 215 | 216 | // Dropdown Menus 217 | // Use the .menu class on any
  1. element within the topbar or ul.tabs and you'll get some superfancy dropdowns 218 | // li.menu for backwards compatibility 219 | li.menu, 220 | .dropdown { 221 | position: relative; 222 | } 223 | // The link that is clicked to toggle the dropdown 224 | // a.menu for backwards compatibility 225 | a.menu:after, 226 | .dropdown-toggle:after { 227 | width: 0; 228 | height: 0; 229 | display: inline-block; 230 | content: "↓"; 231 | text-indent: -99999px; 232 | vertical-align: top; 233 | margin-top: 8px; 234 | margin-left: 4px; 235 | border-left: 4px solid transparent; 236 | border-right: 4px solid transparent; 237 | border-top: 4px solid @white; 238 | .opacity(50); 239 | } 240 | // The dropdown menu (ul) 241 | // .menu-dropdown for backwards compatibility 242 | .menu-dropdown, 243 | .dropdown-menu { 244 | background-color: @white; 245 | float: left; 246 | display: none; // None by default, but block on "open" of the menu 247 | position: absolute; 248 | top: 40px; 249 | z-index: 900; 250 | min-width: 160px; 251 | max-width: 220px; 252 | _width: 160px; 253 | margin-left: 0; // override default ul styles 254 | margin-right: 0; 255 | padding: 6px 0; 256 | zoom: 1; // do we need this? 257 | border-color: #999; 258 | border-color: rgba(0,0,0,.2); 259 | border-style: solid; 260 | border-width: 0 1px 1px; 261 | .border-radius(0 0 6px 6px); 262 | .box-shadow(0 2px 4px rgba(0,0,0,.2)); 263 | .background-clip(padding-box); 264 | 265 | // Unfloat any li's to make them stack 266 | li { 267 | float: none; 268 | display: block; 269 | background-color: none; 270 | } 271 | // Dividers (basically an hr) within the dropdown 272 | .divider { 273 | height: 1px; 274 | margin: 5px 0; 275 | overflow: hidden; 276 | background-color: #eee; 277 | border-bottom: 1px solid @white; 278 | } 279 | } 280 | 281 | .topbar .dropdown-menu, 282 | .dropdown-menu { 283 | // Links within the dropdown menu 284 | a { 285 | display: block; 286 | padding: 4px 15px; 287 | clear: both; 288 | font-weight: normal; 289 | line-height: 18px; 290 | color: @gray; 291 | text-shadow: 0 1px 0 @white; 292 | // Hover state 293 | &:hover, 294 | &.hover { 295 | #gradient > .vertical(#eeeeee, #dddddd); 296 | color: @grayDark; 297 | text-decoration: none; 298 | @shadow: inset 0 1px 0 rgba(0,0,0,.025), inset 0 -1px rgba(0,0,0,.025); 299 | .box-shadow(@shadow); 300 | } 301 | } 302 | } 303 | 304 | // Open state for the dropdown 305 | // .open for backwards compatibility 306 | .open, 307 | .dropdown.open { 308 | // .menu for backwards compatibility 309 | .menu, 310 | .dropdown-toggle { 311 | color: @white; 312 | background: #ccc; 313 | background: rgba(0,0,0,.3); 314 | } 315 | // .menu-dropdown for backwards compatibility 316 | .menu-dropdown, 317 | .dropdown-menu { 318 | display: block; 319 | } 320 | } 321 | 322 | 323 | // TABS AND PILLS 324 | // -------------- 325 | 326 | // Common styles 327 | .tabs, 328 | .pills { 329 | margin: 0 0 @baseline; 330 | padding: 0; 331 | list-style: none; 332 | .clearfix(); 333 | > li { 334 | float: left; 335 | > a { 336 | display: block; 337 | } 338 | } 339 | } 340 | 341 | // Tabs 342 | .tabs { 343 | border-color: #ddd; 344 | border-style: solid; 345 | border-width: 0 0 1px; 346 | > li { 347 | position: relative; // For the dropdowns mostly 348 | margin-bottom: -1px; 349 | > a { 350 | padding: 0 15px; 351 | margin-right: 2px; 352 | line-height: (@baseline * 2) - 2; 353 | border: 1px solid transparent; 354 | .border-radius(4px 4px 0 0); 355 | &:hover { 356 | text-decoration: none; 357 | background-color: #eee; 358 | border-color: #eee #eee #ddd; 359 | } 360 | } 361 | } 362 | // Active state, and it's :hover to override normal :hover 363 | .active > a, 364 | .active > a:hover { 365 | color: @gray; 366 | background-color: @white; 367 | border: 1px solid #ddd; 368 | border-bottom-color: transparent; 369 | cursor: default; 370 | } 371 | } 372 | 373 | // Dropdowns in tabs 374 | .tabs { 375 | // first one for backwards compatibility 376 | .menu-dropdown, 377 | .dropdown-menu { 378 | top: 35px; 379 | border-width: 1px; 380 | .border-radius(0 6px 6px 6px); 381 | } 382 | // first one for backwards compatibility 383 | a.menu:after, 384 | .dropdown-toggle:after { 385 | border-top-color: #999; 386 | margin-top: 15px; 387 | margin-left: 5px; 388 | } 389 | // first one for backwards compatibility 390 | li.open.menu .menu, 391 | .open.dropdown .dropdown-toggle { 392 | border-color: #999; 393 | } 394 | // first one for backwards compatibility 395 | li.open a.menu:after, 396 | .dropdown.open .dropdown-toggle:after { 397 | border-top-color: #555; 398 | } 399 | } 400 | 401 | // Pills 402 | .pills { 403 | a { 404 | margin: 5px 3px 5px 0; 405 | padding: 0 15px; 406 | line-height: 30px; 407 | text-shadow: 0 1px 1px @white; 408 | .border-radius(15px); 409 | &:hover { 410 | color: @white; 411 | text-decoration: none; 412 | text-shadow: 0 1px 1px rgba(0,0,0,.25); 413 | background-color: @linkColorHover; 414 | } 415 | } 416 | .active a { 417 | color: @white; 418 | text-shadow: 0 1px 1px rgba(0,0,0,.25); 419 | background-color: @linkColor; 420 | } 421 | } 422 | 423 | // Stacked pills 424 | .pills-vertical > li { 425 | float: none; 426 | } 427 | 428 | // Tabbable areas 429 | .tab-content, 430 | .pill-content { 431 | } 432 | .tab-content > .tab-pane, 433 | .pill-content > .pill-pane, 434 | .tab-content > div, 435 | .pill-content > div { 436 | display: none; 437 | } 438 | .tab-content > .active, 439 | .pill-content > .active { 440 | display: block; 441 | } 442 | 443 | 444 | // BREADCRUMBS 445 | // ----------- 446 | 447 | .breadcrumb { 448 | padding: 7px 14px; 449 | margin: 0 0 @baseline; 450 | #gradient > .vertical(#ffffff, #f5f5f5); 451 | border: 1px solid #ddd; 452 | .border-radius(3px); 453 | .box-shadow(inset 0 1px 0 @white); 454 | li { 455 | display: inline; 456 | text-shadow: 0 1px 0 @white; 457 | } 458 | .divider { 459 | padding: 0 5px; 460 | color: @grayLight; 461 | } 462 | .active a { 463 | color: @grayDark; 464 | } 465 | } 466 | 467 | 468 | // PAGE HEADERS 469 | // ------------ 470 | 471 | .hero-unit { 472 | background-color: #f5f5f5; 473 | margin-bottom: 30px; 474 | padding: 60px; 475 | .border-radius(6px); 476 | h1 { 477 | margin-bottom: 0; 478 | font-size: 60px; 479 | line-height: 1; 480 | letter-spacing: -1px; 481 | } 482 | p { 483 | font-size: 18px; 484 | font-weight: 200; 485 | line-height: @baseline * 1.5; 486 | } 487 | } 488 | footer { 489 | margin-top: @baseline - 1; 490 | padding-top: @baseline - 1; 491 | border-top: 1px solid #eee; 492 | } 493 | 494 | 495 | // PAGE HEADERS 496 | // ------------ 497 | 498 | .page-header { 499 | margin-bottom: @baseline - 1; 500 | border-bottom: 1px solid #ddd; 501 | .box-shadow(0 1px 0 rgba(255,255,255,.5)); 502 | h1 { 503 | margin-bottom: (@baseline / 2) - 1px; 504 | } 505 | } 506 | 507 | 508 | // BUTTON STYLES 509 | // ------------- 510 | 511 | // Shared colors for buttons and alerts 512 | .btn, 513 | .alert-message { 514 | // Set text color 515 | &.danger, 516 | &.danger:hover, 517 | &.error, 518 | &.error:hover, 519 | &.success, 520 | &.success:hover, 521 | &.info, 522 | &.info:hover { 523 | color: @white 524 | } 525 | // Sets the close button to the middle of message 526 | .close{ 527 | font-family: Arial, sans-serif; 528 | line-height: 18px; 529 | } 530 | // Danger and error appear as red 531 | &.danger, 532 | &.error { 533 | .gradientBar(#ee5f5b, #c43c35); 534 | } 535 | // Success appears as green 536 | &.success { 537 | .gradientBar(#62c462, #57a957); 538 | } 539 | // Info appears as a neutral blue 540 | &.info { 541 | .gradientBar(#5bc0de, #339bb9); 542 | } 543 | } 544 | 545 | // Base .btn styles 546 | .btn { 547 | // Button Base 548 | cursor: pointer; 549 | display: inline-block; 550 | #gradient > .vertical-three-colors(#ffffff, #ffffff, 25%, darken(#ffffff, 10%)); // Don't use .gradientbar() here since it does a three-color gradient 551 | padding: 5px 14px 6px; 552 | text-shadow: 0 1px 1px rgba(255,255,255,.75); 553 | color: #333; 554 | font-size: @basefont; 555 | line-height: normal; 556 | border: 1px solid #ccc; 557 | border-bottom-color: #bbb; 558 | .border-radius(4px); 559 | @shadow: inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05); 560 | .box-shadow(@shadow); 561 | 562 | &:hover { 563 | background-position: 0 -15px; 564 | color: #333; 565 | text-decoration: none; 566 | } 567 | 568 | // Focus state for keyboard and accessibility 569 | &:focus { 570 | outline: 1px dotted #666; 571 | } 572 | 573 | // Primary Button Type 574 | &.primary { 575 | color: @white; 576 | .gradientBar(@blue, @blueDark) 577 | } 578 | 579 | // Transitions 580 | .transition(.1s linear all); 581 | 582 | // Active and Disabled states 583 | &.active, 584 | &:active { 585 | @shadow: inset 0 2px 4px rgba(0,0,0,.25), 0 1px 2px rgba(0,0,0,.05); 586 | .box-shadow(@shadow); 587 | } 588 | &.disabled { 589 | cursor: default; 590 | background-image: none; 591 | .reset-filter(); 592 | .opacity(65); 593 | .box-shadow(none); 594 | } 595 | &[disabled] { 596 | // disabled pseudo can't be included with .disabled 597 | // def because IE8 and below will drop it ;_; 598 | cursor: default; 599 | background-image: none; 600 | .reset-filter(); 601 | .opacity(65); 602 | .box-shadow(none); 603 | } 604 | 605 | // Button Sizes 606 | &.large { 607 | font-size: @basefont + 2px; 608 | line-height: normal; 609 | padding: 9px 14px 9px; 610 | .border-radius(6px); 611 | } 612 | &.small { 613 | padding: 7px 9px 7px; 614 | font-size: @basefont - 2px; 615 | } 616 | } 617 | // Super jank hack for removing border-radius from IE9 so we can keep filter gradients on alerts and buttons 618 | :root .alert-message, 619 | :root .btn { 620 | border-radius: 0 \0; 621 | } 622 | 623 | // Help Firefox not be a jerk about adding extra padding to buttons 624 | button.btn, 625 | input[type=submit].btn { 626 | &::-moz-focus-inner { 627 | padding: 0; 628 | border: 0; 629 | } 630 | } 631 | 632 | 633 | // CLOSE ICONS 634 | // ----------- 635 | .close { 636 | float: right; 637 | color: @black; 638 | font-size: 20px; 639 | font-weight: bold; 640 | line-height: @baseline * .75; 641 | text-shadow: 0 1px 0 rgba(255,255,255,1); 642 | .opacity(25); 643 | &:hover { 644 | color: @black; 645 | text-decoration: none; 646 | .opacity(40); 647 | } 648 | } 649 | 650 | 651 | // ERROR STYLES 652 | // ------------ 653 | 654 | // Base alert styles 655 | .alert-message { 656 | position: relative; 657 | padding: 7px 15px; 658 | margin-bottom: @baseline; 659 | color: @grayDark; 660 | .gradientBar(#fceec1, #eedc94); // warning by default 661 | text-shadow: 0 1px 0 rgba(255,255,255,.5); 662 | border-width: 1px; 663 | border-style: solid; 664 | .border-radius(4px); 665 | .box-shadow(inset 0 1px 0 rgba(255,255,255,.25)); 666 | 667 | // Adjust close icon 668 | .close { 669 | margin-top: 1px; 670 | *margin-top: 0; // For IE7 671 | } 672 | 673 | // Make links same color as text and stand out more 674 | a { 675 | font-weight: bold; 676 | color: @grayDark; 677 | } 678 | &.danger p a, 679 | &.error p a, 680 | &.success p a, 681 | &.info p a { 682 | color: @white; 683 | } 684 | 685 | // Remove extra margin from content 686 | h5 { 687 | line-height: @baseline; 688 | } 689 | p { 690 | margin-bottom: 0; 691 | } 692 | div { 693 | margin-top: 5px; 694 | margin-bottom: 2px; 695 | line-height: 28px; 696 | } 697 | .btn { 698 | // Provide actions with buttons 699 | .box-shadow(0 1px 0 rgba(255,255,255,.25)); 700 | } 701 | 702 | &.block-message { 703 | background-image: none; 704 | background-color: lighten(#fceec1, 5%); 705 | .reset-filter(); 706 | padding: 14px; 707 | border-color: #fceec1; 708 | .box-shadow(none); 709 | ul, p { 710 | margin-right: 30px; 711 | } 712 | ul { 713 | margin-bottom: 0; 714 | } 715 | li { 716 | color: @grayDark; 717 | } 718 | .alert-actions { 719 | margin-top: 5px; 720 | } 721 | &.error, 722 | &.success, 723 | &.info { 724 | color: @grayDark; 725 | text-shadow: 0 1px 0 rgba(255,255,255,.5); 726 | } 727 | &.error { 728 | background-color: lighten(#f56a66, 25%); 729 | border-color: lighten(#f56a66, 20%); 730 | } 731 | &.success { 732 | background-color: lighten(#62c462, 30%); 733 | border-color: lighten(#62c462, 25%); 734 | } 735 | &.info { 736 | background-color: lighten(#6bd0ee, 25%); 737 | border-color: lighten(#6bd0ee, 20%); 738 | } 739 | // Change link color back 740 | &.danger p a, 741 | &.error p a, 742 | &.success p a, 743 | &.info p a { 744 | color: @grayDark; 745 | } 746 | 747 | } 748 | } 749 | 750 | 751 | // PAGINATION 752 | // ---------- 753 | 754 | .pagination { 755 | height: @baseline * 2; 756 | margin: @baseline 0; 757 | ul { 758 | float: left; 759 | margin: 0; 760 | border: 1px solid #ddd; 761 | border: 1px solid rgba(0,0,0,.15); 762 | .border-radius(3px); 763 | .box-shadow(0 1px 2px rgba(0,0,0,.05)); 764 | } 765 | li { 766 | display: inline; 767 | } 768 | a { 769 | float: left; 770 | padding: 0 14px; 771 | line-height: (@baseline * 2) - 2; 772 | border-right: 1px solid; 773 | border-right-color: #ddd; 774 | border-right-color: rgba(0,0,0,.15); 775 | *border-right-color: #ddd; /* IE6-7 */ 776 | text-decoration: none; 777 | } 778 | a:hover, 779 | .active a { 780 | background-color: lighten(@blue, 45%); 781 | } 782 | .disabled a, 783 | .disabled a:hover { 784 | background-color: transparent; 785 | color: @grayLight; 786 | } 787 | .next a { 788 | border: 0; 789 | } 790 | } 791 | 792 | 793 | // WELLS 794 | // ----- 795 | 796 | .well { 797 | background-color: #f5f5f5; 798 | margin-bottom: 20px; 799 | padding: 19px; 800 | min-height: 20px; 801 | border: 1px solid #eee; 802 | border: 1px solid rgba(0,0,0,.05); 803 | .border-radius(4px); 804 | .box-shadow(inset 0 1px 1px rgba(0,0,0,.05)); 805 | blockquote { 806 | border-color: #ddd; 807 | border-color: rgba(0,0,0,.15); 808 | } 809 | } 810 | 811 | 812 | // MODALS 813 | // ------ 814 | 815 | .modal-backdrop { 816 | background-color: @black; 817 | position: fixed; 818 | top: 0; 819 | left: 0; 820 | right: 0; 821 | bottom: 0; 822 | z-index: 10000; 823 | // Fade for backdrop 824 | &.fade { opacity: 0; } 825 | } 826 | 827 | .modal-backdrop, 828 | .modal-backdrop.fade.in { 829 | .opacity(80); 830 | } 831 | 832 | .modal { 833 | position: fixed; 834 | top: 50%; 835 | left: 50%; 836 | z-index: 11000; 837 | width: 560px; 838 | margin: -250px 0 0 -280px; 839 | background-color: @white; 840 | border: 1px solid #999; 841 | border: 1px solid rgba(0,0,0,.3); 842 | *border: 1px solid #999; /* IE6-7 */ 843 | .border-radius(6px); 844 | .box-shadow(0 3px 7px rgba(0,0,0,0.3)); 845 | .background-clip(padding-box); 846 | .close { margin-top: 7px; } 847 | &.fade { 848 | .transition(e('opacity .3s linear, top .3s ease-out')); 849 | top: -25%; 850 | } 851 | &.fade.in { top: 50%; } 852 | } 853 | .modal-header { 854 | border-bottom: 1px solid #eee; 855 | padding: 5px 15px; 856 | } 857 | .modal-body { 858 | padding: 15px; 859 | } 860 | .modal-body form { 861 | margin-bottom: 0; 862 | } 863 | .modal-footer { 864 | background-color: #f5f5f5; 865 | padding: 14px 15px 15px; 866 | border-top: 1px solid #ddd; 867 | .border-radius(0 0 6px 6px); 868 | .box-shadow(inset 0 1px 0 @white); 869 | .clearfix(); 870 | margin-bottom: 0; 871 | .btn { 872 | float: right; 873 | margin-left: 5px; 874 | } 875 | } 876 | 877 | // Fix the stacking of these components when in modals 878 | .modal .popover, 879 | .modal .twipsy { 880 | z-index: 12000; 881 | } 882 | 883 | 884 | // POPOVER ARROWS 885 | // -------------- 886 | 887 | #popoverArrow { 888 | .above(@arrowWidth: 5px) { 889 | bottom: 0; 890 | left: 50%; 891 | margin-left: -@arrowWidth; 892 | border-left: @arrowWidth solid transparent; 893 | border-right: @arrowWidth solid transparent; 894 | border-top: @arrowWidth solid @black; 895 | } 896 | .left(@arrowWidth: 5px) { 897 | top: 50%; 898 | right: 0; 899 | margin-top: -@arrowWidth; 900 | border-top: @arrowWidth solid transparent; 901 | border-bottom: @arrowWidth solid transparent; 902 | border-left: @arrowWidth solid @black; 903 | } 904 | .below(@arrowWidth: 5px) { 905 | top: 0; 906 | left: 50%; 907 | margin-left: -@arrowWidth; 908 | border-left: @arrowWidth solid transparent; 909 | border-right: @arrowWidth solid transparent; 910 | border-bottom: @arrowWidth solid @black; 911 | } 912 | .right(@arrowWidth: 5px) { 913 | top: 50%; 914 | left: 0; 915 | margin-top: -@arrowWidth; 916 | border-top: @arrowWidth solid transparent; 917 | border-bottom: @arrowWidth solid transparent; 918 | border-right: @arrowWidth solid @black; 919 | } 920 | } 921 | 922 | // TWIPSY 923 | // ------ 924 | 925 | .twipsy { 926 | display: block; 927 | position: absolute; 928 | visibility: visible; 929 | padding: 5px; 930 | font-size: 11px; 931 | z-index: 1000; 932 | .opacity(80); 933 | &.fade.in { 934 | .opacity(80); 935 | } 936 | &.above .twipsy-arrow { #popoverArrow > .above(); } 937 | &.left .twipsy-arrow { #popoverArrow > .left(); } 938 | &.below .twipsy-arrow { #popoverArrow > .below(); } 939 | &.right .twipsy-arrow { #popoverArrow > .right(); } 940 | } 941 | .twipsy-inner { 942 | padding: 3px 8px; 943 | background-color: @black; 944 | color: white; 945 | text-align: center; 946 | max-width: 200px; 947 | text-decoration: none; 948 | .border-radius(4px); 949 | } 950 | .twipsy-arrow { 951 | position: absolute; 952 | width: 0; 953 | height: 0; 954 | } 955 | 956 | 957 | // POPOVERS 958 | // -------- 959 | 960 | .popover { 961 | position: absolute; 962 | top: 0; 963 | left: 0; 964 | z-index: 1000; 965 | padding: 5px; 966 | display: none; 967 | &.above .arrow { #popoverArrow > .above(); } 968 | &.right .arrow { #popoverArrow > .right(); } 969 | &.below .arrow { #popoverArrow > .below(); } 970 | &.left .arrow { #popoverArrow > .left(); } 971 | .arrow { 972 | position: absolute; 973 | width: 0; 974 | height: 0; 975 | } 976 | .inner { 977 | background: @black; 978 | background: rgba(0,0,0,.8); 979 | padding: 3px; 980 | overflow: hidden; 981 | width: 280px; 982 | .border-radius(6px); 983 | .box-shadow(0 3px 7px rgba(0,0,0,0.3)); 984 | } 985 | .title { 986 | background-color: #f5f5f5; 987 | padding: 9px 15px; 988 | line-height: 1; 989 | .border-radius(3px 3px 0 0); 990 | border-bottom:1px solid #eee; 991 | } 992 | .content { 993 | background-color: @white; 994 | padding: 14px; 995 | .border-radius(0 0 3px 3px); 996 | .background-clip(padding-box); 997 | p, ul, ol { 998 | margin-bottom: 0; 999 | } 1000 | } 1001 | } 1002 | 1003 | 1004 | // PATTERN ANIMATIONS 1005 | // ------------------ 1006 | 1007 | .fade { 1008 | .transition(opacity .15s linear); 1009 | opacity: 0; 1010 | &.in { 1011 | opacity: 1; 1012 | } 1013 | } 1014 | 1015 | 1016 | // LABELS 1017 | // ------ 1018 | 1019 | .label { 1020 | padding: 1px 3px 2px; 1021 | font-size: @basefont * .75; 1022 | font-weight: bold; 1023 | color: @white; 1024 | text-transform: uppercase; 1025 | white-space: nowrap; 1026 | background-color: @grayLight; 1027 | .border-radius(3px); 1028 | text-shadow: none; 1029 | &.important { background-color: #c43c35; } 1030 | &.warning { background-color: @orange; } 1031 | &.success { background-color: @green; } 1032 | &.notice { background-color: lighten(@blue, 25%); } 1033 | } 1034 | 1035 | 1036 | // MEDIA GRIDS 1037 | // ----------- 1038 | 1039 | .media-grid { 1040 | margin-left: -@gridGutterWidth; 1041 | margin-bottom: 0; 1042 | .clearfix(); 1043 | li { 1044 | display: inline; 1045 | } 1046 | a { 1047 | float: left; 1048 | padding: 4px; 1049 | margin: 0 0 @baseline @gridGutterWidth; 1050 | border: 1px solid #ddd; 1051 | .border-radius(4px); 1052 | .box-shadow(0 1px 1px rgba(0,0,0,.075)); 1053 | img { 1054 | display: block; 1055 | } 1056 | &:hover { 1057 | border-color: @linkColor; 1058 | .box-shadow(0 1px 4px rgba(0,105,214,.25)); 1059 | } 1060 | } 1061 | } 1062 | -------------------------------------------------------------------------------- /js/less-1.1.5.min.js: -------------------------------------------------------------------------------- 1 | // 2 | // LESS - Leaner CSS v1.1.5 3 | // http://lesscss.org 4 | // 5 | // Copyright (c) 2009-2011, Alexis Sellier 6 | // Licensed under the Apache 2.0 License. 7 | // 8 | // 9 | // LESS - Leaner CSS v1.1.5 10 | // http://lesscss.org 11 | // 12 | // Copyright (c) 2009-2011, Alexis Sellier 13 | // Licensed under the Apache 2.0 License. 14 | // 15 | (function(a,b){function c(b){return a.less[b.split("/")[1]]}function l(){var a=document.getElementsByTagName("style");for(var b=0;b0?d.firstChild.nodeValue!==a.nodeValue&&d.replaceChild(a,d.firstChild):d.appendChild(a)})(document.createTextNode(a));c&&g&&(t("saving "+e+" to cache."),g.setItem(e,a),g.setItem(e+":timestamp",c))}function q(a,b,c,e){function i(b,c,d){b.status>=200&&b.status<300?c(b.responseText,b.getResponseHeader("Last-Modified")):typeof d=="function"&&d(b.status,a)}var g=r(),h=f?!1:d.async;typeof g.overrideMimeType=="function"&&g.overrideMimeType("text/css"),g.open("GET",a,h),g.setRequestHeader("Accept",b||"text/x-less, text/css; q=0.9, */*; q=0.5"),g.send(null),f?g.status===0?c(g.responseText):e(g.status,a):h?g.onreadystatechange=function(){g.readyState==4&&i(g,c,e)}:i(g,c,e)}function r(){if(a.XMLHttpRequest)return new XMLHttpRequest;try{return new ActiveXObject("MSXML2.XMLHTTP.3.0")}catch(b){return t("browser doesn't support AJAX."),null}}function s(a){return a&&a.parentNode.removeChild(a)}function t(a){d.env=="development"&&typeof console!="undefined"&&console.log("less: "+a)}function u(a,b){var c="less-error-message:"+o(b),e=["
      ",'
    • {0}
    • ',"
    • {current}
    • ",'
    • {2}
    • ',"
    "].join("\n"),f=document.createElement("div"),g,h;f.id=c,f.className="less-error-message",h="

    "+(a.message||"There is an error in your .less file")+"

    "+'

    '+b+" ",a.extract&&(h+="on line "+a.line+", column "+(a.column+1)+":

    "+e.replace(/\[(-?\d)\]/g,function(b,c){return parseInt(a.line)+parseInt(c)||""}).replace(/\{(\d)\}/g,function(b,c){return a.extract[parseInt(c)]||""}).replace(/\{current\}/,a.extract[1].slice(0,a.column)+''+a.extract[1].slice(a.column)+"")),f.innerHTML=h,p([".less-error-message ul, .less-error-message li {","list-style-type: none;","margin-right: 15px;","padding: 4px 0;","margin: 0;","}",".less-error-message label {","font-size: 12px;","margin-right: 15px;","padding: 4px 0;","color: #cc7777;","}",".less-error-message pre {","color: #ee4444;","padding: 4px 0;","margin: 0;","display: inline-block;","}",".less-error-message pre.ctx {","color: #dd4444;","}",".less-error-message h3 {","font-size: 20px;","font-weight: bold;","padding: 15px 0 5px 0;","margin: 0;","}",".less-error-message a {","color: #10a","}",".less-error-message .error {","color: red;","font-weight: bold;","padding-bottom: 2px;","border-bottom: 1px dashed red;","}"].join("\n"),{title:"error-message"}),f.style.cssText=["font-family: Arial, sans-serif","border: 1px solid #e00","background-color: #eee","border-radius: 5px","-webkit-border-radius: 5px","-moz-border-radius: 5px","color: #e00","padding: 15px","margin-bottom: 15px"].join(";"),d.env=="development"&&(g=setInterval(function(){document.body&&(document.getElementById(c)?document.body.replaceChild(f,document.getElementById(c)):document.body.insertBefore(f,document.body.firstChild),clearInterval(g))},10))}Array.isArray||(Array.isArray=function(a){return Object.prototype.toString.call(a)==="[object Array]"||a instanceof Array}),Array.prototype.forEach||(Array.prototype.forEach=function(a,b){var c=this.length>>>0;for(var d=0;d>>0,c=new Array(b),d=arguments[1];for(var e=0;e>>0,c=0;if(b===0&&arguments.length===1)throw new TypeError;if(arguments.length>=2)var d=arguments[1];else do{if(c in this){d=this[c++];break}if(++c>=b)throw new TypeError}while(!0);for(;c=b)return-1;c<0&&(c+=b);for(;ck&&(j[f]=j[f].slice(c-k),k=c)}function s(a){var d,e,g,h,i,m,n,o;if(a instanceof Function)return a.call(l.parsers);if(typeof a=="string")d=b.charAt(c)===a?a:null,g=1,r();else{r();if(d=a.exec(j[f]))g=d[0].length;else return null}if(d){o=c+=g,m=c+j[f].length-g;while(c0)throw{type:"Syntax",message:"Missing closing `}`",filename:a.filename};return c.map(function(a){return a.join("")})}([[]]),h=new e.Ruleset([],s(this.parsers.primary)),h.root=!0,h.toCSS=function(c){var d,f,g;return function(g,h){function n(a){return a?(b.slice(0,a).match(/\n/g)||"").length:null}var i=[];g=g||{},typeof h=="object"&&!Array.isArray(h)&&(h=Object.keys(h).map(function(a){var b=h[a];return b instanceof e.Value||(b instanceof e.Expression||(b=new e.Expression([b])),b=new e.Value([b])),new e.Rule("@"+a,b,!1,0)}),i=[new e.Ruleset(null,h)]);try{var j=c.call(this,{frames:i}).toCSS([],{compress:g.compress||!1})}catch(k){f=b.split("\n"),d=n(k.index);for(var l=k.index,m=-1;l>=0&&b.charAt(l)!=="\n";l--)m++;throw{type:k.type,message:k.message,filename:a.filename,index:k.index,line:typeof d=="number"?d+1:null,callLine:k.call&&n(k.call)+1,callExtract:f[n(k.call)],stack:k.stack,column:m,extract:[f[d-1],f[d],f[d+1]]}}return g.compress?j.replace(/(\s)+/g,"$1"):j}}(h.eval);if(c=0&&b.charAt(v)!=="\n";v--)w++;u={name:"ParseError",message:"Syntax Error on line "+p,index:c,filename:a.filename,line:p,column:w,extract:[q[p-2],q[p-1],q[p]]}}this.imports.queue.length>0?n=function(){g(u,h)}:g(u,h)},parsers:{primary:function(){var a,b=[];while((a=s(this.mixin.definition)||s(this.rule)||s(this.ruleset)||s(this.mixin.call)||s(this.comment)||s(this.directive))||s(/^[\s\n]+/))a&&b.push(a);return b},comment:function(){var a;if(b.charAt(c)!=="/")return;if(b.charAt(c+1)==="/")return new e.Comment(s(/^\/\/.*/),!0);if(a=s(/^\/\*(?:[^*]|\*+[^\/*])*\*+\/\n?/))return new e.Comment(a)},entities:{quoted:function(){var a,d=c,f;b.charAt(d)==="~"&&(d++,f=!0);if(b.charAt(d)!=='"'&&b.charAt(d)!=="'")return;f&&s("~");if(a=s(/^"((?:[^"\\\r\n]|\\.)*)"|'((?:[^'\\\r\n]|\\.)*)'/))return new e.Quoted(a[0],a[1]||a[2],f)},keyword:function(){var a;if(a=s(/^[_A-Za-z-][_A-Za-z0-9-]*/))return new e.Keyword(a)},call:function(){var a,b,d=c;if(!(a=/^([\w-]+|%)\(/.exec(j[f])))return;a=a[1].toLowerCase();if(a==="url")return null;c+=a.length;if(a==="alpha")return s(this.alpha);s("("),b=s(this.entities.arguments);if(!s(")"))return;if(a)return new e.Call(a,b,d)},arguments:function(){var a=[],b;while(b=s(this.expression)){a.push(b);if(!s(","))break}return a},literal:function(){return s(this.entities.dimension)||s(this.entities.color)||s(this.entities.quoted)},url:function(){var a;if(b.charAt(c)!=="u"||!s(/^url\(/))return;a=s(this.entities.quoted)||s(this.entities.variable)||s(this.entities.dataURI)||s(/^[-\w%@$\/.&=:;#+?~]+/)||"";if(!s(")"))throw new Error("missing closing ) for url()");return new e.URL(a.value||a.data||a instanceof e.Variable?a:new e.Anonymous(a),o.paths)},dataURI:function(){var a;if(s(/^data:/)){a={},a.mime=s(/^[^\/]+\/[^,;)]+/)||"",a.charset=s(/^;\s*charset=[^,;)]+/)||"",a.base64=s(/^;\s*base64/)||"",a.data=s(/^,\s*[^)]+/);if(a.data)return a}},variable:function(){var a,d=c;if(b.charAt(c)==="@"&&(a=s(/^@@?[\w-]+/)))return new e.Variable(a,d)},color:function(){var a;if(b.charAt(c)==="#"&&(a=s(/^#([a-fA-F0-9]{6}|[a-fA-F0-9]{3})/)))return new e.Color(a[1])},dimension:function(){var a,d=b.charCodeAt(c);if(d>57||d<45||d===47)return;if(a=s(/^(-?\d*\.?\d+)(px|%|em|pc|ex|in|deg|s|ms|pt|cm|mm|rad|grad|turn)?/))return new e.Dimension(a[1],a[2])},javascript:function(){var a,d=c,f;b.charAt(d)==="~"&&(d++,f=!0);if(b.charAt(d)!=="`")return;f&&s("~");if(a=s(/^`([^`]*)`/))return new e.JavaScript(a[1],c,f)}},variable:function(){var a;if(b.charAt(c)==="@"&&(a=s(/^(@[\w-]+)\s*:/)))return a[1]},shorthand:function(){var a,b;if(!t(/^[@\w.%-]+\/[@\w.-]+/))return;if((a=s(this.entity))&&s("/")&&(b=s(this.entity)))return new e.Shorthand(a,b)},mixin:{call:function(){var a=[],d,f,g,h=c,i=b.charAt(c);if(i!=="."&&i!=="#")return;while(d=s(/^[#.](?:[\w-]|\\(?:[a-fA-F0-9]{1,6} ?|[^a-fA-F0-9]))+/))a.push(new e.Element(f,d,c)),f=s(">");s("(")&&(g=s(this.entities.arguments))&&s(")");if(a.length>0&&(s(";")||t("}")))return new e.mixin.Call(a,g,h)},definition:function(){var a,d=[],f,g,h,i;if(b.charAt(c)!=="."&&b.charAt(c)!=="#"||t(/^[^{]*(;|})/))return;if(f=s(/^([#.](?:[\w-]|\\(?:[a-fA-F0-9]{1,6} ?|[^a-fA-F0-9]))+)\s*\(/)){a=f[1];while(h=s(this.entities.variable)||s(this.entities.literal)||s(this.entities.keyword)){if(h instanceof e.Variable)if(s(":"))if(i=s(this.expression))d.push({name:h.name,value:i});else throw new Error("Expected value");else d.push({name:h.name});else d.push({value:h});if(!s(","))break}if(!s(")"))throw new Error("Expected )");g=s(this.block);if(g)return new e.mixin.Definition(a,d,g)}}},entity:function(){return s(this.entities.literal)||s(this.entities.variable)||s(this.entities.url)||s(this.entities.call)||s(this.entities.keyword)||s(this.entities.javascript)||s(this.comment)},end:function(){return s(";")||t("}")},alpha:function(){var a;if(!s(/^\(opacity=/i))return;if(a=s(/^\d+/)||s(this.entities.variable)){if(!s(")"))throw new Error("missing closing ) for alpha()");return new e.Alpha(a)}},element:function(){var a,b,d;d=s(this.combinator),a=s(/^(?:\d+\.\d+|\d+)%/)||s(/^(?:[.#]?|:*)(?:[\w-]|\\(?:[a-fA-F0-9]{1,6} ?|[^a-fA-F0-9]))+/)||s("*")||s(this.attribute)||s(/^\([^)@]+\)/);if(a)return new e.Element(d,a,c);if(d.value&&d.value.charAt(0)==="&")return new e.Element(d,null,c)},combinator:function(){var a,d=b.charAt(c);if(d===">"||d==="+"||d==="~"){c++;while(b.charAt(c)===" ")c++;return new e.Combinator(d)}if(d==="&"){a="&",c++,b.charAt(c)===" "&&(a="& ");while(b.charAt(c)===" ")c++;return new e.Combinator(a)}if(d===":"&&b.charAt(c+1)===":"){c+=2;while(b.charAt(c)===" ")c++;return new e.Combinator("::")}return b.charAt(c-1)===" "?new e.Combinator(" "):new e.Combinator(null)},selector:function(){var a,d,f=[],g,h;while(d=s(this.element)){g=b.charAt(c),f.push(d);if(g==="{"||g==="}"||g===";"||g===",")break}if(f.length>0)return new e.Selector(f)},tag:function(){return s(/^[a-zA-Z][a-zA-Z-]*[0-9]?/)||s("*")},attribute:function(){var a="",b,c,d;if(!s("["))return;if(b=s(/^[a-zA-Z-]+/)||s(this.entities.quoted))(d=s(/^[|~*$^]?=/))&&(c=s(this.entities.quoted)||s(/^[\w-]+/))?a=[b,d,c.toCSS?c.toCSS():c].join(""):a=b;if(!s("]"))return;if(a)return"["+a+"]"},block:function(){var a;if(s("{")&&(a=s(this.primary))&&s("}"))return a},ruleset:function(){var a=[],b,d,f;p();while(b=s(this.selector)){a.push(b),s(this.comment);if(!s(","))break;s(this.comment)}if(a.length>0&&(d=s(this.block)))return new e.Ruleset(a,d);i=c,q()},rule:function(){var a,d,g=b.charAt(c),k,l;p();if(g==="."||g==="#"||g==="&")return;if(a=s(this.variable)||s(this.property)){a.charAt(0)!="@"&&(l=/^([^@+\/'"*`(;{}-]*);/.exec(j[f]))?(c+=l[0].length-1,d=new e.Anonymous(l[1])):a==="font"?d=s(this.font):d=s(this.value),k=s(this.important);if(d&&s(this.end))return new e.Rule(a,d,k,h);i=c,q()}},"import":function(){var a;if(s(/^@import\s+/)&&(a=s(this.entities.quoted)||s(this.entities.url))&&s(";"))return new e.Import(a,o)},directive:function(){var a,d,f,g;if(b.charAt(c)!=="@")return;if(d=s(this["import"]))return d;if(a=s(/^@media|@page/)||s(/^@(?:-webkit-|-moz-)?keyframes/)){g=(s(/^[^{]+/)||"").trim();if(f=s(this.block))return new e.Directive(a+" "+g,f)}else if(a=s(/^@[-a-z]+/))if(a==="@font-face"){if(f=s(this.block))return new e.Directive(a,f)}else if((d=s(this.entity))&&s(";"))return new e.Directive(a,d)},font:function(){var a=[],b=[],c,d,f,g;while(g=s(this.shorthand)||s(this.entity))b.push(g);a.push(new e.Expression(b));if(s(","))while(g=s(this.expression)){a.push(g);if(!s(","))break}return new e.Value(a)},value:function(){var a,b=[],c;while(a=s(this.expression)){b.push(a);if(!s(","))break}if(b.length>0)return new e.Value(b)},important:function(){if(b.charAt(c)==="!")return s(/^! *important/)},sub:function(){var a;if(s("(")&&(a=s(this.expression))&&s(")"))return a},multiplication:function(){var a,b,c,d;if(a=s(this.operand)){while((c=s("/")||s("*"))&&(b=s(this.operand)))d=new e.Operation(c,[d||a,b]);return d||a}},addition:function(){var a,d,f,g;if(a=s(this.multiplication)){while((f=s(/^[-+]\s+/)||b.charAt(c-1)!=" "&&(s("+")||s("-")))&&(d=s(this.multiplication)))g=new e.Operation(f,[g||a,d]);return g||a}},operand:function(){var a,d=b.charAt(c+1);b.charAt(c)==="-"&&(d==="@"||d==="(")&&(a=s("-"));var f=s(this.sub)||s(this.entities.dimension)||s(this.entities.color)||s(this.entities.variable)||s(this.entities.call);return a?new e.Operation("*",[new e.Dimension(-1),f]):f},expression:function(){var a,b,c=[],d;while(a=s(this.addition)||s(this.entity))c.push(a);if(c.length>0)return new e.Expression(c)},property:function(){var a;if(a=s(/^(\*?-?[-a-z_0-9]+)\s*:/))return a[1]}}}};if(d.mode==="browser"||d.mode==="rhino")d.Parser.importer=function(a,b,c,d){a.charAt(0)!=="/"&&b.length>0&&(a=b[0]+a),n({href:a,title:a,type:d.mime},c,!0)};(function(a){function b(b){return a.functions.hsla(b.h,b.s,b.l,b.a)}function c(b){if(b instanceof a.Dimension)return parseFloat(b.unit=="%"?b.value/100:b.value);if(typeof b=="number")return b;throw{error:"RuntimeError",message:"color functions take numbers as parameters"}}function d(a){return Math.min(1,Math.max(0,a))}a.functions={rgb:function(a,b,c){return this.rgba(a,b,c,1)},rgba:function(b,d,e,f){var g=[b,d,e].map(function(a){return c(a)}),f=c(f);return new a.Color(g,f)},hsl:function(a,b,c){return this.hsla(a,b,c,1)},hsla:function(a,b,d,e){function h(a){return a=a<0?a+1:a>1?a-1:a,a*6<1?g+(f-g)*a*6:a*2<1?f:a*3<2?g+(f-g)*(2/3-a)*6:g}a=c(a)%360/360,b=c(b),d=c(d),e=c(e);var f=d<=.5?d*(b+1):d+b-d*b,g=d*2-f;return this.rgba(h(a+1/3)*255,h(a)*255,h(a-1/3)*255,e)},hue:function(b){return new a.Dimension(Math.round(b.toHSL().h))},saturation:function(b){return new a.Dimension(Math.round(b.toHSL().s*100),"%")},lightness:function(b){return new a.Dimension(Math.round(b.toHSL().l*100),"%")},alpha:function(b){return new a.Dimension(b.toHSL().a)},saturate:function(a,c){var e=a.toHSL();return e.s+=c.value/100,e.s=d(e.s),b(e)},desaturate:function(a,c){var e=a.toHSL();return e.s-=c.value/100,e.s=d(e.s),b(e)},lighten:function(a,c){var e=a.toHSL();return e.l+=c.value/100,e.l=d(e.l),b(e)},darken:function(a,c){var e=a.toHSL();return e.l-=c.value/100,e.l=d(e.l),b(e)},fadein:function(a,c){var e=a.toHSL();return e.a+=c.value/100,e.a=d(e.a),b(e)},fadeout:function(a,c){var e=a.toHSL();return e.a-=c.value/100,e.a=d(e.a),b(e)},fade:function(a,c){var e=a.toHSL();return e.a=c.value/100,e.a=d(e.a),b(e)},spin:function(a,c){var d=a.toHSL(),e=(d.h+c.value)%360;return d.h=e<0?360+e:e,b(d)},mix:function(b,c,d){var e=d.value/100,f=e*2-1,g=b.toHSL().a-c.toHSL().a,h=((f*g==-1?f:(f+g)/(1+f*g))+1)/2,i=1-h,j=[b.rgb[0]*h+c.rgb[0]*i,b.rgb[1]*h+c.rgb[1]*i,b.rgb[2]*h+c.rgb[2]*i],k=b.alpha*e+c.alpha*(1-e);return new a.Color(j,k)},greyscale:function(b){return this.desaturate(b,new a.Dimension(100))},e:function(b){return new a.Anonymous(b instanceof a.JavaScript?b.evaluated:b)},escape:function(b){return new a.Anonymous(encodeURI(b.value).replace(/=/g,"%3D").replace(/:/g,"%3A").replace(/#/g,"%23").replace(/;/g,"%3B").replace(/\(/g,"%28").replace(/\)/g,"%29"))},"%":function(b){var c=Array.prototype.slice.call(arguments,1),d=b.value;for(var e=0;e255?255:a<0?0:a).toString(16),a.length===1?"0"+a:a}).join("")},operate:function(b,c){var d=[];c instanceof a.Color||(c=c.toColor());for(var e=0;e<3;e++)d[e]=a.operate(b,this.rgb[e],c.rgb[e]);return new a.Color(d,this.alpha+c.alpha)},toHSL:function(){var a=this.rgb[0]/255,b=this.rgb[1]/255,c=this.rgb[2]/255,d=this.alpha,e=Math.max(a,b,c),f=Math.min(a,b,c),g,h,i=(e+f)/2,j=e-f;if(e===f)g=h=0;else{h=i>.5?j/(2-e-f):j/(e+f);switch(e){case a:g=(b-c)/j+(b255?255:a<0?0:a).toString(16),a.length===1?"0"+a:a}).join("")}}}(c("../tree")),function(a){a.Comment=function(a,b){this.value=a,this.silent=!!b},a.Comment.prototype={toCSS:function(a){return a.compress?"":this.value},eval:function(){return this}}}(c("../tree")),function(a){a.Dimension=function(a,b){this.value=parseFloat(a),this.unit=b||null},a.Dimension.prototype={eval:function(){return this},toColor:function(){return new a.Color([this.value,this.value,this.value])},toCSS:function(){var a=this.value+this.unit;return a},operate:function(b,c){return new a.Dimension(a.operate(b,this.value,c.value),this.unit||c.unit)}}}(c("../tree")),function(a){a.Directive=function(b,c){this.name=b,Array.isArray(c)?this.ruleset=new a.Ruleset([],c):this.value=c},a.Directive.prototype={toCSS:function(a,b){return this.ruleset?(this.ruleset.root=!0,this.name+(b.compress?"{":" {\n ")+this.ruleset.toCSS(a,b).trim().replace(/\n/g,"\n ")+(b.compress?"}":"\n}\n")):this.name+" "+this.value.toCSS()+";\n"},eval:function(a){return a.frames.unshift(this),this.ruleset=this.ruleset&&this.ruleset.eval(a),a.frames.shift(),this},variable:function(b){return a.Ruleset.prototype.variable.call(this.ruleset,b)},find:function(){return a.Ruleset.prototype.find.apply(this.ruleset,arguments)},rulesets:function(){return a.Ruleset.prototype.rulesets.apply(this.ruleset)}}}(c("../tree")),function(a){a.Element=function(b,c,d){this.combinator=b instanceof a.Combinator?b:new a.Combinator(b),this.value=c?c.trim():"",this.index=d},a.Element.prototype.toCSS=function(a){return this.combinator.toCSS(a||{})+this.value},a.Combinator=function(a){a===" "?this.value=" ":a==="& "?this.value="& ":this.value=a?a.trim():""},a.Combinator.prototype.toCSS=function(a){return{"":""," ":" ","&":"","& ":" ",":":" :","::":"::","+":a.compress?"+":" + ","~":a.compress?"~":" ~ ",">":a.compress?">":" > "}[this.value]}}(c("../tree")),function(a){a.Expression=function(a){this.value=a},a.Expression.prototype={eval:function(b){return this.value.length>1?new a.Expression(this.value.map(function(a){return a.eval(b)})):this.value.length===1?this.value[0].eval(b):this},toCSS:function(a){return this.value.map(function(b){return b.toCSS(a)}).join(" ")}}}(c("../tree")),function(a){a.Import=function(b,c){var d=this;this._path=b,b instanceof a.Quoted?this.path=/\.(le?|c)ss(\?.*)?$/.test(b.value)?b.value:b.value+".less":this.path=b.value.value||b.value,this.css=/css(\?.*)?$/.test(this.path),this.css||c.push(this.path,function(a){if(!a)throw new Error("Error parsing "+d.path);d.root=a})},a.Import.prototype={toCSS:function(){return this.css?"@import "+this._path.toCSS()+";\n":""},eval:function(b){var c;if(this.css)return this;c=new a.Ruleset(null,this.root.rules.slice(0));for(var d=0;d0){c=this.arguments&&this.arguments.map(function(b){return b.eval(a)});for(var g=0;g0&&c>this.params.length)return!1;d=Math.min(c,this.arity);for(var e=0;ee.selectors[g].elements.length?Array.prototype.push.apply(d,e.find(new a.Selector(b.elements.slice(1)),c)):d.push(e);break}}),this._lookups[g]=d)},toCSS:function(b,c){var d=[],e=[],f=[],g=[],h,i;this.root||(b.length===0?g=this.selectors.map(function(a){return[a]}):this.joinSelectors(g,b,this.selectors));for(var j=0;j0&&(h=g.map(function(a){return a.map(function(a){return a.toCSS(c)}).join("").trim()}).join(c.compress?",":g.length>3?",\n":", "),d.push(h,(c.compress?"{":" {\n ")+e.join(c.compress?"":"\n ")+(c.compress?"}":"\n}\n"))),d.push(f),d.join("")+(c.compress?"\n":"")},joinSelectors:function(a,b,c){for(var d=0;d0&&e.push(new a.Selector(g)),h.length>0&&f.push(new a.Selector(h));for(var l=0;l0&&typeof a!="undefined"&&(b.value=c[0]+(b.value.charAt(0)==="/"?b.value.slice(1):b.value)),this.value=b,this.paths=c)},b.URL.prototype={toCSS:function(){return"url("+(this.attrs?"data:"+this.attrs.mime+this.attrs.charset+this.attrs.base64+this.attrs.data:this.value.toCSS())+")"},eval:function(a){return this.attrs?this:new b.URL(this.value.eval(a),this.paths)}}}(c("../tree")),function(a){a.Value=function(a){this.value=a,this.is="value"},a.Value.prototype={eval:function(b){return this.value.length===1?this.value[0].eval(b):new a.Value(this.value.map(function(a){return a.eval(b)}))},toCSS:function(a){return this.value.map(function(b){return b.toCSS(a)}).join(a.compress?",":", ")}}}(c("../tree")),function(a){a.Variable=function(a,b){this.name=a,this.index=b},a.Variable.prototype={eval:function(b){var c,d,e=this.name;e.indexOf("@@")==0&&(e="@"+(new a.Variable(e.slice(1))).eval(b).value);if(c=a.find(b.frames,function(a){if(d=a.variable(e))return d.value.eval(b)}))return c;throw{message:"variable "+e+" is undefined",index:this.index}}}}(c("../tree")),c("./tree").find=function(a,b){for(var c=0,d;c1?"["+a.value.map(function(a){return a.toCSS(!1)}).join(", ")+"]":a.toCSS(!1)};var f=location.protocol==="file:"||location.protocol==="chrome:"||location.protocol==="chrome-extension:"||location.protocol==="resource:";d.env=d.env||(location.hostname=="127.0.0.1"||location.hostname=="0.0.0.0"||location.hostname=="localhost"||location.port.length>0||f?"development":"production"),d.async=!1,d.poll=d.poll||(f?1e3:1500),d.watch=function(){return this.watchMode=!0},d.unwatch=function(){return this.watchMode=!1},d.env==="development"?(d.optimization=0,/!watch/.test(location.hash)&&d.watch(),d.watchTimer=setInterval(function(){d.watchMode&&m(function(a,b,c){a&&p(a.toCSS(),b,c.lastModified)})},d.poll)):d.optimization=3;var g;try{g=typeof a.localStorage=="undefined"?null:a.localStorage}catch(h){g=null}var i=document.getElementsByTagName("link"),j=/^text\/(x-)?less$/;d.sheets=[];for(var k=0;k
  2. ID
    ltcaddres
    IP