├── LICENSE ├── README.md └── app ├── .meteor ├── .finished-upgraders ├── .gitignore ├── .id ├── packages ├── platforms ├── release └── versions ├── client ├── collections.js ├── index.js ├── lib │ ├── compatibility │ │ └── bootstrap.js │ ├── contracts │ │ └── MultiplyContract.sol │ ├── helpers │ │ ├── helperFunctions.js │ │ └── templateHelpers.js │ └── thirdparty │ │ ├── chance.min.js │ │ └── web3 │ │ └── web3.js ├── meta.js ├── routes.js ├── stylesheets │ ├── base │ │ ├── global.less │ │ ├── lib │ │ │ ├── bootstrap │ │ │ │ ├── alerts.import.less │ │ │ │ ├── badges.import.less │ │ │ │ ├── bootstrap.import.less │ │ │ │ ├── breadcrumbs.import.less │ │ │ │ ├── button-groups.import.less │ │ │ │ ├── buttons.import.less │ │ │ │ ├── carousel.import.less │ │ │ │ ├── close.import.less │ │ │ │ ├── code.import.less │ │ │ │ ├── component-animations.import.less │ │ │ │ ├── dropdowns.import.less │ │ │ │ ├── forms.import.less │ │ │ │ ├── glyphicons.import.less │ │ │ │ ├── grid.import.less │ │ │ │ ├── input-groups.import.less │ │ │ │ ├── jumbotron.import.less │ │ │ │ ├── labels.import.less │ │ │ │ ├── list-group.import.less │ │ │ │ ├── media.import.less │ │ │ │ ├── mixins.import.less │ │ │ │ ├── mixins │ │ │ │ │ ├── alerts.import.less │ │ │ │ │ ├── background-variant.import.less │ │ │ │ │ ├── border-radius.import.less │ │ │ │ │ ├── buttons.import.less │ │ │ │ │ ├── center-block.import.less │ │ │ │ │ ├── clearfix.import.less │ │ │ │ │ ├── forms.import.less │ │ │ │ │ ├── gradients.import.less │ │ │ │ │ ├── grid-framework.import.less │ │ │ │ │ ├── grid.import.less │ │ │ │ │ ├── hide-text.import.less │ │ │ │ │ ├── image.import.less │ │ │ │ │ ├── labels.import.less │ │ │ │ │ ├── list-group.import.less │ │ │ │ │ ├── nav-divider.import.less │ │ │ │ │ ├── nav-vertical-align.import.less │ │ │ │ │ ├── opacity.import.less │ │ │ │ │ ├── pagination.import.less │ │ │ │ │ ├── panels.import.less │ │ │ │ │ ├── progress-bar.import.less │ │ │ │ │ ├── reset-filter.import.less │ │ │ │ │ ├── resize.import.less │ │ │ │ │ ├── responsive-visibility.import.less │ │ │ │ │ ├── size.import.less │ │ │ │ │ ├── tab-focus.import.less │ │ │ │ │ ├── table-row.import.less │ │ │ │ │ ├── text-emphasis.import.less │ │ │ │ │ ├── text-overflow.import.less │ │ │ │ │ └── vendor-prefixes.import.less │ │ │ │ ├── modals.import.less │ │ │ │ ├── navbar.import.less │ │ │ │ ├── navs.import.less │ │ │ │ ├── normalize.import.less │ │ │ │ ├── pager.import.less │ │ │ │ ├── pagination.import.less │ │ │ │ ├── panels.import.less │ │ │ │ ├── popovers.import.less │ │ │ │ ├── print.import.less │ │ │ │ ├── progress-bars.import.less │ │ │ │ ├── responsive-embed.import.less │ │ │ │ ├── responsive-utilities.import.less │ │ │ │ ├── scaffolding.import.less │ │ │ │ ├── tables.import.less │ │ │ │ ├── theme.import.less │ │ │ │ ├── thumbnails.import.less │ │ │ │ ├── tooltip.import.less │ │ │ │ ├── type.import.less │ │ │ │ ├── utilities.import.less │ │ │ │ ├── variables.import.less │ │ │ │ └── wells.import.less │ │ │ └── font-awesome │ │ │ │ ├── animated.import.less │ │ │ │ ├── bordered-pulled.import.less │ │ │ │ ├── core.import.less │ │ │ │ ├── fixed-width.import.less │ │ │ │ ├── font-awesome.import.less │ │ │ │ ├── icons.import.less │ │ │ │ ├── larger.import.less │ │ │ │ ├── list.import.less │ │ │ │ ├── mixins.import.less │ │ │ │ ├── path.import.less │ │ │ │ ├── rotated-flipped.import.less │ │ │ │ ├── stacked.import.less │ │ │ │ └── variables.import.less │ │ ├── mixins.import.less │ │ ├── type.import.less │ │ └── variables.import.less │ └── components │ │ ├── buttons.import.less │ │ └── loading.import.less └── templates │ ├── components │ ├── accounts.html │ ├── accounts.js │ ├── balance.html │ ├── balance.js │ ├── multiplyContract.html │ ├── multiplyContract.js │ ├── networkHealth.html │ └── networkHealth.js │ ├── index.html │ ├── layout │ ├── _footer.html │ ├── _header.html │ ├── main.html │ └── notFound.html │ └── views │ ├── view1.html │ ├── view1.js │ ├── view2.html │ └── view2.js ├── i18n ├── app.en.i18n.json └── dapp.en.i18n.json ├── project-tap.i18n ├── public ├── fonts │ ├── font-awesome │ │ ├── FontAwesome.otf │ │ ├── fontawesome-webfont.eot │ │ ├── fontawesome-webfont.svg │ │ ├── fontawesome-webfont.ttf │ │ └── fontawesome-webfont.woff │ └── glyphicons-halflings │ │ ├── glyphicons-halflings-regular.eot │ │ ├── glyphicons-halflings-regular.svg │ │ ├── glyphicons-halflings-regular.ttf │ │ ├── glyphicons-halflings-regular.woff │ │ └── glyphicons-halflings-regular.woff2 └── images │ └── favicons │ ├── apple-touch-icon-114x114.png │ ├── apple-touch-icon-120x120.png │ ├── apple-touch-icon-144x144.png │ ├── apple-touch-icon-152x152.png │ ├── apple-touch-icon-57x57.png │ ├── apple-touch-icon-60x60.png │ ├── apple-touch-icon-72x72.png │ ├── apple-touch-icon-76x76.png │ ├── apple-touch-icon-precomposed.png │ ├── apple-touch-icon.png │ ├── browserconfig.xml │ ├── favicon-160x160.png │ ├── favicon-16x16.png │ ├── favicon-192x192.png │ ├── favicon-32x32.png │ ├── favicon-96x96.png │ ├── favicon.ico │ ├── mstile-144x144.png │ ├── mstile-150x150.png │ ├── mstile-310x150.png │ ├── mstile-310x310.png │ └── mstile-70x70.png ├── settings.json ├── test-genesis.json └── tests └── mocha └── client └── MultiplyContract.js /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License 2 | 3 | Copyright (c) 2015 Nick Dodson. nickdodson.com 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. 22 | 23 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # meteor-dapp-boilerplate 2 | 3 | A starting point for decentralized MeteorJS applications. Includes Ethereum.js, iron-router, Bootstrap 3, Font Awesome, LESS and more. 4 | 5 | **Based off of [Differential's meteor-boilerplate](https://github.com/Differential/meteor-boilerplate) and [Ethereum's meteor-dapp-wallet](https://github.com/ethereum/meteor-dapp-wallet). Please note that this boilerplate is still in Alpha. 6 | 7 | * [Alpha](#alpha) 8 | * [Included Packages](#included-packages) 9 | * [Installation](#installation) 10 | * [Deployment](#deployment) 11 | * [File Structure](#file-structure) 12 | * [Bootstrap and Less](#bootstrap-and-less) 13 | * [Favicons and Touch Icons](#favicons-and-touch-icons) 14 | * [Private Network](#private-network) 15 | * [Unit Testing](#unit-testing) 16 | * [License](#license) 17 | 18 | ## Included Packages 19 | 20 | * Collections: 21 | * [dburles:collection-helpers](https://github.com/dburles/meteor-collection-helpers) 22 | * [matb33:collection-hooks](https://github.com/matb33/meteor-collection-hooks) 23 | * [reywood:publish-composite](https://github.com/englue/meteor-publish-composite) 24 | * [frozeman:persistent-minimongo](https://github.com/frozeman/meteor-persistent-minimongo) 25 | * Router: 26 | * [iron:router](https://github.com/EventedMind/iron-router) 27 | * [zimme:iron-router-active](https://github.com/zimme/meteor-iron-router-active) 28 | * [yasinuslu:blaze-meta](https://github.com/yasinuslu/blaze-meta) 29 | * [Less](http://lesscss.org) 30 | * [Bootstrap](http://getbootstrap.com) 31 | * [Font Awesome](http://fontawesome.io) 32 | * [Ethereum](http://ethereum.org) 33 | * [ethereum:elements](https://github.com/ethereum/meteor-package-elements) 34 | * [ethereum:tools](https://github.com/ethereum/meteor-package-tools) 35 | * [ethereum:js](https://github.com/ethereum/ethereum.js) 36 | * [ethereum:accounts](https://github.com/ethereum/meteor-package-accounts/) 37 | * [ethereum:blocks](https://github.com/ethereum/meteor-package-blocks/) 38 | * Numbers: 39 | * [3stack:bignumber](https://github.com/MikeMcl/bignumber.js/) 40 | * [chance.js](http://chancejs.com/) 41 | * Language: 42 | * [tap:i18n](https://github.com/TAPevents/tap-i18n) 43 | * Unit Testing: 44 | * [mike:mocha](https://github.com/mad-eye/meteor-mocha-web/) 45 | * Misc: 46 | * [Moment.js](http://momentjs.com/) 47 | * [chuangbo:cookie](https://github.com/chuangbo/meteor-cookie) 48 | * [Underscore.js](http://underscorejs.org/) 49 | * [Underscore.string](http://epeli.github.io/underscore.string/) 50 | * [frozeman:storage](https://github.com/frozeman/meteor-storage) 51 | * [frozeman:template-var](https://github.com/frozeman/meteor-template-var) 52 | * [frozeman:reactive-timer](https://github.com/frozeman/meteor-reactive-timer) 53 | 54 | ## Hosted Alpha 55 | 56 | http://meteor-dapp-boilerplate.meteor.com 57 | 58 | ## Installation 59 | 60 | Clone this repo 61 | 62 | $ git clone http://github.com/SilentCicero/meteor-dapp-boilerplate 63 | 64 | Create an account with geth (create a passphrase): 65 | 66 | $ geth account new 67 | 68 | Start a local geth node instace (then hit 'enter' to promt passphrase input): 69 | 70 | $ geth --rpc --rpcaddr="0.0.0.0" --rpccorsdomain="*" --mine --unlock=0 --verbosity=5 --maxpeers=0 --minerthreads="4" 71 | 72 | Start the app using Meteor 73 | 74 | $ cd meteor-dapp-boilerplate/app 75 | $ meteor 76 | 77 | ## File Structure 78 | 79 | This file structure is largley based off of Differentials boilerplate, but with client-only directories. Client-only files are stored in the `client` directory. The `public` directory is for publicly accessible assets such as images and fonts. The `i18n` directory is for language files. 80 | 81 | ## Bootstrap and LESS 82 | 83 | The majority of Bootstrap can be customized with LESS variables. If you look in `client/stylesheets/base/lib/bootstrap/variables.import.less` you will see a slew of configuration variables that can be tweaked to drastically change the look and feel of your site without having to write a single line of CSS. 84 | 85 | However we should avoid modifying the core Bootstrap Less files (in case we want to update them later), and should instead override the variables in our own LESS files. 86 | 87 | For example, to change the color of all primary buttons and links, simply add a `@brand-primary` variable to `stylesheets/base/variables.import.less`: 88 | 89 | ``` 90 | // variables.import.less 91 | @brand-primary: #DC681D; 92 | ``` 93 | 94 | If you'd like to override a feature of Bootstrap that can't be modified using variables, simply create a new file in the `client/stylesheets/components` directory named after the corresponding Bootstrap component (eg. `buttons` in this case), and make your changes there. 95 | 96 | ``` 97 | // buttons.import.less 98 | .btn { 99 | text-transform: uppercase; 100 | } 101 | ``` 102 | 103 | After your file is ready, you need to import it into `client/stylesheets/base/global.less`. So, you would add in this statement: 104 | ``` 105 | @import '@{components}/buttons.import.less'; 106 | ``` 107 | 108 | The reason that this is done is to avoid any issues when the LESS files are compiled into CSS. That way, if one component relies on another or you want a certain order for your components, you can avoid any issues. 109 | 110 | 111 | ## Favicons and Touch Icons 112 | 113 | Upload your image to http://realfavicongenerator.net/ and place the resulting images in `public/images/favicons` 114 | 115 | ## Private Network 116 | 117 | If you would like to test your dApp with a local private Ethereum node, a `test-genesis.json` file is provided in the `app` folder. This is an example command line to run your own private network: 118 | 119 | $ geth --rpc --rpccorsdomain "*" --genesis test-genesis.json --networkid 1234 --mine --unlock 0 120 | 121 | ## Unit Testing 122 | 123 | All tests are stored in the `app/tests` directory. By default the [Mocha](https://mochajs.org/) testing framework is not installed, but some example tests are provided with this boilerplate. In order to activate Mocha/Velocity you must edit `app/.meteor/packages` and uncomment `#mike:mocha` to `mike:mocha`. A testing button will appear on the top right hand corner of your dApp. Remember to remove the mocha package for deployment and production. 124 | 125 | Add Mocha/Velocity 126 | 127 | $ meteor add mike:mocha 128 | 129 | Remove Mocha/Velocity 130 | 131 | $ meteor remove mike:mocha 132 | 133 | Please refer to this page for more on unit testing in Meteor: https://velocity.readme.io/ 134 | 135 | ## License 136 | 137 | Released under the MIT License, see LICENSE file. -------------------------------------------------------------------------------- /app/.meteor/.finished-upgraders: -------------------------------------------------------------------------------- 1 | # This file contains information which helps Meteor properly upgrade your 2 | # app when you run 'meteor update'. You should check it into version control 3 | # with your project. 4 | 5 | notices-for-0.9.0 6 | notices-for-0.9.1 7 | 0.9.4-platform-file 8 | notices-for-facebook-graph-api-2 9 | 1.2.0-standard-minifiers-package 10 | 1.2.0-meteor-platform-split 11 | 1.2.0-cordova-changes 12 | 1.2.0-breaking-changes 13 | -------------------------------------------------------------------------------- /app/.meteor/.gitignore: -------------------------------------------------------------------------------- 1 | local 2 | -------------------------------------------------------------------------------- /app/.meteor/.id: -------------------------------------------------------------------------------- 1 | # This file contains a token that is unique to your project. 2 | # Check it into your repository along with the rest of this directory. 3 | # It can be used for purposes such as: 4 | # - ensuring you don't accidentally deploy one app on top of another 5 | # - providing package authors with aggregated statistics 6 | 7 | wzsvj5186nsct1gvqf6b 8 | -------------------------------------------------------------------------------- /app/.meteor/packages: -------------------------------------------------------------------------------- 1 | # Meteor packages used by this project, one per line. 2 | # Check this file (and the other files in this directory) into your repository. 3 | # 4 | # 'meteor add' and 'meteor remove' will edit this file for you, 5 | # but you can also edit it by hand. 6 | 7 | reactive-var 8 | less 9 | iron:router 10 | fastclick 11 | tap:i18n 12 | 3stack:bignumber 13 | zimme:iron-router-active 14 | yasinuslu:blaze-meta 15 | numeral:numeral 16 | ethereum:web3 17 | ethereum:accounts@0.3.5 18 | ethereum:elements 19 | ethereum:tools 20 | ethereum:blocks 21 | frozeman:persistent-minimongo 22 | frozeman:storage 23 | frozeman:template-var 24 | frozeman:reactive-timer 25 | mrt:moment 26 | dburles:collection-helpers 27 | matb33:collection-hooks 28 | raix:handlebar-helpers 29 | chuangbo:cookie 30 | markdown 31 | standard-minifiers 32 | meteor-base 33 | mobile-experience 34 | mongo 35 | blaze-html-templates 36 | session 37 | jquery 38 | tracker 39 | logging 40 | reload 41 | random 42 | ejson 43 | spacebars 44 | check 45 | silentcicero:solc 46 | mike:mocha -------------------------------------------------------------------------------- /app/.meteor/platforms: -------------------------------------------------------------------------------- 1 | server 2 | browser 3 | -------------------------------------------------------------------------------- /app/.meteor/release: -------------------------------------------------------------------------------- 1 | METEOR@1.2.0.2 2 | -------------------------------------------------------------------------------- /app/.meteor/versions: -------------------------------------------------------------------------------- 1 | 3stack:bignumber@2.0.7 2 | aldeed:simple-schema@1.3.3 3 | alexvandesande:identicon@1.0.2 4 | amplify@1.0.0 5 | autoupdate@1.2.3 6 | babel-compiler@5.8.24_1 7 | babel-runtime@0.1.4 8 | base64@1.0.4 9 | binary-heap@1.0.4 10 | blaze@2.1.3 11 | blaze-html-templates@1.0.1 12 | blaze-tools@1.0.4 13 | boilerplate-generator@1.0.4 14 | caching-compiler@1.0.0 15 | caching-html-compiler@1.0.2 16 | callback-hook@1.0.4 17 | cfs:http-methods@0.0.30 18 | check@1.0.6 19 | chuangbo:cookie@1.1.0 20 | coffeescript@1.0.10 21 | cosmos:browserify@0.4.0 22 | dburles:collection-helpers@1.0.3 23 | ddp@1.2.2 24 | ddp-client@1.2.1 25 | ddp-common@1.2.1 26 | ddp-server@1.2.1 27 | deps@1.0.9 28 | diff-sequence@1.0.1 29 | ecmascript@0.1.5 30 | ecmascript-collections@0.1.6 31 | ejson@1.0.7 32 | ethereum:accounts@0.3.7 33 | ethereum:blocks@0.2.3 34 | ethereum:elements@0.5.6 35 | ethereum:tools@0.2.9 36 | ethereum:web3@0.14.1 37 | fastclick@1.0.7 38 | frozeman:animation-helper@0.2.6 39 | frozeman:persistent-minimongo@0.1.6 40 | frozeman:reactive-timer@0.1.7 41 | frozeman:storage@0.1.8 42 | frozeman:template-var@1.2.1 43 | geojson-utils@1.0.4 44 | hot-code-push@1.0.0 45 | html-tools@1.0.5 46 | htmljs@1.0.5 47 | http@1.1.1 48 | id-map@1.0.4 49 | iron:controller@1.0.12 50 | iron:core@1.0.11 51 | iron:dynamic-template@1.0.12 52 | iron:layout@1.0.12 53 | iron:location@1.0.11 54 | iron:middleware-stack@1.0.11 55 | iron:router@1.0.12 56 | iron:url@1.0.11 57 | jquery@1.11.4 58 | launch-screen@1.0.4 59 | less@2.5.0_3 60 | livedata@1.0.15 61 | localstorage@1.0.5 62 | logging@1.0.8 63 | markdown@1.0.5 64 | matb33:collection-hooks@0.8.1 65 | meteor@1.1.9 66 | meteor-base@1.0.1 67 | meteorspark:util@0.2.0 68 | mike:mocha@0.6.4 69 | mike:mocha-core@0.1.0 70 | minifiers@1.1.7 71 | minimongo@1.0.10 72 | mobile-experience@1.0.1 73 | mobile-status-bar@1.0.6 74 | mongo@1.1.2 75 | mongo-id@1.0.1 76 | mrt:moment@2.8.1 77 | npm-mongo@1.4.39_1 78 | numeral:numeral@1.5.3_1 79 | observe-sequence@1.0.7 80 | ordered-dict@1.0.4 81 | package-version-parser@3.0.4 82 | practicalmeteor:chai@2.1.0_1 83 | practicalmeteor:loglevel@1.2.0_2 84 | promise@0.5.0 85 | raix:eventemitter@0.1.3 86 | raix:handlebar-helpers@0.2.5 87 | random@1.0.4 88 | reactive-dict@1.1.2 89 | reactive-var@1.0.6 90 | reload@1.1.4 91 | retry@1.0.4 92 | routepolicy@1.0.6 93 | sanjo:long-running-child-process@1.1.3 94 | sanjo:meteor-files-helpers@1.1.0_7 95 | sanjo:meteor-version@1.0.0 96 | session@1.1.1 97 | silentcicero:solc@0.2.4 98 | silentcicero:solc-compiler@0.1.9 99 | spacebars@1.0.7 100 | spacebars-compiler@1.0.7 101 | standard-minifiers@1.0.1 102 | tap:i18n@1.7.0 103 | templating@1.1.4 104 | templating-tools@1.0.0 105 | tracker@1.0.9 106 | ui@1.0.8 107 | underscore@1.0.4 108 | underscorestring:underscore.string@3.0.3_1 109 | url@1.0.5 110 | velocity:chokidar@1.0.3_1 111 | velocity:core@0.10.1 112 | velocity:html-reporter@0.9.0 113 | velocity:meteor-internals@1.1.0_7 114 | velocity:shim@0.1.0 115 | velocity:source-map-support@0.3.2_1 116 | webapp@1.2.2 117 | webapp-hashing@1.0.5 118 | yasinuslu:blaze-meta@0.3.3 119 | zimme:iron-router-active@1.0.4 120 | -------------------------------------------------------------------------------- /app/client/collections.js: -------------------------------------------------------------------------------- 1 | 2 | // Basic (local) collections 3 | // we use {connection: null} to prevent them from syncing with our not existing Meteor server 4 | 5 | // A test persitent collection 6 | MyCollection = new Mongo.Collection('mydb', {connection: null}); 7 | new PersistentMinimongo(MyCollection); 8 | -------------------------------------------------------------------------------- /app/client/index.js: -------------------------------------------------------------------------------- 1 | 2 | // disconnect any meteor server 3 | if(location.host !== 'localhost:3000' 4 | && location.host !== '127.0.0.1:3000' 5 | && typeof MochaWeb === 'undefined') 6 | Meteor.disconnect(); 7 | 8 | 9 | // Set the default unit to ether 10 | if(!LocalStore.get('etherUnit')) 11 | LocalStore.set('etherUnit', 'ether'); 12 | 13 | 14 | // Set Session default values for components 15 | if (Meteor.isClient) { 16 | Session.setDefault('balance', '0'); 17 | } 18 | 19 | Meteor.startup(function() { 20 | // set providor, which should be a geth node 21 | // my RPC settings are: 22 | // geth --rpc --rpcaddr="0.0.0.0" --rpccorsdomain="*" --mine --unlock=YOUR_ACCOUNT --verbosity=5 --maxpeers=0 --minerthreads="3" 23 | if(!web3.currentProvider) 24 | web3.setProvider(new web3.providers.HttpProvider("http://localhost:8545")); 25 | 26 | // Setup EthAccounts 27 | EthAccounts.init(); 28 | 29 | // SET default language 30 | if(Cookie.get('TAPi18next')) { 31 | TAPi18n.setLanguage(Cookie.get('TAPi18next')); 32 | } else { 33 | var userLang = navigator.language || navigator.userLanguage, 34 | availLang = TAPi18n.getLanguages(); 35 | 36 | // set default language 37 | if (_.isObject(availLang) && availLang[userLang]) { 38 | TAPi18n.setLanguage(userLang); 39 | // lang = userLang; 40 | } else if (_.isObject(availLang) && availLang[userLang.substr(0,2)]) { 41 | TAPi18n.setLanguage(userLang.substr(0,2)); 42 | // lang = userLang.substr(0,2); 43 | } else { 44 | TAPi18n.setLanguage('en'); 45 | // lang = 'en'; 46 | } 47 | } 48 | 49 | // Setup Moment and Numeral i18n support 50 | Tracker.autorun(function(){ 51 | if(_.isString(TAPi18n.getLanguage())) { 52 | moment.locale(TAPi18n.getLanguage().substr(0,2)); 53 | numeral.language(TAPi18n.getLanguage().substr(0,2)); 54 | } 55 | }); 56 | 57 | // Set Meta Title 58 | Meta.setTitle(TAPi18n.__("dapp.app.title")); 59 | }); 60 | -------------------------------------------------------------------------------- /app/client/lib/contracts/MultiplyContract.sol: -------------------------------------------------------------------------------- 1 | contract MultiplyContract { 2 | function multiply(uint a) returns(uint d) { 3 | return a * 7; 4 | } 5 | } -------------------------------------------------------------------------------- /app/client/lib/helpers/helperFunctions.js: -------------------------------------------------------------------------------- 1 | /** 2 | Helper functions 3 | 4 | @module Helpers 5 | **/ 6 | 7 | /** 8 | The Helpers class containing helper functions 9 | 10 | @class Helpers 11 | @constructor 12 | **/ 13 | 14 | Helpers = {}; 15 | 16 | 17 | /** 18 | Reruns functions reactively, based on an interval. Use it like so: 19 | 20 | Helpers.rerun['10s'].tick(); 21 | 22 | @method (rerun) 23 | **/ 24 | 25 | Helpers.rerun = { 26 | '10s': new ReactiveTimer(10) 27 | }; 28 | 29 | 30 | /** 31 | Clear localStorage 32 | 33 | @method (getLocalStorageSize) 34 | **/ 35 | 36 | Helpers.getLocalStorageSize = function(){ 37 | 38 | var size = 0; 39 | if(localStorage) { 40 | _.each(Object.keys(localStorage), function(key){ 41 | size += localStorage[key].length * 2 / 1024 / 1024; 42 | }); 43 | } 44 | 45 | return size; 46 | }; 47 | 48 | 49 | 50 | /** 51 | Reactive wrapper for the moment package. 52 | 53 | @method (moment) 54 | @param {String} time a date object passed to moment function. 55 | @return {Object} the moment js package 56 | **/ 57 | 58 | Helpers.moment = function(time){ 59 | 60 | // react to language changes as well 61 | TAPi18n.getLanguage(); 62 | 63 | if(_.isFinite(time) && moment.unix(time).isValid()) 64 | return moment.unix(time); 65 | else 66 | return moment(time); 67 | 68 | }; 69 | 70 | 71 | /** 72 | Formats a timestamp to any format given. 73 | 74 | Helpers.formatTime(myTime, "YYYY-MM-DD") 75 | 76 | @method (formatTime) 77 | @param {String} time The timstamp, can be string or unix format 78 | @param {String} format the format string, can also be "iso", to format to ISO string, or "fromnow" 79 | @return {String} The formated time 80 | **/ 81 | 82 | Helpers.formatTime = function(time, format) { //parameters 83 | 84 | // make sure not existing values are not Spacebars.kw 85 | if(format instanceof Spacebars.kw) 86 | format = null; 87 | 88 | if(time) { 89 | 90 | if(_.isString(format) && !_.isEmpty(format)) { 91 | 92 | if(format.toLowerCase() === 'iso') 93 | time = Helpers.moment(time).toISOString(); 94 | else if(format.toLowerCase() === 'fromnow') { 95 | // make reactive updating 96 | Helpers.rerun['10s'].tick(); 97 | time = Helpers.moment(time).fromNow(); 98 | } else 99 | time = Helpers.moment(time).format(format); 100 | } 101 | 102 | return time; 103 | 104 | } else 105 | return ''; 106 | }; 107 | -------------------------------------------------------------------------------- /app/client/lib/helpers/templateHelpers.js: -------------------------------------------------------------------------------- 1 | /** 2 | Helper functions 3 | 4 | @module Helpers 5 | **/ 6 | 7 | /** 8 | Global template helpers 9 | 10 | @class TemplateHelpers 11 | @constructor 12 | **/ 13 | 14 | /** 15 | A simple template helper to log objects in the console. 16 | 17 | @method (debug) 18 | **/ 19 | 20 | Template.registerHelper('debug', function(object){ 21 | console.log(object); 22 | }); 23 | 24 | 25 | 26 | /** 27 | Formats a timestamp to any format given. 28 | 29 | {{formatTime myTime "YYYY-MM-DD"}} 30 | 31 | @method (formatTime) 32 | @param {String} time The timstamp, can be string or unix format 33 | @param {String} format the format string, can also be "iso", to format to ISO string, or "fromnow" 34 | //@param {Boolean} realTime Whether or not this helper should re-run every 10s 35 | @return {String} The formated time 36 | **/ 37 | 38 | Template.registerHelper('formatTime', Helpers.formatTime); 39 | 40 | 41 | /** 42 | Formats a number. 43 | 44 | {{formatNumber myNumber "0,0.0[0000]"}} 45 | 46 | @method (formatNumber) 47 | @param {String} number 48 | @param {String} format the format string 49 | @return {String} The formatted number 50 | **/ 51 | 52 | Template.registerHelper('formatNumber', function(number, format){ 53 | if(format instanceof Spacebars.kw) 54 | format = null; 55 | 56 | if(number instanceof BigNumber) 57 | number = number.toNumber(); 58 | 59 | format = format || '0,0.0[0000]'; 60 | 61 | 62 | if(!_.isFinite(number)) 63 | number = numeral().unformat(number); 64 | 65 | if(_.isFinite(number)) 66 | return numeral(number).format(format); 67 | }); 68 | -------------------------------------------------------------------------------- /app/client/lib/thirdparty/web3/web3.js: -------------------------------------------------------------------------------- 1 | web3 = new Web3(); -------------------------------------------------------------------------------- /app/client/meta.js: -------------------------------------------------------------------------------- 1 | /** 2 | Template Controllers 3 | 4 | @module Meta 5 | */ 6 | 7 | /** 8 | The app meta data 9 | 10 | @class App meta 11 | @constructor 12 | */ 13 | 14 | if(Meteor.isClient) { 15 | 16 | // Meta defaults 17 | Meta.config({ 18 | options: { 19 | suffix: '' 20 | } 21 | }); 22 | 23 | 24 | /** 25 | A suffix method to allow for suffix updates (Title | [Suffix]) 26 | 27 | @method setSuffix 28 | */ 29 | 30 | Meta.setSuffix = function(suffix){ 31 | Meta.setTitle(TAPi18n.__("dapp.app.title") + ' | ' + suffix); 32 | }; 33 | } 34 | -------------------------------------------------------------------------------- /app/client/routes.js: -------------------------------------------------------------------------------- 1 | /** 2 | Template Controllers 3 | 4 | @module Routes 5 | */ 6 | 7 | /** 8 | The app routes 9 | 10 | @class App routes 11 | @constructor 12 | */ 13 | 14 | // Change the URLS to use #! instead of real paths 15 | // Iron.Location.configure({useHashPaths: true}); 16 | 17 | // Router defaults 18 | Router.configure({ 19 | layoutTemplate: 'layout_main', 20 | notFoundTemplate: 'layout_notFound', 21 | yieldRegions: { 22 | 'layout_header': {to: 'header'} 23 | , 'layout_footer': {to: 'footer'} 24 | } 25 | }); 26 | 27 | // ROUTES 28 | 29 | /** 30 | The receive route, showing the wallet overview 31 | 32 | @method dashboard 33 | */ 34 | 35 | // Default route 36 | Router.route('/', { 37 | template: 'views_view1', 38 | name: 'home' 39 | }); 40 | 41 | // Route for view1 42 | Router.route('/view1', { 43 | template: 'views_view1', 44 | name: 'view1' 45 | }); 46 | 47 | // Route for view2 48 | Router.route('/view2', { 49 | template: 'views_view2', 50 | name: 'view2' 51 | }); 52 | -------------------------------------------------------------------------------- /app/client/stylesheets/base/global.less: -------------------------------------------------------------------------------- 1 | @components: '../components'; 2 | 3 | // Bootstrap 4 | @import "./lib/bootstrap/bootstrap.import.less"; 5 | 6 | // Font Awesome 7 | @import "./lib/font-awesome/font-awesome.import.less"; 8 | 9 | @import './mixins.import.less'; 10 | @import './variables.import.less'; 11 | 12 | // Misc Global Styles 13 | @import './type.import.less'; 14 | 15 | // Components 16 | @import '@{components}/buttons.import.less'; 17 | @import '@{components}/loading.import.less'; 18 | -------------------------------------------------------------------------------- /app/client/stylesheets/base/lib/bootstrap/alerts.import.less: -------------------------------------------------------------------------------- 1 | // 2 | // Alerts 3 | // -------------------------------------------------- 4 | 5 | 6 | // Base styles 7 | // ------------------------- 8 | 9 | .alert { 10 | padding: @alert-padding; 11 | margin-bottom: @line-height-computed; 12 | border: 1px solid transparent; 13 | border-radius: @alert-border-radius; 14 | 15 | // Headings for larger alerts 16 | h4 { 17 | margin-top: 0; 18 | // Specified for the h4 to prevent conflicts of changing @headings-color 19 | color: inherit; 20 | } 21 | 22 | // Provide class for links that match alerts 23 | .alert-link { 24 | font-weight: @alert-link-font-weight; 25 | } 26 | 27 | // Improve alignment and spacing of inner content 28 | > p, 29 | > ul { 30 | margin-bottom: 0; 31 | } 32 | 33 | > p + p { 34 | margin-top: 5px; 35 | } 36 | } 37 | 38 | // Dismissible alerts 39 | // 40 | // Expand the right padding and account for the close button's positioning. 41 | 42 | .alert-dismissable, // The misspelled .alert-dismissable was deprecated in 3.2.0. 43 | .alert-dismissible { 44 | padding-right: (@alert-padding + 20); 45 | 46 | // Adjust close link position 47 | .close { 48 | position: relative; 49 | top: -2px; 50 | right: -21px; 51 | color: inherit; 52 | } 53 | } 54 | 55 | // Alternate styles 56 | // 57 | // Generate contextual modifier classes for colorizing the alert. 58 | 59 | .alert-success { 60 | .alert-variant(@alert-success-bg; @alert-success-border; @alert-success-text); 61 | } 62 | 63 | .alert-info { 64 | .alert-variant(@alert-info-bg; @alert-info-border; @alert-info-text); 65 | } 66 | 67 | .alert-warning { 68 | .alert-variant(@alert-warning-bg; @alert-warning-border; @alert-warning-text); 69 | } 70 | 71 | .alert-danger { 72 | .alert-variant(@alert-danger-bg; @alert-danger-border; @alert-danger-text); 73 | } 74 | -------------------------------------------------------------------------------- /app/client/stylesheets/base/lib/bootstrap/badges.import.less: -------------------------------------------------------------------------------- 1 | // 2 | // Badges 3 | // -------------------------------------------------- 4 | 5 | 6 | // Base class 7 | .badge { 8 | display: inline-block; 9 | min-width: 10px; 10 | padding: 3px 7px; 11 | font-size: @font-size-small; 12 | font-weight: @badge-font-weight; 13 | color: @badge-color; 14 | line-height: @badge-line-height; 15 | vertical-align: baseline; 16 | white-space: nowrap; 17 | text-align: center; 18 | background-color: @badge-bg; 19 | border-radius: @badge-border-radius; 20 | 21 | // Empty badges collapse automatically (not available in IE8) 22 | &:empty { 23 | display: none; 24 | } 25 | 26 | // Quick fix for badges in buttons 27 | .btn & { 28 | position: relative; 29 | top: -1px; 30 | } 31 | 32 | .btn-xs &, 33 | .btn-group-xs > .btn & { 34 | top: 0; 35 | padding: 1px 5px; 36 | } 37 | 38 | // Hover state, but only for links 39 | a& { 40 | &:hover, 41 | &:focus { 42 | color: @badge-link-hover-color; 43 | text-decoration: none; 44 | cursor: pointer; 45 | } 46 | } 47 | 48 | // Account for badges in navs 49 | .list-group-item.active > &, 50 | .nav-pills > .active > a > & { 51 | color: @badge-active-color; 52 | background-color: @badge-active-bg; 53 | } 54 | 55 | .list-group-item > & { 56 | float: right; 57 | } 58 | 59 | .list-group-item > & + & { 60 | margin-right: 5px; 61 | } 62 | 63 | .nav-pills > li > a > & { 64 | margin-left: 3px; 65 | } 66 | } 67 | -------------------------------------------------------------------------------- /app/client/stylesheets/base/lib/bootstrap/bootstrap.import.less: -------------------------------------------------------------------------------- 1 | // Core variables and mixins 2 | @import "variables.import.less"; 3 | @import "mixins.import.less"; 4 | 5 | // Reset and dependencies 6 | @import "normalize.import.less"; 7 | @import "print.import.less"; 8 | @import "glyphicons.import.less"; 9 | 10 | // Core CSS 11 | @import "scaffolding.import.less"; 12 | @import "type.import.less"; 13 | @import "code.import.less"; 14 | @import "grid.import.less"; 15 | @import "tables.import.less"; 16 | @import "forms.import.less"; 17 | @import "buttons.import.less"; 18 | 19 | // Components 20 | @import "component-animations.import.less"; 21 | @import "dropdowns.import.less"; 22 | @import "button-groups.import.less"; 23 | @import "input-groups.import.less"; 24 | @import "navs.import.less"; 25 | @import "navbar.import.less"; 26 | @import "breadcrumbs.import.less"; 27 | @import "pagination.import.less"; 28 | @import "pager.import.less"; 29 | @import "labels.import.less"; 30 | @import "badges.import.less"; 31 | @import "jumbotron.import.less"; 32 | @import "thumbnails.import.less"; 33 | @import "alerts.import.less"; 34 | @import "progress-bars.import.less"; 35 | @import "media.import.less"; 36 | @import "list-group.import.less"; 37 | @import "panels.import.less"; 38 | @import "responsive-embed.import.less"; 39 | @import "wells.import.less"; 40 | @import "close.import.less"; 41 | 42 | // Components w/ JavaScript 43 | @import "modals.import.less"; 44 | @import "tooltip.import.less"; 45 | @import "popovers.import.less"; 46 | @import "carousel.import.less"; 47 | 48 | // Utility classes 49 | @import "utilities.import.less"; 50 | @import "responsive-utilities.import.less"; 51 | -------------------------------------------------------------------------------- /app/client/stylesheets/base/lib/bootstrap/breadcrumbs.import.less: -------------------------------------------------------------------------------- 1 | // 2 | // Breadcrumbs 3 | // -------------------------------------------------- 4 | 5 | 6 | .breadcrumb { 7 | padding: @breadcrumb-padding-vertical @breadcrumb-padding-horizontal; 8 | margin-bottom: @line-height-computed; 9 | list-style: none; 10 | background-color: @breadcrumb-bg; 11 | border-radius: @border-radius-base; 12 | 13 | > li { 14 | display: inline-block; 15 | 16 | + li:before { 17 | content: "@{breadcrumb-separator}\00a0"; // Unicode space added since inline-block means non-collapsing white-space 18 | padding: 0 5px; 19 | color: @breadcrumb-color; 20 | } 21 | } 22 | 23 | > .active { 24 | color: @breadcrumb-active-color; 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /app/client/stylesheets/base/lib/bootstrap/button-groups.import.less: -------------------------------------------------------------------------------- 1 | // 2 | // Button groups 3 | // -------------------------------------------------- 4 | 5 | // Make the div behave like a button 6 | .btn-group, 7 | .btn-group-vertical { 8 | position: relative; 9 | display: inline-block; 10 | vertical-align: middle; // match .btn alignment given font-size hack above 11 | > .btn { 12 | position: relative; 13 | float: left; 14 | // Bring the "active" button to the front 15 | &:hover, 16 | &:focus, 17 | &:active, 18 | &.active { 19 | z-index: 2; 20 | } 21 | } 22 | } 23 | 24 | // Prevent double borders when buttons are next to each other 25 | .btn-group { 26 | .btn + .btn, 27 | .btn + .btn-group, 28 | .btn-group + .btn, 29 | .btn-group + .btn-group { 30 | margin-left: -1px; 31 | } 32 | } 33 | 34 | // Optional: Group multiple button groups together for a toolbar 35 | .btn-toolbar { 36 | margin-left: -5px; // Offset the first child's margin 37 | &:extend(.clearfix all); 38 | 39 | .btn-group, 40 | .input-group { 41 | float: left; 42 | } 43 | > .btn, 44 | > .btn-group, 45 | > .input-group { 46 | margin-left: 5px; 47 | } 48 | } 49 | 50 | .btn-group > .btn:not(:first-child):not(:last-child):not(.dropdown-toggle) { 51 | border-radius: 0; 52 | } 53 | 54 | // Set corners individual because sometimes a single button can be in a .btn-group and we need :first-child and :last-child to both match 55 | .btn-group > .btn:first-child { 56 | margin-left: 0; 57 | &:not(:last-child):not(.dropdown-toggle) { 58 | .border-right-radius(0); 59 | } 60 | } 61 | // Need .dropdown-toggle since :last-child doesn't apply given a .dropdown-menu immediately after it 62 | .btn-group > .btn:last-child:not(:first-child), 63 | .btn-group > .dropdown-toggle:not(:first-child) { 64 | .border-left-radius(0); 65 | } 66 | 67 | // Custom edits for including btn-groups within btn-groups (useful for including dropdown buttons within a btn-group) 68 | .btn-group > .btn-group { 69 | float: left; 70 | } 71 | .btn-group > .btn-group:not(:first-child):not(:last-child) > .btn { 72 | border-radius: 0; 73 | } 74 | .btn-group > .btn-group:first-child:not(:last-child) { 75 | > .btn:last-child, 76 | > .dropdown-toggle { 77 | .border-right-radius(0); 78 | } 79 | } 80 | .btn-group > .btn-group:last-child:not(:first-child) > .btn:first-child { 81 | .border-left-radius(0); 82 | } 83 | 84 | // On active and open, don't show outline 85 | .btn-group .dropdown-toggle:active, 86 | .btn-group.open .dropdown-toggle { 87 | outline: 0; 88 | } 89 | 90 | 91 | // Sizing 92 | // 93 | // Remix the default button sizing classes into new ones for easier manipulation. 94 | 95 | .btn-group-xs > .btn { &:extend(.btn-xs); } 96 | .btn-group-sm > .btn { &:extend(.btn-sm); } 97 | .btn-group-lg > .btn { &:extend(.btn-lg); } 98 | 99 | 100 | // Split button dropdowns 101 | // ---------------------- 102 | 103 | // Give the line between buttons some depth 104 | .btn-group > .btn + .dropdown-toggle { 105 | padding-left: 8px; 106 | padding-right: 8px; 107 | } 108 | .btn-group > .btn-lg + .dropdown-toggle { 109 | padding-left: 12px; 110 | padding-right: 12px; 111 | } 112 | 113 | // The clickable button for toggling the menu 114 | // Remove the gradient and set the same inset shadow as the :active state 115 | .btn-group.open .dropdown-toggle { 116 | .box-shadow(inset 0 3px 5px rgba(0,0,0,.125)); 117 | 118 | // Show no shadow for `.btn-link` since it has no other button styles. 119 | &.btn-link { 120 | .box-shadow(none); 121 | } 122 | } 123 | 124 | 125 | // Reposition the caret 126 | .btn .caret { 127 | margin-left: 0; 128 | } 129 | // Carets in other button sizes 130 | .btn-lg .caret { 131 | border-width: @caret-width-large @caret-width-large 0; 132 | border-bottom-width: 0; 133 | } 134 | // Upside down carets for .dropup 135 | .dropup .btn-lg .caret { 136 | border-width: 0 @caret-width-large @caret-width-large; 137 | } 138 | 139 | 140 | // Vertical button groups 141 | // ---------------------- 142 | 143 | .btn-group-vertical { 144 | > .btn, 145 | > .btn-group, 146 | > .btn-group > .btn { 147 | display: block; 148 | float: none; 149 | width: 100%; 150 | max-width: 100%; 151 | } 152 | 153 | // Clear floats so dropdown menus can be properly placed 154 | > .btn-group { 155 | &:extend(.clearfix all); 156 | > .btn { 157 | float: none; 158 | } 159 | } 160 | 161 | > .btn + .btn, 162 | > .btn + .btn-group, 163 | > .btn-group + .btn, 164 | > .btn-group + .btn-group { 165 | margin-top: -1px; 166 | margin-left: 0; 167 | } 168 | } 169 | 170 | .btn-group-vertical > .btn { 171 | &:not(:first-child):not(:last-child) { 172 | border-radius: 0; 173 | } 174 | &:first-child:not(:last-child) { 175 | border-top-right-radius: @border-radius-base; 176 | .border-bottom-radius(0); 177 | } 178 | &:last-child:not(:first-child) { 179 | border-bottom-left-radius: @border-radius-base; 180 | .border-top-radius(0); 181 | } 182 | } 183 | .btn-group-vertical > .btn-group:not(:first-child):not(:last-child) > .btn { 184 | border-radius: 0; 185 | } 186 | .btn-group-vertical > .btn-group:first-child:not(:last-child) { 187 | > .btn:last-child, 188 | > .dropdown-toggle { 189 | .border-bottom-radius(0); 190 | } 191 | } 192 | .btn-group-vertical > .btn-group:last-child:not(:first-child) > .btn:first-child { 193 | .border-top-radius(0); 194 | } 195 | 196 | 197 | // Justified button groups 198 | // ---------------------- 199 | 200 | .btn-group-justified { 201 | display: table; 202 | width: 100%; 203 | table-layout: fixed; 204 | border-collapse: separate; 205 | > .btn, 206 | > .btn-group { 207 | float: none; 208 | display: table-cell; 209 | width: 1%; 210 | } 211 | > .btn-group .btn { 212 | width: 100%; 213 | } 214 | 215 | > .btn-group .dropdown-menu { 216 | left: auto; 217 | } 218 | } 219 | 220 | 221 | // Checkbox and radio options 222 | // 223 | // In order to support the browser's form validation feedback, powered by the 224 | // `required` attribute, we have to "hide" the inputs via `clip`. We cannot use 225 | // `display: none;` or `visibility: hidden;` as that also hides the popover. 226 | // Simply visually hiding the inputs via `opacity` would leave them clickable in 227 | // certain cases which is prevented by using `clip` and `pointer-events`. 228 | // This way, we ensure a DOM element is visible to position the popover from. 229 | // 230 | // See https://github.com/twbs/bootstrap/pull/12794 and 231 | // https://github.com/twbs/bootstrap/pull/14559 for more information. 232 | 233 | [data-toggle="buttons"] { 234 | > .btn, 235 | > .btn-group > .btn { 236 | input[type="radio"], 237 | input[type="checkbox"] { 238 | position: absolute; 239 | clip: rect(0,0,0,0); 240 | pointer-events: none; 241 | } 242 | } 243 | } 244 | -------------------------------------------------------------------------------- /app/client/stylesheets/base/lib/bootstrap/buttons.import.less: -------------------------------------------------------------------------------- 1 | // 2 | // Buttons 3 | // -------------------------------------------------- 4 | 5 | 6 | // Base styles 7 | // -------------------------------------------------- 8 | 9 | .btn { 10 | display: inline-block; 11 | margin-bottom: 0; // For input.btn 12 | font-weight: @btn-font-weight; 13 | text-align: center; 14 | vertical-align: middle; 15 | touch-action: manipulation; 16 | cursor: pointer; 17 | background-image: none; // Reset unusual Firefox-on-Android default style; see https://github.com/necolas/normalize.css/issues/214 18 | border: 1px solid transparent; 19 | white-space: nowrap; 20 | .button-size(@padding-base-vertical; @padding-base-horizontal; @font-size-base; @line-height-base; @border-radius-base); 21 | .user-select(none); 22 | 23 | &, 24 | &:active, 25 | &.active { 26 | &:focus, 27 | &.focus { 28 | .tab-focus(); 29 | } 30 | } 31 | 32 | &:hover, 33 | &:focus, 34 | &.focus { 35 | color: @btn-default-color; 36 | text-decoration: none; 37 | } 38 | 39 | &:active, 40 | &.active { 41 | outline: 0; 42 | background-image: none; 43 | .box-shadow(inset 0 3px 5px rgba(0,0,0,.125)); 44 | } 45 | 46 | &.disabled, 47 | &[disabled], 48 | fieldset[disabled] & { 49 | cursor: @cursor-disabled; 50 | pointer-events: none; // Future-proof disabling of clicks 51 | .opacity(.65); 52 | .box-shadow(none); 53 | } 54 | } 55 | 56 | 57 | // Alternate buttons 58 | // -------------------------------------------------- 59 | 60 | .btn-default { 61 | .button-variant(@btn-default-color; @btn-default-bg; @btn-default-border); 62 | } 63 | .btn-primary { 64 | .button-variant(@btn-primary-color; @btn-primary-bg; @btn-primary-border); 65 | } 66 | // Success appears as green 67 | .btn-success { 68 | .button-variant(@btn-success-color; @btn-success-bg; @btn-success-border); 69 | } 70 | // Info appears as blue-green 71 | .btn-info { 72 | .button-variant(@btn-info-color; @btn-info-bg; @btn-info-border); 73 | } 74 | // Warning appears as orange 75 | .btn-warning { 76 | .button-variant(@btn-warning-color; @btn-warning-bg; @btn-warning-border); 77 | } 78 | // Danger and error appear as red 79 | .btn-danger { 80 | .button-variant(@btn-danger-color; @btn-danger-bg; @btn-danger-border); 81 | } 82 | 83 | 84 | // Link buttons 85 | // ------------------------- 86 | 87 | // Make a button look and behave like a link 88 | .btn-link { 89 | color: @link-color; 90 | font-weight: normal; 91 | border-radius: 0; 92 | 93 | &, 94 | &:active, 95 | &.active, 96 | &[disabled], 97 | fieldset[disabled] & { 98 | background-color: transparent; 99 | .box-shadow(none); 100 | } 101 | &, 102 | &:hover, 103 | &:focus, 104 | &:active { 105 | border-color: transparent; 106 | } 107 | &:hover, 108 | &:focus { 109 | color: @link-hover-color; 110 | text-decoration: @link-hover-decoration; 111 | background-color: transparent; 112 | } 113 | &[disabled], 114 | fieldset[disabled] & { 115 | &:hover, 116 | &:focus { 117 | color: @btn-link-disabled-color; 118 | text-decoration: none; 119 | } 120 | } 121 | } 122 | 123 | 124 | // Button Sizes 125 | // -------------------------------------------------- 126 | 127 | .btn-lg { 128 | // line-height: ensure even-numbered height of button next to large input 129 | .button-size(@padding-large-vertical; @padding-large-horizontal; @font-size-large; @line-height-large; @border-radius-large); 130 | } 131 | .btn-sm { 132 | // line-height: ensure proper height of button next to small input 133 | .button-size(@padding-small-vertical; @padding-small-horizontal; @font-size-small; @line-height-small; @border-radius-small); 134 | } 135 | .btn-xs { 136 | .button-size(@padding-xs-vertical; @padding-xs-horizontal; @font-size-small; @line-height-small; @border-radius-small); 137 | } 138 | 139 | 140 | // Block button 141 | // -------------------------------------------------- 142 | 143 | .btn-block { 144 | display: block; 145 | width: 100%; 146 | } 147 | 148 | // Vertically space out multiple block buttons 149 | .btn-block + .btn-block { 150 | margin-top: 5px; 151 | } 152 | 153 | // Specificity overrides 154 | input[type="submit"], 155 | input[type="reset"], 156 | input[type="button"] { 157 | &.btn-block { 158 | width: 100%; 159 | } 160 | } 161 | -------------------------------------------------------------------------------- /app/client/stylesheets/base/lib/bootstrap/carousel.import.less: -------------------------------------------------------------------------------- 1 | // 2 | // Carousel 3 | // -------------------------------------------------- 4 | 5 | 6 | // Wrapper for the slide container and indicators 7 | .carousel { 8 | position: relative; 9 | } 10 | 11 | .carousel-inner { 12 | position: relative; 13 | overflow: hidden; 14 | width: 100%; 15 | 16 | > .item { 17 | display: none; 18 | position: relative; 19 | .transition(.6s ease-in-out left); 20 | 21 | // Account for jankitude on images 22 | > img, 23 | > a > img { 24 | &:extend(.img-responsive); 25 | line-height: 1; 26 | } 27 | 28 | // WebKit CSS3 transforms for supported devices 29 | @media all and (transform-3d), (-webkit-transform-3d) { 30 | .transition-transform(~'0.6s ease-in-out'); 31 | .backface-visibility(~'hidden'); 32 | .perspective(1000); 33 | 34 | &.next, 35 | &.active.right { 36 | .translate3d(100%, 0, 0); 37 | left: 0; 38 | } 39 | &.prev, 40 | &.active.left { 41 | .translate3d(-100%, 0, 0); 42 | left: 0; 43 | } 44 | &.next.left, 45 | &.prev.right, 46 | &.active { 47 | .translate3d(0, 0, 0); 48 | left: 0; 49 | } 50 | } 51 | } 52 | 53 | > .active, 54 | > .next, 55 | > .prev { 56 | display: block; 57 | } 58 | 59 | > .active { 60 | left: 0; 61 | } 62 | 63 | > .next, 64 | > .prev { 65 | position: absolute; 66 | top: 0; 67 | width: 100%; 68 | } 69 | 70 | > .next { 71 | left: 100%; 72 | } 73 | > .prev { 74 | left: -100%; 75 | } 76 | > .next.left, 77 | > .prev.right { 78 | left: 0; 79 | } 80 | 81 | > .active.left { 82 | left: -100%; 83 | } 84 | > .active.right { 85 | left: 100%; 86 | } 87 | 88 | } 89 | 90 | // Left/right controls for nav 91 | // --------------------------- 92 | 93 | .carousel-control { 94 | position: absolute; 95 | top: 0; 96 | left: 0; 97 | bottom: 0; 98 | width: @carousel-control-width; 99 | .opacity(@carousel-control-opacity); 100 | font-size: @carousel-control-font-size; 101 | color: @carousel-control-color; 102 | text-align: center; 103 | text-shadow: @carousel-text-shadow; 104 | // We can't have this transition here because WebKit cancels the carousel 105 | // animation if you trip this while in the middle of another animation. 106 | 107 | // Set gradients for backgrounds 108 | &.left { 109 | #gradient > .horizontal(@start-color: rgba(0,0,0,.5); @end-color: rgba(0,0,0,.0001)); 110 | } 111 | &.right { 112 | left: auto; 113 | right: 0; 114 | #gradient > .horizontal(@start-color: rgba(0,0,0,.0001); @end-color: rgba(0,0,0,.5)); 115 | } 116 | 117 | // Hover/focus state 118 | &:hover, 119 | &:focus { 120 | outline: 0; 121 | color: @carousel-control-color; 122 | text-decoration: none; 123 | .opacity(.9); 124 | } 125 | 126 | // Toggles 127 | .icon-prev, 128 | .icon-next, 129 | .glyphicon-chevron-left, 130 | .glyphicon-chevron-right { 131 | position: absolute; 132 | top: 50%; 133 | z-index: 5; 134 | display: inline-block; 135 | } 136 | .icon-prev, 137 | .glyphicon-chevron-left { 138 | left: 50%; 139 | margin-left: -10px; 140 | } 141 | .icon-next, 142 | .glyphicon-chevron-right { 143 | right: 50%; 144 | margin-right: -10px; 145 | } 146 | .icon-prev, 147 | .icon-next { 148 | width: 20px; 149 | height: 20px; 150 | margin-top: -10px; 151 | line-height: 1; 152 | font-family: serif; 153 | } 154 | 155 | 156 | .icon-prev { 157 | &:before { 158 | content: '\2039';// SINGLE LEFT-POINTING ANGLE QUOTATION MARK (U+2039) 159 | } 160 | } 161 | .icon-next { 162 | &:before { 163 | content: '\203a';// SINGLE RIGHT-POINTING ANGLE QUOTATION MARK (U+203A) 164 | } 165 | } 166 | } 167 | 168 | // Optional indicator pips 169 | // 170 | // Add an unordered list with the following class and add a list item for each 171 | // slide your carousel holds. 172 | 173 | .carousel-indicators { 174 | position: absolute; 175 | bottom: 10px; 176 | left: 50%; 177 | z-index: 15; 178 | width: 60%; 179 | margin-left: -30%; 180 | padding-left: 0; 181 | list-style: none; 182 | text-align: center; 183 | 184 | li { 185 | display: inline-block; 186 | width: 10px; 187 | height: 10px; 188 | margin: 1px; 189 | text-indent: -999px; 190 | border: 1px solid @carousel-indicator-border-color; 191 | border-radius: 10px; 192 | cursor: pointer; 193 | 194 | // IE8-9 hack for event handling 195 | // 196 | // Internet Explorer 8-9 does not support clicks on elements without a set 197 | // `background-color`. We cannot use `filter` since that's not viewed as a 198 | // background color by the browser. Thus, a hack is needed. 199 | // See https://developer.mozilla.org/en-US/docs/Web/Events/click#Internet_Explorer 200 | // 201 | // For IE8, we set solid black as it doesn't support `rgba()`. For IE9, we 202 | // set alpha transparency for the best results possible. 203 | background-color: #000 \9; // IE8 204 | background-color: rgba(0,0,0,0); // IE9 205 | } 206 | .active { 207 | margin: 0; 208 | width: 12px; 209 | height: 12px; 210 | background-color: @carousel-indicator-active-bg; 211 | } 212 | } 213 | 214 | // Optional captions 215 | // ----------------------------- 216 | // Hidden by default for smaller viewports 217 | .carousel-caption { 218 | position: absolute; 219 | left: 15%; 220 | right: 15%; 221 | bottom: 20px; 222 | z-index: 10; 223 | padding-top: 20px; 224 | padding-bottom: 20px; 225 | color: @carousel-caption-color; 226 | text-align: center; 227 | text-shadow: @carousel-text-shadow; 228 | & .btn { 229 | text-shadow: none; // No shadow for button elements in carousel-caption 230 | } 231 | } 232 | 233 | 234 | // Scale up controls for tablets and up 235 | @media screen and (min-width: @screen-sm-min) { 236 | 237 | // Scale up the controls a smidge 238 | .carousel-control { 239 | .glyphicon-chevron-left, 240 | .glyphicon-chevron-right, 241 | .icon-prev, 242 | .icon-next { 243 | width: 30px; 244 | height: 30px; 245 | margin-top: -15px; 246 | font-size: 30px; 247 | } 248 | .glyphicon-chevron-left, 249 | .icon-prev { 250 | margin-left: -15px; 251 | } 252 | .glyphicon-chevron-right, 253 | .icon-next { 254 | margin-right: -15px; 255 | } 256 | } 257 | 258 | // Show and left align the captions 259 | .carousel-caption { 260 | left: 20%; 261 | right: 20%; 262 | padding-bottom: 30px; 263 | } 264 | 265 | // Move up the indicators 266 | .carousel-indicators { 267 | bottom: 20px; 268 | } 269 | } 270 | -------------------------------------------------------------------------------- /app/client/stylesheets/base/lib/bootstrap/close.import.less: -------------------------------------------------------------------------------- 1 | // 2 | // Close icons 3 | // -------------------------------------------------- 4 | 5 | 6 | .close { 7 | float: right; 8 | font-size: (@font-size-base * 1.5); 9 | font-weight: @close-font-weight; 10 | line-height: 1; 11 | color: @close-color; 12 | text-shadow: @close-text-shadow; 13 | .opacity(.2); 14 | 15 | &:hover, 16 | &:focus { 17 | color: @close-color; 18 | text-decoration: none; 19 | cursor: pointer; 20 | .opacity(.5); 21 | } 22 | 23 | // Additional properties for button version 24 | // iOS requires the button element instead of an anchor tag. 25 | // If you want the anchor version, it requires `href="#"`. 26 | // See https://developer.mozilla.org/en-US/docs/Web/Events/click#Safari_Mobile 27 | button& { 28 | padding: 0; 29 | cursor: pointer; 30 | background: transparent; 31 | border: 0; 32 | -webkit-appearance: none; 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /app/client/stylesheets/base/lib/bootstrap/code.import.less: -------------------------------------------------------------------------------- 1 | // 2 | // Code (inline and block) 3 | // -------------------------------------------------- 4 | 5 | 6 | // Inline and block code styles 7 | code, 8 | kbd, 9 | pre, 10 | samp { 11 | font-family: @font-family-monospace; 12 | } 13 | 14 | // Inline code 15 | code { 16 | padding: 2px 4px; 17 | font-size: 90%; 18 | color: @code-color; 19 | background-color: @code-bg; 20 | border-radius: @border-radius-base; 21 | } 22 | 23 | // User input typically entered via keyboard 24 | kbd { 25 | padding: 2px 4px; 26 | font-size: 90%; 27 | color: @kbd-color; 28 | background-color: @kbd-bg; 29 | border-radius: @border-radius-small; 30 | box-shadow: inset 0 -1px 0 rgba(0,0,0,.25); 31 | 32 | kbd { 33 | padding: 0; 34 | font-size: 100%; 35 | font-weight: bold; 36 | box-shadow: none; 37 | } 38 | } 39 | 40 | // Blocks of code 41 | pre { 42 | display: block; 43 | padding: ((@line-height-computed - 1) / 2); 44 | margin: 0 0 (@line-height-computed / 2); 45 | font-size: (@font-size-base - 1); // 14px to 13px 46 | line-height: @line-height-base; 47 | word-break: break-all; 48 | word-wrap: break-word; 49 | color: @pre-color; 50 | background-color: @pre-bg; 51 | border: 1px solid @pre-border-color; 52 | border-radius: @border-radius-base; 53 | 54 | // Account for some code outputs that place code tags in pre tags 55 | code { 56 | padding: 0; 57 | font-size: inherit; 58 | color: inherit; 59 | white-space: pre-wrap; 60 | background-color: transparent; 61 | border-radius: 0; 62 | } 63 | } 64 | 65 | // Enable scrollable blocks of code 66 | .pre-scrollable { 67 | max-height: @pre-scrollable-max-height; 68 | overflow-y: scroll; 69 | } 70 | -------------------------------------------------------------------------------- /app/client/stylesheets/base/lib/bootstrap/component-animations.import.less: -------------------------------------------------------------------------------- 1 | // 2 | // Component animations 3 | // -------------------------------------------------- 4 | 5 | // Heads up! 6 | // 7 | // We don't use the `.opacity()` mixin here since it causes a bug with text 8 | // fields in IE7-8. Source: https://github.com/twbs/bootstrap/pull/3552. 9 | 10 | .fade { 11 | opacity: 0; 12 | .transition(opacity .15s linear); 13 | &.in { 14 | opacity: 1; 15 | } 16 | } 17 | 18 | .collapse { 19 | display: none; 20 | visibility: hidden; 21 | 22 | &.in { display: block; visibility: visible; } 23 | tr&.in { display: table-row; } 24 | tbody&.in { display: table-row-group; } 25 | } 26 | 27 | .collapsing { 28 | position: relative; 29 | height: 0; 30 | overflow: hidden; 31 | .transition-property(~"height, visibility"); 32 | .transition-duration(.35s); 33 | .transition-timing-function(ease); 34 | } 35 | -------------------------------------------------------------------------------- /app/client/stylesheets/base/lib/bootstrap/dropdowns.import.less: -------------------------------------------------------------------------------- 1 | // 2 | // Dropdown menus 3 | // -------------------------------------------------- 4 | 5 | 6 | // Dropdown arrow/caret 7 | .caret { 8 | display: inline-block; 9 | width: 0; 10 | height: 0; 11 | margin-left: 2px; 12 | vertical-align: middle; 13 | border-top: @caret-width-base dashed; 14 | border-right: @caret-width-base solid transparent; 15 | border-left: @caret-width-base solid transparent; 16 | } 17 | 18 | // The dropdown wrapper (div) 19 | .dropup, 20 | .dropdown { 21 | position: relative; 22 | } 23 | 24 | // Prevent the focus on the dropdown toggle when closing dropdowns 25 | .dropdown-toggle:focus { 26 | outline: 0; 27 | } 28 | 29 | // The dropdown menu (ul) 30 | .dropdown-menu { 31 | position: absolute; 32 | top: 100%; 33 | left: 0; 34 | z-index: @zindex-dropdown; 35 | display: none; // none by default, but block on "open" of the menu 36 | float: left; 37 | min-width: 160px; 38 | padding: 5px 0; 39 | margin: 2px 0 0; // override default ul 40 | list-style: none; 41 | font-size: @font-size-base; 42 | text-align: left; // Ensures proper alignment if parent has it changed (e.g., modal footer) 43 | background-color: @dropdown-bg; 44 | border: 1px solid @dropdown-fallback-border; // IE8 fallback 45 | border: 1px solid @dropdown-border; 46 | border-radius: @border-radius-base; 47 | .box-shadow(0 6px 12px rgba(0,0,0,.175)); 48 | background-clip: padding-box; 49 | 50 | // Aligns the dropdown menu to right 51 | // 52 | // Deprecated as of 3.1.0 in favor of `.dropdown-menu-[dir]` 53 | &.pull-right { 54 | right: 0; 55 | left: auto; 56 | } 57 | 58 | // Dividers (basically an hr) within the dropdown 59 | .divider { 60 | .nav-divider(@dropdown-divider-bg); 61 | } 62 | 63 | // Links within the dropdown menu 64 | > li > a { 65 | display: block; 66 | padding: 3px 20px; 67 | clear: both; 68 | font-weight: normal; 69 | line-height: @line-height-base; 70 | color: @dropdown-link-color; 71 | white-space: nowrap; // prevent links from randomly breaking onto new lines 72 | } 73 | } 74 | 75 | // Hover/Focus state 76 | .dropdown-menu > li > a { 77 | &:hover, 78 | &:focus { 79 | text-decoration: none; 80 | color: @dropdown-link-hover-color; 81 | background-color: @dropdown-link-hover-bg; 82 | } 83 | } 84 | 85 | // Active state 86 | .dropdown-menu > .active > a { 87 | &, 88 | &:hover, 89 | &:focus { 90 | color: @dropdown-link-active-color; 91 | text-decoration: none; 92 | outline: 0; 93 | background-color: @dropdown-link-active-bg; 94 | } 95 | } 96 | 97 | // Disabled state 98 | // 99 | // Gray out text and ensure the hover/focus state remains gray 100 | 101 | .dropdown-menu > .disabled > a { 102 | &, 103 | &:hover, 104 | &:focus { 105 | color: @dropdown-link-disabled-color; 106 | } 107 | 108 | // Nuke hover/focus effects 109 | &:hover, 110 | &:focus { 111 | text-decoration: none; 112 | background-color: transparent; 113 | background-image: none; // Remove CSS gradient 114 | .reset-filter(); 115 | cursor: @cursor-disabled; 116 | } 117 | } 118 | 119 | // Open state for the dropdown 120 | .open { 121 | // Show the menu 122 | > .dropdown-menu { 123 | display: block; 124 | } 125 | 126 | // Remove the outline when :focus is triggered 127 | > a { 128 | outline: 0; 129 | } 130 | } 131 | 132 | // Menu positioning 133 | // 134 | // Add extra class to `.dropdown-menu` to flip the alignment of the dropdown 135 | // menu with the parent. 136 | .dropdown-menu-right { 137 | left: auto; // Reset the default from `.dropdown-menu` 138 | right: 0; 139 | } 140 | // With v3, we enabled auto-flipping if you have a dropdown within a right 141 | // aligned nav component. To enable the undoing of that, we provide an override 142 | // to restore the default dropdown menu alignment. 143 | // 144 | // This is only for left-aligning a dropdown menu within a `.navbar-right` or 145 | // `.pull-right` nav component. 146 | .dropdown-menu-left { 147 | left: 0; 148 | right: auto; 149 | } 150 | 151 | // Dropdown section headers 152 | .dropdown-header { 153 | display: block; 154 | padding: 3px 20px; 155 | font-size: @font-size-small; 156 | line-height: @line-height-base; 157 | color: @dropdown-header-color; 158 | white-space: nowrap; // as with > li > a 159 | } 160 | 161 | // Backdrop to catch body clicks on mobile, etc. 162 | .dropdown-backdrop { 163 | position: fixed; 164 | left: 0; 165 | right: 0; 166 | bottom: 0; 167 | top: 0; 168 | z-index: (@zindex-dropdown - 10); 169 | } 170 | 171 | // Right aligned dropdowns 172 | .pull-right > .dropdown-menu { 173 | right: 0; 174 | left: auto; 175 | } 176 | 177 | // Allow for dropdowns to go bottom up (aka, dropup-menu) 178 | // 179 | // Just add .dropup after the standard .dropdown class and you're set, bro. 180 | // TODO: abstract this so that the navbar fixed styles are not placed here? 181 | 182 | .dropup, 183 | .navbar-fixed-bottom .dropdown { 184 | // Reverse the caret 185 | .caret { 186 | border-top: 0; 187 | border-bottom: @caret-width-base solid; 188 | content: ""; 189 | } 190 | // Different positioning for bottom up menu 191 | .dropdown-menu { 192 | top: auto; 193 | bottom: 100%; 194 | margin-bottom: 2px; 195 | } 196 | } 197 | 198 | 199 | // Component alignment 200 | // 201 | // Reiterate per navbar.less and the modified component alignment there. 202 | 203 | @media (min-width: @grid-float-breakpoint) { 204 | .navbar-right { 205 | .dropdown-menu { 206 | .dropdown-menu-right(); 207 | } 208 | // Necessary for overrides of the default right aligned menu. 209 | // Will remove come v4 in all likelihood. 210 | .dropdown-menu-left { 211 | .dropdown-menu-left(); 212 | } 213 | } 214 | } 215 | -------------------------------------------------------------------------------- /app/client/stylesheets/base/lib/bootstrap/grid.import.less: -------------------------------------------------------------------------------- 1 | // 2 | // Grid system 3 | // -------------------------------------------------- 4 | 5 | 6 | // Container widths 7 | // 8 | // Set the container width, and override it for fixed navbars in media queries. 9 | 10 | .container { 11 | .container-fixed(); 12 | 13 | @media (min-width: @screen-sm-min) { 14 | width: @container-sm; 15 | } 16 | @media (min-width: @screen-md-min) { 17 | width: @container-md; 18 | } 19 | @media (min-width: @screen-lg-min) { 20 | width: @container-lg; 21 | } 22 | } 23 | 24 | 25 | // Fluid container 26 | // 27 | // Utilizes the mixin meant for fixed width containers, but without any defined 28 | // width for fluid, full width layouts. 29 | 30 | .container-fluid { 31 | .container-fixed(); 32 | } 33 | 34 | 35 | // Row 36 | // 37 | // Rows contain and clear the floats of your columns. 38 | 39 | .row { 40 | .make-row(); 41 | } 42 | 43 | 44 | // Columns 45 | // 46 | // Common styles for small and large grid columns 47 | 48 | .make-grid-columns(); 49 | 50 | 51 | // Extra small grid 52 | // 53 | // Columns, offsets, pushes, and pulls for extra small devices like 54 | // smartphones. 55 | 56 | .make-grid(xs); 57 | 58 | 59 | // Small grid 60 | // 61 | // Columns, offsets, pushes, and pulls for the small device range, from phones 62 | // to tablets. 63 | 64 | @media (min-width: @screen-sm-min) { 65 | .make-grid(sm); 66 | } 67 | 68 | 69 | // Medium grid 70 | // 71 | // Columns, offsets, pushes, and pulls for the desktop device range. 72 | 73 | @media (min-width: @screen-md-min) { 74 | .make-grid(md); 75 | } 76 | 77 | 78 | // Large grid 79 | // 80 | // Columns, offsets, pushes, and pulls for the large desktop device range. 81 | 82 | @media (min-width: @screen-lg-min) { 83 | .make-grid(lg); 84 | } 85 | -------------------------------------------------------------------------------- /app/client/stylesheets/base/lib/bootstrap/input-groups.import.less: -------------------------------------------------------------------------------- 1 | // 2 | // Input groups 3 | // -------------------------------------------------- 4 | 5 | // Base styles 6 | // ------------------------- 7 | .input-group { 8 | position: relative; // For dropdowns 9 | display: table; 10 | border-collapse: separate; // prevent input groups from inheriting border styles from table cells when placed within a table 11 | 12 | // Undo padding and float of grid classes 13 | &[class*="col-"] { 14 | float: none; 15 | padding-left: 0; 16 | padding-right: 0; 17 | } 18 | 19 | .form-control { 20 | // Ensure that the input is always above the *appended* addon button for 21 | // proper border colors. 22 | position: relative; 23 | z-index: 2; 24 | 25 | // IE9 fubars the placeholder attribute in text inputs and the arrows on 26 | // select elements in input groups. To fix it, we float the input. Details: 27 | // https://github.com/twbs/bootstrap/issues/11561#issuecomment-28936855 28 | float: left; 29 | 30 | width: 100%; 31 | margin-bottom: 0; 32 | } 33 | } 34 | 35 | // Sizing options 36 | // 37 | // Remix the default form control sizing classes into new ones for easier 38 | // manipulation. 39 | 40 | .input-group-lg > .form-control, 41 | .input-group-lg > .input-group-addon, 42 | .input-group-lg > .input-group-btn > .btn { 43 | .input-lg(); 44 | } 45 | .input-group-sm > .form-control, 46 | .input-group-sm > .input-group-addon, 47 | .input-group-sm > .input-group-btn > .btn { 48 | .input-sm(); 49 | } 50 | 51 | 52 | // Display as table-cell 53 | // ------------------------- 54 | .input-group-addon, 55 | .input-group-btn, 56 | .input-group .form-control { 57 | display: table-cell; 58 | 59 | &:not(:first-child):not(:last-child) { 60 | border-radius: 0; 61 | } 62 | } 63 | // Addon and addon wrapper for buttons 64 | .input-group-addon, 65 | .input-group-btn { 66 | width: 1%; 67 | white-space: nowrap; 68 | vertical-align: middle; // Match the inputs 69 | } 70 | 71 | // Text input groups 72 | // ------------------------- 73 | .input-group-addon { 74 | padding: @padding-base-vertical @padding-base-horizontal; 75 | font-size: @font-size-base; 76 | font-weight: normal; 77 | line-height: 1; 78 | color: @input-color; 79 | text-align: center; 80 | background-color: @input-group-addon-bg; 81 | border: 1px solid @input-group-addon-border-color; 82 | border-radius: @border-radius-base; 83 | 84 | // Sizing 85 | &.input-sm { 86 | padding: @padding-small-vertical @padding-small-horizontal; 87 | font-size: @font-size-small; 88 | border-radius: @border-radius-small; 89 | } 90 | &.input-lg { 91 | padding: @padding-large-vertical @padding-large-horizontal; 92 | font-size: @font-size-large; 93 | border-radius: @border-radius-large; 94 | } 95 | 96 | // Nuke default margins from checkboxes and radios to vertically center within. 97 | input[type="radio"], 98 | input[type="checkbox"] { 99 | margin-top: 0; 100 | } 101 | } 102 | 103 | // Reset rounded corners 104 | .input-group .form-control:first-child, 105 | .input-group-addon:first-child, 106 | .input-group-btn:first-child > .btn, 107 | .input-group-btn:first-child > .btn-group > .btn, 108 | .input-group-btn:first-child > .dropdown-toggle, 109 | .input-group-btn:last-child > .btn:not(:last-child):not(.dropdown-toggle), 110 | .input-group-btn:last-child > .btn-group:not(:last-child) > .btn { 111 | .border-right-radius(0); 112 | } 113 | .input-group-addon:first-child { 114 | border-right: 0; 115 | } 116 | .input-group .form-control:last-child, 117 | .input-group-addon:last-child, 118 | .input-group-btn:last-child > .btn, 119 | .input-group-btn:last-child > .btn-group > .btn, 120 | .input-group-btn:last-child > .dropdown-toggle, 121 | .input-group-btn:first-child > .btn:not(:first-child), 122 | .input-group-btn:first-child > .btn-group:not(:first-child) > .btn { 123 | .border-left-radius(0); 124 | } 125 | .input-group-addon:last-child { 126 | border-left: 0; 127 | } 128 | 129 | // Button input groups 130 | // ------------------------- 131 | .input-group-btn { 132 | position: relative; 133 | // Jankily prevent input button groups from wrapping with `white-space` and 134 | // `font-size` in combination with `inline-block` on buttons. 135 | font-size: 0; 136 | white-space: nowrap; 137 | 138 | // Negative margin for spacing, position for bringing hovered/focused/actived 139 | // element above the siblings. 140 | > .btn { 141 | position: relative; 142 | + .btn { 143 | margin-left: -1px; 144 | } 145 | // Bring the "active" button to the front 146 | &:hover, 147 | &:focus, 148 | &:active { 149 | z-index: 2; 150 | } 151 | } 152 | 153 | // Negative margin to only have a 1px border between the two 154 | &:first-child { 155 | > .btn, 156 | > .btn-group { 157 | margin-right: -1px; 158 | } 159 | } 160 | &:last-child { 161 | > .btn, 162 | > .btn-group { 163 | margin-left: -1px; 164 | } 165 | } 166 | } 167 | -------------------------------------------------------------------------------- /app/client/stylesheets/base/lib/bootstrap/jumbotron.import.less: -------------------------------------------------------------------------------- 1 | // 2 | // Jumbotron 3 | // -------------------------------------------------- 4 | 5 | 6 | .jumbotron { 7 | padding: @jumbotron-padding (@jumbotron-padding / 2); 8 | margin-bottom: @jumbotron-padding; 9 | color: @jumbotron-color; 10 | background-color: @jumbotron-bg; 11 | 12 | h1, 13 | .h1 { 14 | color: @jumbotron-heading-color; 15 | } 16 | 17 | p { 18 | margin-bottom: (@jumbotron-padding / 2); 19 | font-size: @jumbotron-font-size; 20 | font-weight: 200; 21 | } 22 | 23 | > hr { 24 | border-top-color: darken(@jumbotron-bg, 10%); 25 | } 26 | 27 | .container &, 28 | .container-fluid & { 29 | border-radius: @border-radius-large; // Only round corners at higher resolutions if contained in a container 30 | } 31 | 32 | .container { 33 | max-width: 100%; 34 | } 35 | 36 | @media screen and (min-width: @screen-sm-min) { 37 | padding: (@jumbotron-padding * 1.6) 0; 38 | 39 | .container &, 40 | .container-fluid & { 41 | padding-left: (@jumbotron-padding * 2); 42 | padding-right: (@jumbotron-padding * 2); 43 | } 44 | 45 | h1, 46 | .h1 { 47 | font-size: (@font-size-base * 4.5); 48 | } 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /app/client/stylesheets/base/lib/bootstrap/labels.import.less: -------------------------------------------------------------------------------- 1 | // 2 | // Labels 3 | // -------------------------------------------------- 4 | 5 | .label { 6 | display: inline; 7 | padding: .2em .6em .3em; 8 | font-size: 75%; 9 | font-weight: bold; 10 | line-height: 1; 11 | color: @label-color; 12 | text-align: center; 13 | white-space: nowrap; 14 | vertical-align: baseline; 15 | border-radius: .25em; 16 | 17 | // Add hover effects, but only for links 18 | a& { 19 | &:hover, 20 | &:focus { 21 | color: @label-link-hover-color; 22 | text-decoration: none; 23 | cursor: pointer; 24 | } 25 | } 26 | 27 | // Empty labels collapse automatically (not available in IE8) 28 | &:empty { 29 | display: none; 30 | } 31 | 32 | // Quick fix for labels in buttons 33 | .btn & { 34 | position: relative; 35 | top: -1px; 36 | } 37 | } 38 | 39 | // Colors 40 | // Contextual variations (linked labels get darker on :hover) 41 | 42 | .label-default { 43 | .label-variant(@label-default-bg); 44 | } 45 | 46 | .label-primary { 47 | .label-variant(@label-primary-bg); 48 | } 49 | 50 | .label-success { 51 | .label-variant(@label-success-bg); 52 | } 53 | 54 | .label-info { 55 | .label-variant(@label-info-bg); 56 | } 57 | 58 | .label-warning { 59 | .label-variant(@label-warning-bg); 60 | } 61 | 62 | .label-danger { 63 | .label-variant(@label-danger-bg); 64 | } 65 | -------------------------------------------------------------------------------- /app/client/stylesheets/base/lib/bootstrap/list-group.import.less: -------------------------------------------------------------------------------- 1 | // 2 | // List groups 3 | // -------------------------------------------------- 4 | 5 | 6 | // Base class 7 | // 8 | // Easily usable on