Repository: ngmy/webloyer Branch: master Commit: 0bf9f867ab4c Files: 341 Total size: 879.7 KB Directory structure: gitextract_lvb56yoq/ ├── .coveralls.yml ├── .gitattributes ├── .github/ │ └── FUNDING.yml ├── .gitignore ├── .travis.yml ├── LICENSE ├── README.md ├── SCREENSHOTS.md ├── WEBAPIS.md ├── WEBHOOKS.md ├── app/ │ ├── Console/ │ │ ├── Commands/ │ │ │ ├── Inspire.php │ │ │ └── Webloyer/ │ │ │ ├── DiscardOldDeployments.php │ │ │ └── Install.php │ │ └── Kernel.php │ ├── Entities/ │ │ ├── ProjectAttribute/ │ │ │ └── ProjectAttributeEntity.php │ │ └── Setting/ │ │ ├── AbstractSettingEntity.php │ │ ├── AppSettingEntity.php │ │ ├── DbSettingEntity.php │ │ └── MailSettingEntity.php │ ├── Events/ │ │ └── Event.php │ ├── Exceptions/ │ │ └── Handler.php │ ├── Http/ │ │ ├── Controllers/ │ │ │ ├── Auth/ │ │ │ │ ├── AuthController.php │ │ │ │ └── PasswordController.php │ │ │ ├── Controller.php │ │ │ ├── DeploymentsController.php │ │ │ ├── HomeController.php │ │ │ ├── ProjectsController.php │ │ │ ├── RecipesController.php │ │ │ ├── ServersController.php │ │ │ ├── SettingsController.php │ │ │ ├── UsersController.php │ │ │ ├── Webhook/ │ │ │ │ └── Github/ │ │ │ │ └── V1/ │ │ │ │ └── DeploymentsController.php │ │ │ └── WelcomeController.php │ │ ├── Kernel.php │ │ ├── Middleware/ │ │ │ ├── ApplySettings.php │ │ │ ├── Authenticate.php │ │ │ ├── RedirectIfAuthenticated.php │ │ │ ├── VerifyCsrfToken.php │ │ │ └── VerifyGithubWebhookSecret.php │ │ ├── Requests/ │ │ │ └── Request.php │ │ ├── breadcrumbs.php │ │ └── routes.php │ ├── Jobs/ │ │ ├── Deploy.php │ │ ├── Job.php │ │ └── Rollback.php │ ├── Listeners/ │ │ └── .gitkeep │ ├── Models/ │ │ ├── BaseModel.php │ │ ├── Deployment.php │ │ ├── DeploymentPresenter.php │ │ ├── MaxDeployment.php │ │ ├── Project.php │ │ ├── Recipe.php │ │ ├── Server.php │ │ ├── Setting.php │ │ └── User.php │ ├── Policies/ │ │ └── .gitkeep │ ├── Providers/ │ │ ├── AppServiceProvider.php │ │ ├── AuthServiceProvider.php │ │ ├── EventServiceProvider.php │ │ ├── RepositoryServiceProvider.php │ │ └── RouteServiceProvider.php │ ├── Repositories/ │ │ ├── AbstractConfigRepository.php │ │ ├── AbstractEloquentRepository.php │ │ ├── Project/ │ │ │ ├── EloquentProject.php │ │ │ └── ProjectInterface.php │ │ ├── Recipe/ │ │ │ ├── EloquentRecipe.php │ │ │ └── RecipeInterface.php │ │ ├── RepositoryInterface.php │ │ ├── Role/ │ │ │ ├── EloquentRole.php │ │ │ └── RoleInterface.php │ │ ├── Server/ │ │ │ ├── EloquentServer.php │ │ │ └── ServerInterface.php │ │ ├── Setting/ │ │ │ ├── AppSettingInterface.php │ │ │ ├── ConfigAppSetting.php │ │ │ ├── ConfigDbSetting.php │ │ │ ├── ConfigMailSetting.php │ │ │ ├── DbSettingInterface.php │ │ │ ├── EloquentSetting.php │ │ │ ├── MailSettingInterface.php │ │ │ └── SettingInterface.php │ │ └── User/ │ │ ├── EloquentUser.php │ │ └── UserInterface.php │ ├── Services/ │ │ ├── Api/ │ │ │ ├── JsonRpc.php │ │ │ └── Middleware/ │ │ │ └── Authenticate.php │ │ ├── Config/ │ │ │ ├── ConfigReaderInterface.php │ │ │ ├── ConfigWriterInterface.php │ │ │ ├── DotenvReader.php │ │ │ └── DotenvWriter.php │ │ ├── Deployment/ │ │ │ ├── DeployCommanderInterface.php │ │ │ ├── DeployerDeploymentFileBuilder.php │ │ │ ├── DeployerFile.php │ │ │ ├── DeployerFileBuilderInterface.php │ │ │ ├── DeployerFileDirector.php │ │ │ ├── DeployerRecipeFileBuilder.php │ │ │ ├── DeployerServerListFileBuilder.php │ │ │ ├── QueueDeployCommander.php │ │ │ └── StorageDeployCommander.php │ │ ├── Filesystem/ │ │ │ ├── FilesystemInterface.php │ │ │ └── LaravelFilesystem.php │ │ ├── Form/ │ │ │ ├── Deployment/ │ │ │ │ ├── DeploymentForm.php │ │ │ │ └── DeploymentFormLaravelValidator.php │ │ │ ├── Project/ │ │ │ │ ├── ProjectForm.php │ │ │ │ └── ProjectFormLaravelValidator.php │ │ │ ├── Recipe/ │ │ │ │ ├── RecipeForm.php │ │ │ │ └── RecipeFormLaravelValidator.php │ │ │ ├── Server/ │ │ │ │ ├── ServerForm.php │ │ │ │ └── ServerFormLaravelValidator.php │ │ │ ├── Setting/ │ │ │ │ ├── MailSettingForm.php │ │ │ │ └── MailSettingFormLaravelValidator.php │ │ │ └── User/ │ │ │ ├── UserForm.php │ │ │ └── UserFormLaravelValidator.php │ │ ├── Notification/ │ │ │ ├── MailNotifier.php │ │ │ └── NotifierInterface.php │ │ └── Validation/ │ │ ├── AbstractLaravelValidator.php │ │ └── ValidableInterface.php │ ├── Specifications/ │ │ ├── DeploymentSpecification.php │ │ └── OldDeploymentSpecification.php │ └── Traits/ │ └── RestExceptionHandlerTrait.php ├── artisan ├── bootstrap/ │ ├── app.php │ ├── autoload.php │ └── cache/ │ └── .gitignore ├── composer.json ├── config/ │ ├── acl.php │ ├── app.php │ ├── auth.php │ ├── cache.php │ ├── compile.php │ ├── database.php │ ├── filesystems.php │ ├── mail.php │ ├── queue.php │ ├── services.php │ ├── session.php │ └── view.php ├── database/ │ ├── .gitignore │ ├── migrations/ │ │ ├── .gitkeep │ │ ├── 2014_10_12_000000_create_users_table.php │ │ ├── 2014_10_12_100000_create_password_resets_table.php │ │ ├── 2015_02_07_172606_create_roles_table.php │ │ ├── 2015_02_07_172633_create_role_user_table.php │ │ ├── 2015_02_07_172649_create_permissions_table.php │ │ ├── 2015_02_07_172657_create_permission_role_table.php │ │ ├── 2015_02_17_152439_create_permission_user_table.php │ │ ├── 2015_02_22_123238_create_recipes_table.php │ │ ├── 2015_02_23_123238_create_servers_table.php │ │ ├── 2015_02_28_164641_create_projects_table.php │ │ ├── 2015_03_01_084552_create_deployments_table.php │ │ ├── 2015_05_28_132914_create_max_deployments_table.php │ │ ├── 2015_06_16_143119_create_jobs_table.php │ │ ├── 2015_08_10_143119_create_project_recipe_table.php │ │ └── 2016_08_24_041250_create_settings_table.php │ └── seeds/ │ ├── .gitkeep │ ├── DatabaseSeeder.php │ ├── PermissionRoleTableSeeder.php │ ├── PermissionTableSeeder.php │ ├── RecipeTableSeeder.php │ ├── RoleTableSeeder.php │ ├── RoleUserTableSeeder.php │ └── UserTableSeeder.php ├── gulpfile.js ├── package.json ├── phpspec.yml ├── phpunit.xml ├── public/ │ ├── .gitignore │ ├── .htaccess │ ├── css/ │ │ └── app.css │ ├── index.php │ ├── js/ │ │ └── .gitignore │ └── robots.txt ├── resources/ │ ├── assets/ │ │ └── less/ │ │ ├── app.less │ │ ├── bootstrap/ │ │ │ ├── alerts.less │ │ │ ├── badges.less │ │ │ ├── bootstrap.less │ │ │ ├── breadcrumbs.less │ │ │ ├── button-groups.less │ │ │ ├── buttons.less │ │ │ ├── carousel.less │ │ │ ├── close.less │ │ │ ├── code.less │ │ │ ├── component-animations.less │ │ │ ├── dropdowns.less │ │ │ ├── forms.less │ │ │ ├── glyphicons.less │ │ │ ├── grid.less │ │ │ ├── input-groups.less │ │ │ ├── jumbotron.less │ │ │ ├── labels.less │ │ │ ├── list-group.less │ │ │ ├── media.less │ │ │ ├── mixins/ │ │ │ │ ├── alerts.less │ │ │ │ ├── background-variant.less │ │ │ │ ├── border-radius.less │ │ │ │ ├── buttons.less │ │ │ │ ├── center-block.less │ │ │ │ ├── clearfix.less │ │ │ │ ├── forms.less │ │ │ │ ├── gradients.less │ │ │ │ ├── grid-framework.less │ │ │ │ ├── grid.less │ │ │ │ ├── hide-text.less │ │ │ │ ├── image.less │ │ │ │ ├── labels.less │ │ │ │ ├── list-group.less │ │ │ │ ├── nav-divider.less │ │ │ │ ├── nav-vertical-align.less │ │ │ │ ├── opacity.less │ │ │ │ ├── pagination.less │ │ │ │ ├── panels.less │ │ │ │ ├── progress-bar.less │ │ │ │ ├── reset-filter.less │ │ │ │ ├── resize.less │ │ │ │ ├── responsive-visibility.less │ │ │ │ ├── size.less │ │ │ │ ├── tab-focus.less │ │ │ │ ├── table-row.less │ │ │ │ ├── text-emphasis.less │ │ │ │ ├── text-overflow.less │ │ │ │ └── vendor-prefixes.less │ │ │ ├── mixins.less │ │ │ ├── modals.less │ │ │ ├── navbar.less │ │ │ ├── navs.less │ │ │ ├── normalize.less │ │ │ ├── pager.less │ │ │ ├── pagination.less │ │ │ ├── panels.less │ │ │ ├── popovers.less │ │ │ ├── print.less │ │ │ ├── progress-bars.less │ │ │ ├── responsive-embed.less │ │ │ ├── responsive-utilities.less │ │ │ ├── scaffolding.less │ │ │ ├── tables.less │ │ │ ├── theme.less │ │ │ ├── thumbnails.less │ │ │ ├── tooltip.less │ │ │ ├── type.less │ │ │ ├── utilities.less │ │ │ ├── variables.less │ │ │ └── wells.less │ │ └── webloyer/ │ │ ├── bootstrap.less │ │ ├── code.less │ │ ├── forms.less │ │ ├── helpers.less │ │ └── list-group.less │ ├── lang/ │ │ └── en/ │ │ ├── pagination.php │ │ ├── passwords.php │ │ ├── validation.php │ │ └── webloyer.php │ └── views/ │ ├── app.blade.php │ ├── auth/ │ │ ├── login.blade.php │ │ ├── password.blade.php │ │ ├── register.blade.php │ │ └── reset.blade.php │ ├── deployments/ │ │ ├── index.blade.php │ │ └── show.blade.php │ ├── emails/ │ │ ├── notification.blade.php │ │ └── password.blade.php │ ├── errors/ │ │ └── 503.blade.php │ ├── home.blade.php │ ├── projects/ │ │ ├── create.blade.php │ │ ├── edit.blade.php │ │ ├── index.blade.php │ │ └── show.blade.php │ ├── recipes/ │ │ ├── create.blade.php │ │ ├── edit.blade.php │ │ ├── index.blade.php │ │ └── show.blade.php │ ├── servers/ │ │ ├── create.blade.php │ │ ├── edit.blade.php │ │ ├── index.blade.php │ │ └── show.blade.php │ ├── settings/ │ │ └── email.blade.php │ ├── users/ │ │ ├── change_password.blade.php │ │ ├── create.blade.php │ │ ├── edit.blade.php │ │ ├── edit_api_token.blade.php │ │ ├── edit_role.blade.php │ │ └── index.blade.php │ ├── vendor/ │ │ └── .gitkeep │ └── welcome.blade.php ├── server.php ├── storage/ │ ├── .gitignore │ ├── app/ │ │ └── .gitignore │ ├── framework/ │ │ ├── .gitignore │ │ ├── cache/ │ │ │ └── .gitignore │ │ ├── sessions/ │ │ │ └── .gitignore │ │ └── views/ │ │ └── .gitignore │ └── logs/ │ └── .gitignore └── tests/ ├── Entities/ │ └── Setting/ │ ├── AppSettingEntityTest.php │ ├── DbSettingEntityTest.php │ └── MailSettingEntityTest.php ├── Http/ │ └── Controllers/ │ ├── DeploymentsControllerTest.php │ ├── ProjectsControllerTest.php │ ├── RecipesControllerTest.php │ ├── ServersControllerTest.php │ ├── SettingsControllerTest.php │ ├── UsersControllerTest.php │ └── Webhook/ │ └── Github/ │ └── V1/ │ └── DeploymentsControllerTest.php ├── Jobs/ │ ├── DeployTest.php │ └── RollbackTest.php ├── Models/ │ ├── DeploymentPresenterTest.php │ └── ProjectTest.php ├── Repositories/ │ ├── Project/ │ │ └── EloquentProjectTest.php │ ├── Recipe/ │ │ └── EloquentRecipeTest.php │ ├── Role/ │ │ └── EloquentRoleTest.php │ ├── Server/ │ │ └── EloquentServerTest.php │ ├── Setting/ │ │ ├── ConfigAppSettingTest.php │ │ ├── ConfigDbSettingTest.php │ │ └── ConfigMailSettingTest.php │ └── User/ │ └── EloquentUserTest.php ├── Services/ │ ├── Api/ │ │ └── JsonRpcTest.php │ ├── Config/ │ │ ├── DotenvReaderTest.php │ │ └── DotenvWriterTest.php │ ├── Deployment/ │ │ ├── DeployerDeploymentFileBuilderTest.php │ │ ├── DeployerRecipeFileBuilderTest.php │ │ ├── DeployerServerListFileBuilderTest.php │ │ └── StorageDeployCommanderTest.php │ ├── Filesystem/ │ │ └── LaravelFilesystemTest.php │ ├── Form/ │ │ ├── Deployment/ │ │ │ ├── DeploymentFormLaravelValidatorTest.php │ │ │ └── DeploymentFormTest.php │ │ ├── Project/ │ │ │ ├── ProjectFormLaravelValidatorTest.php │ │ │ └── ProjectFormTest.php │ │ ├── Recipe/ │ │ │ ├── RecipeFormLaravelValidatorTest.php │ │ │ └── RecipeFormTest.php │ │ ├── Server/ │ │ │ ├── ServerFormLaravelValidatorTest.php │ │ │ └── ServerFormTest.php │ │ ├── Setting/ │ │ │ ├── MailSettingFormLaravelValidatorTest.php │ │ │ └── MailSettingFormTest.php │ │ └── User/ │ │ ├── UserFormLaravelValidatorTest.php │ │ └── UserFormTest.php │ └── Notification/ │ └── MailNotifierTest.php ├── Specifications/ │ ├── DeploymentSpecificationTest.php │ └── OldDeploymentSpecificationTest.php ├── TestCase.php └── _helpers/ ├── ConsoleCommandTestHelper.php ├── ControllerTestHelper.php ├── DummyMiddleware.php ├── Factory.php └── MockeryHelper.php ================================================ FILE CONTENTS ================================================ ================================================ FILE: .coveralls.yml ================================================ service_name: travis-ci ================================================ FILE: .gitattributes ================================================ * text=auto *.css linguist-vendored *.less linguist-vendored ================================================ FILE: .github/FUNDING.yml ================================================ # These are supported funding model platforms github: ngmy patreon: # Replace with a single Patreon username open_collective: # Replace with a single Open Collective username ko_fi: # Replace with a single Ko-fi username tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry liberapay: # Replace with a single Liberapay username issuehunt: # Replace with a single IssueHunt username otechie: # Replace with a single Otechie username custom: https://flattr.com/@ngmy ================================================ FILE: .gitignore ================================================ /vendor /node_modules .env *.swp ================================================ FILE: .travis.yml ================================================ language: php php: - 5.6 - 7.0 - 7.1 - 7.2 - 7.3 - 7.4 services: - mysql before_script: - curl -s http://getcomposer.org/installer | php - php composer.phar install --dev --no-interaction - mysql -u root -e "create database webloyer_test" script: - mkdir -p build/logs - php vendor/bin/phpunit after_success: - travis_retry php vendor/bin/php-coveralls ================================================ FILE: LICENSE ================================================ The MIT License (MIT) Copyright (c) 2015 Yuta Nagamiya Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ================================================ FILE: README.md ================================================ # Webloyer [![Latest Stable Version](https://poser.pugx.org/ngmy/webloyer/v/stable)](https://packagist.org/packages/ngmy/webloyer) [![Total Downloads](https://poser.pugx.org/ngmy/webloyer/downloads)](https://packagist.org/packages/ngmy/webloyer) [![Latest Unstable Version](https://poser.pugx.org/ngmy/webloyer/v/unstable)](https://packagist.org/packages/ngmy/webloyer) [![License](https://poser.pugx.org/ngmy/webloyer/license)](https://packagist.org/packages/ngmy/webloyer)
[![Build Status](https://travis-ci.org/ngmy/webloyer.svg?branch=master)](https://travis-ci.org/ngmy/webloyer) [![Coverage Status](https://coveralls.io/repos/ngmy/webloyer/badge.svg?branch=master)](https://coveralls.io/r/ngmy/webloyer?branch=master) Webloyer is a Web UI for managing [Deployer](https://github.com/deployphp/deployer) deployments. ## Features Webloyer has the following features: * Project management * Managing deployment settings on a project-by-project basis * Deployment management on a project-by-project basis * 1-click deploying and rolling back * Keeping a log of every deployments * E-mail notifications can be sent when a deployment finishes * Recipe management * Creating, editing, deleting and listing recipe files * Server management * Creating, editing, deleting and listing server list files * User management * Authentication with e-mail address and password * Role-based access control to features * Web APIs * Webhooks * GitHub ## Screenshots See [screenshots](/SCREENSHOTS.md). ## Requirements Webloyer has the following requirements: * PHP >= 5.6.0 * OpenSSL PHP Extension * PDO PHP Extension * Mbstring PHP Extension * Tokenizer PHP Extension ## Installation ### Option 1: Download Source Code 1. Download the application source code by using the Composer `create-project` command: ``` composer create-project ngmy/webloyer ``` 2. Give write permission to the `storage` directory and the `bootstrap/cache` directory for your web server user (e.g. `www-data`) by running the following command: ``` chown -R www-data:www-data storage chown -R www-data:www-data bootstrap/cache ``` 3. Run the installer by using the Artisan `webloyer:install` command: ``` php artisan webloyer:install ``` **Note:** You must be running this command as your web server user. 4. Start the queue listener as a background process by using the Artisan `queue:listen` command: ``` nohup php artisan queue:listen --timeout=0 & ``` **Note:** You must be running this command as your web server user. 5. Add the following Cron entry to your server: ``` * * * * * php /path/to/webloyer/artisan schedule:run >> /dev/null 2>&1 ``` **Note:** You must be running this Cron entry as your web server user. ### Option 2: Using Docker You can also install using [Webloyer Docker](https://github.com/ngmy/webloyer-docker). ## Basic Usage ### Step 1: Login to Webloyer 1. Go to the Login page by click the "Login" link. 2. Enter the e-mail address and password. 3. Click the "Login" button to login to Webloyer. ### Step 2: Create Your Project 1. Go to the Create Project page by click the "Create" button in the Projects page. 2. Enter your project information. **Note:** For now, Webloyer only supports the `deploy` task and the `rollback` task. Therefore, you must define these tasks in your Deployer recipe file. **Note:** If you want to use the e-mail notification, you need to enter your e-mail settings from the E-Mail Settings page. 3. Click the "Store" button to finish project creation process. ### Step 3: Managing Deployments 1. Go to the Deployments page by click the "Deployments" button. 2. Run the `deploy` task by click the "Deploy" button. Or run the `rollback` task by click the "Rollback" button. 3. After the task of execution has been completed, it is possible to go to the Deployment Detail page by click the "Show" button, you can see the details of the task execution results. ## Advanced Usage * [Web APIs](/WEBAPIS.md) * [Webhooks](/WEBHOOKS.md) ## Foundation Library Webloyer uses [Laravel](http://laravel.com/) as a foundation PHP framework. ## License Webloyer is open-sourced software licensed under the [MIT license](http://opensource.org/licenses/MIT). ## Donation Do you want to buy me a coffee? [![Flattr this](https://button.flattr.com/flattr-badge-large.png "Flattr this")](https://flattr.com/submit/auto?fid=513grl&url=https%3A%2F%2Fgithub.com%2Fngmy%2Fwebloyer) ================================================ FILE: SCREENSHOTS.md ================================================ # Screenshots ## Login [![https://gyazo.com/97aadef9d25c06e67d70aae12a0aa8da](https://i.gyazo.com/97aadef9d25c06e67d70aae12a0aa8da.png)](https://gyazo.com/97aadef9d25c06e67d70aae12a0aa8da) ## Project Management [![https://gyazo.com/d8c7d46ac818f57e738dd34fa1c83713](https://i.gyazo.com/d8c7d46ac818f57e738dd34fa1c83713.png)](https://gyazo.com/d8c7d46ac818f57e738dd34fa1c83713)
[![https://gyazo.com/24d48ddf502b46acdc407efc7f5c2dda](https://i.gyazo.com/24d48ddf502b46acdc407efc7f5c2dda.png)](https://gyazo.com/24d48ddf502b46acdc407efc7f5c2dda) ## Deployment Management [![https://gyazo.com/39e520f537d877bea52070d0a444ccff](https://i.gyazo.com/39e520f537d877bea52070d0a444ccff.png)](https://gyazo.com/39e520f537d877bea52070d0a444ccff)
[![https://gyazo.com/17cc4ff25b25e0a85e6a0e79cbbc7ac3](https://i.gyazo.com/17cc4ff25b25e0a85e6a0e79cbbc7ac3.png)](https://gyazo.com/17cc4ff25b25e0a85e6a0e79cbbc7ac3) ## Recipe Management [![https://gyazo.com/d609b1ee6bc6b62b189d7cd100a08bf7](https://i.gyazo.com/d609b1ee6bc6b62b189d7cd100a08bf7.png)](https://gyazo.com/d609b1ee6bc6b62b189d7cd100a08bf7)
[![https://gyazo.com/47b875828f5f84156816a015d46472ed](https://i.gyazo.com/47b875828f5f84156816a015d46472ed.png)](https://gyazo.com/47b875828f5f84156816a015d46472ed) ## Server Management [![https://gyazo.com/bb97dea77c1d84edd6b598420c9f7df3](https://i.gyazo.com/bb97dea77c1d84edd6b598420c9f7df3.png)](https://gyazo.com/bb97dea77c1d84edd6b598420c9f7df3)
[![https://gyazo.com/529e418174a32df51e12234f0a678c1b](https://i.gyazo.com/529e418174a32df51e12234f0a678c1b.png)](https://gyazo.com/529e418174a32df51e12234f0a678c1b) ## User Management [![https://gyazo.com/8812374fa5917022cfb42fd333282c5f](https://i.gyazo.com/8812374fa5917022cfb42fd333282c5f.png)](https://gyazo.com/8812374fa5917022cfb42fd333282c5f)
[![https://gyazo.com/e89694d7dc7cdf05c4605f384aba1551](https://i.gyazo.com/e89694d7dc7cdf05c4605f384aba1551.png)](https://gyazo.com/e89694d7dc7cdf05c4605f384aba1551)
[![https://gyazo.com/e4f3aab674caa9ab97aa78ff206575ff](https://i.gyazo.com/e4f3aab674caa9ab97aa78ff206575ff.png)](https://gyazo.com/e4f3aab674caa9ab97aa78ff206575ff)
[![https://gyazo.com/1e12d1c8ed1447dcb3cb7fd0210a47c4](https://i.gyazo.com/1e12d1c8ed1447dcb3cb7fd0210a47c4.png)](https://gyazo.com/1e12d1c8ed1447dcb3cb7fd0210a47c4) ## Settings [![https://gyazo.com/9af8b0675760785a19444a2ed5b7a87b](https://i.gyazo.com/9af8b0675760785a19444a2ed5b7a87b.png)](https://gyazo.com/9af8b0675760785a19444a2ed5b7a87b) ================================================ FILE: WEBAPIS.md ================================================ # Web APIs Webloyer provide Web APIs.
For example, you can use these for Git hooks. ## Protocol The Web APIs use the [JSON-RPC 2.0](http://www.jsonrpc.org/specification) protocol.
You must call the Web APIs with a **POST** HTTP request.
And you must call the Web APIs with a `Accept` header set to `application/json-rpc`. ## Endpoint ``` /api/v1/jsonrpc ``` ## Authentication You must provide your API token into a `Authorization: Bearer` header.
You can see your API token in Edit API Token Page ([Users] -> [Edit] -> [Edit API Token]). ## API Reference ### deploy Deploy a project. #### Parameters | Name | Type | Description | | --- | --- | --- | | project_id | integer | Project id. | #### Example Request ``` curl -X POST -d '{"jsonrpc":"2.0","id":1,"method":"deploy","params":{"project_id":1}}' -H "Authorization: Bearer aiSPTQE2nMnmHtyfjZenfI5dcb52zANE30n5t1gL5H2BwPpXz9GIVYKVFE8x" -H "Accept: application/json-rpc" http://webloyer.local/api/v1/jsonrpc ``` #### Example Response ```json {"jsonrpc":"2.0","result":{"id":11,"project_id":1,"number":11,"task":"deploy","status":null,"message":null,"user_id":1,"created_at":"2016-10-15 18:25:31","updated_at":"2016-10-15 18:25:31"},"id":1} ``` ### rollback Roll back a project to a previous deployment. #### Parameters | Name | Type | Description | | --- | --- | --- | | project_id | integer | Project id. | #### Example Request ``` curl -X POST -d '{"jsonrpc":"2.0","id":1,"method":"rollback","params":{"project_id":1}}' -H "Authorization: Bearer aiSPTQE2nMnmHtyfjZenfI5dcb52zANE30n5t1gL5H2BwPpXz9GIVYKVFE8x" -H "Accept: application/json-rpc" http://webloyer.local/api/v1/jsonrpc ``` #### Example Response ```json {"jsonrpc":"2.0","result":{"id":13,"project_id":1,"number":13,"task":"rollback","status":null,"message":null,"user_id":1,"created_at":"2016-10-15 18:36:22","updated_at":"2016-10-15 18:36:22"},"id":1} ``` ================================================ FILE: WEBHOOKS.md ================================================ # Webhooks Webloyer provide webhooks of GitHub to deploy a project. ## GitHub ### Usage You must set "Execute By" in Create Project Page.
If you want to use [GitHub webhook secret](https://developer.github.com/webhooks/securing/), you must also set "Secret". ### Endpoint ``` /webhook/github/v1/projects/:project_id/deployments ``` ================================================ FILE: app/Console/Commands/Inspire.php ================================================ comment(PHP_EOL.Inspiring::quote().PHP_EOL); } } ================================================ FILE: app/Console/Commands/Webloyer/DiscardOldDeployments.php ================================================ projectRepository = $projectRepository; $this->spec = new OldDeploymentSpecification(new DateTime); } /** * Execute the console command. * * @return mixed */ public function handle() { DB::transaction(function () { $projects = $this->projectRepository->all(); foreach ($projects as $project) { $oldDeployments = $project->getSatisfyingDeployments($this->spec); if (!$oldDeployments->isEmpty()) { $project->deleteDeployments($oldDeployments); } } }); } } ================================================ FILE: app/Console/Commands/Webloyer/Install.php ================================================ ask(trans('webloyer.enter_webloyer_url')); $config['db']['driver'] = $this->choice(trans('webloyer.enter_db_system'), [ 'mysql' => 'MySQL', 'pgsql' => 'Postgres', 'sqlite' => 'SQLite', 'sqlsrv' => 'SQL Server', ], 'mysql'); if ($config['db']['driver'] !== 'sqlite') { $config['db']['host'] = $this->ask(trans('webloyer.enter_db_host'), 'localhost'); $config['db']['database'] = $this->ask(trans('webloyer.enter_db_name'), 'webloyer'); $config['db']['username'] = $this->ask(trans('webloyer.enter_db_username'), 'webloyer'); $config['db']['password'] = $this->ask(trans('webloyer.enter_db_password'), false); } else { $config['db']['host'] = null; $config['db']['database'] = $this->ask(trans('webloyer.enter_db_name_sqlite'), storage_path('webloyer.sqlite')); $config['db']['username'] = null; $config['db']['password'] = null; } $config['admin']['name'] = $this->ask(trans('webloyer.enter_admin_name')); $config['admin']['email'] = $this->ask(trans('webloyer.enter_admin_email')); $config['admin']['password'] = $this->ask(trans('webloyer.enter_admin_password')); // Set configuration to .env $appSetting->update($config['app']); $dbSetting->update($config['db']); config(['database.default' => $config['db']['driver']]); config(['database.connections.'.$config['db']['driver'].'.host' => $config['db']['host']]); config(['database.connections.'.$config['db']['driver'].'.database' => $config['db']['database']]); config(['database.connections.'.$config['db']['driver'].'.username' => $config['db']['username']]); config(['database.connections.'.$config['db']['driver'].'.password' => $config['db']['password']]); // Migrate and seed database Artisan::call('migrate:refresh', [ '--force' => true, '--no-interaction' => true, ]); Artisan::call('db:seed', [ '--force' => true, '--no-interaction' => true, '--class' => 'RecipeTableSeeder', ]); Artisan::call('db:seed', [ '--force' => true, '--no-interaction' => true, '--class' => 'RoleTableSeeder', ]); Artisan::call('db:seed', [ '--force' => true, '--no-interaction' => true, '--class' => 'PermissionTableSeeder', ]); Artisan::call('db:seed', [ '--force' => true, '--no-interaction' => true, '--class' => 'PermissionRoleTableSeeder', ]); // Create admin user $config['admin']['password'] = Hash::make($config['admin']['password']); $config['admin']['api_token'] = str_random(60); $user = $userRepository->create($config['admin']); $user->assignRole('administrator'); } } ================================================ FILE: app/Console/Kernel.php ================================================ command('webloyer:discard-old-deployments') ->everyMinute() ->withoutOverlapping(); } } ================================================ FILE: app/Entities/ProjectAttribute/ProjectAttributeEntity.php ================================================ deployPath; } public function setDeployPath($deployPath) { $this->deployPath = $deployPath; } } ================================================ FILE: app/Entities/Setting/AbstractSettingEntity.php ================================================ url; } public function setUrl($url) { $this->url = $url; return $this; } } ================================================ FILE: app/Entities/Setting/DbSettingEntity.php ================================================ driver; } public function getHost() { return $this->host; } public function getDatabase() { return $this->database; } public function getUsername() { return $this->username; } public function getPassword() { return $this->password; } public function setDriver($driver) { $this->driver = $driver; return $this; } public function setHost($host) { $this->host = $host; return $this; } public function setDatabase($database) { $this->database = $database; return $this; } public function setUsername($username) { $this->username = $username; return $this; } public function setPassword($password) { $this->password = $password; return $this; } } ================================================ FILE: app/Entities/Setting/MailSettingEntity.php ================================================ driver; } public function getFrom() { return $this->from; } public function getSmtpHost() { return $this->smtpHost; } public function getSmtpPort() { return $this->smtpPort; } public function getSmtpEncryption() { return $this->smtpEncryption; } public function getSmtpUsername() { return $this->smtpUsername; } public function getSmtpPassword() { return $this->smtpPassword; } public function getSendmailPath() { return $this->sendmailPath; } public function setDriver($driver) { $this->driver = $driver; return $this; } public function setFrom(array $from) { $this->from = $from; return $this; } public function setSmtpHost($smtpHost) { $this->smtpHost = $smtpHost; return $this; } public function setSmtpPort($smtpPort) { $this->smtpPort = $smtpPort; return $this; } public function setSmtpEncryption($smtpEncryption) { $this->smtpEncryption = $smtpEncryption; return $this; } public function setSmtpUsername($smtpUsername) { $this->smtpUsername = $smtpUsername; return $this; } public function setSmtpPassword($smtpPassword) { $this->smtpPassword = $smtpPassword; return $this; } public function setSendmailPath($sendmailPath) { $this->sendmailPath = $sendmailPath; return $this; } } ================================================ FILE: app/Events/Event.php ================================================ is('webhook/*')) { return $this->getJsonResponseForException($request, $e); } return parent::render($request, $e); } } ================================================ FILE: app/Http/Controllers/Auth/AuthController.php ================================================ middleware('guest', ['except' => 'getLogout']); } /** * Get a validator for an incoming registration request. * * @param array $data * @return \Illuminate\Contracts\Validation\Validator */ public function validator(array $data) { return Validator::make($data, [ 'name' => 'required|max:255', 'email' => 'required|email|max:255|unique:users', 'password' => 'required|confirmed|min:6', ]); } /** * Create a new user instance after a valid registration. * * @param array $data * @return User */ public function create(array $data) { return User::create([ 'name' => $data['name'], 'email' => $data['email'], 'password' => bcrypt($data['password']), ]); } /** * Show the application registration form. * * @throws \Symfony\Component\HttpKernel\Exception\NotFoundHttpException * @return void */ public function getRegister() { abort(404); } /** * Handle a registration request for the application. * * @throws \Symfony\Component\HttpKernel\Exception\NotFoundHttpException * @return void */ public function postRegister() { abort(404); } } ================================================ FILE: app/Http/Controllers/Auth/PasswordController.php ================================================ middleware('guest'); } } ================================================ FILE: app/Http/Controllers/Controller.php ================================================ middleware('auth'); $this->middleware('acl'); $this->project = $project; $this->deploymentForm = $deploymentForm; } /** * Display a listing of the resource. * * @param \Illuminate\Http\Request $request * @param \App\Models\Project $project * @return Response */ public function index(Request $request, Project $project) { $page = $request->input('page', 1); $perPage = 10; $deployments = $project->getDeploymentsByPage($page, $perPage); return view('deployments.index') ->with('deployments', $deployments) ->with('project', $project); } /** * Store a newly created resource in storage. * * @param \Illuminate\Http\Request $request * @param \App\Models\Project $project * @return Response */ public function store(Request $request, Project $project) { $input = array_merge($request->all(), [ 'status' => null, 'message' => null, 'project_id' => $project->id, 'user_id' => $request->user()->id, ]); if ($this->deploymentForm->save($input)) { $deployment = $project->getLastDeployment(); $link = link_to_route('projects.deployments.show', "#$deployment->number", [$project, $deployment->number]); $request->session()->flash('status', "The deployment $link was successfully started."); return redirect()->route('projects.deployments.index', [$project]); } else { return redirect()->route('projects.deployments.index', [$project]) ->withInput() ->withErrors($this->deploymentForm->errors()); } } /** * Display the specified resource. * * @param \App\Models\Project $project * @param \App\Models\Deployment $deployment * @return Response */ public function show(Project $project, Deployment $deployment) { return view('deployments.show')->with('deployment', $deployment); } } ================================================ FILE: app/Http/Controllers/HomeController.php ================================================ middleware('auth'); } /** * Show the application dashboard to the user. * * @return Response */ public function index() { return view('home'); } } ================================================ FILE: app/Http/Controllers/ProjectsController.php ================================================ middleware('auth'); $this->middleware('acl'); $this->project = $project; $this->projectForm = $projectForm; $this->recipe = $recipe; $this->server = $server; $this->user = $user; } /** * Display a listing of the resource. * * @param \Illuminate\Http\Request $request * @return Response */ public function index(Request $request) { $page = $request->input('page', 1); $perPage = 10; $projects = $this->project->byPage($page, $perPage); return view('projects.index')->with('projects', $projects); } /** * Show the form for creating a new resource. * * @return Response */ public function create() { $recipes = $this->recipe->all()->toArray(); $recipes = array_column($recipes, 'name', 'id'); $servers = $this->server->all()->toArray(); $servers = array_column($servers, 'name', 'id'); $users = $this->user->all()->toArray(); $users = array_column($users, 'email', 'id'); $users = ['' => ''] + $users; return view('projects.create') ->with('recipes', $recipes) ->with('servers', $servers) ->with('users', $users); } /** * Store a newly created resource in storage. * * @param \Illuminate\Http\Request $request * @return Response */ public function store(Request $request) { $input = $request->all(); if ($this->projectForm->save($input)) { return redirect()->route('projects.index'); } else { return redirect()->route('projects.create') ->withInput() ->withErrors($this->projectForm->errors()); } } /** * Display the specified resource. * * @param \App\Models\Project $project * @return Response */ public function show(Project $project) { $projectRecipe = $project->getRecipes()->toArray(); $projectServer = $this->server->byId($project->server_id); return view('projects.show') ->with('project', $project) ->with('projectRecipe', $projectRecipe) ->with('projectServer', $projectServer); } /** * Show the form for editing the specified resource. * * @param \App\Models\Project $project * @return Response */ public function edit(Project $project) { $recipes = $this->recipe->all()->toArray(); $recipes = array_column($recipes, 'name', 'id'); $servers = $this->server->all()->toArray(); $servers = array_column($servers, 'name', 'id'); $projectRecipe = $project->getRecipes()->toArray(); $projectRecipe = array_column($projectRecipe, 'id'); $users = $this->user->all()->toArray(); $users = array_column($users, 'email', 'id'); $users = ['' => ''] + $users; return view('projects.edit') ->with('project', $project) ->with('recipes', $recipes) ->with('servers', $servers) ->with('projectRecipe', $projectRecipe) ->with('users', $users); } /** * Update the specified resource in storage. * * @param \Illuminate\Http\Request $request * @param \App\Models\Project $project * @return Response */ public function update(Request $request, Project $project) { $input = array_merge($request->all(), ['id' => $project->id]); if ($this->projectForm->update($input)) { return redirect()->route('projects.index'); } else { return redirect()->route('projects.edit', [$project]) ->withInput() ->withErrors($this->projectForm->errors()); } } /** * Remove the specified resource from storage. * * @param \App\Models\Project $project * @return Response */ public function destroy(Project $project) { $this->project->delete($project->id); return redirect()->route('projects.index'); } } ================================================ FILE: app/Http/Controllers/RecipesController.php ================================================ middleware('auth'); $this->middleware('acl'); $this->recipe = $recipe; $this->recipeForm = $recipeForm; } /** * Display a listing of the resource. * * @param \Illuminate\Http\Request $request * @return Response */ public function index(Request $request) { $page = $request->input('page', 1); $perPage = 10; $recipes = $this->recipe->byPage($page, $perPage); return view('recipes.index')->with('recipes', $recipes); } /** * Show the form for creating a new resource. * * @return Response */ public function create() { return view('recipes.create'); } /** * Store a newly created resource in storage. * * @param \Illuminate\Http\Request $request * @return Response */ public function store(Request $request) { $input = $request->all(); if ($this->recipeForm->save($input)) { return redirect()->route('recipes.index'); } else { return redirect()->route('recipes.create') ->withInput() ->withErrors($this->recipeForm->errors()); } } /** * Display the specified resource. * * @param \App\Models\Recipe $recipe * @return Response */ public function show(Recipe $recipe) { $recipeProject = $recipe->getProjects()->toArray(); return view('recipes.show')->with('recipe', $recipe) ->with('recipeProject', $recipeProject); } /** * Show the form for editing the specified resource. * * @param \App\Models\Recipe $recipe * @return Response */ public function edit(Recipe $recipe) { return view('recipes.edit')->with('recipe', $recipe); } /** * Update the specified resource in storage. * * @param \Illuminate\Http\Request $request * @param \App\Models\Recipe $recipe * @return Response */ public function update(Request $request, Recipe $recipe) { $input = array_merge($request->all(), ['id' => $recipe->id]); if ($this->recipeForm->update($input)) { return redirect()->route('recipes.index'); } else { return redirect()->route('recipes.edit', [$recipe]) ->withInput() ->withErrors($this->recipeForm->errors()); } } /** * Remove the specified resource from storage. * * @param \App\Models\Recipe $recipe * @return Response */ public function destroy(Recipe $recipe) { $this->recipe->delete($recipe->id); return redirect()->route('recipes.index'); } } ================================================ FILE: app/Http/Controllers/ServersController.php ================================================ middleware('auth'); $this->middleware('acl'); $this->server = $server; $this->serverForm = $serverForm; } /** * Display a listing of the resource. * * @param \Illuminate\Http\Request $request * @return Response */ public function index(Request $request) { $page = $request->input('page', 1); $perPage = 10; $servers = $this->server->byPage($page, $perPage); return view('servers.index')->with('servers', $servers); } /** * Show the form for creating a new resource. * * @return Response */ public function create() { return view('servers.create'); } /** * Store a newly created resource in storage. * * @param \Illuminate\Http\Request $request * @return Response */ public function store(Request $request) { $input = $request->all(); if ($this->serverForm->save($input)) { return redirect()->route('servers.index'); } else { return redirect()->route('servers.create') ->withInput() ->withErrors($this->serverForm->errors()); } } /** * Display the specified resource. * * @param \App\Models\Server $server * @return Response */ public function show(Server $server) { return view('servers.show')->with('server', $server); } /** * Show the form for editing the specified resource. * * @param \App\Models\Server $server * @return Response */ public function edit(Server $server) { return view('servers.edit')->with('server', $server); } /** * Update the specified resource in storage. * * @param \Illuminate\Http\Request $request * @param \App\Models\Server $server * @return Response */ public function update(Request $request, Server $server) { $input = array_merge($request->all(), ['id' => $server->id]); if ($this->serverForm->update($input)) { return redirect()->route('servers.index'); } else { return redirect()->route('servers.edit', [$server]) ->withInput() ->withErrors($this->serverForm->errors()); } } /** * Remove the specified resource from storage. * * @param \App\Models\Server $server * @return Response */ public function destroy(Server $server) { $this->server->delete($server->id); return redirect()->route('servers.index'); } } ================================================ FILE: app/Http/Controllers/SettingsController.php ================================================ middleware('auth'); $this->middleware('acl'); } public function getEmail(SettingInterface $settingRepository) { $settings = $settingRepository->byType('mail'); return view('settings.email') ->with('settings', $settings); } public function postEmail(Request $request, MailSettingForm $mailSettingForm) { $input = $request->all(); if ($mailSettingForm->update($input)) { return redirect()->route('settings.email'); } else { return redirect()->route('settings.email') ->withInput() ->withErrors($mailSettingForm->errors()); } } } ================================================ FILE: app/Http/Controllers/UsersController.php ================================================ middleware('auth'); $this->middleware('acl'); $this->user = $user; $this->userForm = $userForm; $this->role = $role; } /** * Display a listing of the resource. * * @param \Illuminate\Http\Request $request * @return Response */ public function index(Request $request) { $page = $request->input('page', 1); $perPage = 10; $users = $this->user->byPage($page, $perPage); return view('users.index')->with('users', $users); } /** * Show the form for creating a new resource. * * @return Response */ public function create() { $roles = $this->role->all(); return view('users.create') ->with('roles', $roles); } /** * Store a newly created resource in storage. * * @param \Illuminate\Http\Request $request * @return Response */ public function store(Request $request) { $input = $request->all(); if ($this->userForm->save($input)) { return redirect()->route('users.index'); } else { return redirect()->route('users.create') ->withInput() ->withErrors($this->userForm->errors()); } } /** * Display the specified resource. * * @param \App\Models\User $user * @return Response */ public function show(User $user) { return redirect()->route('users.edit', [$user]); } /** * Show the form for editing the specified resource. * * @param \App\Models\User $user * @return Response */ public function edit(User $user) { return view('users.edit')->with('user', $user); } /** * Update the specified resource in storage. * * @param \Illuminate\Http\Request $request * @param \App\Models\User $user * @return Response */ public function update(Request $request, User $user) { $input = array_merge($request->all(), ['id' => $user->id]); if ($this->userForm->update($input)) { return redirect()->route('users.index'); } else { return redirect()->route('users.edit', [$user]) ->withInput() ->withErrors($this->userForm->errors()); } } /** * Show the form for changing the password of the specified resource. * * @param \App\Models\User $user * @return Response */ public function changePassword(User $user) { return view('users.change_password')->with('user', $user); } /** * Update the password of the specified resource in storage. * * @param \Illuminate\Http\Request $request * @param \App\Models\User $user * @return Response */ public function updatePassword(Request $request, User $user) { $input = array_merge($request->all(), ['id' => $user->id]); if ($this->userForm->updatePassword($input)) { return redirect()->route('users.index'); } else { return redirect()->route('users.password.change', [$user]) ->withInput() ->withErrors($this->userForm->errors()); } } /** * Show the form for editing the role of the specified resource. * * @param \App\Models\User $user * @return Response */ public function editRole(User $user) { $roles = $this->role->all(); return view('users.edit_role') ->with('user', $user) ->with('roles', $roles); } /** * Update the role of the specified resource in storage. * * @param \Illuminate\Http\Request $request * @param \App\Models\User $user * @return Response */ public function updateRole(Request $request, User $user) { $input = array_merge($request->all(), ['id' => $user->id]); if ($this->userForm->updateRole($input)) { return redirect()->route('users.index'); } else { return redirect()->route('users.role.edit', [$user]) ->withInput() ->withErrors($this->userForm->errors()); } } /** * Show the form for editing the API token of the specified resource. * * @param \App\Models\User $user * @return Response */ public function editApiToken(User $user) { return view('users.edit_api_token') ->with('user', $user); } /** * Regenerate the API token of the specified resource in storage. * * @param \Illuminate\Http\Request $request * @param \App\Models\User $user * @return Response */ public function regenerateApiToken(Request $request, User $user) { $input = array_merge($request->all(), ['id' => $user->id]); if ($this->userForm->regenerateApiToken($input)) { return redirect()->route('users.index'); } else { return redirect()->route('users.api_token.edit', [$user]) ->withInput() ->withErrors($this->userForm->errors()); } } /** * Remove the specified resource from storage. * * @param \App\Models\User $user * @return Response */ public function destroy(User $user) { $this->user->delete($user->id); return redirect()->route('users.index'); } } ================================================ FILE: app/Http/Controllers/Webhook/Github/V1/DeploymentsController.php ================================================ project = $project; $this->deploymentForm = $deploymentForm; } /** * Store a newly created resource in storage. * * @param \Illuminate\Http\Request $request * @param \App\Models\Project $project * @return Response */ public function store(Request $request, Project $project) { $input = array_merge($request->all(), [ 'status' => null, 'message' => null, 'project_id' => $project->id, 'user_id' => $project->github_webhook_user_id, 'task' => 'deploy', ]); if ($this->deploymentForm->save($input)) { $deployment = $project->getLastDeployment(); return $deployment->toJson(); } else { abort(400, $this->deploymentForm->errors()); } } } ================================================ FILE: app/Http/Controllers/WelcomeController.php ================================================ middleware('guest'); } /** * Show the application welcome screen to the user. * * @return Response */ public function index() { return redirect('projects'); } } ================================================ FILE: app/Http/Kernel.php ================================================ [ \Illuminate\Cookie\Middleware\EncryptCookies::class, \Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class, \Illuminate\Session\Middleware\StartSession::class, \Illuminate\View\Middleware\ShareErrorsFromSession::class, \App\Http\Middleware\VerifyCsrfToken::class, ], 'api' => [ 'throttle:60,1', ], ]; /** * The application's route middleware. * * @var array */ protected $routeMiddleware = [ 'auth' => \App\Http\Middleware\Authenticate::class, 'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class, 'guest' => \App\Http\Middleware\RedirectIfAuthenticated::class, 'throttle' => \Illuminate\Routing\Middleware\ThrottleRequests::class, 'acl' => \Kodeine\Acl\Middleware\HasPermission::class, 'github_webhook_secret' => \App\Http\Middleware\VerifyGithubWebhookSecret::class, ]; } ================================================ FILE: app/Http/Middleware/ApplySettings.php ================================================ settingRepository = $settingRepository; } /** * Handle an incoming request. * * @param \Illuminate\Http\Request $request * @param \Closure $next * @return mixed */ public function handle($request, Closure $next) { $mailSettings = $this->settingRepository->byType('mail'); if (isset($mailSettings->attributes->getFrom()['address'])) { $fromAddress = $mailSettings->attributes->getFrom()['address']; } else { $fromAddress = null; } if (isset($mailSettings->attributes->getFrom()['name'])) { $fromName = $mailSettings->attributes->getFrom()['name']; } else { $fromName = null; } config(['mail.driver' => $mailSettings->attributes->getDriver()]); config(['mail.from.address' => $fromAddress]); config(['mail.from.name' => $fromName]); config(['mail.host' => $mailSettings->attributes->getSmtpHost()]); config(['mail.port' => $mailSettings->attributes->getSmtpPort()]); config(['mail.encryption' => $mailSettings->attributes->getSmtpEncryption()]); config(['mail.username' => $mailSettings->attributes->getSmtpUsername()]); config(['mail.password' => $mailSettings->attributes->getSmtpPassword()]); config(['mail.sendmail' => $mailSettings->attributes->getSendmailPath()]); return $next($request); } } ================================================ FILE: app/Http/Middleware/Authenticate.php ================================================ guest()) { if ($request->ajax() || $request->wantsJson()) { return response('Unauthorized.', 401); } else { return redirect()->guest('auth/login'); } } return $next($request); } } ================================================ FILE: app/Http/Middleware/RedirectIfAuthenticated.php ================================================ auth = $auth; } /** * Handle an incoming request. * * @param \Illuminate\Http\Request $request * @param \Closure $next * @return mixed */ public function handle($request, Closure $next) { if ($this->auth->check()) { return new RedirectResponse(url('/projects')); } return $next($request); } } ================================================ FILE: app/Http/Middleware/VerifyCsrfToken.php ================================================ projectRepository = $projectRepository; } /** * Handle an incoming request. * * @param \Illuminate\Http\Request $request * @param \Closure $next * @return mixed */ public function handle($request, Closure $next) { $secret = $request->projects->github_webhook_secret; if (isset($secret)) { $signature = 'sha1='.hash_hmac('sha1', $request->getContent(), $secret); if ($signature !== $request->header('X-Hub-Signature')) { abort(401); } } return $next($request); } } ================================================ FILE: app/Http/Requests/Request.php ================================================ push('Projects', route('projects.index')); }); Breadcrumbs::register('projects.create', function ($breadcrumbs) { $breadcrumbs->parent('projects.index'); $breadcrumbs->push('Create', route('projects.create')); }); Breadcrumbs::register('projects.show', function ($breadcrumbs, App\Models\Project $project) { $breadcrumbs->parent('projects.index'); $breadcrumbs->push($project->name, route('projects.show', [$project])); }); Breadcrumbs::register('projects.edit', function ($breadcrumbs, App\Models\Project $project) { $breadcrumbs->parent('projects.show', $project); $breadcrumbs->push('Edit', route('projects.edit', [$project])); }); Breadcrumbs::register('projects.deployments.index', function ($breadcrumbs, App\Models\Project $project) { $breadcrumbs->parent('projects.show', $project); $breadcrumbs->push('Deployments', route('projects.deployments.index', [$project])); }); Breadcrumbs::register('projects.deployments.show', function ($breadcrumbs, App\Models\Project $project, App\Models\Deployment $deployment) { $breadcrumbs->parent('projects.deployments.index', $project); $breadcrumbs->push($deployment->number, route('projects.deployments.show', [$project, $deployment])); }); Breadcrumbs::register('recipes.index', function ($breadcrumbs) { $breadcrumbs->push('Recipes', route('recipes.index')); }); Breadcrumbs::register('recipes.create', function ($breadcrumbs) { $breadcrumbs->parent('recipes.index'); $breadcrumbs->push('Create', route('recipes.create')); }); Breadcrumbs::register('recipes.show', function ($breadcrumbs, App\Models\Recipe $recipe) { $breadcrumbs->parent('recipes.index'); $breadcrumbs->push($recipe->name, route('recipes.show', [$recipe])); }); Breadcrumbs::register('recipes.edit', function ($breadcrumbs, App\Models\Recipe $recipe) { $breadcrumbs->parent('recipes.show', $recipe); $breadcrumbs->push('Edit', route('recipes.edit', [$recipe])); }); Breadcrumbs::register('servers.index', function ($breadcrumbs) { $breadcrumbs->push('Servers', route('servers.index')); }); Breadcrumbs::register('servers.create', function ($breadcrumbs) { $breadcrumbs->parent('servers.index'); $breadcrumbs->push('Create', route('servers.create')); }); Breadcrumbs::register('servers.show', function ($breadcrumbs, App\Models\Server $server) { $breadcrumbs->parent('servers.index'); $breadcrumbs->push($server->name, route('servers.show', [$server])); }); Breadcrumbs::register('servers.edit', function ($breadcrumbs, App\Models\Server $server) { $breadcrumbs->parent('servers.show', $server); $breadcrumbs->push('Edit', route('servers.edit', [$server])); }); Breadcrumbs::register('users.index', function ($breadcrumbs) { $breadcrumbs->push('Users', route('users.index')); }); Breadcrumbs::register('users.create', function ($breadcrumbs) { $breadcrumbs->parent('users.index'); $breadcrumbs->push('Create', route('users.create')); }); Breadcrumbs::register('users.show', function ($breadcrumbs, App\Models\User $user) { $breadcrumbs->parent('users.index'); $breadcrumbs->push($user->name, route('users.show', [$user])); }); Breadcrumbs::register('users.edit', function ($breadcrumbs, App\Models\User $user) { $breadcrumbs->parent('users.show', $user); $breadcrumbs->push('Edit', route('users.edit', [$user])); }); Breadcrumbs::register('users.password.change', function ($breadcrumbs, App\Models\User $user) { $breadcrumbs->parent('users.show', $user); $breadcrumbs->push('Change Password', route('users.password.change', [$user])); }); Breadcrumbs::register('users.role.edit', function ($breadcrumbs, App\Models\User $user) { $breadcrumbs->parent('users.show', $user); $breadcrumbs->push('Edit Role', route('users.role.edit', [$user])); }); ================================================ FILE: app/Http/routes.php ================================================ 'web'], function () { Route::get('/', 'WelcomeController@index'); Route::controller('auth', 'Auth\AuthController', [ 'getRegister' => 'auth.register', 'getLogin' => 'auth.login', ]); Route::controller('password', 'Auth\PasswordController', [ 'getEmail' => 'password.email', 'getReset' => 'password.reset', ]); Route::group([ 'protect_alias' => 'project', ], function () { Route::resource('projects', 'ProjectsController'); }); Route::group([ 'protect_alias' => 'deployment', ], function () { Route::resource('projects.deployments', 'DeploymentsController', [ 'only' => ['index', 'store', 'show'] ]); }); Route::group([ 'protect_alias' => 'recipe', ], function () { Route::resource('recipes', 'RecipesController'); }); Route::group([ 'protect_alias' => 'server', ], function () { Route::resource('servers', 'ServersController'); }); Route::group([ 'protect_alias' => 'user', ], function () { Route::get('users/{users}/password/change', [ 'as' => 'users.password.change', 'uses' => 'UsersController@changePassword', ]); Route::put('users/{users}/password', [ 'as' => 'users.password.update', 'uses' => 'UsersController@updatePassword' ]); Route::get('users/{users}/role/edit', [ 'as' => 'users.role.edit', 'uses' => 'UsersController@editRole', ]); Route::put('users/{users}/role', [ 'as' => 'users.role.update', 'uses' => 'UsersController@updateRole' ]); Route::get('users/{users}/api_token/edit', [ 'as' => 'users.api_token.edit', 'uses' => 'UsersController@editApiToken', ]); Route::put('users/{users}/api_token', [ 'as' => 'users.api_token.regenerate', 'uses' => 'UsersController@regenerateApiToken' ]); Route::resource('users', 'UsersController'); }); Route::group([ 'protect_alias' => 'setting' ], function () { Route::controller('settings', 'SettingsController', [ 'getEmail' => 'settings.email' ]); }); }); Route::group(['middleware' => 'api'], function () { Route::group(['prefix' => 'api/v1'], function () { Route::post('jsonrpc', function (Illuminate\Http\Request $request) { $server = new JsonRPC\Server; $middlewareHandler = $server->getMiddlewareHandler(); $middlewareHandler->withMiddleware(new App\Services\Api\Middleware\Authenticate($request)); $procedureHandler = $server->getProcedureHandler(); $procedureHandler->withObject(app()->make('App\Services\Api\JsonRpc')); return $server->execute(); }); }); Route::group(['prefix' => 'webhook/github/v1', 'middleware' => 'github_webhook_secret'], function () { Route::resource('projects.deployments', 'Webhook\Github\V1\DeploymentsController', [ 'only' => ['store'] ]); }); }); ================================================ FILE: app/Jobs/Deploy.php ================================================ deployment = $deployment; $this->executable = base_path('vendor/bin/dep'); } /** * Execute the job. * * @param \App\Repositories\Project\ProjectInterface $projectRepository * @param \App\Repositories\Server\ServerInterface $serverRepository * @param \Symfony\Component\Process\ProcessBuilder $processBuilder * @param \App\Services\Notification\NotifierInterface $notifier * @param \App\Repositories\Setting\SettingInterface $settingRepository * @return void */ public function handle(ProjectInterface $projectRepository, ServerInterface $serverRepository, ProcessBuilder $processBuilder, NotifierInterface $notifier, SettingInterface $settingRepository) { $deployment = $this->deployment; $project = $projectRepository->byId($deployment->project_id); $server = $serverRepository->byId($project->server_id); $app = app(); // Create a server list file $serverListFileBuilder = $app->make('App\Services\Deployment\DeployerServerListFileBuilder') ->setServer($server) ->setProject($project); $serverListFile = $app->make('App\Services\Deployment\DeployerFileDirector', [$serverListFileBuilder])->construct(); // Create recipe files foreach ($project->getRecipes() as $i => $recipe) { // HACK: If an instance of DeployerRecipeFileBuilder class is not stored in an array, a destructor is called and a recipe file is deleted immediately. $recipeFileBuilders[] = $app->make('App\Services\Deployment\DeployerRecipeFileBuilder')->setRecipe($recipe); $recipeFiles[] = $app->make('App\Services\Deployment\DeployerFileDirector', [$recipeFileBuilders[$i]])->construct(); } // Create a deployment file $deploymentFileBuilder = $app->make('App\Services\Deployment\DeployerDeploymentFileBuilder') ->setProject($project) ->setServerListFile($serverListFile) ->setRecipeFile($recipeFiles); $deploymentFile = $app->make('App\Services\Deployment\DeployerFileDirector', [$deploymentFileBuilder])->construct(); // Create a command $processBuilder ->add($this->executable) ->add("-f={$deploymentFile->getFullPath()}") ->add('--ansi') ->add('-n') ->add('-vv') ->add('deploy') ->add($project->stage); // Run the command $tmp['id'] = $deployment->id; $tmp['message'] = ''; $process = $processBuilder->getProcess(); $process->setTimeout(600); $process->run(function ($type, $buffer) use (&$tmp, $project, $deployment) { $tmp['message'] .= $buffer; $tmp['number'] = $deployment->number; $project->updateDeployment($tmp); }); // Store the result if ($process->isSuccessful()) { $message = $process->getOutput(); } else { $message = $process->getErrorOutput(); } $data['id'] = $deployment->id; $data['number'] = $deployment->number; $data['message'] = $message; $data['status'] = $process->getExitCode(); $project->updateDeployment($data); // Notify if (isset($project->email_notification_recipient)) { $mailSettings = $settingRepository->byType('mail'); if (isset($mailSettings->attributes->getFrom()['address'])) { $fromAddress = $mailSettings->attributes->getFrom()['address']; } else { $fromAddress = null; } if (isset($mailSettings->attributes->getFrom()['name'])) { $fromName = $mailSettings->attributes->getFrom()['name']; } else { $fromName = null; } config(['mail.driver' => $mailSettings->attributes->getDriver()]); config(['mail.from.address' => $fromAddress]); config(['mail.from.name' => $fromName]); config(['mail.host' => $mailSettings->attributes->getSmtpHost()]); config(['mail.port' => $mailSettings->attributes->getSmtpPort()]); config(['mail.encryption' => $mailSettings->attributes->getSmtpEncryption()]); config(['mail.username' => $mailSettings->attributes->getSmtpUsername()]); config(['mail.password' => $mailSettings->attributes->getSmtpPassword()]); config(['mail.sendmail' => $mailSettings->attributes->getSendmailPath()]); $deployment = $project->getDeploymentByNumber($deployment->number); if ($process->isSuccessful()) { $status = 'success'; } else { $status = 'failure'; } $subject = "Deployment of {$project->name} #{$deployment->number} finished: {$status}"; $message = view('emails.notification') ->with('project', $project) ->with('deployment', $deployment) ->render(); $notifier->to($project->email_notification_recipient)->notify($subject, $message); } } } ================================================ FILE: app/Jobs/Job.php ================================================ deployment = $deployment; $this->executable = base_path('vendor/bin/dep'); } /** * Execute the job. * * @param \App\Repositories\Project\ProjectInterface $projectRepository * @param \App\Repositories\Server\ServerInterface $serverRepository * @param \Symfony\Component\Process\ProcessBuilder $processBuilder * @param \App\Services\Notification\NotifierInterface $notifier * @param \App\Repositories\Setting\SettingInterface $settingRepository * @return void */ public function handle(ProjectInterface $projectRepository, ServerInterface $serverRepository, ProcessBuilder $processBuilder, NotifierInterface $notifier, SettingInterface $settingRepository) { $deployment = $this->deployment; $project = $projectRepository->byId($deployment->project_id); $server = $serverRepository->byId($project->server_id); $app = app(); // Create a server list file $serverListFileBuilder = $app->make('App\Services\Deployment\DeployerServerListFileBuilder') ->setServer($server) ->setProject($project); $serverListFile = $app->make('App\Services\Deployment\DeployerFileDirector', [$serverListFileBuilder])->construct(); // Create recipe files foreach ($project->getRecipes() as $i => $recipe) { // HACK: If an instance of DeployerRecipeFileBuilder class is not stored in an array, a destructor is called and a recipe file is deleted immediately. $recipeFileBuilders[] = $app->make('App\Services\Deployment\DeployerRecipeFileBuilder')->setRecipe($recipe); $recipeFiles[] = $app->make('App\Services\Deployment\DeployerFileDirector', [$recipeFileBuilders[$i]])->construct(); } // Create a deployment file $deploymentFileBuilder = $app->make('App\Services\Deployment\DeployerDeploymentFileBuilder') ->setProject($project) ->setServerListFile($serverListFile) ->setRecipeFile($recipeFiles); $deploymentFile = $app->make('App\Services\Deployment\DeployerFileDirector', [$deploymentFileBuilder])->construct(); // Create a command $processBuilder ->add($this->executable) ->add("-f={$deploymentFile->getFullPath()}") ->add('--ansi') ->add('-n') ->add('-vv') ->add('rollback') ->add($project->stage); // Run the command $tmp['id'] = $deployment->id; $tmp['message'] = ''; $process = $processBuilder->getProcess(); $process->setTimeout(600); $process->run(function ($type, $buffer) use (&$tmp, $project, $deployment) { $tmp['message'] .= $buffer; $tmp['number'] = $deployment->number; $project->updateDeployment($tmp); }); // Store the result if ($process->isSuccessful()) { $message = $process->getOutput(); } else { $message = $process->getErrorOutput(); } $data['id'] = $deployment->id; $data['number'] = $deployment->number; $data['message'] = $message; $data['status'] = $process->getExitCode(); $project->updateDeployment($data); // Notify if (isset($project->email_notification_recipient)) { $mailSettings = $settingRepository->byType('mail'); if (isset($mailSettings->attributes->getFrom()['address'])) { $fromAddress = $mailSettings->attributes->getFrom()['address']; } else { $fromAddress = null; } if (isset($mailSettings->attributes->getFrom()['name'])) { $fromName = $mailSettings->attributes->getFrom()['name']; } else { $fromName = null; } config(['mail.driver' => $mailSettings->attributes->getDriver()]); config(['mail.from.address' => $fromAddress]); config(['mail.from.name' => $fromName]); config(['mail.host' => $mailSettings->attributes->getSmtpHost()]); config(['mail.port' => $mailSettings->attributes->getSmtpPort()]); config(['mail.encryption' => $mailSettings->attributes->getSmtpEncryption()]); config(['mail.username' => $mailSettings->attributes->getSmtpUsername()]); config(['mail.password' => $mailSettings->attributes->getSmtpPassword()]); config(['mail.sendmail' => $mailSettings->attributes->getSendmailPath()]); $deployment = $project->getDeploymentByNumber($deployment->number); if ($process->isSuccessful()) { $status = 'success'; } else { $status = 'failure'; } $subject = "Deployment of {$project->name} #{$deployment->number} finished: {$status}"; $message = view('emails.notification') ->with('project', $project) ->with('deployment', $deployment) ->render(); $notifier->to($project->email_notification_recipient)->notify($subject, $message); } } } ================================================ FILE: app/Listeners/.gitkeep ================================================ ================================================ FILE: app/Models/BaseModel.php ================================================ 'integer', 'status' => 'integer', ]; /** * Return a created presenter. * * @return \Robbo\Presenter\Presenter */ public function getPresenter() { $converter = new AnsiToHtmlConverter; return new DeploymentPresenter($this, $converter); } public function user() { return $this->belongsTo('App\Models\User'); } } ================================================ FILE: app/Models/DeploymentPresenter.php ================================================ converter = $converter; } public function status() { if (!isset($this->status)) { return ''; } elseif ($this->status === 0) { return ''; } else { return ''; } } public function statusText() { if (!isset($this->status)) { return 'running'; } elseif ($this->status === 0) { return 'success'; } else { return 'failure'; } } public function message() { $html = $this->converter->convert($this->message); return $html; } public function messageText() { $html = $this->message(); $text = htmlspecialchars_decode(strip_tags($html)); return $text; } } ================================================ FILE: app/Models/MaxDeployment.php ================================================ 'integer', ]; } ================================================ FILE: app/Models/Project.php ================================================ attributes['stage'] = $this->nullIfBlank($value); } public function setEmailNotificationRecipientAttribute($value) { $this->attributes['email_notification_recipient'] = $this->nullIfBlank($value); } public function setDaysToKeepDeploymentsAttribute($value) { $this->attributes['days_to_keep_deployments'] = $this->nullIfBlank($value); } public function setMaxNumberOfDeploymentsToKeepAttribute($value) { $this->attributes['max_number_of_deployments_to_keep'] = $this->nullIfBlank($value); } public function setGithubWebhookSecretAttribute($value) { $this->attributes['github_webhook_secret'] = $this->nullIfBlank($value); } public function setGithubWebhookUserIdAttribute($value) { $this->attributes['github_webhook_user_id'] = $this->nullIfBlank($value); } public function maxDeployment() { return $this->hasOne('App\Models\MaxDeployment'); } public function deployments() { return $this->hasMany('App\Models\Deployment'); } public function recipes() { return $this->belongsToMany('App\Models\Recipe'); } public function githubWebhookUser() { return $this->belongsTo('App\Models\User', 'github_webhook_user_id'); } public function getGithubWebhookUser() { return $this->githubWebhookUser()->first(); } public function getMaxDeployment() { return $this->maxDeployment()->lockForUpdate()->first(); } public function getLastDeployment() { return $this->deployments()->orderBy('number', 'desc')->first(); } public function getDeploymentByNumber($number) { return $this->deployments()->where('number', $number)->first(); } public function getDeploymentsByPage($page = 1, $limit = 10) { return $this->deployments() ->orderBy('deployments.created_at', 'desc') ->skip($limit * ($page - 1)) ->take($limit) ->paginate($limit); } public function getDeployments() { return $this->deployments()->orderBy('number', 'desc')->get(); } public function deleteDeployments(Collection $deployments) { foreach ($deployments as $deployment) { $deploymentIds[] = $deployment->id; } return $this->deployments() ->whereIn('id', $deploymentIds) ->delete(); } public function getRecipes() { return $this->recipes()->orderBy('recipe_order')->get(); } public function addMaxDeployment(array $data = []) { return $this->maxDeployment()->create($data); } public function addDeployment(array $data) { return $this->deployments()->create($data); } public function updateDeployment(array $data) { return $this->deployments() ->where('number', $data['number']) ->update($data); } public function syncRecipes(array $data) { foreach ($data as $i => $recipeId) { $syncRecipeIds[$recipeId] = ['recipe_order' => $i + 1]; } return $this->recipes()->sync($syncRecipeIds); } public function updateMaxDeployment(array $data) { return $this->maxDeployment()->update($data); } public function getDeploymentsWhereCreatedAtBefore(DateTime $date) { return $this->deployments() ->orderBy('number', 'desc') ->where('created_at', '<', $date) ->get(); } public function getDeploymentsWhereNumberBefore($number) { return $this->deployments() ->orderBy('number', 'desc') ->where('number', '<', $number) ->get(); } public function getSatisfyingDeployments(DeploymentSpecification $spec) { return $spec->satisfyingElementsFrom($this); } protected function serializedLobColumn() { return 'attributes'; } protected function serializedLobSerializer() { return \Ngmy\EloquentSerializedLob\Serializer\JsonSerializer::class; } protected function serializedLobDeserializeType() { return \App\Entities\ProjectAttribute\ProjectAttributeEntity::class; } } ================================================ FILE: app/Models/Recipe.php ================================================ belongsToMany('App\Models\Project'); } public function getProjects() { return $this->projects()->orderBy('name')->get(); } } ================================================ FILE: app/Models/Server.php ================================================ type === 'mail') { return \App\Entities\Setting\MailSettingEntity::class; } } } ================================================ FILE: app/Models/User.php ================================================ =') && ($isArtisanOptimize || $this->app->runningUnitTests())) { error_reporting(E_ALL ^ E_DEPRECATED ^ E_NOTICE); } } /** * Register any application services. * * This service provider is a great spot to register your various container * bindings with the application. As you can see, we are registering our * "Registrar" implementation here. You can add your own bindings too! * * @return void */ public function register() { $this->app->bind( 'Illuminate\Contracts\Auth\Registrar', 'App\Services\Registrar' ); $this->app->bind('App\Services\Deployment\DeployCommanderInterface', function ($app) { return new QueueDeployCommander( $app->make('Illuminate\Contracts\Bus\Dispatcher') ); }); $this->app->bind('App\Services\Form\Project\ProjectForm', function ($app) { return new ProjectForm( new ProjectFormLaravelValidator($app['validator']), $app->make('App\Repositories\Project\ProjectInterface') ); }); $this->app->bind('App\Services\Form\Deployment\DeploymentForm', function ($app) { return new DeploymentForm( new DeploymentFormLaravelValidator($app['validator']), $app->make('App\Repositories\Project\ProjectInterface'), $app->make('App\Services\Deployment\DeployCommanderInterface') ); }); $this->app->bind('App\Services\Form\Recipe\RecipeForm', function ($app) { return new RecipeForm( new RecipeFormLaravelValidator($app['validator']), $app->make('App\Repositories\Recipe\RecipeInterface') ); }); $this->app->bind('App\Services\Form\Server\ServerForm', function ($app) { return new ServerForm( new ServerFormLaravelValidator($app['validator']), $app->make('App\Repositories\Server\ServerInterface') ); }); $this->app->bind('App\Services\Form\User\UserForm', function ($app) { return new UserForm( new UserFormLaravelValidator($app['validator']), $app->make('App\Repositories\User\UserInterface') ); }); $this->app->bind('App\Services\Form\Setting\MailSettingForm', function ($app) { return new MailSettingForm( new MailSettingFormLaravelValidator($app['validator']), $app->make('App\Repositories\Setting\SettingInterface') ); }); $this->app->bind('App\Services\Notification\NotifierInterface', function ($app) { return new MailNotifier; }); $this->app->bind('App\Services\Config\ConfigReaderInterface', function ($app) { $path = base_path('.env'); return new DotenvReader( new LaravelFilesystem($app['files']), $path ); }); $this->app->bind('App\Services\Config\ConfigWriterInterface', function ($app) { $path = base_path('.env'); return new DotenvWriter( new LaravelFilesystem($app['files']), $path ); }); $this->app->bind('App\Services\Deployment\DeployerServerListFileBuilder', function ($app) { return new DeployerServerListFileBuilder( new LaravelFilesystem($app['files']), new DeployerFile, new Parser, new Dumper ); }); $this->app->bind('App\Services\Deployment\DeployerRecipeFileBuilder', function ($app) { return new DeployerRecipeFileBuilder( new LaravelFilesystem($app['files']), new DeployerFile ); }); $this->app->bind('App\Services\Deployment\DeployerDeploymentFileBuilder', function ($app) { return new DeployerDeploymentFileBuilder( new LaravelFilesystem($app['files']), new DeployerFile ); }); $this->app->bind('App\Services\Api\JsonRpc', function ($app) { return new JsonRpc( $app->make('App\Repositories\Project\ProjectInterface'), $app->make('App\Services\Form\Deployment\DeploymentForm') ); }); } } ================================================ FILE: app/Providers/AuthServiceProvider.php ================================================ 'App\Policies\ModelPolicy', ]; /** * Register any application authentication / authorization services. * * @param \Illuminate\Contracts\Auth\Access\Gate $gate * @return void */ public function boot(GateContract $gate) { $this->registerPolicies($gate); // } } ================================================ FILE: app/Providers/EventServiceProvider.php ================================================ [ 'EventListener', ], ]; /** * Register any other events for your application. * * @param \Illuminate\Contracts\Events\Dispatcher $events * @return void */ public function boot(DispatcherContract $events) { parent::boot($events); // } } ================================================ FILE: app/Providers/RepositoryServiceProvider.php ================================================ app->bind('App\Repositories\Project\ProjectInterface', function ($app) { return new EloquentProject(new Project); }); $this->app->bind('App\Repositories\Recipe\RecipeInterface', function ($app) { return new EloquentRecipe(new Recipe); }); $this->app->bind('App\Repositories\Server\ServerInterface', function ($app) { return new EloquentServer(new Server); }); $this->app->bind('App\Repositories\User\UserInterface', function ($app) { return new EloquentUser(new User); }); $this->app->bind('App\Repositories\Role\RoleInterface', function ($app) { return new EloquentRole(new Role); }); $this->app->bind('App\Repositories\Setting\SettingInterface', function ($app) { return new EloquentSetting(new Setting); }); $this->app->bind('App\Repositories\Setting\DbSettingInterface', function ($app) { return new ConfigDbSetting( $app->make('App\Services\Config\ConfigReaderInterface'), $app->make('App\Services\Config\ConfigWriterInterface') ); }); $this->app->bind('App\Repositories\Setting\AppSettingInterface', function ($app) { return new ConfigAppSetting( $app->make('App\Services\Config\ConfigReaderInterface'), $app->make('App\Services\Config\ConfigWriterInterface') ); }); } } ================================================ FILE: app/Providers/RouteServiceProvider.php ================================================ bind('projects', function ($id) { $projectRepository = $this->app->make('App\Repositories\Project\ProjectInterface'); $project = $projectRepository->byId($id); if (is_null($project)) { throw new NotFoundHttpException; } return $project; }); $router->bind('deployments', function ($num, $route) { $project = $route->parameter('projects'); $deployment = $project->getDeploymentByNumber($num); if (is_null($deployment)) { throw new NotFoundHttpException; } return $deployment; }); $router->bind('recipes', function ($id) { $recipeRepository = $this->app->make('App\Repositories\Recipe\RecipeInterface'); $recipe = $recipeRepository->byId($id); if (is_null($recipe)) { throw new NotFoundHttpException; } return $recipe; }); $router->bind('servers', function ($id) { $serverRepository = $this->app->make('App\Repositories\Server\ServerInterface'); $server = $serverRepository->byId($id); if (is_null($server)) { throw new NotFoundHttpException; } return $server; }); $router->bind('users', function ($id) { $userRepository = $this->app->make('App\Repositories\User\UserInterface'); $user = $userRepository->byId($id); if (is_null($user)) { throw new NotFoundHttpException; } return $user; }); } /** * Define the routes for the application. * * @param \Illuminate\Routing\Router $router * @return void */ public function map(Router $router) { $router->group(['namespace' => $this->namespace], function ($router) { require app_path('Http/routes.php'); }); } } ================================================ FILE: app/Repositories/AbstractConfigRepository.php ================================================ reader = $reader; $this->writer = $writer; } public function byId($id) { } public function byPage($page = 1, $limi = 10) { } public function all() { } public function create(array $data) { } public function update(array $data) { } public function delete($id) { } } ================================================ FILE: app/Repositories/AbstractEloquentRepository.php ================================================ model->find($id); } /** * Get paginated models. * * @param int $page Page number * @param int $limit Number of models per page * @return \Illuminate\Pagination\LengthAwarePaginator */ public function byPage($page = 1, $limit = 10) { $models = $this->model ->skip($limit * ($page - 1)) ->take($limit) ->paginate($limit); return $models; } /** * Get all models. * * @return \Illuminate\Database\Eloquent\Collection */ public function all() { return $this->model->all(); } /** * Create a new model. * * @param array $data Data to create a model * @return \Illuminate\Database\Eloquent\Model */ public function create(array $data) { $model = $this->model->create($data); return $model; } /** * Update an existing model. * * @param array $data Data to update a model * @return boolean */ public function update(array $data) { $model = $this->model->find($data['id']); $model->update($data); return true; } /** * Delete an existing model. * * @param int $id Model id * @return boolean */ public function delete($id) { $model = $this->model->find($id); $model->delete(); return true; } } ================================================ FILE: app/Repositories/Project/EloquentProject.php ================================================ model = $project; } /** * Get paginated projects. * * @param int $page Page number * @param int $limit Number of projects per page * @return \Illuminate\Pagination\LengthAwarePaginator */ public function byPage($page = 1, $limit = 10) { $projects = $this->model->with(['deployments' => function ($query) { $query->orderBy('number', 'desc'); }])->orderBy('name') ->skip($limit * ($page - 1)) ->take($limit) ->paginate($limit); return $projects; } } ================================================ FILE: app/Repositories/Project/ProjectInterface.php ================================================ model = $recipe; } /** * Get paginated recipes. * * @param int $page Page number * @param int $limit Number of recipes per page * @return \Illuminate\Pagination\LengthAwarePaginator */ public function byPage($page = 1, $limit = 10) { $recipes = $this->model->orderBy('name') ->skip($limit * ($page - 1)) ->take($limit) ->paginate($limit); return $recipes; } } ================================================ FILE: app/Repositories/Recipe/RecipeInterface.php ================================================ model = $role; } /** * Get paginated roles. * * @param int $page Page number * @param int $limit Number of roles per page * @return \Illuminate\Pagination\LengthAwarePaginator */ public function byPage($page = 1, $limit = 10) { $roles = $this->model->orderBy('name') ->skip($limit * ($page - 1)) ->take($limit) ->paginate($limit); return $roles; } } ================================================ FILE: app/Repositories/Role/RoleInterface.php ================================================ model = $server; } /** * Get paginated servers. * * @param int $page Page number * @param int $limit Number of servers per page * @return \Illuminate\Pagination\LengthAwarePaginator */ public function byPage($page = 1, $limit = 10) { $servers = $this->model->orderBy('name') ->skip($limit * ($page - 1)) ->take($limit) ->paginate($limit); return $servers; } } ================================================ FILE: app/Repositories/Server/ServerInterface.php ================================================ reader->getConfig('APP_URL'); $appSetting = new AppSettingEntity; $appSetting->setUrl($url); return $appSetting; } public function update(array $data) { $this->writer->setConfig('APP_URL', $data['url']); return true; } } ================================================ FILE: app/Repositories/Setting/ConfigDbSetting.php ================================================ reader->getConfig('DB_DRIVER'); $host = $this->reader->getConfig('DB_HOST'); $database = $this->reader->getConfig('DB_DATABASE'); $username = $this->reader->getConfig('DB_USERNAME'); $password = $this->reader->getConfig('DB_PASSWORD'); $dbSetting = new DbSettingEntity; $dbSetting->setDriver($driver) ->setHost($host) ->setDatabase($database) ->setUsername($username) ->setPassword($password); return $dbSetting; } public function update(array $data) { $this->writer->setConfig('DB_DRIVER', $data['driver']); $this->writer->setConfig('DB_HOST', $data['host']); $this->writer->setConfig('DB_DATABASE', $data['database']); $this->writer->setConfig('DB_USERNAME', $data['username']); $this->writer->setConfig('DB_PASSWORD', $data['password']); return true; } } ================================================ FILE: app/Repositories/Setting/ConfigMailSetting.php ================================================ reader->getConfig('MAIL_DRIVER'); $fromAddress = $this->reader->getConfig('MAIL_FROM_ADDRESS'); $fromName = $this->reader->getConfig('MAIL_FROM_NAME'); $smtpHost = $this->reader->getConfig('MAIL_HOST'); $smtpPort = $this->reader->getConfig('MAIL_PORT'); $smtpEncryption = $this->reader->getConfig('MAIL_ENCRYPTION'); $smtpUsername = $this->reader->getConfig('MAIL_USERNAME'); $smtpPassword = $this->reader->getConfig('MAIL_PASSWORD'); $sendmailPath = $this->reader->getConfig('MAIL_SENDMAIL'); $from = [ 'address' => $fromAddress, 'name' => $fromName, ]; $mailSetting = new MailSettingEntity; $mailSetting->setDriver($driver) ->setFrom($from) ->setSmtpHost($smtpHost) ->setSmtpPort($smtpPort) ->setSmtpEncryption($smtpEncryption) ->setSmtpUsername($smtpUsername) ->setSmtpPassword($smtpPassword) ->setSendmailPath($sendmailPath); return $mailSetting; } public function update(array $data) { $this->writer->setConfig('MAIL_DRIVER', $data['driver']); $this->writer->setConfig('MAIL_FROM_ADDRESS', $data['from_address']); $this->writer->setConfig('MAIL_FROM_NAME', $data['from_name']); $this->writer->setConfig('MAIL_HOST', $data['smtp_host']); $this->writer->setConfig('MAIL_PORT', $data['smtp_port']); $this->writer->setConfig('MAIL_ENCRYPTION', $data['smtp_encryption']); $this->writer->setConfig('MAIL_USERNAME', $data['smtp_username']); $this->writer->setConfig('MAIL_PASSWORD', $data['smtp_password']); $this->writer->setConfig('MAIL_SENDMAIL', $data['sendmail_path']); return true; } } ================================================ FILE: app/Repositories/Setting/DbSettingInterface.php ================================================ model = $setting; } /** * Get a model by setting type. If a model does not exist, create a new model. * * @param string $id Setting type * @return \Illuminate\Database\Eloquent\Model */ public function byType($type) { $setting = $this->model->where('type', $type)->first(); if (!is_null($setting)) { return $setting; } if ($type === 'mail') { $attributes = new MailSettingEntity; $attributes->setDriver('smtp'); $attributes->setFrom([ 'address' => 'webloyer@example.com', 'name' => 'Webloyer', ]); $attributes->setSmtpHost('smtp.mailgun.org'); $attributes->setSmtpPort(587); $attributes->setSmtpEncryption('tls'); $attributes->setSendmailPath('/usr/sbin/sendmail -bs'); } return $this->model->create([ 'type' => $type, 'attributes' => $attributes, ]); } /** * Update an existing model has a same type. * * @param array $data Data to update a model * @return boolean */ public function updateByType(array $data) { $setting = $this->model->where('type', $data['type'])->first(); $setting->update($data); return true; } } ================================================ FILE: app/Repositories/Setting/MailSettingInterface.php ================================================ model = $user; } /** * Get paginated users. * * @param int $page Page number * @param int $limit Number of users per page * @return \Illuminate\Pagination\LengthAwarePaginator */ public function byPage($page = 1, $limit = 10) { $users = $this->model->orderBy('name') ->skip($limit * ($page - 1)) ->take($limit) ->paginate($limit); return $users; } } ================================================ FILE: app/Repositories/User/UserInterface.php ================================================ project = $project; $this->deploymentForm = $deploymentForm; } /** * Deploy a project. * * @param int $project_id * @return \App\Models\Deployment */ public function deploy($project_id) { $input = [ 'status' => null, 'message' => null, 'project_id' => $project_id, 'user_id' => Auth::guard('api')->user()->id, 'task' => 'deploy', ]; if ($this->deploymentForm->save($input)) { $project = $this->project->byId($project_id); $deployment = $project->getLastDeployment(); return $deployment; } else { throw new InvalidArgumentException($this->deploymentForm->errors()); } } /** * Roll back a deployment. * * @param int $project_id * @return \App\Models\Deployment */ public function rollback($project_id) { $input = [ 'status' => null, 'message' => null, 'project_id' => $project_id, 'user_id' => Auth::guard('api')->user()->id, 'task' => 'rollback', ]; if ($this->deploymentForm->save($input)) { $project = $this->project->byId($project_id); $deployment = $project->getLastDeployment(); return $deployment; } else { throw new InvalidArgumentException($this->deploymentForm->errors()); } } } ================================================ FILE: app/Services/Api/Middleware/Authenticate.php ================================================ request = $request; } public function execute($username, $password, $procedureName) { $user = Auth::guard('api')->setRequest($this->request)->user(); if (is_null($user)) { throw new AuthenticationFailureException('Wrong credentials!'); } } } ================================================ FILE: app/Services/Config/ConfigReaderInterface.php ================================================ fs = $fs; $this->path = $path; } /** * Get configuration from a .env file. * * @param string $name Configuration name * @return string|null */ public function getConfig($name) { $contents = $this->fs->get($this->path); if (preg_match("/^$name=(.*)$/m", $contents, $matches)) { $value = $matches[1]; $value = $this->nullIfBlank($value); } else { $value = null; } return $value; } protected function nullIfBlank($value) { return trim($value) !== '' ? $value : null; } } ================================================ FILE: app/Services/Config/DotenvWriter.php ================================================ fs = $fs; $this->path = $path; } /** * Set configuration to a .env file. * * @param string $name Configuration name * @param string $value Configuration value * @return mixed */ public function setConfig($name, $value) { $contents = $this->fs->get($this->path); if (preg_match("/^$name=.*$/m", $contents)) { $contents = preg_replace("/^$name=.*$/m", "$name=$value", $contents); } else { $contents .= "$name=$value".PHP_EOL; } return $this->fs->put($this->path, $contents); } } ================================================ FILE: app/Services/Deployment/DeployCommanderInterface.php ================================================ fs = $fs; $this->deployerFile = $deployerFile; } public function __destruct() { $this->fs->delete($this->deployerFile->getFullPath()); } /** * Set a deployment file path info. * * @return \App\Services\Deployment\DeployerDeploymentFileBuilder $this */ public function pathInfo() { $id = md5(uniqid(rand(), true)); $baseName = "deploy_$id.php"; $fullPath = storage_path("app/$baseName"); $this->deployerFile->setBaseName($baseName); $this->deployerFile->setFullPath($fullPath); return $this; } /** * Put a deployment file. * * @return \App\Services\Deployment\DeployerDeploymentFileBuilder $this */ public function put() { $fullPath = $this->deployerFile->getFullPath(); $contents[] = 'recipeFile as $recipeFile) { $contents[] = "require '{$recipeFile->getFullPath()}';"; } // Set a repository $contents[] = "set('repository', '{$this->project->repository}');"; // Load a server list file $contents[] = "serverList('{$this->serverListFile->getFullPath()}');"; $this->fs->put($fullPath, implode(PHP_EOL, $contents)); return $this; } /** * Get a deployment file instance. * * @return \App\Services\Deployment\DeployerFile */ public function getResult() { return $this->deployerFile; } /** * Set a project model instance. * * @param \Illuminate\Database\Eloquent\Model $project * @return \App\Services\Deployment\DeployerDeploymentFileBuilder $this */ public function setProject(Model $project) { $this->project = $project; return $this; } /** * Set a server list file instance. * * @param \App\Services\Deployment\DeployerFile $serverListFile * @return \App\Services\Deployment\DeployerDeploymentFileBuilder $this */ public function setServerListFile(DeployerFile $serverListFile) { $this->serverListFile = $serverListFile; return $this; } /** * Set recipe file instances. * * @param array $recipeFile * @return \App\Services\Deployment\DeployerDeploymentFileBuilder $this */ public function setRecipeFile(array $recipeFile) { $this->recipeFile = $recipeFile; return $this; } } ================================================ FILE: app/Services/Deployment/DeployerFile.php ================================================ baseName; } /** * Get a full path. * * @return string */ public function getFullPath() { return $this->fullPath; } /** * Set a base name. * * @param string Base name * @return \App\Services\Deployment\DeployerFile $this */ public function setBaseName($baseName) { $this->baseName = $baseName; return $this; } /** * Set a full path. * * @param string Full path * @return \App\Services\Deployment\DeployerFile $this */ public function setFullPath($fullPath) { $this->fullPath = $fullPath; return $this; } } ================================================ FILE: app/Services/Deployment/DeployerFileBuilderInterface.php ================================================ fileBuilder = $fileBuilder; } /** * Construct a deployer file instance. * * @return \App\Services\Deployment\DeployerFile */ public function construct() { $this->fileBuilder->pathInfo(); $this->fileBuilder->put(); return $this->fileBuilder->getResult(); } } ================================================ FILE: app/Services/Deployment/DeployerRecipeFileBuilder.php ================================================ fs = $fs; $this->deployerFile = $deployerFile; } public function __destruct() { $this->fs->delete($this->deployerFile->getFullPath()); } /** * Set a recipe file path info. * * @return \App\Services\Deployment\DeployerRecipeFileBuilder $this */ public function pathInfo() { $id = md5(uniqid(rand(), true)); $baseName = "recipe_$id.php"; $fullPath = storage_path("app/$baseName"); $this->deployerFile->setBaseName($baseName); $this->deployerFile->setFullPath($fullPath); return $this; } /** * Put a recipe file. * * @return \App\Services\Deployment\DeployerRecipeFileBuilder $this */ public function put() { $fullPath = $this->deployerFile->getFullPath(); $contents = $this->recipe->body; $this->fs->put($fullPath, $contents); return $this; } /** * Get a recipe file instance. * * @return \App\Services\Deployment\DeployerFile */ public function getResult() { return $this->deployerFile; } /** * Set a recipe model instance. * * @param \Illuminate\Database\Eloquent\Model $recipe * @return \App\Services\Deployment\DeployerRecipeFileBuilder $this */ public function setRecipe(Model $recipe) { $this->recipe = $recipe; return $this; } } ================================================ FILE: app/Services/Deployment/DeployerServerListFileBuilder.php ================================================ fs = $fs; $this->deployerFile = $deployerFile; $this->yamlParser = $parser; $this->yamlDumper = $dumper; } public function __destruct() { $this->fs->delete($this->deployerFile->getFullPath()); } /** * Set a server list file path info. * * @return \App\Services\ServerList\DeployerServerListFileBuilder $this */ public function pathInfo() { $id = md5(uniqid(rand(), true)); $baseName = "server_$id.yml"; $fullPath = storage_path("app/$baseName"); $this->deployerFile->setBaseName($baseName); $this->deployerFile->setFullPath($fullPath); return $this; } /** * Put a server list file. * * @return \App\Services\ServerList\DeployerServerListFileBuilder $this */ public function put() { $fullPath = $this->deployerFile->getFullPath(); $contents = $this->server->body; // Override settings in a server list file $serverList = $this->yamlParser->parse($contents); $projectAttributes = $this->project->attributes; if (!is_null($projectAttributes)) { foreach ($serverList as $i => $server) { if (!is_null($projectAttributes->getDeployPath())) { $serverList[$i]['deploy_path'] = $projectAttributes->getDeployPath(); } } } $newContents = $this->yamlDumper->dump($serverList); $this->fs->put($fullPath, $newContents); return $this; } /** * Get a server list file instance. * * @return \App\Services\Deployment\DeployerFile */ public function getResult() { return $this->deployerFile; } /** * Set a server model instance. * * @param \Illuminate\Database\Eloquent\Model $server * @return \App\Services\ServerList\DeployerServerListFileBuilder $this */ public function setServer(Model $server) { $this->server = $server; return $this; } /** * Set a project model instance. * * @param \Illuminate\Database\Eloquent\Model $project * @return \App\Services\ServerList\DeployerServerListFileBuilder $this */ public function setProject(Model $project) { $this->project = $project; return $this; } } ================================================ FILE: app/Services/Deployment/QueueDeployCommander.php ================================================ dispatcher = $dispatcher; } /** * Give the command to deploy * * @param mixed $deployment * @return boolean */ public function deploy($deployment) { $this->dispatcher->dispatch( new Deploy($deployment) ); } /** * Give the command to rollback * * @param mixed $deployment * @return boolean */ public function rollback($deployment) { $this->dispatcher->dispatch( new Rollback($deployment) ); } } ================================================ FILE: app/Services/Deployment/StorageDeployCommander.php ================================================ fs = $fs; } /** * Write a file. * * @param string $path File path * @param string $contents Contents to write a file * @return mixed */ public function put($path, $contents) { return $this->fs->put($path, $contents); } /** * Read a file. * * @param string $path File path * @return string Contents */ public function get($path) { return $this->fs->get($path); } /** * Delete a file. * * @param string $path File path * @return boolean */ public function delete($path) { return $this->fs->delete($path); } } ================================================ FILE: app/Services/Form/Deployment/DeploymentForm.php ================================================ validator = $validator; $this->project = $project; $this->deployCommander = $deployCommander; } /** * Create a new deployment. * * @param array $input Data to create a deployment * @return boolean */ public function save(array $input) { if (!$this->valid($input)) { return false; } $deployment = DB::transaction(function () use ($input) { $project = $this->project->byId($input['project_id']); $maxDeployment = $project->getMaxDeployment(); $input['number'] = $maxDeployment->number + 1; $project->addDeployment($input); $project->updateMaxDeployment(['number' => $input['number']]); $deployment = $project->getDeploymentByNumber($input['number']); return $deployment; }); if (!$deployment) { return false; } $this->deployCommander->{$input['task']}($deployment); return true; } /** * Return validation errors. * * @return array */ public function errors() { return $this->validator->errors(); } /** * Test whether form validator passes. * * @return boolean */ protected function valid(array $input) { return $this->validator->with($input)->passes(); } } ================================================ FILE: app/Services/Form/Deployment/DeploymentFormLaravelValidator.php ================================================ 'required|exists:projects,id', 'task' => 'required|in:deploy,rollback', 'user_id' => 'required|exists:users,id', ]; } ================================================ FILE: app/Services/Form/Project/ProjectForm.php ================================================ validator = $validator; $this->project = $project; } /** * Create a new project. * * @param array $input Data to create a project * @return boolean */ public function save(array $input) { $input['recipe_id'] = explode(',', $input['recipe_id_order']); if (!$this->valid($input)) { return false; } DB::transaction(function () use ($input) { $projectAttribute = new \App\Entities\ProjectAttribute\ProjectAttributeEntity; if (!empty($input['deploy_path'])) { $projectAttribute->setDeployPath($input['deploy_path']); } $input['attributes'] = $projectAttribute; if (isset($input['keep_last_deployment'])) { $input['keep_last_deployment'] = true; } else { $input['keep_last_deployment'] = false; } $project = $this->project->create($input); $project->addMaxDeployment(); $project->syncRecipes($input['recipe_id']); }); return true; } /** * Update an existing project. * * @param array $input Data to update a project * @return boolean */ public function update(array $input) { $input['recipe_id'] = explode(',', $input['recipe_id_order']); if (!$this->valid($input)) { return false; } DB::transaction(function () use ($input) { $project = $this->project->byId($input['id']); $project->syncRecipes($input['recipe_id']); $projectAttribute = new \App\Entities\ProjectAttribute\ProjectAttributeEntity; if (!empty($input['deploy_path'])) { $projectAttribute->setDeployPath($input['deploy_path']); } $input['attributes'] = $projectAttribute; if (isset($input['keep_last_deployment'])) { $input['keep_last_deployment'] = true; } else { $input['keep_last_deployment'] = false; } $this->project->update($input); }); return true; } /** * Return validation errors. * * @return array */ public function errors() { return $this->validator->errors(); } /** * Test whether form validator passes. * * @return boolean */ protected function valid(array $input) { return $this->validator->with($input)->passes(); } } ================================================ FILE: app/Services/Form/Project/ProjectFormLaravelValidator.php ================================================ 'required', 'stage' => 'required', 'recipe_id' => 'required', 'server_id' => 'required|exists:servers,id', 'repository' => 'required|url', 'deploy_path' => 'string', 'email_notification_recipient' => 'email', 'days_to_keep_deployments' => 'integer|min:1', 'max_number_of_deployments_to_keep' => 'integer|min:1', 'keep_last_deployment' => 'boolean', 'github_webhook_secret' => 'string', ]; protected function rules() { $rules = []; if (isset($this->data['recipe_id'])) { foreach ($this->data['recipe_id'] as $key => $val) { $rules["recipe_id.$key"] = 'required|exists:recipes,id'; } } // HACK Laravel 5.2 URL validation doesn't work with PHP 7.3 due to preg_match() error. if (version_compare(phpversion(), '7.3.0', '>=')) { $rules['repository'] = 'required'; } return $rules; } } ================================================ FILE: app/Services/Form/Recipe/RecipeForm.php ================================================ validator = $validator; $this->recipe = $recipe; } /** * Create a new recipe. * * @param array $input Data to create a recipe * @return boolean */ public function save(array $input) { if (!$this->valid($input)) { return false; } return $this->recipe->create($input); } /** * Update an existing recipe. * * @param array $input Data to update a recipe * @return boolean */ public function update(array $input) { if (!$this->valid($input)) { return false; } return $this->recipe->update($input); } /** * Return validation errors. * * @return array */ public function errors() { return $this->validator->errors(); } /** * Test whether form validator passes. * * @return boolean */ protected function valid(array $input) { return $this->validator->with($input)->passes(); } } ================================================ FILE: app/Services/Form/Recipe/RecipeFormLaravelValidator.php ================================================ 'required', 'body' => 'required', ]; } ================================================ FILE: app/Services/Form/Server/ServerForm.php ================================================ validator = $validator; $this->server = $server; } /** * Create a new server. * * @param array $input Data to create a server * @return boolean */ public function save(array $input) { if (!$this->valid($input)) { return false; } return $this->server->create($input); } /** * Update an existing server. * * @param array $input Data to update a server * @return boolean */ public function update(array $input) { if (!$this->valid($input)) { return false; } return $this->server->update($input); } /** * Return validation errors. * * @return array */ public function errors() { return $this->validator->errors(); } /** * Test whether form validator passes. * * @return boolean */ protected function valid(array $input) { return $this->validator->with($input)->passes(); } } ================================================ FILE: app/Services/Form/Server/ServerFormLaravelValidator.php ================================================ 'required', 'body' => 'required', ]; } ================================================ FILE: app/Services/Form/Setting/MailSettingForm.php ================================================ validator = $validator; $this->setting = $setting; } /** * Update an existing setting. * * @param array $input Data to update a setting * @return boolean */ public function update(array $input) { if (!$this->valid($input)) { return false; } foreach ($input as $key => $value) { if ($value === '') { $input[$key] = null; } } $mailSetting = new \App\Entities\Setting\MailSettingEntity; $mailSetting->setDriver($input['driver']); $mailSetting->setFrom([ 'address' => $input['from_address'], 'name' => $input['from_name'], ]); $mailSetting->setSmtpHost($input['smtp_host']); $mailSetting->setSmtpPort($input['smtp_port']); $mailSetting->setSmtpEncryption($input['smtp_encryption']); $mailSetting->setSmtpUsername($input['smtp_username']); $mailSetting->setSmtpPassword($input['smtp_password']); $mailSetting->setSendmailPath($input['sendmail_path']); $input['attributes'] = $mailSetting; $input['type'] = 'mail'; $this->setting->updateByType($input); return true; } /** * Return validation errors. * * @return array */ public function errors() { return $this->validator->errors(); } /** * Test whether form validator passes. * * @return boolean */ protected function valid(array $input) { return $this->validator->with($input)->passes(); } } ================================================ FILE: app/Services/Form/Setting/MailSettingFormLaravelValidator.php ================================================ 'required|in:smtp,mail,sendmail', 'from_address' => 'required|email', 'from_name' => 'sometimes', 'smtp_host' => 'sometimes', 'smtp_port' => 'sometimes|integer|min:0|max:65535', 'smtp_encryption' => 'sometimes|in:tls,ssl', 'smtp_username' => 'sometimes', 'smtp_password' => 'sometimes', 'sendmail_path' => 'sometimes', ]; } ================================================ FILE: app/Services/Form/User/UserForm.php ================================================ validator = $validator; $this->user = $user; } /** * Create a new user. * * @param array $input Data to create a user * @return boolean */ public function save(array $input) { if (!$this->valid($input)) { return false; } if (isset($input['password'])) { $input['password'] = Hash::make($input['password']); } $input['api_token'] = str_random(60); DB::transaction(function () use ($input) { $user = $this->user->create($input); if (isset($input['role'])) { $user->assignRole($input['role']); } }); return true; } /** * Update an existing user. * * @param array $input Data to update a user * @return boolean */ public function update(array $input) { if (!$this->valid($input)) { return false; } DB::transaction(function () use ($input) { $this->user->update($input); }); return true; } /** * Update a password of an existing user. * * @param array $input Data to update a user * @return boolean */ public function updatePassword(array $input) { if (!$this->valid($input)) { return false; } $input['password'] = Hash::make($input['password']); return $this->user->update($input); } /** * Update a role of an existing user. * * @param array $input Data to update a user * @return boolean */ public function updateRole(array $input) { if (!$this->valid($input)) { return false; } if (!isset($input['role'])) { $input['role'] = []; } DB::transaction(function () use ($input) { $user = $this->user->byId($input['id']); $user->revokeAllRoles(); if (!empty($input['role'])) { $user->assignRole($input['role']); } }); return true; } public function regenerateApiToken(array $input) { $input['api_token'] = str_random(60); return $this->user->update($input); return true; } /** * Return validation errors. * * @return array */ public function errors() { return $this->validator->errors(); } /** * Test whether form validator passes. * * @return boolean */ protected function valid(array $input) { return $this->validator->with($input)->passes(); } } ================================================ FILE: app/Services/Form/User/UserFormLaravelValidator.php ================================================ 'sometimes|required', 'password' => 'sometimes|required|min:8|confirmed', 'role' => 'sometimes|required', ]; protected function rules() { $rules = []; // For role if (isset($this->data['role'])) { foreach ($this->data['role'] as $key => $val) { $rules["role.$key"] = 'required|exists:roles,id'; } } // For email $unique = 'unique:users,email'; if (isset($this->data['id'])) { $unique .= ','.$this->data['id']; } $rules['email'] = "sometimes|required|email|$unique"; return $rules; } } ================================================ FILE: app/Services/Notification/MailNotifier.php ================================================ to = $to; return $this; } /** * Sender of notification. * * @param string $from The sender * @return App\Services\Notification\NotifierInterface Return self for chainability */ public function from($from) { $this->from = $from; return $this; } /** * Send notification. * * @param string $subject The subject of notification * @param string $message The message of notification * @return void */ public function notify($subject, $message) { Mail::raw($message, function ($m) use ($subject) { $m->to($this->to)->subject($subject); }); } } ================================================ FILE: app/Services/Notification/NotifierInterface.php ================================================ validator = $validator; } /** * Add data to validation. * * @param array Data to validation * @return \App\Services\Validation\ValidableInterface $this */ public function with(array $data) { $this->data = $data; return $this; } /** * Test whether passes validation. * * @return boolean */ public function passes() { $rules = array_merge($this->rules, $this->rules()); $validator = $this->validator->make($this->data, $rules); if ($validator->fails()) { $this->errors = $validator->messages(); return false; } return true; } /** * Return validation errors. * * @return array */ public function errors() { return $this->errors; } /** * Return validation rules. * * @return array */ protected function rules() { return []; } } ================================================ FILE: app/Services/Validation/ValidableInterface.php ================================================ getDeployments(); } } ================================================ FILE: app/Specifications/OldDeploymentSpecification.php ================================================ currentDate = $currentDate; } /** * Get elements that satisfy the specification. * * @param \Illuminate\Database\Eloquent\Model $project * @return \Illuminate\Support\Collection */ public function satisfyingElementsFrom(Model $project) { if ($project->getDeployments()->isEmpty()) { return collect([]); } $oldDeployments = collect([]); $pastDaysToKeepDeployments = collect([]); $pastNumToKeepDeployments = collect([]); if (!is_null($project->days_to_keep_deployments)) { $currentDate = clone $this->currentDate; $date = $currentDate->modify('-'.$project->days_to_keep_deployments.' days'); $pastDaysToKeepDeployments = $project->getDeploymentsWhereCreatedAtBefore($date); if ($project->keep_last_deployment && $pastDaysToKeepDeployments->contains($project->getLastDeployment())) { $pastDaysToKeepDeployments->shift(); } } if (!is_null($project->max_number_of_deployments_to_keep)) { $number = $project->getLastDeployment()->number - $project->max_number_of_deployments_to_keep + 1; $pastNumToKeepDeployments = $project->getDeploymentsWhereNumberBefore($number); } return $oldDeployments->merge($pastDaysToKeepDeployments) ->merge($pastNumToKeepDeployments) ->sortByDesc('number') ->unique('number') ->values(); } } ================================================ FILE: app/Traits/RestExceptionHandlerTrait.php ================================================ getStatusCode() == 401) { return $this->unauthorized(); } elseif ($e->getStatusCode() == 404) { return $this->notFound(); } elseif ($e->getStatusCode() < 500) { return $this->badRequest(); } else { return $this->internalError(); } } else { return $this->internalError(); } } /** * Return JSON response for bad request. * * @param string $message * @param int $statusCode * @return \Illuminate\Http\JsonResponse */ protected function badRequest($message = 'Bad request', $statusCode = 400) { return $this->jsonResponse(['error' => $message], $statusCode); } /** * Return JSON response for unauthorized. * * @param string $message * @param int $statusCode * @return \Illuminate\Http\JsonResponse */ protected function unauthorized($message = 'Unauthorized', $statusCode = 401) { return $this->jsonResponse(['error' => $message], $statusCode); } /** * Return JSON response for not found. * * @param string $message * @param int $statusCode * @return \Illuminate\Http\JsonResponse */ protected function notFound($message = 'Not found', $statusCode = 404) { return $this->jsonResponse(['error' => $message], $statusCode); } /** * Return JSON response for internal error. * * @param string $message * @param int $statusCode * @return \Illuminate\Http\JsonResponse */ protected function internalError($message = 'Internal error', $statusCode = 500) { return $this->jsonResponse(['error' => $message], $statusCode); } /** * Return JSON response. * * @param array|null $payload * @param int $statusCode * @return \Illuminate\Http\JsonResponse */ protected function jsonResponse(array $payload = null, $statusCode = 404) { $payload = $payload ?: []; return response()->json($payload, $statusCode); } } ================================================ FILE: artisan ================================================ #!/usr/bin/env php make('Illuminate\Contracts\Console\Kernel'); $status = $kernel->handle( $input = new Symfony\Component\Console\Input\ArgvInput, new Symfony\Component\Console\Output\ConsoleOutput ); /* |-------------------------------------------------------------------------- | Shutdown The Application |-------------------------------------------------------------------------- | | Once Artisan has finished running. We will fire off the shutdown events | so that any final work may be done by the application before we shut | down the process. This is the last thing to happen to the request. | */ $kernel->terminate($input, $status); exit($status); ================================================ FILE: bootstrap/app.php ================================================ singleton( 'Illuminate\Contracts\Http\Kernel', 'App\Http\Kernel' ); $app->singleton( 'Illuminate\Contracts\Console\Kernel', 'App\Console\Kernel' ); $app->singleton( 'Illuminate\Contracts\Debug\ExceptionHandler', 'App\Exceptions\Handler' ); /* |-------------------------------------------------------------------------- | Return The Application |-------------------------------------------------------------------------- | | This script returns the application instance. The instance is given to | the calling script so we can separate the building of the instances | from the actual running of the application and sending responses. | */ return $app; ================================================ FILE: bootstrap/autoload.php ================================================ =5.6.0", "laravel/framework": "5.2.*", "laravelcollective/html": "5.2.*", "davejamesmiller/laravel-breadcrumbs": "3.0.*", "robclancy/presenter": "1.3.*", "ajaxorg/ace-builds": "~1.2.0", "lou/multi-select": "0.9.12", "kodeine/laravel-acl": "~1.0@dev", "sensiolabs/ansi-to-html": "~1.0", "symfony/yaml": "~3.0", "ngmy/eloquent-serialized-lob": "^0.1.0", "fguillot/json-rpc": "~v1.2.1", "deployer/deployer": "^4.0" }, "require-dev": { "phpunit/phpunit": "~5.0", "symfony/dom-crawler": "~3.0", "symfony/css-selector": "~3.0", "mockery/mockery": "dev-master", "mikey179/vfsstream": "~1", "php-coveralls/php-coveralls": "^2.2" }, "autoload": { "classmap": [ "database" ], "psr-4": { "App\\": "app/" } }, "autoload-dev": { "classmap": [ "tests/TestCase.php", "tests/_helpers" ] }, "scripts": { "post-install-cmd": [ "mkdir -p public/js/vendor/ajaxorg", "ln -nfs $(pwd)/vendor/ajaxorg/ace-builds/src-min-noconflict public/js/vendor/ajaxorg/ace", "mkdir -p public/vendor/lou/multi-select", "cp -r $(pwd)/vendor/lou/multi-select/js public/vendor/lou/multi-select", "cp -r $(pwd)/vendor/lou/multi-select/css public/vendor/lou/multi-select", "cp -r $(pwd)/vendor/lou/multi-select/img public/vendor/lou/multi-select", "php artisan clear-compiled", "php artisan optimize" ], "post-update-cmd": [ "mkdir -p public/js/vendor/ajaxorg", "ln -nfs $(pwd)/vendor/ajaxorg/ace-builds/src-min-noconflict public/js/vendor/ajaxorg/ace", "mkdir -p public/vendor/lou/multi-select", "cp -r $(pwd)/vendor/lou/multi-select/js public/vendor/lou/multi-select", "cp -r $(pwd)/vendor/lou/multi-select/css public/vendor/lou/multi-select", "cp -r $(pwd)/vendor/lou/multi-select/img public/vendor/lou/multi-select", "php artisan clear-compiled", "php artisan optimize" ], "post-create-project-cmd": [ "php -r \"copy('.env.example', '.env');\"", "php artisan key:generate" ] }, "config": { "preferred-install": "dist" } } ================================================ FILE: config/acl.php ================================================ 'Kodeine\Acl\Models\Eloquent\Role', 'permission' => 'Kodeine\Acl\Models\Eloquent\Permission', /** * NTFS right, the more permissive wins * If you have multiple permission aliases assigned, each alias * has a common permission, view.house => false, but one alias * has it set to true. If ntfs right is enabled, true value * wins the race, ie the more permissive wins. */ 'ntfs' => false, ]; ================================================ FILE: config/app.php ================================================ env('APP_ENV', 'production'), /* |-------------------------------------------------------------------------- | Application Debug Mode |-------------------------------------------------------------------------- | | When your application is in debug mode, detailed error messages with | stack traces will be shown on every error that occurs within your | application. If disabled, a simple generic error page is shown. | */ 'debug' => env('APP_DEBUG'), /* |-------------------------------------------------------------------------- | Application URL |-------------------------------------------------------------------------- | | This URL is used by the console to properly generate URLs when using | the Artisan command line tool. You should set this to the root of | your application so that it is used when running Artisan tasks. | */ 'url' => env('APP_URL', 'http://localhost'), /* |-------------------------------------------------------------------------- | Application Timezone |-------------------------------------------------------------------------- | | Here you may specify the default timezone for your application, which | will be used by the PHP date and date-time functions. We have gone | ahead and set this to a sensible default for you out of the box. | */ 'timezone' => 'UTC', /* |-------------------------------------------------------------------------- | Application Locale Configuration |-------------------------------------------------------------------------- | | The application locale determines the default locale that will be used | by the translation service provider. You are free to set this value | to any of the locales which will be supported by the application. | */ 'locale' => 'en', /* |-------------------------------------------------------------------------- | Application Fallback Locale |-------------------------------------------------------------------------- | | The fallback locale determines the locale to use when the current one | is not available. You may change the value to correspond to any of | the language folders that are provided through your application. | */ 'fallback_locale' => 'en', /* |-------------------------------------------------------------------------- | Encryption Key |-------------------------------------------------------------------------- | | This key is used by the Illuminate encrypter service and should be set | to a random, 32 character string, otherwise these encrypted strings | will not be safe. Please do this before deploying an application! | */ 'key' => env('APP_KEY', 'SomeRandomString'), 'cipher' => 'AES-256-CBC', /* |-------------------------------------------------------------------------- | Logging Configuration |-------------------------------------------------------------------------- | | Here you may configure the log settings for your application. Out of | the box, Laravel uses the Monolog PHP logging library. This gives | you a variety of powerful log handlers / formatters to utilize. | | Available Settings: "single", "daily", "syslog", "errorlog" | */ 'log' => 'daily', /* |-------------------------------------------------------------------------- | Autoloaded Service Providers |-------------------------------------------------------------------------- | | The service providers listed here will be automatically loaded on the | request to your application. Feel free to add your own services to | this array to grant expanded functionality to your applications. | */ 'providers' => [ /* * Laravel Framework Service Providers... */ Illuminate\Auth\AuthServiceProvider::class, Illuminate\Bus\BusServiceProvider::class, Illuminate\Cache\CacheServiceProvider::class, Illuminate\Foundation\Providers\ConsoleSupportServiceProvider::class, Illuminate\Cookie\CookieServiceProvider::class, Illuminate\Database\DatabaseServiceProvider::class, Illuminate\Encryption\EncryptionServiceProvider::class, Illuminate\Filesystem\FilesystemServiceProvider::class, Illuminate\Foundation\Providers\FoundationServiceProvider::class, Illuminate\Hashing\HashServiceProvider::class, Illuminate\Mail\MailServiceProvider::class, Illuminate\Pagination\PaginationServiceProvider::class, Illuminate\Pipeline\PipelineServiceProvider::class, Illuminate\Queue\QueueServiceProvider::class, Illuminate\Redis\RedisServiceProvider::class, Illuminate\Auth\Passwords\PasswordResetServiceProvider::class, Illuminate\Session\SessionServiceProvider::class, Illuminate\Translation\TranslationServiceProvider::class, Illuminate\Validation\ValidationServiceProvider::class, Illuminate\View\ViewServiceProvider::class, /* * Application Service Providers... */ App\Providers\AppServiceProvider::class, App\Providers\AuthServiceProvider::class, App\Providers\EventServiceProvider::class, App\Providers\RouteServiceProvider::class, App\Providers\RepositoryServiceProvider::class, Collective\Html\HtmlServiceProvider::class, DaveJamesMiller\Breadcrumbs\ServiceProvider::class, Robbo\Presenter\PresenterServiceProvider::class, Kodeine\Acl\AclServiceProvider::class, Ngmy\EloquentSerializedLob\SerializedLobTraitServiceProvider::class, ], /* |-------------------------------------------------------------------------- | Class Aliases |-------------------------------------------------------------------------- | | This array of class aliases will be registered when this application | is started. However, feel free to register as many as you wish as | the aliases are "lazy" loaded so they don't hinder performance. | */ 'aliases' => [ 'App' => Illuminate\Support\Facades\App::class, 'Artisan' => Illuminate\Support\Facades\Artisan::class, 'Auth' => Illuminate\Support\Facades\Auth::class, 'Blade' => Illuminate\Support\Facades\Blade::class, 'Bus' => Illuminate\Support\Facades\Bus::class, 'Cache' => Illuminate\Support\Facades\Cache::class, 'Config' => Illuminate\Support\Facades\Config::class, 'Cookie' => Illuminate\Support\Facades\Cookie::class, 'Crypt' => Illuminate\Support\Facades\Crypt::class, 'DB' => Illuminate\Support\Facades\DB::class, 'Eloquent' => Illuminate\Database\Eloquent\Model::class, 'Event' => Illuminate\Support\Facades\Event::class, 'File' => Illuminate\Support\Facades\File::class, 'Gate' => Illuminate\Support\Facades\Gate::class, 'Hash' => Illuminate\Support\Facades\Hash::class, 'Input' => Illuminate\Support\Facades\Input::class, 'Inspiring' => Illuminate\Foundation\Inspiring::class, 'Lang' => Illuminate\Support\Facades\Lang::class, 'Log' => Illuminate\Support\Facades\Log::class, 'Mail' => Illuminate\Support\Facades\Mail::class, 'Password' => Illuminate\Support\Facades\Password::class, 'Queue' => Illuminate\Support\Facades\Queue::class, 'Redirect' => Illuminate\Support\Facades\Redirect::class, 'Redis' => Illuminate\Support\Facades\Redis::class, 'Request' => Illuminate\Support\Facades\Request::class, 'Response' => Illuminate\Support\Facades\Response::class, 'Route' => Illuminate\Support\Facades\Route::class, 'Schema' => Illuminate\Support\Facades\Schema::class, 'Session' => Illuminate\Support\Facades\Session::class, 'Storage' => Illuminate\Support\Facades\Storage::class, 'URL' => Illuminate\Support\Facades\URL::class, 'Validator' => Illuminate\Support\Facades\Validator::class, 'View' => Illuminate\Support\Facades\View::class, 'Form' => Collective\Html\FormFacade::class, 'Html' => Collective\Html\HtmlFacade::class, 'Breadcrumbs' => DaveJamesMiller\Breadcrumbs\Facade::class, ], ]; ================================================ FILE: config/auth.php ================================================ [ 'guard' => 'web', 'passwords' => 'users', ], /* |-------------------------------------------------------------------------- | Authentication Guards |-------------------------------------------------------------------------- | | Next, you may define every authentication guard for your application. | Of course, a great default configuration has been defined for you | here which uses session storage and the Eloquent user provider. | | All authentication drivers have a user provider. This defines how the | users are actually retrieved out of your database or other storage | mechanisms used by this application to persist your user's data. | | Supported: "session", "token" | */ 'guards' => [ 'web' => [ 'driver' => 'session', 'provider' => 'users', ], 'api' => [ 'driver' => 'token', 'provider' => 'users', ], ], /* |-------------------------------------------------------------------------- | User Providers |-------------------------------------------------------------------------- | | All authentication drivers have a user provider. This defines how the | users are actually retrieved out of your database or other storage | mechanisms used by this application to persist your user's data. | | If you have multiple user tables or models you may configure multiple | sources which represent each model / table. These sources may then | be assigned to any extra authentication guards you have defined. | | Supported: "database", "eloquent" | */ 'providers' => [ 'users' => [ 'driver' => 'eloquent', 'model' => App\Models\User::class, ], // 'users' => [ // 'driver' => 'database', // 'table' => 'users', // ], ], /* |-------------------------------------------------------------------------- | Resetting Passwords |-------------------------------------------------------------------------- | | Here you may set the options for resetting passwords including the view | that is your password reset e-mail. You may also set the name of the | table that maintains all of the reset tokens for your application. | | You may specify multiple password reset configurations if you have more | than one user table or model in the application and you want to have | separate password reset settings based on the specific user types. | | The expire time is the number of minutes that the reset token should be | considered valid. This security feature keeps tokens short-lived so | they have less time to be guessed. You may change this as needed. | */ 'passwords' => [ 'users' => [ 'provider' => 'users', 'email' => 'emails.password', 'table' => 'password_resets', 'expire' => 60, ], ], ]; ================================================ FILE: config/cache.php ================================================ env('CACHE_DRIVER', 'file'), /* |-------------------------------------------------------------------------- | Cache Stores |-------------------------------------------------------------------------- | | Here you may define all of the cache "stores" for your application as | well as their drivers. You may even define multiple stores for the | same cache driver to group types of items stored in your caches. | */ 'stores' => [ 'apc' => [ 'driver' => 'apc' ], 'array' => [ 'driver' => 'array' ], 'database' => [ 'driver' => 'database', 'table' => 'cache', 'connection' => null, ], 'file' => [ 'driver' => 'file', 'path' => storage_path().'/framework/cache', ], 'memcached' => [ 'driver' => 'memcached', 'servers' => [ [ 'host' => '127.0.0.1', 'port' => 11211, 'weight' => 100 ], ], ], 'redis' => [ 'driver' => 'redis', 'connection' => 'default', ], ], /* |-------------------------------------------------------------------------- | Cache Key Prefix |-------------------------------------------------------------------------- | | When utilizing a RAM based store such as APC or Memcached, there might | be other applications utilizing the same cache. So, we'll specify a | value to get prefixed to all our keys so we can avoid collisions. | */ 'prefix' => 'laravel', ]; ================================================ FILE: config/compile.php ================================================ [ realpath(__DIR__.'/../app/Providers/AppServiceProvider.php'), realpath(__DIR__.'/../app/Providers/EventServiceProvider.php'), realpath(__DIR__.'/../app/Providers/RouteServiceProvider.php'), ], /* |-------------------------------------------------------------------------- | Compiled File Providers |-------------------------------------------------------------------------- | | Here you may list service providers which define a "compiles" function | that returns additional files that should be compiled, providing an | easy way to get common files from any packages you are utilizing. | */ 'providers' => [ // ], ]; ================================================ FILE: config/database.php ================================================ PDO::FETCH_CLASS, /* |-------------------------------------------------------------------------- | Default Database Connection Name |-------------------------------------------------------------------------- | | Here you may specify which of the database connections below you wish | to use as your default connection for all database work. Of course | you may use many connections at once using the Database library. | */ 'default' => env('DB_DRIVER', 'mysql'), /* |-------------------------------------------------------------------------- | Database Connections |-------------------------------------------------------------------------- | | Here are each of the database connections setup for your application. | Of course, examples of configuring each database platform that is | supported by Laravel is shown below to make development simple. | | | All database work in Laravel is done through the PHP PDO facilities | so make sure you have the driver for your particular database of | choice installed on your machine before you begin development. | */ 'connections' => [ 'sqlite' => [ 'driver' => 'sqlite', 'database' => env('DB_DATABASE', storage_path().'/database.sqlite'), 'prefix' => '', ], 'mysql' => [ 'driver' => 'mysql', 'host' => env('DB_HOST', 'localhost'), 'database' => env('DB_DATABASE', 'forge'), 'username' => env('DB_USERNAME', 'forge'), 'password' => env('DB_PASSWORD', ''), 'charset' => 'utf8', 'collation' => 'utf8_unicode_ci', 'prefix' => '', 'strict' => false, ], 'pgsql' => [ 'driver' => 'pgsql', 'host' => env('DB_HOST', 'localhost'), 'database' => env('DB_DATABASE', 'forge'), 'username' => env('DB_USERNAME', 'forge'), 'password' => env('DB_PASSWORD', ''), 'charset' => 'utf8', 'prefix' => '', 'schema' => 'public', ], 'sqlsrv' => [ 'driver' => 'sqlsrv', 'host' => env('DB_HOST', 'localhost'), 'database' => env('DB_DATABASE', 'forge'), 'username' => env('DB_USERNAME', 'forge'), 'password' => env('DB_PASSWORD', ''), 'prefix' => '', ], ], /* |-------------------------------------------------------------------------- | Migration Repository Table |-------------------------------------------------------------------------- | | This table keeps track of all the migrations that have already run for | your application. Using this information, we can determine which of | the migrations on disk haven't actually been run in the database. | */ 'migrations' => 'migrations', /* |-------------------------------------------------------------------------- | Redis Databases |-------------------------------------------------------------------------- | | Redis is an open source, fast, and advanced key-value store that also | provides a richer set of commands than a typical key-value systems | such as APC or Memcached. Laravel makes it easy to dig right in. | */ 'redis' => [ 'cluster' => false, 'default' => [ 'host' => '127.0.0.1', 'port' => 6379, 'database' => 0, ], ], ]; ================================================ FILE: config/filesystems.php ================================================ 'local', /* |-------------------------------------------------------------------------- | Default Cloud Filesystem Disk |-------------------------------------------------------------------------- | | Many applications store files both locally and in the cloud. For this | reason, you may specify a default "cloud" driver here. This driver | will be bound as the Cloud disk implementation in the container. | */ 'cloud' => 's3', /* |-------------------------------------------------------------------------- | Filesystem Disks |-------------------------------------------------------------------------- | | Here you may configure as many filesystem "disks" as you wish, and you | may even configure multiple disks of the same driver. Defaults have | been setup for each driver as an example of the required options. | */ 'disks' => [ 'local' => [ 'driver' => 'local', 'root' => storage_path().'/app', ], 's3' => [ 'driver' => 's3', 'key' => 'your-key', 'secret' => 'your-secret', 'region' => 'your-region', 'bucket' => 'your-bucket', ], 'rackspace' => [ 'driver' => 'rackspace', 'username' => 'your-username', 'key' => 'your-key', 'container' => 'your-container', 'endpoint' => 'https://identity.api.rackspacecloud.com/v2.0/', 'region' => 'IAD', 'url_type' => 'publicURL' ], ], ]; ================================================ FILE: config/mail.php ================================================ env('MAIL_DRIVER', 'smtp'), /* |-------------------------------------------------------------------------- | SMTP Host Address |-------------------------------------------------------------------------- | | Here you may provide the host address of the SMTP server used by your | applications. A default option is provided that is compatible with | the Mailgun mail service which will provide reliable deliveries. | */ 'host' => env('MAIL_HOST', 'smtp.mailgun.org'), /* |-------------------------------------------------------------------------- | SMTP Host Port |-------------------------------------------------------------------------- | | This is the SMTP port used by your application to deliver e-mails to | users of the application. Like the host we have set this value to | stay compatible with the Mailgun e-mail application by default. | */ 'port' => env('MAIL_PORT', 587), /* |-------------------------------------------------------------------------- | Global "From" Address |-------------------------------------------------------------------------- | | You may wish for all e-mails sent by your application to be sent from | the same address. Here, you may specify a name and address that is | used globally for all e-mails that are sent by your application. | */ 'from' => ['address' => null, 'name' => null], /* |-------------------------------------------------------------------------- | E-Mail Encryption Protocol |-------------------------------------------------------------------------- | | Here you may specify the encryption protocol that should be used when | the application send e-mail messages. A sensible default using the | transport layer security protocol should provide great security. | */ 'encryption' => env('MAIL_ENCRYPTION', 'tls'), /* |-------------------------------------------------------------------------- | SMTP Server Username |-------------------------------------------------------------------------- | | If your SMTP server requires a username for authentication, you should | set it here. This will get used to authenticate with your server on | connection. You may also set the "password" value below this one. | */ 'username' => env('MAIL_USERNAME'), /* |-------------------------------------------------------------------------- | SMTP Server Password |-------------------------------------------------------------------------- | | Here you may set the password required by your SMTP server to send out | messages from your application. This will be given to the server on | connection so that the application will be able to send messages. | */ 'password' => env('MAIL_PASSWORD'), /* |-------------------------------------------------------------------------- | Sendmail System Path |-------------------------------------------------------------------------- | | When using the "sendmail" driver to send e-mails, we will need to know | the path to where Sendmail lives on this server. A default path has | been provided here, which will work well on most of your systems. | */ 'sendmail' => '/usr/sbin/sendmail -bs', ]; ================================================ FILE: config/queue.php ================================================ env('QUEUE_DRIVER', 'database'), /* |-------------------------------------------------------------------------- | Queue Connections |-------------------------------------------------------------------------- | | Here you may configure the connection information for each server that | is used by your application. A default configuration has been added | for each back-end shipped with Laravel. You are free to add more. | */ 'connections' => [ 'sync' => [ 'driver' => 'sync', ], 'database' => [ 'driver' => 'database', 'table' => 'jobs', 'queue' => 'default', 'expire' => 60, ], 'beanstalkd' => [ 'driver' => 'beanstalkd', 'host' => 'localhost', 'queue' => 'default', 'ttr' => 60, ], 'sqs' => [ 'driver' => 'sqs', 'key' => 'your-public-key', 'secret' => 'your-secret-key', 'queue' => 'your-queue-url', 'region' => 'us-east-1', ], 'iron' => [ 'driver' => 'iron', 'host' => 'mq-aws-us-east-1.iron.io', 'token' => 'your-token', 'project' => 'your-project-id', 'queue' => 'your-queue-name', 'encrypt' => true, ], 'redis' => [ 'driver' => 'redis', 'queue' => 'default', 'expire' => 60, ], ], /* |-------------------------------------------------------------------------- | Failed Queue Jobs |-------------------------------------------------------------------------- | | These options configure the behavior of failed queue job logging so you | can control which database and table are used to store the jobs that | have failed. You may change them to any database / table you wish. | */ 'failed' => [ 'database' => 'mysql', 'table' => 'failed_jobs', ], ]; ================================================ FILE: config/services.php ================================================ [ 'domain' => '', 'secret' => '', ], 'mandrill' => [ 'secret' => '', ], 'ses' => [ 'key' => '', 'secret' => '', 'region' => 'us-east-1', ], 'stripe' => [ 'model' => 'User', 'secret' => '', ], ]; ================================================ FILE: config/session.php ================================================ env('SESSION_DRIVER', 'file'), /* |-------------------------------------------------------------------------- | Session Lifetime |-------------------------------------------------------------------------- | | Here you may specify the number of minutes that you wish the session | to be allowed to remain idle before it expires. If you want them | to immediately expire on the browser closing, set that option. | */ 'lifetime' => 120, 'expire_on_close' => false, /* |-------------------------------------------------------------------------- | Session Encryption |-------------------------------------------------------------------------- | | This option allows you to easily specify that all of your session data | should be encrypted before it is stored. All encryption will be run | automatically by Laravel and you can use the Session like normal. | */ 'encrypt' => false, /* |-------------------------------------------------------------------------- | Session File Location |-------------------------------------------------------------------------- | | When using the native session driver, we need a location where session | files may be stored. A default has been set for you but a different | location may be specified. This is only needed for file sessions. | */ 'files' => storage_path().'/framework/sessions', /* |-------------------------------------------------------------------------- | Session Database Connection |-------------------------------------------------------------------------- | | When using the "database" or "redis" session drivers, you may specify a | connection that should be used to manage these sessions. This should | correspond to a connection in your database configuration options. | */ 'connection' => null, /* |-------------------------------------------------------------------------- | Session Database Table |-------------------------------------------------------------------------- | | When using the "database" session driver, you may specify the table we | should use to manage the sessions. Of course, a sensible default is | provided for you; however, you are free to change this as needed. | */ 'table' => 'sessions', /* |-------------------------------------------------------------------------- | Session Sweeping Lottery |-------------------------------------------------------------------------- | | Some session drivers must manually sweep their storage location to get | rid of old sessions from storage. Here are the chances that it will | happen on a given request. By default, the odds are 2 out of 100. | */ 'lottery' => [2, 100], /* |-------------------------------------------------------------------------- | Session Cookie Name |-------------------------------------------------------------------------- | | Here you may change the name of the cookie used to identify a session | instance by ID. The name specified here will get used every time a | new session cookie is created by the framework for every driver. | */ 'cookie' => 'laravel_session', /* |-------------------------------------------------------------------------- | Session Cookie Path |-------------------------------------------------------------------------- | | The session cookie path determines the path for which the cookie will | be regarded as available. Typically, this will be the root path of | your application but you are free to change this when necessary. | */ 'path' => '/', /* |-------------------------------------------------------------------------- | Session Cookie Domain |-------------------------------------------------------------------------- | | Here you may change the domain of the cookie used to identify a session | in your application. This will determine which domains the cookie is | available to in your application. A sensible default has been set. | */ 'domain' => null, /* |-------------------------------------------------------------------------- | HTTPS Only Cookies |-------------------------------------------------------------------------- | | By setting this option to true, session cookies will only be sent back | to the server if the browser has a HTTPS connection. This will keep | the cookie from being sent to you if it can not be done securely. | */ 'secure' => false, ]; ================================================ FILE: config/view.php ================================================ [ realpath(base_path('resources/views')) ], /* |-------------------------------------------------------------------------- | Compiled View Path |-------------------------------------------------------------------------- | | This option determines where all the compiled Blade templates will be | stored for your application. Typically, this is within the storage | directory. However, as usual, you are free to change this value. | */ 'compiled' => realpath(storage_path().'/framework/views'), ]; ================================================ FILE: database/.gitignore ================================================ *.sqlite ================================================ FILE: database/migrations/.gitkeep ================================================ ================================================ FILE: database/migrations/2014_10_12_000000_create_users_table.php ================================================ increments('id'); $table->string('name'); $table->string('email')->unique(); $table->string('password', 60); $table->rememberToken(); $table->string('api_token', 60)->unique(); $table->timestamps(); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::drop('users'); } } ================================================ FILE: database/migrations/2014_10_12_100000_create_password_resets_table.php ================================================ string('email')->index(); $table->string('token')->index(); $table->timestamp('created_at'); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::drop('password_resets'); } } ================================================ FILE: database/migrations/2015_02_07_172606_create_roles_table.php ================================================ increments('id'); $table->string('name')->unique(); $table->string('slug')->unique(); $table->text('description')->nullable(); $table->timestamps(); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::drop('roles'); } } ================================================ FILE: database/migrations/2015_02_07_172633_create_role_user_table.php ================================================ increments('id'); $table->integer('role_id')->unsigned()->index(); $table->foreign('role_id')->references('id')->on('roles')->onDelete('cascade'); $table->integer('user_id')->unsigned()->index(); $table->foreign('user_id')->references('id')->on('users')->onDelete('cascade'); $table->timestamps(); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::drop('role_user'); } } ================================================ FILE: database/migrations/2015_02_07_172649_create_permissions_table.php ================================================ increments('id'); $table->integer('inherit_id')->unsigned()->nullable()->index(); $table->foreign('inherit_id')->references('id')->on('permissions'); $table->string('name')->index(); $table->string('slug')->index(); $table->text('description')->nullable(); $table->timestamps(); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::drop('permissions'); } } ================================================ FILE: database/migrations/2015_02_07_172657_create_permission_role_table.php ================================================ increments('id'); $table->integer('permission_id')->unsigned()->index(); $table->foreign('permission_id')->references('id')->on('permissions')->onDelete('cascade'); $table->integer('role_id')->unsigned()->index(); $table->foreign('role_id')->references('id')->on('roles')->onDelete('cascade'); $table->timestamps(); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::drop('permission_role'); } } ================================================ FILE: database/migrations/2015_02_17_152439_create_permission_user_table.php ================================================ increments('id'); $table->integer('permission_id')->unsigned()->index(); $table->foreign('permission_id')->references('id')->on('permissions')->onDelete('cascade'); $table->integer('user_id')->unsigned()->index(); $table->foreign('user_id')->references('id')->on('users')->onDelete('cascade'); $table->timestamps(); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::drop('permission_user'); } } ================================================ FILE: database/migrations/2015_02_22_123238_create_recipes_table.php ================================================ increments('id'); $table->string('name'); $table->text('description'); $table->text('body'); $table->timestamps(); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::drop('recipes'); } } ================================================ FILE: database/migrations/2015_02_23_123238_create_servers_table.php ================================================ increments('id'); $table->string('name'); $table->text('description'); $table->text('body'); $table->timestamps(); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::drop('servers'); } } ================================================ FILE: database/migrations/2015_02_28_164641_create_projects_table.php ================================================ increments('id'); $table->string('name'); $table->string('stage')->nullable(); $table->integer('server_id')->unsigned(); $table->string('repository'); $table->string('email_notification_recipient')->nullable(); $table->text('attributes'); $table->integer('days_to_keep_deployments')->unsigned()->nullable(); $table->integer('max_number_of_deployments_to_keep')->unsigned()->nullable(); $table->tinyInteger('keep_last_deployment')->unsigned(); $table->string('github_webhook_secret')->nullable(); $table->integer('github_webhook_user_id')->unsigned()->nullable(); $table->timestamps(); $table->foreign('server_id') ->references('id') ->on('servers'); $table->foreign('github_webhook_user_id') ->references('id') ->on('users') ->onDelete('set null'); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::drop('projects'); } } ================================================ FILE: database/migrations/2015_03_01_084552_create_deployments_table.php ================================================ increments('id'); $table->integer('project_id')->unsigned(); $table->integer('number')->unsigned(); $table->string('task'); $table->tinyInteger('status')->unsigned()->nullable(); $table->text('message')->nullable(); $table->integer('user_id')->unsigned(); $table->timestamps(); $table->foreign('project_id') ->references('id') ->on('projects') ->onDelete('cascade'); $table->unique(['project_id', 'number']); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::drop('deployments'); } } ================================================ FILE: database/migrations/2015_05_28_132914_create_max_deployments_table.php ================================================ increments('id'); $table->integer('project_id')->unsigned(); $table->integer('number')->unsigned()->default(0); $table->timestamps(); $table->foreign('project_id') ->references('id') ->on('projects') ->onDelete('cascade'); $table->unique('project_id'); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::drop('max_deployments'); } } ================================================ FILE: database/migrations/2015_06_16_143119_create_jobs_table.php ================================================ bigIncrements('id'); $table->string('queue'); $table->text('payload'); $table->tinyInteger('attempts')->unsigned(); $table->tinyInteger('reserved')->unsigned(); $table->unsignedInteger('reserved_at')->nullable(); $table->unsignedInteger('available_at'); $table->unsignedInteger('created_at'); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::drop('jobs'); } } ================================================ FILE: database/migrations/2015_08_10_143119_create_project_recipe_table.php ================================================ increments('id'); $table->integer('project_id')->unsigned(); $table->integer('recipe_id')->unsigned(); $table->tinyInteger('recipe_order')->unsigned(); $table->foreign('project_id') ->references('id') ->on('projects') ->onDelete('cascade'); $table->foreign('recipe_id') ->references('id') ->on('recipes') ->onDelete('cascade'); $table->unique(['project_id', 'recipe_id', 'recipe_order']); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::drop('project_recipe'); } } ================================================ FILE: database/migrations/2016_08_24_041250_create_settings_table.php ================================================ increments('id'); $table->string('type')->unique(); $table->text('attributes'); $table->timestamps(); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::drop('settings'); } } ================================================ FILE: database/seeds/.gitkeep ================================================ ================================================ FILE: database/seeds/DatabaseSeeder.php ================================================ call('UserTableSeeder'); $this->call('RecipeTableSeeder'); $this->call('RoleTableSeeder'); $this->call('PermissionTableSeeder'); $this->call('PermissionRoleTableSeeder'); $this->call('RoleUserTableSeeder'); } } ================================================ FILE: database/seeds/PermissionRoleTableSeeder.php ================================================ delete(); $roleAdmin = Role::where('name', 'Administrator') ->where('slug', 'administrator') ->first(); $roleAdmin->assignPermission([ 'project', 'deployment', 'recipe', 'server', 'user', 'setting', ]); $roleDeveloper = Role::where('name', 'Developer') ->where('slug', 'developer') ->first(); $roleDeveloper->assignPermission([ 'project', 'deployment', 'recipe', 'server', 'user.developer', 'setting.developer', ]); $roleModerator = Role::where('name', 'Moderator') ->where('slug', 'moderator') ->first(); $roleModerator->assignPermission([ 'project.moderator', 'deployment', 'recipe.moderator', 'server.moderator', 'user.moderator', 'setting.moderator', ]); } } ================================================ FILE: database/seeds/PermissionTableSeeder.php ================================================ delete(); // project $permission = new Permission; $permissionProject = $permission->create([ 'name' => 'project', 'slug' => [ 'create' => true, 'view' => true, 'update' => true, 'delete' => true, ], 'description' => 'Manage project permissions.', ]); $permission = new Permission; $permissionProjectModerator = $permission->create([ 'name' => 'project.moderator', 'slug' => [ 'create' => false, 'update' => false, 'delete' => false, ], 'inherit_id' => $permissionProject->getKey(), 'description' => 'Moderator project permissions.', ]); // deployment $permission = new Permission; $permissionDeployment = $permission->create([ 'name' => 'deployment', 'slug' => [ 'create' => true, 'view' => true, 'update' => true, 'delete' => true, ], 'description' => 'Manage deployment permissions.', ]); // recipe $permission = new Permission; $permissionRecipe = $permission->create([ 'name' => 'recipe', 'slug' => [ 'create' => true, 'view' => true, 'update' => true, 'delete' => true, ], 'description' => 'Manage recipe permissions.', ]); $permission = new Permission; $permissionRecipeModerator = $permission->create([ 'name' => 'recipe.moderator', 'slug' => [ 'create' => false, 'update' => false, 'delete' => false, ], 'inherit_id' => $permissionRecipe->getKey(), 'description' => 'Moderator recipe permissions.', ]); // server $permission = new Permission; $permissionServer = $permission->create([ 'name' => 'server', 'slug' => [ 'create' => true, 'view' => true, 'update' => true, 'delete' => true, ], 'description' => 'Manage server permissions.', ]); $permission = new Permission; $permissionServerModerator = $permission->create([ 'name' => 'server.moderator', 'slug' => [ 'create' => false, 'update' => false, 'delete' => false, ], 'inherit_id' => $permissionServer->getKey(), 'description' => 'Moderator server permissions.', ]); // user $permission = new Permission; $permissionUser = $permission->create([ 'name' => 'user', 'slug' => [ 'create' => true, 'view' => true, 'update' => true, 'delete' => true, ], 'description' => 'Manage user permissions.', ]); $permission = new Permission; $permissionUserDeveloper = $permission->create([ 'name' => 'user.developer', 'slug' => [ 'create' => false, 'view' => false, 'update' => false, 'delete' => false, ], 'inherit_id' => $permissionUser->getKey(), 'description' => 'Developer user permissions.', ]); $permission = new Permission; $permissionUserModerator = $permission->create([ 'name' => 'user.moderator', 'slug' => [ 'create' => false, 'view' => false, 'update' => false, 'delete' => false, ], 'inherit_id' => $permissionUser->getKey(), 'description' => 'Moderator user permissions.', ]); // setting $permission = new Permission; $permissionSetting = $permission->create([ 'name' => 'setting', 'slug' => [ 'create' => true, 'view' => true, 'update' => true, 'delete' => true, ], 'description' => 'Manage setting permissions.', ]); $permission = new Permission; $permissionSettingDeveloper = $permission->create([ 'name' => 'setting.developer', 'slug' => [ 'create' => false, 'view' => false, 'update' => false, 'delete' => false, ], 'inherit_id' => $permissionSetting->getKey(), 'description' => 'Developer setting permissions.', ]); $permission = new Permission; $permissionSettingModerator = $permission->create([ 'name' => 'setting.moderator', 'slug' => [ 'create' => false, 'view' => false, 'update' => false, 'delete' => false, ], 'inherit_id' => $permissionSetting->getKey(), 'description' => 'Moderator setting permissions.', ]); } } ================================================ FILE: database/seeds/RecipeTableSeeder.php ================================================ delete(); $deployerRecipes = [ 'cakephp' => [ 'name' => 'deployer-cakephp-recipe', 'description' => 'This recipe is specifically for deploying CakePHP 3 projects.', 'body' => << [ 'name' => 'deployer-codeigniter-recipe', 'description' => 'This recipe is specifically for deploying CodeIgniter projects.', 'body' => << [ 'name' => 'deployer-common-recipe', 'description' => 'This recipe is the basis of all other recipes', 'body' => << [ 'name' => 'deployer-composer-recipe', 'description' => 'This recipe is specifically for deploying projects which uses composer.', 'body' => << [ 'name' => 'deployer-drupal7-recipe', 'description' => 'This recipe is specifically for deploying Drupal 7 projects.', 'body' => << [ 'name' => 'deployer-drupal8-recipe', 'description' => 'This recipe is specifically for deploying Drupal 8 projects.', 'body' => << [ 'name' => 'deployer-fuelphp-recipe', 'description' => 'This recipe is specifically for deploying FuelPHP projects.', 'body' => << [ 'name' => 'deployer-laravel-recipe', 'description' => 'This recipe is specifically for deploying Laravel projects.', 'body' => << [ 'name' => 'deployer-magento-recipe', 'description' => 'This recipe is specifically for deploying Magento projects.', 'body' => << [ 'name' => 'deployer-symfony-recipe', 'description' => 'This recipe is specifically for deploying Symfony projects.', 'body' => << [ 'name' => 'deployer-symfony3-recipe', 'description' => 'This recipe is specifically for deploying Symfony 3 projects.', 'body' => << [ 'name' => 'deployer-wordpress-recipe', 'description' => 'This recipe is specifically for deploying WordPress projects.', 'body' => << [ 'name' => 'deployer-yii-recipe', 'description' => 'This recipe is specifically for deploying Yii projects.', 'body' => << [ 'name' => 'deployer-yii2-app-advanced-recipe', 'description' => 'This recipe is specifically for deploying Yii 2 Advanced Project Template projects.', 'body' => << [ 'name' => 'deployer-yii2-app-basic-recipe', 'description' => 'This recipe is specifically for deploying Yii 2 Basic Project Template projects.', 'body' => << [ 'name' => 'deployer-zend_framework-recipe', 'description' => 'This recipe is specifically for deploying Zend Framework projects.', 'body' => << $recipe['name'], 'description' => $recipe['description'], 'body' => $recipe['body'], ]); } } } ================================================ FILE: database/seeds/RoleTableSeeder.php ================================================ delete(); $role = new Role; $roleAdmin = $role->create([ 'name' => 'Administrator', 'slug' => 'administrator', 'description' => 'Manage administration privileges.', ]); $role = new Role; $roleDeveloper = $role->create([ 'name' => 'Developer', 'slug' => 'developer', 'description' => 'Manage developer privileges.', ]); $role = new Role; $roleModerator = $role->create([ 'name' => 'Moderator', 'slug' => 'moderator', 'description' => 'Manage moderator privileges.', ]); } } ================================================ FILE: database/seeds/RoleUserTableSeeder.php ================================================ delete(); $user = User::where('email', 'admin@example.com')->first(); $user->assignRole('administrator'); } } ================================================ FILE: database/seeds/UserTableSeeder.php ================================================ delete(); User::create([ 'name' => 'admin', 'email' => 'admin@example.com', 'password' => Hash::make('admin'), ]); } } ================================================ FILE: gulpfile.js ================================================ var elixir = require('laravel-elixir'); /* |-------------------------------------------------------------------------- | Elixir Asset Management |-------------------------------------------------------------------------- | | Elixir provides a clean, fluent API for defining some basic Gulp tasks | for your Laravel application. By default, we are compiling the Less | file for our application, as well as publishing vendor resources. | */ elixir(function(mix) { mix.less('app.less'); }); ================================================ FILE: package.json ================================================ { "private": true, "devDependencies": { "gulp": "^3.8.8", "laravel-elixir": "*" } } ================================================ FILE: phpspec.yml ================================================ suites: main: namespace: App psr4_prefix: App src_path: app ================================================ FILE: phpunit.xml ================================================ ./tests ./app ./app/Providers ./app ./app/Console/Commands/Inspire.php ./app/Console/Kernel.php ./app/Events/Event.php ./app/Exceptions/Handler.php ./app/Http/Controllers/Auth/AuthController.php ./app/Http/Controllers/Auth/PasswordController.php ./app/Http/Controllers/Controller.php ./app/Http/Controllers/HomeController.php ./app/Http/Controllers/WelcomeController.php ./app/Http/Kernel.php ./app/Http/Middleware/Authenticate.php ./app/Http/Middleware/RedirectIfAuthenticated.php ./app/Http/Middleware/VerifyCsrfToken.php ./app/Http/Requests/Request.php ./app/Http/breadcrumbs.php ./app/Http/routes.php ./app/Jobs/Job.php ================================================ FILE: public/.gitignore ================================================ /vendor ================================================ FILE: public/.htaccess ================================================ Options -MultiViews RewriteEngine On # Redirect Trailing Slashes... RewriteRule ^(.*)/$ /$1 [L,R=301] # Handle Front Controller... RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^ index.php [L] ================================================ FILE: public/css/app.css ================================================ /*! normalize.css v3.0.2 | MIT License | git.io/normalize */ html { font-family: sans-serif; -ms-text-size-adjust: 100%; -webkit-text-size-adjust: 100%; } body { margin: 0; } article, aside, details, figcaption, figure, footer, header, hgroup, main, menu, nav, section, summary { display: block; } audio, canvas, progress, video { display: inline-block; vertical-align: baseline; } audio:not([controls]) { display: none; height: 0; } [hidden], template { display: none; } a { background-color: transparent; } a:active, a:hover { outline: 0; } abbr[title] { border-bottom: 1px dotted; } b, strong { font-weight: bold; } dfn { font-style: italic; } h1 { font-size: 2em; margin: 0.67em 0; } mark { background: #ff0; color: #000; } small { font-size: 80%; } sub, sup { font-size: 75%; line-height: 0; position: relative; vertical-align: baseline; } sup { top: -0.5em; } sub { bottom: -0.25em; } img { border: 0; } svg:not(:root) { overflow: hidden; } figure { margin: 1em 40px; } hr { box-sizing: content-box; height: 0; } pre { overflow: auto; } code, kbd, pre, samp { font-family: monospace, monospace; font-size: 1em; } button, input, optgroup, select, textarea { color: inherit; font: inherit; margin: 0; } button { overflow: visible; } button, select { text-transform: none; } button, html input[type="button"], input[type="reset"], input[type="submit"] { -webkit-appearance: button; cursor: pointer; } button[disabled], html input[disabled] { cursor: default; } button::-moz-focus-inner, input::-moz-focus-inner { border: 0; padding: 0; } input { line-height: normal; } input[type="checkbox"], input[type="radio"] { box-sizing: border-box; padding: 0; } input[type="number"]::-webkit-inner-spin-button, input[type="number"]::-webkit-outer-spin-button { height: auto; } input[type="search"] { -webkit-appearance: textfield; box-sizing: content-box; } input[type="search"]::-webkit-search-cancel-button, input[type="search"]::-webkit-search-decoration { -webkit-appearance: none; } fieldset { border: 1px solid #c0c0c0; margin: 0 2px; padding: 0.35em 0.625em 0.75em; } legend { border: 0; padding: 0; } textarea { overflow: auto; } optgroup { font-weight: bold; } table { border-collapse: collapse; border-spacing: 0; } td, th { padding: 0; } /*! Source: https://github.com/h5bp/html5-boilerplate/blob/master/src/css/main.css */ @media print { *, *:before, *:after { background: transparent !important; color: #000 !important; box-shadow: none !important; text-shadow: none !important; } a, a:visited { text-decoration: underline; } a[href]:after { content: " (" attr(href) ")"; } abbr[title]:after { content: " (" attr(title) ")"; } a[href^="#"]:after, a[href^="javascript:"]:after { content: ""; } pre, blockquote { border: 1px solid #999; page-break-inside: avoid; } thead { display: table-header-group; } tr, img { page-break-inside: avoid; } img { max-width: 100% !important; } p, h2, h3 { orphans: 3; widows: 3; } h2, h3 { page-break-after: avoid; } select { background: #fff !important; } .navbar { display: none; } .btn > .caret, .dropup > .btn > .caret { border-top-color: #000 !important; } .label { border: 1px solid #000; } .table { border-collapse: collapse !important; } .table td, .table th { background-color: #fff !important; } .table-bordered th, .table-bordered td { border: 1px solid #ddd !important; } } @font-face { font-family: 'Glyphicons Halflings'; src: url('../fonts/glyphicons-halflings-regular.eot'); src: url('../fonts/glyphicons-halflings-regular.eot?#iefix') format('embedded-opentype'), url('../fonts/glyphicons-halflings-regular.woff') format('woff'), url('../fonts/glyphicons-halflings-regular.ttf') format('truetype'), url('../fonts/glyphicons-halflings-regular.svg#glyphicons_halflingsregular') format('svg'); } .glyphicon { position: relative; top: 1px; display: inline-block; font-family: 'Glyphicons Halflings'; font-style: normal; font-weight: normal; line-height: 1; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; } .glyphicon-asterisk:before { content: "\2a"; } .glyphicon-plus:before { content: "\2b"; } .glyphicon-euro:before, .glyphicon-eur:before { content: "\20ac"; } .glyphicon-minus:before { content: "\2212"; } .glyphicon-cloud:before { content: "\2601"; } .glyphicon-envelope:before { content: "\2709"; } .glyphicon-pencil:before { content: "\270f"; } .glyphicon-glass:before { content: "\e001"; } .glyphicon-music:before { content: "\e002"; } .glyphicon-search:before { content: "\e003"; } .glyphicon-heart:before { content: "\e005"; } .glyphicon-star:before { content: "\e006"; } .glyphicon-star-empty:before { content: "\e007"; } .glyphicon-user:before { content: "\e008"; } .glyphicon-film:before { content: "\e009"; } .glyphicon-th-large:before { content: "\e010"; } .glyphicon-th:before { content: "\e011"; } .glyphicon-th-list:before { content: "\e012"; } .glyphicon-ok:before { content: "\e013"; } .glyphicon-remove:before { content: "\e014"; } .glyphicon-zoom-in:before { content: "\e015"; } .glyphicon-zoom-out:before { content: "\e016"; } .glyphicon-off:before { content: "\e017"; } .glyphicon-signal:before { content: "\e018"; } .glyphicon-cog:before { content: "\e019"; } .glyphicon-trash:before { content: "\e020"; } .glyphicon-home:before { content: "\e021"; } .glyphicon-file:before { content: "\e022"; } .glyphicon-time:before { content: "\e023"; } .glyphicon-road:before { content: "\e024"; } .glyphicon-download-alt:before { content: "\e025"; } .glyphicon-download:before { content: "\e026"; } .glyphicon-upload:before { content: "\e027"; } .glyphicon-inbox:before { content: "\e028"; } .glyphicon-play-circle:before { content: "\e029"; } .glyphicon-repeat:before { content: "\e030"; } .glyphicon-refresh:before { content: "\e031"; } .glyphicon-list-alt:before { content: "\e032"; } .glyphicon-lock:before { content: "\e033"; } .glyphicon-flag:before { content: "\e034"; } .glyphicon-headphones:before { content: "\e035"; } .glyphicon-volume-off:before { content: "\e036"; } .glyphicon-volume-down:before { content: "\e037"; } .glyphicon-volume-up:before { content: "\e038"; } .glyphicon-qrcode:before { content: "\e039"; } .glyphicon-barcode:before { content: "\e040"; } .glyphicon-tag:before { content: "\e041"; } .glyphicon-tags:before { content: "\e042"; } .glyphicon-book:before { content: "\e043"; } .glyphicon-bookmark:before { content: "\e044"; } .glyphicon-print:before { content: "\e045"; } .glyphicon-camera:before { content: "\e046"; } .glyphicon-font:before { content: "\e047"; } .glyphicon-bold:before { content: "\e048"; } .glyphicon-italic:before { content: "\e049"; } .glyphicon-text-height:before { content: "\e050"; } .glyphicon-text-width:before { content: "\e051"; } .glyphicon-align-left:before { content: "\e052"; } .glyphicon-align-center:before { content: "\e053"; } .glyphicon-align-right:before { content: "\e054"; } .glyphicon-align-justify:before { content: "\e055"; } .glyphicon-list:before { content: "\e056"; } .glyphicon-indent-left:before { content: "\e057"; } .glyphicon-indent-right:before { content: "\e058"; } .glyphicon-facetime-video:before { content: "\e059"; } .glyphicon-picture:before { content: "\e060"; } .glyphicon-map-marker:before { content: "\e062"; } .glyphicon-adjust:before { content: "\e063"; } .glyphicon-tint:before { content: "\e064"; } .glyphicon-edit:before { content: "\e065"; } .glyphicon-share:before { content: "\e066"; } .glyphicon-check:before { content: "\e067"; } .glyphicon-move:before { content: "\e068"; } .glyphicon-step-backward:before { content: "\e069"; } .glyphicon-fast-backward:before { content: "\e070"; } .glyphicon-backward:before { content: "\e071"; } .glyphicon-play:before { content: "\e072"; } .glyphicon-pause:before { content: "\e073"; } .glyphicon-stop:before { content: "\e074"; } .glyphicon-forward:before { content: "\e075"; } .glyphicon-fast-forward:before { content: "\e076"; } .glyphicon-step-forward:before { content: "\e077"; } .glyphicon-eject:before { content: "\e078"; } .glyphicon-chevron-left:before { content: "\e079"; } .glyphicon-chevron-right:before { content: "\e080"; } .glyphicon-plus-sign:before { content: "\e081"; } .glyphicon-minus-sign:before { content: "\e082"; } .glyphicon-remove-sign:before { content: "\e083"; } .glyphicon-ok-sign:before { content: "\e084"; } .glyphicon-question-sign:before { content: "\e085"; } .glyphicon-info-sign:before { content: "\e086"; } .glyphicon-screenshot:before { content: "\e087"; } .glyphicon-remove-circle:before { content: "\e088"; } .glyphicon-ok-circle:before { content: "\e089"; } .glyphicon-ban-circle:before { content: "\e090"; } .glyphicon-arrow-left:before { content: "\e091"; } .glyphicon-arrow-right:before { content: "\e092"; } .glyphicon-arrow-up:before { content: "\e093"; } .glyphicon-arrow-down:before { content: "\e094"; } .glyphicon-share-alt:before { content: "\e095"; } .glyphicon-resize-full:before { content: "\e096"; } .glyphicon-resize-small:before { content: "\e097"; } .glyphicon-exclamation-sign:before { content: "\e101"; } .glyphicon-gift:before { content: "\e102"; } .glyphicon-leaf:before { content: "\e103"; } .glyphicon-fire:before { content: "\e104"; } .glyphicon-eye-open:before { content: "\e105"; } .glyphicon-eye-close:before { content: "\e106"; } .glyphicon-warning-sign:before { content: "\e107"; } .glyphicon-plane:before { content: "\e108"; } .glyphicon-calendar:before { content: "\e109"; } .glyphicon-random:before { content: "\e110"; } .glyphicon-comment:before { content: "\e111"; } .glyphicon-magnet:before { content: "\e112"; } .glyphicon-chevron-up:before { content: "\e113"; } .glyphicon-chevron-down:before { content: "\e114"; } .glyphicon-retweet:before { content: "\e115"; } .glyphicon-shopping-cart:before { content: "\e116"; } .glyphicon-folder-close:before { content: "\e117"; } .glyphicon-folder-open:before { content: "\e118"; } .glyphicon-resize-vertical:before { content: "\e119"; } .glyphicon-resize-horizontal:before { content: "\e120"; } .glyphicon-hdd:before { content: "\e121"; } .glyphicon-bullhorn:before { content: "\e122"; } .glyphicon-bell:before { content: "\e123"; } .glyphicon-certificate:before { content: "\e124"; } .glyphicon-thumbs-up:before { content: "\e125"; } .glyphicon-thumbs-down:before { content: "\e126"; } .glyphicon-hand-right:before { content: "\e127"; } .glyphicon-hand-left:before { content: "\e128"; } .glyphicon-hand-up:before { content: "\e129"; } .glyphicon-hand-down:before { content: "\e130"; } .glyphicon-circle-arrow-right:before { content: "\e131"; } .glyphicon-circle-arrow-left:before { content: "\e132"; } .glyphicon-circle-arrow-up:before { content: "\e133"; } .glyphicon-circle-arrow-down:before { content: "\e134"; } .glyphicon-globe:before { content: "\e135"; } .glyphicon-wrench:before { content: "\e136"; } .glyphicon-tasks:before { content: "\e137"; } .glyphicon-filter:before { content: "\e138"; } .glyphicon-briefcase:before { content: "\e139"; } .glyphicon-fullscreen:before { content: "\e140"; } .glyphicon-dashboard:before { content: "\e141"; } .glyphicon-paperclip:before { content: "\e142"; } .glyphicon-heart-empty:before { content: "\e143"; } .glyphicon-link:before { content: "\e144"; } .glyphicon-phone:before { content: "\e145"; } .glyphicon-pushpin:before { content: "\e146"; } .glyphicon-usd:before { content: "\e148"; } .glyphicon-gbp:before { content: "\e149"; } .glyphicon-sort:before { content: "\e150"; } .glyphicon-sort-by-alphabet:before { content: "\e151"; } .glyphicon-sort-by-alphabet-alt:before { content: "\e152"; } .glyphicon-sort-by-order:before { content: "\e153"; } .glyphicon-sort-by-order-alt:before { content: "\e154"; } .glyphicon-sort-by-attributes:before { content: "\e155"; } .glyphicon-sort-by-attributes-alt:before { content: "\e156"; } .glyphicon-unchecked:before { content: "\e157"; } .glyphicon-expand:before { content: "\e158"; } .glyphicon-collapse-down:before { content: "\e159"; } .glyphicon-collapse-up:before { content: "\e160"; } .glyphicon-log-in:before { content: "\e161"; } .glyphicon-flash:before { content: "\e162"; } .glyphicon-log-out:before { content: "\e163"; } .glyphicon-new-window:before { content: "\e164"; } .glyphicon-record:before { content: "\e165"; } .glyphicon-save:before { content: "\e166"; } .glyphicon-open:before { content: "\e167"; } .glyphicon-saved:before { content: "\e168"; } .glyphicon-import:before { content: "\e169"; } .glyphicon-export:before { content: "\e170"; } .glyphicon-send:before { content: "\e171"; } .glyphicon-floppy-disk:before { content: "\e172"; } .glyphicon-floppy-saved:before { content: "\e173"; } .glyphicon-floppy-remove:before { content: "\e174"; } .glyphicon-floppy-save:before { content: "\e175"; } .glyphicon-floppy-open:before { content: "\e176"; } .glyphicon-credit-card:before { content: "\e177"; } .glyphicon-transfer:before { content: "\e178"; } .glyphicon-cutlery:before { content: "\e179"; } .glyphicon-header:before { content: "\e180"; } .glyphicon-compressed:before { content: "\e181"; } .glyphicon-earphone:before { content: "\e182"; } .glyphicon-phone-alt:before { content: "\e183"; } .glyphicon-tower:before { content: "\e184"; } .glyphicon-stats:before { content: "\e185"; } .glyphicon-sd-video:before { content: "\e186"; } .glyphicon-hd-video:before { content: "\e187"; } .glyphicon-subtitles:before { content: "\e188"; } .glyphicon-sound-stereo:before { content: "\e189"; } .glyphicon-sound-dolby:before { content: "\e190"; } .glyphicon-sound-5-1:before { content: "\e191"; } .glyphicon-sound-6-1:before { content: "\e192"; } .glyphicon-sound-7-1:before { content: "\e193"; } .glyphicon-copyright-mark:before { content: "\e194"; } .glyphicon-registration-mark:before { content: "\e195"; } .glyphicon-cloud-download:before { content: "\e197"; } .glyphicon-cloud-upload:before { content: "\e198"; } .glyphicon-tree-conifer:before { content: "\e199"; } .glyphicon-tree-deciduous:before { content: "\e200"; } .glyphicon-copy:before { content: "\e205"; } * { box-sizing: border-box; } *:before, *:after { box-sizing: border-box; } html { font-size: 10px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); } body { font-family: "Roboto", Helvetica, Arial, sans-serif; font-size: 14px; line-height: 1.42857143; color: #333333; background-color: #ffffff; } input, button, select, textarea { font-family: inherit; font-size: inherit; line-height: inherit; } a { color: #337ab7; text-decoration: none; } a:hover, a:focus { color: #23527c; text-decoration: underline; } a:focus { outline: thin dotted; outline: 5px auto -webkit-focus-ring-color; outline-offset: -2px; } figure { margin: 0; } img { vertical-align: middle; } .img-responsive, .thumbnail > img, .thumbnail a > img, .carousel-inner > .item > img, .carousel-inner > .item > a > img { display: block; max-width: 100%; height: auto; } .img-rounded { border-radius: 6px; } .img-thumbnail { padding: 4px; line-height: 1.42857143; background-color: #ffffff; border: 1px solid #dddddd; border-radius: 4px; transition: all 0.2s ease-in-out; display: inline-block; max-width: 100%; height: auto; } .img-circle { border-radius: 50%; } hr { margin-top: 20px; margin-bottom: 20px; border: 0; border-top: 1px solid #eeeeee; } .sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); border: 0; } .sr-only-focusable:active, .sr-only-focusable:focus { position: static; width: auto; height: auto; margin: 0; overflow: visible; clip: auto; } h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 { font-family: inherit; font-weight: 500; line-height: 1.1; color: inherit; } h1 small, h2 small, h3 small, h4 small, h5 small, h6 small, .h1 small, .h2 small, .h3 small, .h4 small, .h5 small, .h6 small, h1 .small, h2 .small, h3 .small, h4 .small, h5 .small, h6 .small, .h1 .small, .h2 .small, .h3 .small, .h4 .small, .h5 .small, .h6 .small { font-weight: normal; line-height: 1; color: #777777; } h1, .h1, h2, .h2, h3, .h3 { margin-top: 20px; margin-bottom: 10px; } h1 small, .h1 small, h2 small, .h2 small, h3 small, .h3 small, h1 .small, .h1 .small, h2 .small, .h2 .small, h3 .small, .h3 .small { font-size: 65%; } h4, .h4, h5, .h5, h6, .h6 { margin-top: 10px; margin-bottom: 10px; } h4 small, .h4 small, h5 small, .h5 small, h6 small, .h6 small, h4 .small, .h4 .small, h5 .small, .h5 .small, h6 .small, .h6 .small { font-size: 75%; } h1, .h1 { font-size: 36px; } h2, .h2 { font-size: 30px; } h3, .h3 { font-size: 24px; } h4, .h4 { font-size: 18px; } h5, .h5 { font-size: 14px; } h6, .h6 { font-size: 12px; } p { margin: 0 0 10px; } .lead { margin-bottom: 20px; font-size: 16px; font-weight: 300; line-height: 1.4; } @media (min-width: 768px) { .lead { font-size: 21px; } } small, .small { font-size: 85%; } mark, .mark { background-color: #fcf8e3; padding: .2em; } .text-left { text-align: left; } .text-right { text-align: right; } .text-center { text-align: center; } .text-justify { text-align: justify; } .text-nowrap { white-space: nowrap; } .text-lowercase { text-transform: lowercase; } .text-uppercase { text-transform: uppercase; } .text-capitalize { text-transform: capitalize; } .text-muted { color: #777777; } .text-primary { color: #337ab7; } a.text-primary:hover { color: #286090; } .text-success { color: #3c763d; } a.text-success:hover { color: #2b542c; } .text-info { color: #31708f; } a.text-info:hover { color: #245269; } .text-warning { color: #8a6d3b; } a.text-warning:hover { color: #66512c; } .text-danger { color: #a94442; } a.text-danger:hover { color: #843534; } .bg-primary { color: #fff; background-color: #337ab7; } a.bg-primary:hover { background-color: #286090; } .bg-success { background-color: #dff0d8; } a.bg-success:hover { background-color: #c1e2b3; } .bg-info { background-color: #d9edf7; } a.bg-info:hover { background-color: #afd9ee; } .bg-warning { background-color: #fcf8e3; } a.bg-warning:hover { background-color: #f7ecb5; } .bg-danger { background-color: #f2dede; } a.bg-danger:hover { background-color: #e4b9b9; } .page-header { padding-bottom: 9px; margin: 40px 0 20px; border-bottom: 1px solid #eeeeee; } ul, ol { margin-top: 0; margin-bottom: 10px; } ul ul, ol ul, ul ol, ol ol { margin-bottom: 0; } .list-unstyled { padding-left: 0; list-style: none; } .list-inline { padding-left: 0; list-style: none; margin-left: -5px; } .list-inline > li { display: inline-block; padding-left: 5px; padding-right: 5px; } dl { margin-top: 0; margin-bottom: 20px; } dt, dd { line-height: 1.42857143; } dt { font-weight: bold; } dd { margin-left: 0; } @media (min-width: 768px) { .dl-horizontal dt { float: left; width: 160px; clear: left; text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .dl-horizontal dd { margin-left: 180px; } } abbr[title], abbr[data-original-title] { cursor: help; border-bottom: 1px dotted #777777; } .initialism { font-size: 90%; text-transform: uppercase; } blockquote { padding: 10px 20px; margin: 0 0 20px; font-size: 17.5px; border-left: 5px solid #eeeeee; } blockquote p:last-child, blockquote ul:last-child, blockquote ol:last-child { margin-bottom: 0; } blockquote footer, blockquote small, blockquote .small { display: block; font-size: 80%; line-height: 1.42857143; color: #777777; } blockquote footer:before, blockquote small:before, blockquote .small:before { content: '\2014 \00A0'; } .blockquote-reverse, blockquote.pull-right { padding-right: 15px; padding-left: 0; border-right: 5px solid #eeeeee; border-left: 0; text-align: right; } .blockquote-reverse footer:before, blockquote.pull-right footer:before, .blockquote-reverse small:before, blockquote.pull-right small:before, .blockquote-reverse .small:before, blockquote.pull-right .small:before { content: ''; } .blockquote-reverse footer:after, blockquote.pull-right footer:after, .blockquote-reverse small:after, blockquote.pull-right small:after, .blockquote-reverse .small:after, blockquote.pull-right .small:after { content: '\00A0 \2014'; } address { margin-bottom: 20px; font-style: normal; line-height: 1.42857143; } code, kbd, pre, samp { font-family: Menlo, Monaco, Consolas, "Courier New", monospace; } code { padding: 2px 4px; font-size: 90%; color: #c7254e; background-color: #f9f2f4; border-radius: 4px; } kbd { padding: 2px 4px; font-size: 90%; color: #ffffff; background-color: #333333; border-radius: 3px; box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.25); } kbd kbd { padding: 0; font-size: 100%; font-weight: bold; box-shadow: none; } pre { display: block; padding: 9.5px; margin: 0 0 10px; font-size: 13px; line-height: 1.42857143; word-break: break-all; word-wrap: break-word; color: #333333; background-color: #f5f5f5; border: 1px solid #cccccc; border-radius: 4px; } pre code { padding: 0; font-size: inherit; color: inherit; white-space: pre-wrap; background-color: transparent; border-radius: 0; } .pre-scrollable { max-height: 340px; overflow-y: scroll; } .container { margin-right: auto; margin-left: auto; padding-left: 15px; padding-right: 15px; } @media (min-width: 768px) { .container { width: 750px; } } @media (min-width: 992px) { .container { width: 970px; } } @media (min-width: 1200px) { .container { width: 1170px; } } .container-fluid { margin-right: auto; margin-left: auto; padding-left: 15px; padding-right: 15px; } .row { margin-left: -15px; margin-right: -15px; } .col-xs-1, .col-sm-1, .col-md-1, .col-lg-1, .col-xs-2, .col-sm-2, .col-md-2, .col-lg-2, .col-xs-3, .col-sm-3, .col-md-3, .col-lg-3, .col-xs-4, .col-sm-4, .col-md-4, .col-lg-4, .col-xs-5, .col-sm-5, .col-md-5, .col-lg-5, .col-xs-6, .col-sm-6, .col-md-6, .col-lg-6, .col-xs-7, .col-sm-7, .col-md-7, .col-lg-7, .col-xs-8, .col-sm-8, .col-md-8, .col-lg-8, .col-xs-9, .col-sm-9, .col-md-9, .col-lg-9, .col-xs-10, .col-sm-10, .col-md-10, .col-lg-10, .col-xs-11, .col-sm-11, .col-md-11, .col-lg-11, .col-xs-12, .col-sm-12, .col-md-12, .col-lg-12 { position: relative; min-height: 1px; padding-left: 15px; padding-right: 15px; } .col-xs-1, .col-xs-2, .col-xs-3, .col-xs-4, .col-xs-5, .col-xs-6, .col-xs-7, .col-xs-8, .col-xs-9, .col-xs-10, .col-xs-11, .col-xs-12 { float: left; } .col-xs-12 { width: 100%; } .col-xs-11 { width: 91.66666667%; } .col-xs-10 { width: 83.33333333%; } .col-xs-9 { width: 75%; } .col-xs-8 { width: 66.66666667%; } .col-xs-7 { width: 58.33333333%; } .col-xs-6 { width: 50%; } .col-xs-5 { width: 41.66666667%; } .col-xs-4 { width: 33.33333333%; } .col-xs-3 { width: 25%; } .col-xs-2 { width: 16.66666667%; } .col-xs-1 { width: 8.33333333%; } .col-xs-pull-12 { right: 100%; } .col-xs-pull-11 { right: 91.66666667%; } .col-xs-pull-10 { right: 83.33333333%; } .col-xs-pull-9 { right: 75%; } .col-xs-pull-8 { right: 66.66666667%; } .col-xs-pull-7 { right: 58.33333333%; } .col-xs-pull-6 { right: 50%; } .col-xs-pull-5 { right: 41.66666667%; } .col-xs-pull-4 { right: 33.33333333%; } .col-xs-pull-3 { right: 25%; } .col-xs-pull-2 { right: 16.66666667%; } .col-xs-pull-1 { right: 8.33333333%; } .col-xs-pull-0 { right: auto; } .col-xs-push-12 { left: 100%; } .col-xs-push-11 { left: 91.66666667%; } .col-xs-push-10 { left: 83.33333333%; } .col-xs-push-9 { left: 75%; } .col-xs-push-8 { left: 66.66666667%; } .col-xs-push-7 { left: 58.33333333%; } .col-xs-push-6 { left: 50%; } .col-xs-push-5 { left: 41.66666667%; } .col-xs-push-4 { left: 33.33333333%; } .col-xs-push-3 { left: 25%; } .col-xs-push-2 { left: 16.66666667%; } .col-xs-push-1 { left: 8.33333333%; } .col-xs-push-0 { left: auto; } .col-xs-offset-12 { margin-left: 100%; } .col-xs-offset-11 { margin-left: 91.66666667%; } .col-xs-offset-10 { margin-left: 83.33333333%; } .col-xs-offset-9 { margin-left: 75%; } .col-xs-offset-8 { margin-left: 66.66666667%; } .col-xs-offset-7 { margin-left: 58.33333333%; } .col-xs-offset-6 { margin-left: 50%; } .col-xs-offset-5 { margin-left: 41.66666667%; } .col-xs-offset-4 { margin-left: 33.33333333%; } .col-xs-offset-3 { margin-left: 25%; } .col-xs-offset-2 { margin-left: 16.66666667%; } .col-xs-offset-1 { margin-left: 8.33333333%; } .col-xs-offset-0 { margin-left: 0%; } @media (min-width: 768px) { .col-sm-1, .col-sm-2, .col-sm-3, .col-sm-4, .col-sm-5, .col-sm-6, .col-sm-7, .col-sm-8, .col-sm-9, .col-sm-10, .col-sm-11, .col-sm-12 { float: left; } .col-sm-12 { width: 100%; } .col-sm-11 { width: 91.66666667%; } .col-sm-10 { width: 83.33333333%; } .col-sm-9 { width: 75%; } .col-sm-8 { width: 66.66666667%; } .col-sm-7 { width: 58.33333333%; } .col-sm-6 { width: 50%; } .col-sm-5 { width: 41.66666667%; } .col-sm-4 { width: 33.33333333%; } .col-sm-3 { width: 25%; } .col-sm-2 { width: 16.66666667%; } .col-sm-1 { width: 8.33333333%; } .col-sm-pull-12 { right: 100%; } .col-sm-pull-11 { right: 91.66666667%; } .col-sm-pull-10 { right: 83.33333333%; } .col-sm-pull-9 { right: 75%; } .col-sm-pull-8 { right: 66.66666667%; } .col-sm-pull-7 { right: 58.33333333%; } .col-sm-pull-6 { right: 50%; } .col-sm-pull-5 { right: 41.66666667%; } .col-sm-pull-4 { right: 33.33333333%; } .col-sm-pull-3 { right: 25%; } .col-sm-pull-2 { right: 16.66666667%; } .col-sm-pull-1 { right: 8.33333333%; } .col-sm-pull-0 { right: auto; } .col-sm-push-12 { left: 100%; } .col-sm-push-11 { left: 91.66666667%; } .col-sm-push-10 { left: 83.33333333%; } .col-sm-push-9 { left: 75%; } .col-sm-push-8 { left: 66.66666667%; } .col-sm-push-7 { left: 58.33333333%; } .col-sm-push-6 { left: 50%; } .col-sm-push-5 { left: 41.66666667%; } .col-sm-push-4 { left: 33.33333333%; } .col-sm-push-3 { left: 25%; } .col-sm-push-2 { left: 16.66666667%; } .col-sm-push-1 { left: 8.33333333%; } .col-sm-push-0 { left: auto; } .col-sm-offset-12 { margin-left: 100%; } .col-sm-offset-11 { margin-left: 91.66666667%; } .col-sm-offset-10 { margin-left: 83.33333333%; } .col-sm-offset-9 { margin-left: 75%; } .col-sm-offset-8 { margin-left: 66.66666667%; } .col-sm-offset-7 { margin-left: 58.33333333%; } .col-sm-offset-6 { margin-left: 50%; } .col-sm-offset-5 { margin-left: 41.66666667%; } .col-sm-offset-4 { margin-left: 33.33333333%; } .col-sm-offset-3 { margin-left: 25%; } .col-sm-offset-2 { margin-left: 16.66666667%; } .col-sm-offset-1 { margin-left: 8.33333333%; } .col-sm-offset-0 { margin-left: 0%; } } @media (min-width: 992px) { .col-md-1, .col-md-2, .col-md-3, .col-md-4, .col-md-5, .col-md-6, .col-md-7, .col-md-8, .col-md-9, .col-md-10, .col-md-11, .col-md-12 { float: left; } .col-md-12 { width: 100%; } .col-md-11 { width: 91.66666667%; } .col-md-10 { width: 83.33333333%; } .col-md-9 { width: 75%; } .col-md-8 { width: 66.66666667%; } .col-md-7 { width: 58.33333333%; } .col-md-6 { width: 50%; } .col-md-5 { width: 41.66666667%; } .col-md-4 { width: 33.33333333%; } .col-md-3 { width: 25%; } .col-md-2 { width: 16.66666667%; } .col-md-1 { width: 8.33333333%; } .col-md-pull-12 { right: 100%; } .col-md-pull-11 { right: 91.66666667%; } .col-md-pull-10 { right: 83.33333333%; } .col-md-pull-9 { right: 75%; } .col-md-pull-8 { right: 66.66666667%; } .col-md-pull-7 { right: 58.33333333%; } .col-md-pull-6 { right: 50%; } .col-md-pull-5 { right: 41.66666667%; } .col-md-pull-4 { right: 33.33333333%; } .col-md-pull-3 { right: 25%; } .col-md-pull-2 { right: 16.66666667%; } .col-md-pull-1 { right: 8.33333333%; } .col-md-pull-0 { right: auto; } .col-md-push-12 { left: 100%; } .col-md-push-11 { left: 91.66666667%; } .col-md-push-10 { left: 83.33333333%; } .col-md-push-9 { left: 75%; } .col-md-push-8 { left: 66.66666667%; } .col-md-push-7 { left: 58.33333333%; } .col-md-push-6 { left: 50%; } .col-md-push-5 { left: 41.66666667%; } .col-md-push-4 { left: 33.33333333%; } .col-md-push-3 { left: 25%; } .col-md-push-2 { left: 16.66666667%; } .col-md-push-1 { left: 8.33333333%; } .col-md-push-0 { left: auto; } .col-md-offset-12 { margin-left: 100%; } .col-md-offset-11 { margin-left: 91.66666667%; } .col-md-offset-10 { margin-left: 83.33333333%; } .col-md-offset-9 { margin-left: 75%; } .col-md-offset-8 { margin-left: 66.66666667%; } .col-md-offset-7 { margin-left: 58.33333333%; } .col-md-offset-6 { margin-left: 50%; } .col-md-offset-5 { margin-left: 41.66666667%; } .col-md-offset-4 { margin-left: 33.33333333%; } .col-md-offset-3 { margin-left: 25%; } .col-md-offset-2 { margin-left: 16.66666667%; } .col-md-offset-1 { margin-left: 8.33333333%; } .col-md-offset-0 { margin-left: 0%; } } @media (min-width: 1200px) { .col-lg-1, .col-lg-2, .col-lg-3, .col-lg-4, .col-lg-5, .col-lg-6, .col-lg-7, .col-lg-8, .col-lg-9, .col-lg-10, .col-lg-11, .col-lg-12 { float: left; } .col-lg-12 { width: 100%; } .col-lg-11 { width: 91.66666667%; } .col-lg-10 { width: 83.33333333%; } .col-lg-9 { width: 75%; } .col-lg-8 { width: 66.66666667%; } .col-lg-7 { width: 58.33333333%; } .col-lg-6 { width: 50%; } .col-lg-5 { width: 41.66666667%; } .col-lg-4 { width: 33.33333333%; } .col-lg-3 { width: 25%; } .col-lg-2 { width: 16.66666667%; } .col-lg-1 { width: 8.33333333%; } .col-lg-pull-12 { right: 100%; } .col-lg-pull-11 { right: 91.66666667%; } .col-lg-pull-10 { right: 83.33333333%; } .col-lg-pull-9 { right: 75%; } .col-lg-pull-8 { right: 66.66666667%; } .col-lg-pull-7 { right: 58.33333333%; } .col-lg-pull-6 { right: 50%; } .col-lg-pull-5 { right: 41.66666667%; } .col-lg-pull-4 { right: 33.33333333%; } .col-lg-pull-3 { right: 25%; } .col-lg-pull-2 { right: 16.66666667%; } .col-lg-pull-1 { right: 8.33333333%; } .col-lg-pull-0 { right: auto; } .col-lg-push-12 { left: 100%; } .col-lg-push-11 { left: 91.66666667%; } .col-lg-push-10 { left: 83.33333333%; } .col-lg-push-9 { left: 75%; } .col-lg-push-8 { left: 66.66666667%; } .col-lg-push-7 { left: 58.33333333%; } .col-lg-push-6 { left: 50%; } .col-lg-push-5 { left: 41.66666667%; } .col-lg-push-4 { left: 33.33333333%; } .col-lg-push-3 { left: 25%; } .col-lg-push-2 { left: 16.66666667%; } .col-lg-push-1 { left: 8.33333333%; } .col-lg-push-0 { left: auto; } .col-lg-offset-12 { margin-left: 100%; } .col-lg-offset-11 { margin-left: 91.66666667%; } .col-lg-offset-10 { margin-left: 83.33333333%; } .col-lg-offset-9 { margin-left: 75%; } .col-lg-offset-8 { margin-left: 66.66666667%; } .col-lg-offset-7 { margin-left: 58.33333333%; } .col-lg-offset-6 { margin-left: 50%; } .col-lg-offset-5 { margin-left: 41.66666667%; } .col-lg-offset-4 { margin-left: 33.33333333%; } .col-lg-offset-3 { margin-left: 25%; } .col-lg-offset-2 { margin-left: 16.66666667%; } .col-lg-offset-1 { margin-left: 8.33333333%; } .col-lg-offset-0 { margin-left: 0%; } } table { background-color: transparent; } caption { padding-top: 8px; padding-bottom: 8px; color: #777777; text-align: left; } th { text-align: left; } .table { width: 100%; max-width: 100%; margin-bottom: 20px; } .table > thead > tr > th, .table > tbody > tr > th, .table > tfoot > tr > th, .table > thead > tr > td, .table > tbody > tr > td, .table > tfoot > tr > td { padding: 8px; line-height: 1.42857143; vertical-align: top; border-top: 1px solid #dddddd; } .table > thead > tr > th { vertical-align: bottom; border-bottom: 2px solid #dddddd; } .table > caption + thead > tr:first-child > th, .table > colgroup + thead > tr:first-child > th, .table > thead:first-child > tr:first-child > th, .table > caption + thead > tr:first-child > td, .table > colgroup + thead > tr:first-child > td, .table > thead:first-child > tr:first-child > td { border-top: 0; } .table > tbody + tbody { border-top: 2px solid #dddddd; } .table .table { background-color: #ffffff; } .table-condensed > thead > tr > th, .table-condensed > tbody > tr > th, .table-condensed > tfoot > tr > th, .table-condensed > thead > tr > td, .table-condensed > tbody > tr > td, .table-condensed > tfoot > tr > td { padding: 5px; } .table-bordered { border: 1px solid #dddddd; } .table-bordered > thead > tr > th, .table-bordered > tbody > tr > th, .table-bordered > tfoot > tr > th, .table-bordered > thead > tr > td, .table-bordered > tbody > tr > td, .table-bordered > tfoot > tr > td { border: 1px solid #dddddd; } .table-bordered > thead > tr > th, .table-bordered > thead > tr > td { border-bottom-width: 2px; } .table-striped > tbody > tr:nth-child(odd) { background-color: #f9f9f9; } .table-hover > tbody > tr:hover { background-color: #f5f5f5; } table col[class*="col-"] { position: static; float: none; display: table-column; } table td[class*="col-"], table th[class*="col-"] { position: static; float: none; display: table-cell; } .table > thead > tr > td.active, .table > tbody > tr > td.active, .table > tfoot > tr > td.active, .table > thead > tr > th.active, .table > tbody > tr > th.active, .table > tfoot > tr > th.active, .table > thead > tr.active > td, .table > tbody > tr.active > td, .table > tfoot > tr.active > td, .table > thead > tr.active > th, .table > tbody > tr.active > th, .table > tfoot > tr.active > th { background-color: #f5f5f5; } .table-hover > tbody > tr > td.active:hover, .table-hover > tbody > tr > th.active:hover, .table-hover > tbody > tr.active:hover > td, .table-hover > tbody > tr:hover > .active, .table-hover > tbody > tr.active:hover > th { background-color: #e8e8e8; } .table > thead > tr > td.success, .table > tbody > tr > td.success, .table > tfoot > tr > td.success, .table > thead > tr > th.success, .table > tbody > tr > th.success, .table > tfoot > tr > th.success, .table > thead > tr.success > td, .table > tbody > tr.success > td, .table > tfoot > tr.success > td, .table > thead > tr.success > th, .table > tbody > tr.success > th, .table > tfoot > tr.success > th { background-color: #dff0d8; } .table-hover > tbody > tr > td.success:hover, .table-hover > tbody > tr > th.success:hover, .table-hover > tbody > tr.success:hover > td, .table-hover > tbody > tr:hover > .success, .table-hover > tbody > tr.success:hover > th { background-color: #d0e9c6; } .table > thead > tr > td.info, .table > tbody > tr > td.info, .table > tfoot > tr > td.info, .table > thead > tr > th.info, .table > tbody > tr > th.info, .table > tfoot > tr > th.info, .table > thead > tr.info > td, .table > tbody > tr.info > td, .table > tfoot > tr.info > td, .table > thead > tr.info > th, .table > tbody > tr.info > th, .table > tfoot > tr.info > th { background-color: #d9edf7; } .table-hover > tbody > tr > td.info:hover, .table-hover > tbody > tr > th.info:hover, .table-hover > tbody > tr.info:hover > td, .table-hover > tbody > tr:hover > .info, .table-hover > tbody > tr.info:hover > th { background-color: #c4e3f3; } .table > thead > tr > td.warning, .table > tbody > tr > td.warning, .table > tfoot > tr > td.warning, .table > thead > tr > th.warning, .table > tbody > tr > th.warning, .table > tfoot > tr > th.warning, .table > thead > tr.warning > td, .table > tbody > tr.warning > td, .table > tfoot > tr.warning > td, .table > thead > tr.warning > th, .table > tbody > tr.warning > th, .table > tfoot > tr.warning > th { background-color: #fcf8e3; } .table-hover > tbody > tr > td.warning:hover, .table-hover > tbody > tr > th.warning:hover, .table-hover > tbody > tr.warning:hover > td, .table-hover > tbody > tr:hover > .warning, .table-hover > tbody > tr.warning:hover > th { background-color: #faf2cc; } .table > thead > tr > td.danger, .table > tbody > tr > td.danger, .table > tfoot > tr > td.danger, .table > thead > tr > th.danger, .table > tbody > tr > th.danger, .table > tfoot > tr > th.danger, .table > thead > tr.danger > td, .table > tbody > tr.danger > td, .table > tfoot > tr.danger > td, .table > thead > tr.danger > th, .table > tbody > tr.danger > th, .table > tfoot > tr.danger > th { background-color: #f2dede; } .table-hover > tbody > tr > td.danger:hover, .table-hover > tbody > tr > th.danger:hover, .table-hover > tbody > tr.danger:hover > td, .table-hover > tbody > tr:hover > .danger, .table-hover > tbody > tr.danger:hover > th { background-color: #ebcccc; } .table-responsive { overflow-x: auto; min-height: 0.01%; } @media screen and (max-width: 767px) { .table-responsive { width: 100%; margin-bottom: 15px; overflow-y: hidden; -ms-overflow-style: -ms-autohiding-scrollbar; border: 1px solid #dddddd; } .table-responsive > .table { margin-bottom: 0; } .table-responsive > .table > thead > tr > th, .table-responsive > .table > tbody > tr > th, .table-responsive > .table > tfoot > tr > th, .table-responsive > .table > thead > tr > td, .table-responsive > .table > tbody > tr > td, .table-responsive > .table > tfoot > tr > td { white-space: nowrap; } .table-responsive > .table-bordered { border: 0; } .table-responsive > .table-bordered > thead > tr > th:first-child, .table-responsive > .table-bordered > tbody > tr > th:first-child, .table-responsive > .table-bordered > tfoot > tr > th:first-child, .table-responsive > .table-bordered > thead > tr > td:first-child, .table-responsive > .table-bordered > tbody > tr > td:first-child, .table-responsive > .table-bordered > tfoot > tr > td:first-child { border-left: 0; } .table-responsive > .table-bordered > thead > tr > th:last-child, .table-responsive > .table-bordered > tbody > tr > th:last-child, .table-responsive > .table-bordered > tfoot > tr > th:last-child, .table-responsive > .table-bordered > thead > tr > td:last-child, .table-responsive > .table-bordered > tbody > tr > td:last-child, .table-responsive > .table-bordered > tfoot > tr > td:last-child { border-right: 0; } .table-responsive > .table-bordered > tbody > tr:last-child > th, .table-responsive > .table-bordered > tfoot > tr:last-child > th, .table-responsive > .table-bordered > tbody > tr:last-child > td, .table-responsive > .table-bordered > tfoot > tr:last-child > td { border-bottom: 0; } } fieldset { padding: 0; margin: 0; border: 0; min-width: 0; } legend { display: block; width: 100%; padding: 0; margin-bottom: 20px; font-size: 21px; line-height: inherit; color: #333333; border: 0; border-bottom: 1px solid #e5e5e5; } label { display: inline-block; max-width: 100%; margin-bottom: 5px; font-weight: bold; } input[type="search"] { box-sizing: border-box; } input[type="radio"], input[type="checkbox"] { margin: 4px 0 0; margin-top: 1px \9; line-height: normal; } input[type="file"] { display: block; } input[type="range"] { display: block; width: 100%; } select[multiple], select[size] { height: auto; } input[type="file"]:focus, input[type="radio"]:focus, input[type="checkbox"]:focus { outline: thin dotted; outline: 5px auto -webkit-focus-ring-color; outline-offset: -2px; } output { display: block; padding-top: 7px; font-size: 14px; line-height: 1.42857143; color: #555555; } .form-control { display: block; width: 100%; height: 34px; padding: 6px 12px; font-size: 14px; line-height: 1.42857143; color: #555555; background-color: #ffffff; background-image: none; border: 1px solid #cccccc; border-radius: 4px; box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s; } .form-control:focus { border-color: #66afe9; outline: 0; box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102, 175, 233, 0.6); } .form-control::-moz-placeholder { color: #999999; opacity: 1; } .form-control:-ms-input-placeholder { color: #999999; } .form-control::-webkit-input-placeholder { color: #999999; } .form-control[disabled], .form-control[readonly], fieldset[disabled] .form-control { cursor: not-allowed; background-color: #eeeeee; opacity: 1; } textarea.form-control { height: auto; } input[type="search"] { -webkit-appearance: none; } @media screen and (-webkit-min-device-pixel-ratio: 0) { input[type="date"], input[type="time"], input[type="datetime-local"], input[type="month"] { line-height: 34px; } input[type="date"].input-sm, input[type="time"].input-sm, input[type="datetime-local"].input-sm, input[type="month"].input-sm { line-height: 30px; } input[type="date"].input-lg, input[type="time"].input-lg, input[type="datetime-local"].input-lg, input[type="month"].input-lg { line-height: 46px; } } .form-group { margin-bottom: 15px; } .radio, .checkbox { position: relative; display: block; margin-top: 10px; margin-bottom: 10px; } .radio label, .checkbox label { min-height: 20px; padding-left: 20px; margin-bottom: 0; font-weight: normal; cursor: pointer; } .radio input[type="radio"], .radio-inline input[type="radio"], .checkbox input[type="checkbox"], .checkbox-inline input[type="checkbox"] { position: absolute; margin-left: -20px; margin-top: 4px \9; } .radio + .radio, .checkbox + .checkbox { margin-top: -5px; } .radio-inline, .checkbox-inline { display: inline-block; padding-left: 20px; margin-bottom: 0; vertical-align: middle; font-weight: normal; cursor: pointer; } .radio-inline + .radio-inline, .checkbox-inline + .checkbox-inline { margin-top: 0; margin-left: 10px; } input[type="radio"][disabled], input[type="checkbox"][disabled], input[type="radio"].disabled, input[type="checkbox"].disabled, fieldset[disabled] input[type="radio"], fieldset[disabled] input[type="checkbox"] { cursor: not-allowed; } .radio-inline.disabled, .checkbox-inline.disabled, fieldset[disabled] .radio-inline, fieldset[disabled] .checkbox-inline { cursor: not-allowed; } .radio.disabled label, .checkbox.disabled label, fieldset[disabled] .radio label, fieldset[disabled] .checkbox label { cursor: not-allowed; } .form-control-static { padding-top: 7px; padding-bottom: 7px; margin-bottom: 0; } .form-control-static.input-lg, .form-control-static.input-sm { padding-left: 0; padding-right: 0; } .input-sm, .form-group-sm .form-control { height: 30px; padding: 5px 10px; font-size: 12px; line-height: 1.5; border-radius: 3px; } select.input-sm, select.form-group-sm .form-control { height: 30px; line-height: 30px; } textarea.input-sm, textarea.form-group-sm .form-control, select[multiple].input-sm, select[multiple].form-group-sm .form-control { height: auto; } .input-lg, .form-group-lg .form-control { height: 46px; padding: 10px 16px; font-size: 18px; line-height: 1.33; border-radius: 6px; } select.input-lg, select.form-group-lg .form-control { height: 46px; line-height: 46px; } textarea.input-lg, textarea.form-group-lg .form-control, select[multiple].input-lg, select[multiple].form-group-lg .form-control { height: auto; } .has-feedback { position: relative; } .has-feedback .form-control { padding-right: 42.5px; } .form-control-feedback { position: absolute; top: 0; right: 0; z-index: 2; display: block; width: 34px; height: 34px; line-height: 34px; text-align: center; pointer-events: none; } .input-lg + .form-control-feedback { width: 46px; height: 46px; line-height: 46px; } .input-sm + .form-control-feedback { width: 30px; height: 30px; line-height: 30px; } .has-success .help-block, .has-success .control-label, .has-success .radio, .has-success .checkbox, .has-success .radio-inline, .has-success .checkbox-inline, .has-success.radio label, .has-success.checkbox label, .has-success.radio-inline label, .has-success.checkbox-inline label { color: #3c763d; } .has-success .form-control { border-color: #3c763d; box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); } .has-success .form-control:focus { border-color: #2b542c; box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #67b168; } .has-success .input-group-addon { color: #3c763d; border-color: #3c763d; background-color: #dff0d8; } .has-success .form-control-feedback { color: #3c763d; } .has-warning .help-block, .has-warning .control-label, .has-warning .radio, .has-warning .checkbox, .has-warning .radio-inline, .has-warning .checkbox-inline, .has-warning.radio label, .has-warning.checkbox label, .has-warning.radio-inline label, .has-warning.checkbox-inline label { color: #8a6d3b; } .has-warning .form-control { border-color: #8a6d3b; box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); } .has-warning .form-control:focus { border-color: #66512c; box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #c0a16b; } .has-warning .input-group-addon { color: #8a6d3b; border-color: #8a6d3b; background-color: #fcf8e3; } .has-warning .form-control-feedback { color: #8a6d3b; } .has-error .help-block, .has-error .control-label, .has-error .radio, .has-error .checkbox, .has-error .radio-inline, .has-error .checkbox-inline, .has-error.radio label, .has-error.checkbox label, .has-error.radio-inline label, .has-error.checkbox-inline label { color: #a94442; } .has-error .form-control { border-color: #a94442; box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); } .has-error .form-control:focus { border-color: #843534; box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #ce8483; } .has-error .input-group-addon { color: #a94442; border-color: #a94442; background-color: #f2dede; } .has-error .form-control-feedback { color: #a94442; } .has-feedback label ~ .form-control-feedback { top: 25px; } .has-feedback label.sr-only ~ .form-control-feedback { top: 0; } .help-block { display: block; margin-top: 5px; margin-bottom: 10px; color: #737373; } @media (min-width: 768px) { .form-inline .form-group { display: inline-block; margin-bottom: 0; vertical-align: middle; } .form-inline .form-control { display: inline-block; width: auto; vertical-align: middle; } .form-inline .form-control-static { display: inline-block; } .form-inline .input-group { display: inline-table; vertical-align: middle; } .form-inline .input-group .input-group-addon, .form-inline .input-group .input-group-btn, .form-inline .input-group .form-control { width: auto; } .form-inline .input-group > .form-control { width: 100%; } .form-inline .control-label { margin-bottom: 0; vertical-align: middle; } .form-inline .radio, .form-inline .checkbox { display: inline-block; margin-top: 0; margin-bottom: 0; vertical-align: middle; } .form-inline .radio label, .form-inline .checkbox label { padding-left: 0; } .form-inline .radio input[type="radio"], .form-inline .checkbox input[type="checkbox"] { position: relative; margin-left: 0; } .form-inline .has-feedback .form-control-feedback { top: 0; } } .form-horizontal .radio, .form-horizontal .checkbox, .form-horizontal .radio-inline, .form-horizontal .checkbox-inline { margin-top: 0; margin-bottom: 0; padding-top: 7px; } .form-horizontal .radio, .form-horizontal .checkbox { min-height: 27px; } .form-horizontal .form-group { margin-left: -15px; margin-right: -15px; } @media (min-width: 768px) { .form-horizontal .control-label { text-align: right; margin-bottom: 0; padding-top: 7px; } } .form-horizontal .has-feedback .form-control-feedback { right: 15px; } @media (min-width: 768px) { .form-horizontal .form-group-lg .control-label { padding-top: 14.3px; } } @media (min-width: 768px) { .form-horizontal .form-group-sm .control-label { padding-top: 6px; } } .btn { display: inline-block; margin-bottom: 0; font-weight: 300; text-align: center; vertical-align: middle; -ms-touch-action: manipulation; touch-action: manipulation; cursor: pointer; background-image: none; border: 1px solid transparent; white-space: nowrap; padding: 6px 12px; font-size: 14px; line-height: 1.42857143; border-radius: 4px; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; } .btn:focus, .btn:active:focus, .btn.active:focus, .btn.focus, .btn:active.focus, .btn.active.focus { outline: thin dotted; outline: 5px auto -webkit-focus-ring-color; outline-offset: -2px; } .btn:hover, .btn:focus, .btn.focus { color: #333333; text-decoration: none; } .btn:active, .btn.active { outline: 0; background-image: none; box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125); } .btn.disabled, .btn[disabled], fieldset[disabled] .btn { cursor: not-allowed; pointer-events: none; opacity: 0.65; filter: alpha(opacity=65); box-shadow: none; } .btn-default { color: #333333; background-color: #ffffff; border-color: #cccccc; } .btn-default:hover, .btn-default:focus, .btn-default.focus, .btn-default:active, .btn-default.active, .open > .dropdown-toggle.btn-default { color: #333333; background-color: #e6e6e6; border-color: #adadad; } .btn-default:active, .btn-default.active, .open > .dropdown-toggle.btn-default { background-image: none; } .btn-default.disabled, .btn-default[disabled], fieldset[disabled] .btn-default, .btn-default.disabled:hover, .btn-default[disabled]:hover, fieldset[disabled] .btn-default:hover, .btn-default.disabled:focus, .btn-default[disabled]:focus, fieldset[disabled] .btn-default:focus, .btn-default.disabled.focus, .btn-default[disabled].focus, fieldset[disabled] .btn-default.focus, .btn-default.disabled:active, .btn-default[disabled]:active, fieldset[disabled] .btn-default:active, .btn-default.disabled.active, .btn-default[disabled].active, fieldset[disabled] .btn-default.active { background-color: #ffffff; border-color: #cccccc; } .btn-default .badge { color: #ffffff; background-color: #333333; } .btn-primary { color: #ffffff; background-color: #337ab7; border-color: #2e6da4; } .btn-primary:hover, .btn-primary:focus, .btn-primary.focus, .btn-primary:active, .btn-primary.active, .open > .dropdown-toggle.btn-primary { color: #ffffff; background-color: #286090; border-color: #204d74; } .btn-primary:active, .btn-primary.active, .open > .dropdown-toggle.btn-primary { background-image: none; } .btn-primary.disabled, .btn-primary[disabled], fieldset[disabled] .btn-primary, .btn-primary.disabled:hover, .btn-primary[disabled]:hover, fieldset[disabled] .btn-primary:hover, .btn-primary.disabled:focus, .btn-primary[disabled]:focus, fieldset[disabled] .btn-primary:focus, .btn-primary.disabled.focus, .btn-primary[disabled].focus, fieldset[disabled] .btn-primary.focus, .btn-primary.disabled:active, .btn-primary[disabled]:active, fieldset[disabled] .btn-primary:active, .btn-primary.disabled.active, .btn-primary[disabled].active, fieldset[disabled] .btn-primary.active { background-color: #337ab7; border-color: #2e6da4; } .btn-primary .badge { color: #337ab7; background-color: #ffffff; } .btn-success { color: #ffffff; background-color: #5cb85c; border-color: #4cae4c; } .btn-success:hover, .btn-success:focus, .btn-success.focus, .btn-success:active, .btn-success.active, .open > .dropdown-toggle.btn-success { color: #ffffff; background-color: #449d44; border-color: #398439; } .btn-success:active, .btn-success.active, .open > .dropdown-toggle.btn-success { background-image: none; } .btn-success.disabled, .btn-success[disabled], fieldset[disabled] .btn-success, .btn-success.disabled:hover, .btn-success[disabled]:hover, fieldset[disabled] .btn-success:hover, .btn-success.disabled:focus, .btn-success[disabled]:focus, fieldset[disabled] .btn-success:focus, .btn-success.disabled.focus, .btn-success[disabled].focus, fieldset[disabled] .btn-success.focus, .btn-success.disabled:active, .btn-success[disabled]:active, fieldset[disabled] .btn-success:active, .btn-success.disabled.active, .btn-success[disabled].active, fieldset[disabled] .btn-success.active { background-color: #5cb85c; border-color: #4cae4c; } .btn-success .badge { color: #5cb85c; background-color: #ffffff; } .btn-info { color: #ffffff; background-color: #5bc0de; border-color: #46b8da; } .btn-info:hover, .btn-info:focus, .btn-info.focus, .btn-info:active, .btn-info.active, .open > .dropdown-toggle.btn-info { color: #ffffff; background-color: #31b0d5; border-color: #269abc; } .btn-info:active, .btn-info.active, .open > .dropdown-toggle.btn-info { background-image: none; } .btn-info.disabled, .btn-info[disabled], fieldset[disabled] .btn-info, .btn-info.disabled:hover, .btn-info[disabled]:hover, fieldset[disabled] .btn-info:hover, .btn-info.disabled:focus, .btn-info[disabled]:focus, fieldset[disabled] .btn-info:focus, .btn-info.disabled.focus, .btn-info[disabled].focus, fieldset[disabled] .btn-info.focus, .btn-info.disabled:active, .btn-info[disabled]:active, fieldset[disabled] .btn-info:active, .btn-info.disabled.active, .btn-info[disabled].active, fieldset[disabled] .btn-info.active { background-color: #5bc0de; border-color: #46b8da; } .btn-info .badge { color: #5bc0de; background-color: #ffffff; } .btn-warning { color: #ffffff; background-color: #f0ad4e; border-color: #eea236; } .btn-warning:hover, .btn-warning:focus, .btn-warning.focus, .btn-warning:active, .btn-warning.active, .open > .dropdown-toggle.btn-warning { color: #ffffff; background-color: #ec971f; border-color: #d58512; } .btn-warning:active, .btn-warning.active, .open > .dropdown-toggle.btn-warning { background-image: none; } .btn-warning.disabled, .btn-warning[disabled], fieldset[disabled] .btn-warning, .btn-warning.disabled:hover, .btn-warning[disabled]:hover, fieldset[disabled] .btn-warning:hover, .btn-warning.disabled:focus, .btn-warning[disabled]:focus, fieldset[disabled] .btn-warning:focus, .btn-warning.disabled.focus, .btn-warning[disabled].focus, fieldset[disabled] .btn-warning.focus, .btn-warning.disabled:active, .btn-warning[disabled]:active, fieldset[disabled] .btn-warning:active, .btn-warning.disabled.active, .btn-warning[disabled].active, fieldset[disabled] .btn-warning.active { background-color: #f0ad4e; border-color: #eea236; } .btn-warning .badge { color: #f0ad4e; background-color: #ffffff; } .btn-danger { color: #ffffff; background-color: #d9534f; border-color: #d43f3a; } .btn-danger:hover, .btn-danger:focus, .btn-danger.focus, .btn-danger:active, .btn-danger.active, .open > .dropdown-toggle.btn-danger { color: #ffffff; background-color: #c9302c; border-color: #ac2925; } .btn-danger:active, .btn-danger.active, .open > .dropdown-toggle.btn-danger { background-image: none; } .btn-danger.disabled, .btn-danger[disabled], fieldset[disabled] .btn-danger, .btn-danger.disabled:hover, .btn-danger[disabled]:hover, fieldset[disabled] .btn-danger:hover, .btn-danger.disabled:focus, .btn-danger[disabled]:focus, fieldset[disabled] .btn-danger:focus, .btn-danger.disabled.focus, .btn-danger[disabled].focus, fieldset[disabled] .btn-danger.focus, .btn-danger.disabled:active, .btn-danger[disabled]:active, fieldset[disabled] .btn-danger:active, .btn-danger.disabled.active, .btn-danger[disabled].active, fieldset[disabled] .btn-danger.active { background-color: #d9534f; border-color: #d43f3a; } .btn-danger .badge { color: #d9534f; background-color: #ffffff; } .btn-link { color: #337ab7; font-weight: normal; border-radius: 0; } .btn-link, .btn-link:active, .btn-link.active, .btn-link[disabled], fieldset[disabled] .btn-link { background-color: transparent; box-shadow: none; } .btn-link, .btn-link:hover, .btn-link:focus, .btn-link:active { border-color: transparent; } .btn-link:hover, .btn-link:focus { color: #23527c; text-decoration: underline; background-color: transparent; } .btn-link[disabled]:hover, fieldset[disabled] .btn-link:hover, .btn-link[disabled]:focus, fieldset[disabled] .btn-link:focus { color: #777777; text-decoration: none; } .btn-lg, .btn-group-lg > .btn { padding: 10px 16px; font-size: 18px; line-height: 1.33; border-radius: 6px; } .btn-sm, .btn-group-sm > .btn { padding: 5px 10px; font-size: 12px; line-height: 1.5; border-radius: 3px; } .btn-xs, .btn-group-xs > .btn { padding: 1px 5px; font-size: 12px; line-height: 1.5; border-radius: 3px; } .btn-block { display: block; width: 100%; } .btn-block + .btn-block { margin-top: 5px; } input[type="submit"].btn-block, input[type="reset"].btn-block, input[type="button"].btn-block { width: 100%; } .fade { opacity: 0; transition: opacity 0.15s linear; } .fade.in { opacity: 1; } .collapse { display: none; visibility: hidden; } .collapse.in { display: block; visibility: visible; } tr.collapse.in { display: table-row; } tbody.collapse.in { display: table-row-group; } .collapsing { position: relative; height: 0; overflow: hidden; transition-property: height, visibility; transition-duration: 0.35s; transition-timing-function: ease; } .caret { display: inline-block; width: 0; height: 0; margin-left: 2px; vertical-align: middle; border-top: 4px solid; border-right: 4px solid transparent; border-left: 4px solid transparent; } .dropdown { position: relative; } .dropdown-toggle:focus { outline: 0; } .dropdown-menu { position: absolute; top: 100%; left: 0; z-index: 1000; display: none; float: left; min-width: 160px; padding: 5px 0; margin: 2px 0 0; list-style: none; font-size: 14px; text-align: left; background-color: #ffffff; border: 1px solid #cccccc; border: 1px solid rgba(0, 0, 0, 0.15); border-radius: 4px; box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175); background-clip: padding-box; } .dropdown-menu.pull-right { right: 0; left: auto; } .dropdown-menu .divider { height: 1px; margin: 9px 0; overflow: hidden; background-color: #e5e5e5; } .dropdown-menu > li > a { display: block; padding: 3px 20px; clear: both; font-weight: normal; line-height: 1.42857143; color: #333333; white-space: nowrap; } .dropdown-menu > li > a:hover, .dropdown-menu > li > a:focus { text-decoration: none; color: #262626; background-color: #f5f5f5; } .dropdown-menu > .active > a, .dropdown-menu > .active > a:hover, .dropdown-menu > .active > a:focus { color: #ffffff; text-decoration: none; outline: 0; background-color: #337ab7; } .dropdown-menu > .disabled > a, .dropdown-menu > .disabled > a:hover, .dropdown-menu > .disabled > a:focus { color: #777777; } .dropdown-menu > .disabled > a:hover, .dropdown-menu > .disabled > a:focus { text-decoration: none; background-color: transparent; background-image: none; filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); cursor: not-allowed; } .open > .dropdown-menu { display: block; } .open > a { outline: 0; } .dropdown-menu-right { left: auto; right: 0; } .dropdown-menu-left { left: 0; right: auto; } .dropdown-header { display: block; padding: 3px 20px; font-size: 12px; line-height: 1.42857143; color: #777777; white-space: nowrap; } .dropdown-backdrop { position: fixed; left: 0; right: 0; bottom: 0; top: 0; z-index: 990; } .pull-right > .dropdown-menu { right: 0; left: auto; } .dropup .caret, .navbar-fixed-bottom .dropdown .caret { border-top: 0; border-bottom: 4px solid; content: ""; } .dropup .dropdown-menu, .navbar-fixed-bottom .dropdown .dropdown-menu { top: auto; bottom: 100%; margin-bottom: 1px; } @media (min-width: 768px) { .navbar-right .dropdown-menu { left: auto; right: 0; } .navbar-right .dropdown-menu-left { left: 0; right: auto; } } .btn-group, .btn-group-vertical { position: relative; display: inline-block; vertical-align: middle; } .btn-group > .btn, .btn-group-vertical > .btn { position: relative; float: left; } .btn-group > .btn:hover, .btn-group-vertical > .btn:hover, .btn-group > .btn:focus, .btn-group-vertical > .btn:focus, .btn-group > .btn:active, .btn-group-vertical > .btn:active, .btn-group > .btn.active, .btn-group-vertical > .btn.active { z-index: 2; } .btn-group .btn + .btn, .btn-group .btn + .btn-group, .btn-group .btn-group + .btn, .btn-group .btn-group + .btn-group { margin-left: -1px; } .btn-toolbar { margin-left: -5px; } .btn-toolbar .btn-group, .btn-toolbar .input-group { float: left; } .btn-toolbar > .btn, .btn-toolbar > .btn-group, .btn-toolbar > .input-group { margin-left: 5px; } .btn-group > .btn:not(:first-child):not(:last-child):not(.dropdown-toggle) { border-radius: 0; } .btn-group > .btn:first-child { margin-left: 0; } .btn-group > .btn:first-child:not(:last-child):not(.dropdown-toggle) { border-bottom-right-radius: 0; border-top-right-radius: 0; } .btn-group > .btn:last-child:not(:first-child), .btn-group > .dropdown-toggle:not(:first-child) { border-bottom-left-radius: 0; border-top-left-radius: 0; } .btn-group > .btn-group { float: left; } .btn-group > .btn-group:not(:first-child):not(:last-child) > .btn { border-radius: 0; } .btn-group > .btn-group:first-child > .btn:last-child, .btn-group > .btn-group:first-child > .dropdown-toggle { border-bottom-right-radius: 0; border-top-right-radius: 0; } .btn-group > .btn-group:last-child > .btn:first-child { border-bottom-left-radius: 0; border-top-left-radius: 0; } .btn-group .dropdown-toggle:active, .btn-group.open .dropdown-toggle { outline: 0; } .btn-group > .btn + .dropdown-toggle { padding-left: 8px; padding-right: 8px; } .btn-group > .btn-lg + .dropdown-toggle { padding-left: 12px; padding-right: 12px; } .btn-group.open .dropdown-toggle { box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125); } .btn-group.open .dropdown-toggle.btn-link { box-shadow: none; } .btn .caret { margin-left: 0; } .btn-lg .caret { border-width: 5px 5px 0; border-bottom-width: 0; } .dropup .btn-lg .caret { border-width: 0 5px 5px; } .btn-group-vertical > .btn, .btn-group-vertical > .btn-group, .btn-group-vertical > .btn-group > .btn { display: block; float: none; width: 100%; max-width: 100%; } .btn-group-vertical > .btn-group > .btn { float: none; } .btn-group-vertical > .btn + .btn, .btn-group-vertical > .btn + .btn-group, .btn-group-vertical > .btn-group + .btn, .btn-group-vertical > .btn-group + .btn-group { margin-top: -1px; margin-left: 0; } .btn-group-vertical > .btn:not(:first-child):not(:last-child) { border-radius: 0; } .btn-group-vertical > .btn:first-child:not(:last-child) { border-top-right-radius: 4px; border-bottom-right-radius: 0; border-bottom-left-radius: 0; } .btn-group-vertical > .btn:last-child:not(:first-child) { border-bottom-left-radius: 4px; border-top-right-radius: 0; border-top-left-radius: 0; } .btn-group-vertical > .btn-group:not(:first-child):not(:last-child) > .btn { border-radius: 0; } .btn-group-vertical > .btn-group:first-child:not(:last-child) > .btn:last-child, .btn-group-vertical > .btn-group:first-child:not(:last-child) > .dropdown-toggle { border-bottom-right-radius: 0; border-bottom-left-radius: 0; } .btn-group-vertical > .btn-group:last-child:not(:first-child) > .btn:first-child { border-top-right-radius: 0; border-top-left-radius: 0; } .btn-group-justified { display: table; width: 100%; table-layout: fixed; border-collapse: separate; } .btn-group-justified > .btn, .btn-group-justified > .btn-group { float: none; display: table-cell; width: 1%; } .btn-group-justified > .btn-group .btn { width: 100%; } .btn-group-justified > .btn-group .dropdown-menu { left: auto; } [data-toggle="buttons"] > .btn input[type="radio"], [data-toggle="buttons"] > .btn-group > .btn input[type="radio"], [data-toggle="buttons"] > .btn input[type="checkbox"], [data-toggle="buttons"] > .btn-group > .btn input[type="checkbox"] { position: absolute; clip: rect(0, 0, 0, 0); pointer-events: none; } .input-group { position: relative; display: table; border-collapse: separate; } .input-group[class*="col-"] { float: none; padding-left: 0; padding-right: 0; } .input-group .form-control { position: relative; z-index: 2; float: left; width: 100%; margin-bottom: 0; } .input-group-lg > .form-control, .input-group-lg > .input-group-addon, .input-group-lg > .input-group-btn > .btn { height: 46px; padding: 10px 16px; font-size: 18px; line-height: 1.33; border-radius: 6px; } select.input-group-lg > .form-control, select.input-group-lg > .input-group-addon, select.input-group-lg > .input-group-btn > .btn { height: 46px; line-height: 46px; } textarea.input-group-lg > .form-control, textarea.input-group-lg > .input-group-addon, textarea.input-group-lg > .input-group-btn > .btn, select[multiple].input-group-lg > .form-control, select[multiple].input-group-lg > .input-group-addon, select[multiple].input-group-lg > .input-group-btn > .btn { height: auto; } .input-group-sm > .form-control, .input-group-sm > .input-group-addon, .input-group-sm > .input-group-btn > .btn { height: 30px; padding: 5px 10px; font-size: 12px; line-height: 1.5; border-radius: 3px; } select.input-group-sm > .form-control, select.input-group-sm > .input-group-addon, select.input-group-sm > .input-group-btn > .btn { height: 30px; line-height: 30px; } textarea.input-group-sm > .form-control, textarea.input-group-sm > .input-group-addon, textarea.input-group-sm > .input-group-btn > .btn, select[multiple].input-group-sm > .form-control, select[multiple].input-group-sm > .input-group-addon, select[multiple].input-group-sm > .input-group-btn > .btn { height: auto; } .input-group-addon, .input-group-btn, .input-group .form-control { display: table-cell; } .input-group-addon:not(:first-child):not(:last-child), .input-group-btn:not(:first-child):not(:last-child), .input-group .form-control:not(:first-child):not(:last-child) { border-radius: 0; } .input-group-addon, .input-group-btn { width: 1%; white-space: nowrap; vertical-align: middle; } .input-group-addon { padding: 6px 12px; font-size: 14px; font-weight: normal; line-height: 1; color: #555555; text-align: center; background-color: #eeeeee; border: 1px solid #cccccc; border-radius: 4px; } .input-group-addon.input-sm { padding: 5px 10px; font-size: 12px; border-radius: 3px; } .input-group-addon.input-lg { padding: 10px 16px; font-size: 18px; border-radius: 6px; } .input-group-addon input[type="radio"], .input-group-addon input[type="checkbox"] { margin-top: 0; } .input-group .form-control:first-child, .input-group-addon:first-child, .input-group-btn:first-child > .btn, .input-group-btn:first-child > .btn-group > .btn, .input-group-btn:first-child > .dropdown-toggle, .input-group-btn:last-child > .btn:not(:last-child):not(.dropdown-toggle), .input-group-btn:last-child > .btn-group:not(:last-child) > .btn { border-bottom-right-radius: 0; border-top-right-radius: 0; } .input-group-addon:first-child { border-right: 0; } .input-group .form-control:last-child, .input-group-addon:last-child, .input-group-btn:last-child > .btn, .input-group-btn:last-child > .btn-group > .btn, .input-group-btn:last-child > .dropdown-toggle, .input-group-btn:first-child > .btn:not(:first-child), .input-group-btn:first-child > .btn-group:not(:first-child) > .btn { border-bottom-left-radius: 0; border-top-left-radius: 0; } .input-group-addon:last-child { border-left: 0; } .input-group-btn { position: relative; font-size: 0; white-space: nowrap; } .input-group-btn > .btn { position: relative; } .input-group-btn > .btn + .btn { margin-left: -1px; } .input-group-btn > .btn:hover, .input-group-btn > .btn:focus, .input-group-btn > .btn:active { z-index: 2; } .input-group-btn:first-child > .btn, .input-group-btn:first-child > .btn-group { margin-right: -1px; } .input-group-btn:last-child > .btn, .input-group-btn:last-child > .btn-group { margin-left: -1px; } .nav { margin-bottom: 0; padding-left: 0; list-style: none; } .nav > li { position: relative; display: block; } .nav > li > a { position: relative; display: block; padding: 10px 15px; } .nav > li > a:hover, .nav > li > a:focus { text-decoration: none; background-color: #eeeeee; } .nav > li.disabled > a { color: #777777; } .nav > li.disabled > a:hover, .nav > li.disabled > a:focus { color: #777777; text-decoration: none; background-color: transparent; cursor: not-allowed; } .nav .open > a, .nav .open > a:hover, .nav .open > a:focus { background-color: #eeeeee; border-color: #337ab7; } .nav .nav-divider { height: 1px; margin: 9px 0; overflow: hidden; background-color: #e5e5e5; } .nav > li > a > img { max-width: none; } .nav-tabs { border-bottom: 1px solid #dddddd; } .nav-tabs > li { float: left; margin-bottom: -1px; } .nav-tabs > li > a { margin-right: 2px; line-height: 1.42857143; border: 1px solid transparent; border-radius: 4px 4px 0 0; } .nav-tabs > li > a:hover { border-color: #eeeeee #eeeeee #dddddd; } .nav-tabs > li.active > a, .nav-tabs > li.active > a:hover, .nav-tabs > li.active > a:focus { color: #555555; background-color: #ffffff; border: 1px solid #dddddd; border-bottom-color: transparent; cursor: default; } .nav-tabs.nav-justified { width: 100%; border-bottom: 0; } .nav-tabs.nav-justified > li { float: none; } .nav-tabs.nav-justified > li > a { text-align: center; margin-bottom: 5px; } .nav-tabs.nav-justified > .dropdown .dropdown-menu { top: auto; left: auto; } @media (min-width: 768px) { .nav-tabs.nav-justified > li { display: table-cell; width: 1%; } .nav-tabs.nav-justified > li > a { margin-bottom: 0; } } .nav-tabs.nav-justified > li > a { margin-right: 0; border-radius: 4px; } .nav-tabs.nav-justified > .active > a, .nav-tabs.nav-justified > .active > a:hover, .nav-tabs.nav-justified > .active > a:focus { border: 1px solid #dddddd; } @media (min-width: 768px) { .nav-tabs.nav-justified > li > a { border-bottom: 1px solid #dddddd; border-radius: 4px 4px 0 0; } .nav-tabs.nav-justified > .active > a, .nav-tabs.nav-justified > .active > a:hover, .nav-tabs.nav-justified > .active > a:focus { border-bottom-color: #ffffff; } } .nav-pills > li { float: left; } .nav-pills > li > a { border-radius: 4px; } .nav-pills > li + li { margin-left: 2px; } .nav-pills > li.active > a, .nav-pills > li.active > a:hover, .nav-pills > li.active > a:focus { color: #ffffff; background-color: #337ab7; } .nav-stacked > li { float: none; } .nav-stacked > li + li { margin-top: 2px; margin-left: 0; } .nav-justified { width: 100%; } .nav-justified > li { float: none; } .nav-justified > li > a { text-align: center; margin-bottom: 5px; } .nav-justified > .dropdown .dropdown-menu { top: auto; left: auto; } @media (min-width: 768px) { .nav-justified > li { display: table-cell; width: 1%; } .nav-justified > li > a { margin-bottom: 0; } } .nav-tabs-justified { border-bottom: 0; } .nav-tabs-justified > li > a { margin-right: 0; border-radius: 4px; } .nav-tabs-justified > .active > a, .nav-tabs-justified > .active > a:hover, .nav-tabs-justified > .active > a:focus { border: 1px solid #dddddd; } @media (min-width: 768px) { .nav-tabs-justified > li > a { border-bottom: 1px solid #dddddd; border-radius: 4px 4px 0 0; } .nav-tabs-justified > .active > a, .nav-tabs-justified > .active > a:hover, .nav-tabs-justified > .active > a:focus { border-bottom-color: #ffffff; } } .tab-content > .tab-pane { display: none; visibility: hidden; } .tab-content > .active { display: block; visibility: visible; } .nav-tabs .dropdown-menu { margin-top: -1px; border-top-right-radius: 0; border-top-left-radius: 0; } .navbar { position: relative; min-height: 50px; margin-bottom: 20px; border: 1px solid transparent; } @media (min-width: 768px) { .navbar { border-radius: 4px; } } @media (min-width: 768px) { .navbar-header { float: left; } } .navbar-collapse { overflow-x: visible; padding-right: 15px; padding-left: 15px; border-top: 1px solid transparent; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1); -webkit-overflow-scrolling: touch; } .navbar-collapse.in { overflow-y: auto; } @media (min-width: 768px) { .navbar-collapse { width: auto; border-top: 0; box-shadow: none; } .navbar-collapse.collapse { display: block !important; visibility: visible !important; height: auto !important; padding-bottom: 0; overflow: visible !important; } .navbar-collapse.in { overflow-y: visible; } .navbar-fixed-top .navbar-collapse, .navbar-static-top .navbar-collapse, .navbar-fixed-bottom .navbar-collapse { padding-left: 0; padding-right: 0; } } .navbar-fixed-top .navbar-collapse, .navbar-fixed-bottom .navbar-collapse { max-height: 340px; } @media (max-device-width: 480px) and (orientation: landscape) { .navbar-fixed-top .navbar-collapse, .navbar-fixed-bottom .navbar-collapse { max-height: 200px; } } .container > .navbar-header, .container-fluid > .navbar-header, .container > .navbar-collapse, .container-fluid > .navbar-collapse { margin-right: -15px; margin-left: -15px; } @media (min-width: 768px) { .container > .navbar-header, .container-fluid > .navbar-header, .container > .navbar-collapse, .container-fluid > .navbar-collapse { margin-right: 0; margin-left: 0; } } .navbar-static-top { z-index: 1000; border-width: 0 0 1px; } @media (min-width: 768px) { .navbar-static-top { border-radius: 0; } } .navbar-fixed-top, .navbar-fixed-bottom { position: fixed; right: 0; left: 0; z-index: 1030; } @media (min-width: 768px) { .navbar-fixed-top, .navbar-fixed-bottom { border-radius: 0; } } .navbar-fixed-top { top: 0; border-width: 0 0 1px; } .navbar-fixed-bottom { bottom: 0; margin-bottom: 0; border-width: 1px 0 0; } .navbar-brand { float: left; padding: 15px 15px; font-size: 18px; line-height: 20px; height: 50px; } .navbar-brand:hover, .navbar-brand:focus { text-decoration: none; } .navbar-brand > img { display: block; } @media (min-width: 768px) { .navbar > .container .navbar-brand, .navbar > .container-fluid .navbar-brand { margin-left: -15px; } } .navbar-toggle { position: relative; float: right; margin-right: 15px; padding: 9px 10px; margin-top: 8px; margin-bottom: 8px; background-color: transparent; background-image: none; border: 1px solid transparent; border-radius: 4px; } .navbar-toggle:focus { outline: 0; } .navbar-toggle .icon-bar { display: block; width: 22px; height: 2px; border-radius: 1px; } .navbar-toggle .icon-bar + .icon-bar { margin-top: 4px; } @media (min-width: 768px) { .navbar-toggle { display: none; } } .navbar-nav { margin: 7.5px -15px; } .navbar-nav > li > a { padding-top: 10px; padding-bottom: 10px; line-height: 20px; } @media (max-width: 767px) { .navbar-nav .open .dropdown-menu { position: static; float: none; width: auto; margin-top: 0; background-color: transparent; border: 0; box-shadow: none; } .navbar-nav .open .dropdown-menu > li > a, .navbar-nav .open .dropdown-menu .dropdown-header { padding: 5px 15px 5px 25px; } .navbar-nav .open .dropdown-menu > li > a { line-height: 20px; } .navbar-nav .open .dropdown-menu > li > a:hover, .navbar-nav .open .dropdown-menu > li > a:focus { background-image: none; } } @media (min-width: 768px) { .navbar-nav { float: left; margin: 0; } .navbar-nav > li { float: left; } .navbar-nav > li > a { padding-top: 15px; padding-bottom: 15px; } } .navbar-form { margin-left: -15px; margin-right: -15px; padding: 10px 15px; border-top: 1px solid transparent; border-bottom: 1px solid transparent; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.1); margin-top: 8px; margin-bottom: 8px; } @media (min-width: 768px) { .navbar-form .form-group { display: inline-block; margin-bottom: 0; vertical-align: middle; } .navbar-form .form-control { display: inline-block; width: auto; vertical-align: middle; } .navbar-form .form-control-static { display: inline-block; } .navbar-form .input-group { display: inline-table; vertical-align: middle; } .navbar-form .input-group .input-group-addon, .navbar-form .input-group .input-group-btn, .navbar-form .input-group .form-control { width: auto; } .navbar-form .input-group > .form-control { width: 100%; } .navbar-form .control-label { margin-bottom: 0; vertical-align: middle; } .navbar-form .radio, .navbar-form .checkbox { display: inline-block; margin-top: 0; margin-bottom: 0; vertical-align: middle; } .navbar-form .radio label, .navbar-form .checkbox label { padding-left: 0; } .navbar-form .radio input[type="radio"], .navbar-form .checkbox input[type="checkbox"] { position: relative; margin-left: 0; } .navbar-form .has-feedback .form-control-feedback { top: 0; } } @media (max-width: 767px) { .navbar-form .form-group { margin-bottom: 5px; } .navbar-form .form-group:last-child { margin-bottom: 0; } } @media (min-width: 768px) { .navbar-form { width: auto; border: 0; margin-left: 0; margin-right: 0; padding-top: 0; padding-bottom: 0; box-shadow: none; } } .navbar-nav > li > .dropdown-menu { margin-top: 0; border-top-right-radius: 0; border-top-left-radius: 0; } .navbar-fixed-bottom .navbar-nav > li > .dropdown-menu { border-top-right-radius: 4px; border-top-left-radius: 4px; border-bottom-right-radius: 0; border-bottom-left-radius: 0; } .navbar-btn { margin-top: 8px; margin-bottom: 8px; } .navbar-btn.btn-sm { margin-top: 10px; margin-bottom: 10px; } .navbar-btn.btn-xs { margin-top: 14px; margin-bottom: 14px; } .navbar-text { margin-top: 15px; margin-bottom: 15px; } @media (min-width: 768px) { .navbar-text { float: left; margin-left: 15px; margin-right: 15px; } } @media (min-width: 768px) { .navbar-left { float: left !important; } .navbar-right { float: right !important; margin-right: -15px; } .navbar-right ~ .navbar-right { margin-right: 0; } } .navbar-default { background-color: #f8f8f8; border-color: #e7e7e7; } .navbar-default .navbar-brand { color: #777777; } .navbar-default .navbar-brand:hover, .navbar-default .navbar-brand:focus { color: #5e5e5e; background-color: transparent; } .navbar-default .navbar-text { color: #777777; } .navbar-default .navbar-nav > li > a { color: #777777; } .navbar-default .navbar-nav > li > a:hover, .navbar-default .navbar-nav > li > a:focus { color: #333333; background-color: transparent; } .navbar-default .navbar-nav > .active > a, .navbar-default .navbar-nav > .active > a:hover, .navbar-default .navbar-nav > .active > a:focus { color: #555555; background-color: #e7e7e7; } .navbar-default .navbar-nav > .disabled > a, .navbar-default .navbar-nav > .disabled > a:hover, .navbar-default .navbar-nav > .disabled > a:focus { color: #cccccc; background-color: transparent; } .navbar-default .navbar-toggle { border-color: #dddddd; } .navbar-default .navbar-toggle:hover, .navbar-default .navbar-toggle:focus { background-color: #dddddd; } .navbar-default .navbar-toggle .icon-bar { background-color: #888888; } .navbar-default .navbar-collapse, .navbar-default .navbar-form { border-color: #e7e7e7; } .navbar-default .navbar-nav > .open > a, .navbar-default .navbar-nav > .open > a:hover, .navbar-default .navbar-nav > .open > a:focus { background-color: #e7e7e7; color: #555555; } @media (max-width: 767px) { .navbar-default .navbar-nav .open .dropdown-menu > li > a { color: #777777; } .navbar-default .navbar-nav .open .dropdown-menu > li > a:hover, .navbar-default .navbar-nav .open .dropdown-menu > li > a:focus { color: #333333; background-color: transparent; } .navbar-default .navbar-nav .open .dropdown-menu > .active > a, .navbar-default .navbar-nav .open .dropdown-menu > .active > a:hover, .navbar-default .navbar-nav .open .dropdown-menu > .active > a:focus { color: #555555; background-color: #e7e7e7; } .navbar-default .navbar-nav .open .dropdown-menu > .disabled > a, .navbar-default .navbar-nav .open .dropdown-menu > .disabled > a:hover, .navbar-default .navbar-nav .open .dropdown-menu > .disabled > a:focus { color: #cccccc; background-color: transparent; } } .navbar-default .navbar-link { color: #777777; } .navbar-default .navbar-link:hover { color: #333333; } .navbar-default .btn-link { color: #777777; } .navbar-default .btn-link:hover, .navbar-default .btn-link:focus { color: #333333; } .navbar-default .btn-link[disabled]:hover, fieldset[disabled] .navbar-default .btn-link:hover, .navbar-default .btn-link[disabled]:focus, fieldset[disabled] .navbar-default .btn-link:focus { color: #cccccc; } .navbar-inverse { background-color: #222222; border-color: #080808; } .navbar-inverse .navbar-brand { color: #9d9d9d; } .navbar-inverse .navbar-brand:hover, .navbar-inverse .navbar-brand:focus { color: #ffffff; background-color: transparent; } .navbar-inverse .navbar-text { color: #9d9d9d; } .navbar-inverse .navbar-nav > li > a { color: #9d9d9d; } .navbar-inverse .navbar-nav > li > a:hover, .navbar-inverse .navbar-nav > li > a:focus { color: #ffffff; background-color: transparent; } .navbar-inverse .navbar-nav > .active > a, .navbar-inverse .navbar-nav > .active > a:hover, .navbar-inverse .navbar-nav > .active > a:focus { color: #ffffff; background-color: #080808; } .navbar-inverse .navbar-nav > .disabled > a, .navbar-inverse .navbar-nav > .disabled > a:hover, .navbar-inverse .navbar-nav > .disabled > a:focus { color: #444444; background-color: transparent; } .navbar-inverse .navbar-toggle { border-color: #333333; } .navbar-inverse .navbar-toggle:hover, .navbar-inverse .navbar-toggle:focus { background-color: #333333; } .navbar-inverse .navbar-toggle .icon-bar { background-color: #ffffff; } .navbar-inverse .navbar-collapse, .navbar-inverse .navbar-form { border-color: #101010; } .navbar-inverse .navbar-nav > .open > a, .navbar-inverse .navbar-nav > .open > a:hover, .navbar-inverse .navbar-nav > .open > a:focus { background-color: #080808; color: #ffffff; } @media (max-width: 767px) { .navbar-inverse .navbar-nav .open .dropdown-menu > .dropdown-header { border-color: #080808; } .navbar-inverse .navbar-nav .open .dropdown-menu .divider { background-color: #080808; } .navbar-inverse .navbar-nav .open .dropdown-menu > li > a { color: #9d9d9d; } .navbar-inverse .navbar-nav .open .dropdown-menu > li > a:hover, .navbar-inverse .navbar-nav .open .dropdown-menu > li > a:focus { color: #ffffff; background-color: transparent; } .navbar-inverse .navbar-nav .open .dropdown-menu > .active > a, .navbar-inverse .navbar-nav .open .dropdown-menu > .active > a:hover, .navbar-inverse .navbar-nav .open .dropdown-menu > .active > a:focus { color: #ffffff; background-color: #080808; } .navbar-inverse .navbar-nav .open .dropdown-menu > .disabled > a, .navbar-inverse .navbar-nav .open .dropdown-menu > .disabled > a:hover, .navbar-inverse .navbar-nav .open .dropdown-menu > .disabled > a:focus { color: #444444; background-color: transparent; } } .navbar-inverse .navbar-link { color: #9d9d9d; } .navbar-inverse .navbar-link:hover { color: #ffffff; } .navbar-inverse .btn-link { color: #9d9d9d; } .navbar-inverse .btn-link:hover, .navbar-inverse .btn-link:focus { color: #ffffff; } .navbar-inverse .btn-link[disabled]:hover, fieldset[disabled] .navbar-inverse .btn-link:hover, .navbar-inverse .btn-link[disabled]:focus, fieldset[disabled] .navbar-inverse .btn-link:focus { color: #444444; } .breadcrumb { padding: 8px 15px; margin-bottom: 20px; list-style: none; background-color: #f5f5f5; border-radius: 4px; } .breadcrumb > li { display: inline-block; } .breadcrumb > li + li:before { content: "/\00a0"; padding: 0 5px; color: #cccccc; } .breadcrumb > .active { color: #777777; } .pagination { display: inline-block; padding-left: 0; margin: 20px 0; border-radius: 4px; } .pagination > li { display: inline; } .pagination > li > a, .pagination > li > span { position: relative; float: left; padding: 6px 12px; line-height: 1.42857143; text-decoration: none; color: #337ab7; background-color: #ffffff; border: 1px solid #dddddd; margin-left: -1px; } .pagination > li:first-child > a, .pagination > li:first-child > span { margin-left: 0; border-bottom-left-radius: 4px; border-top-left-radius: 4px; } .pagination > li:last-child > a, .pagination > li:last-child > span { border-bottom-right-radius: 4px; border-top-right-radius: 4px; } .pagination > li > a:hover, .pagination > li > span:hover, .pagination > li > a:focus, .pagination > li > span:focus { color: #23527c; background-color: #eeeeee; border-color: #dddddd; } .pagination > .active > a, .pagination > .active > span, .pagination > .active > a:hover, .pagination > .active > span:hover, .pagination > .active > a:focus, .pagination > .active > span:focus { z-index: 2; color: #ffffff; background-color: #337ab7; border-color: #337ab7; cursor: default; } .pagination > .disabled > span, .pagination > .disabled > span:hover, .pagination > .disabled > span:focus, .pagination > .disabled > a, .pagination > .disabled > a:hover, .pagination > .disabled > a:focus { color: #777777; background-color: #ffffff; border-color: #dddddd; cursor: not-allowed; } .pagination-lg > li > a, .pagination-lg > li > span { padding: 10px 16px; font-size: 18px; } .pagination-lg > li:first-child > a, .pagination-lg > li:first-child > span { border-bottom-left-radius: 6px; border-top-left-radius: 6px; } .pagination-lg > li:last-child > a, .pagination-lg > li:last-child > span { border-bottom-right-radius: 6px; border-top-right-radius: 6px; } .pagination-sm > li > a, .pagination-sm > li > span { padding: 5px 10px; font-size: 12px; } .pagination-sm > li:first-child > a, .pagination-sm > li:first-child > span { border-bottom-left-radius: 3px; border-top-left-radius: 3px; } .pagination-sm > li:last-child > a, .pagination-sm > li:last-child > span { border-bottom-right-radius: 3px; border-top-right-radius: 3px; } .pager { padding-left: 0; margin: 20px 0; list-style: none; text-align: center; } .pager li { display: inline; } .pager li > a, .pager li > span { display: inline-block; padding: 5px 14px; background-color: #ffffff; border: 1px solid #dddddd; border-radius: 15px; } .pager li > a:hover, .pager li > a:focus { text-decoration: none; background-color: #eeeeee; } .pager .next > a, .pager .next > span { float: right; } .pager .previous > a, .pager .previous > span { float: left; } .pager .disabled > a, .pager .disabled > a:hover, .pager .disabled > a:focus, .pager .disabled > span { color: #777777; background-color: #ffffff; cursor: not-allowed; } .label { display: inline; padding: .2em .6em .3em; font-size: 75%; font-weight: bold; line-height: 1; color: #ffffff; text-align: center; white-space: nowrap; vertical-align: baseline; border-radius: .25em; } a.label:hover, a.label:focus { color: #ffffff; text-decoration: none; cursor: pointer; } .label:empty { display: none; } .btn .label { position: relative; top: -1px; } .label-default { background-color: #777777; } .label-default[href]:hover, .label-default[href]:focus { background-color: #5e5e5e; } .label-primary { background-color: #337ab7; } .label-primary[href]:hover, .label-primary[href]:focus { background-color: #286090; } .label-success { background-color: #5cb85c; } .label-success[href]:hover, .label-success[href]:focus { background-color: #449d44; } .label-info { background-color: #5bc0de; } .label-info[href]:hover, .label-info[href]:focus { background-color: #31b0d5; } .label-warning { background-color: #f0ad4e; } .label-warning[href]:hover, .label-warning[href]:focus { background-color: #ec971f; } .label-danger { background-color: #d9534f; } .label-danger[href]:hover, .label-danger[href]:focus { background-color: #c9302c; } .badge { display: inline-block; min-width: 10px; padding: 3px 7px; font-size: 12px; font-weight: bold; color: #ffffff; line-height: 1; vertical-align: baseline; white-space: nowrap; text-align: center; background-color: #777777; border-radius: 10px; } .badge:empty { display: none; } .btn .badge { position: relative; top: -1px; } .btn-xs .badge { top: 0; padding: 1px 5px; } a.badge:hover, a.badge:focus { color: #ffffff; text-decoration: none; cursor: pointer; } .list-group-item.active > .badge, .nav-pills > .active > a > .badge { color: #337ab7; background-color: #ffffff; } .list-group-item > .badge { float: right; } .list-group-item > .badge + .badge { margin-right: 5px; } .nav-pills > li > a > .badge { margin-left: 3px; } .jumbotron { padding: 30px 15px; margin-bottom: 30px; color: inherit; background-color: #eeeeee; } .jumbotron h1, .jumbotron .h1 { color: inherit; } .jumbotron p { margin-bottom: 15px; font-size: 21px; font-weight: 200; } .jumbotron > hr { border-top-color: #d5d5d5; } .container .jumbotron, .container-fluid .jumbotron { border-radius: 6px; } .jumbotron .container { max-width: 100%; } @media screen and (min-width: 768px) { .jumbotron { padding: 48px 0; } .container .jumbotron, .container-fluid .jumbotron { padding-left: 60px; padding-right: 60px; } .jumbotron h1, .jumbotron .h1 { font-size: 63px; } } .thumbnail { display: block; padding: 4px; margin-bottom: 20px; line-height: 1.42857143; background-color: #ffffff; border: 1px solid #dddddd; border-radius: 4px; transition: border 0.2s ease-in-out; } .thumbnail > img, .thumbnail a > img { margin-left: auto; margin-right: auto; } a.thumbnail:hover, a.thumbnail:focus, a.thumbnail.active { border-color: #337ab7; } .thumbnail .caption { padding: 9px; color: #333333; } .alert { padding: 15px; margin-bottom: 20px; border: 1px solid transparent; border-radius: 4px; } .alert h4 { margin-top: 0; color: inherit; } .alert .alert-link { font-weight: bold; } .alert > p, .alert > ul { margin-bottom: 0; } .alert > p + p { margin-top: 5px; } .alert-dismissable, .alert-dismissible { padding-right: 35px; } .alert-dismissable .close, .alert-dismissible .close { position: relative; top: -2px; right: -21px; color: inherit; } .alert-success { background-color: #dff0d8; border-color: #d6e9c6; color: #3c763d; } .alert-success hr { border-top-color: #c9e2b3; } .alert-success .alert-link { color: #2b542c; } .alert-info { background-color: #d9edf7; border-color: #bce8f1; color: #31708f; } .alert-info hr { border-top-color: #a6e1ec; } .alert-info .alert-link { color: #245269; } .alert-warning { background-color: #fcf8e3; border-color: #faebcc; color: #8a6d3b; } .alert-warning hr { border-top-color: #f7e1b5; } .alert-warning .alert-link { color: #66512c; } .alert-danger { background-color: #f2dede; border-color: #ebccd1; color: #a94442; } .alert-danger hr { border-top-color: #e4b9c0; } .alert-danger .alert-link { color: #843534; } @-webkit-keyframes progress-bar-stripes { from { background-position: 40px 0; } to { background-position: 0 0; } } @keyframes progress-bar-stripes { from { background-position: 40px 0; } to { background-position: 0 0; } } .progress { overflow: hidden; height: 20px; margin-bottom: 20px; background-color: #f5f5f5; border-radius: 4px; box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1); } .progress-bar { float: left; width: 0%; height: 100%; font-size: 12px; line-height: 20px; color: #ffffff; text-align: center; background-color: #337ab7; box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15); transition: width 0.6s ease; } .progress-striped .progress-bar, .progress-bar-striped { background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); background-size: 40px 40px; } .progress.active .progress-bar, .progress-bar.active { -webkit-animation: progress-bar-stripes 2s linear infinite; animation: progress-bar-stripes 2s linear infinite; } .progress-bar-success { background-color: #5cb85c; } .progress-striped .progress-bar-success { background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); } .progress-bar-info { background-color: #5bc0de; } .progress-striped .progress-bar-info { background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); } .progress-bar-warning { background-color: #f0ad4e; } .progress-striped .progress-bar-warning { background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); } .progress-bar-danger { background-color: #d9534f; } .progress-striped .progress-bar-danger { background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); } .media { margin-top: 15px; } .media:first-child { margin-top: 0; } .media-right, .media > .pull-right { padding-left: 10px; } .media-left, .media > .pull-left { padding-right: 10px; } .media-left, .media-right, .media-body { display: table-cell; vertical-align: top; } .media-middle { vertical-align: middle; } .media-bottom { vertical-align: bottom; } .media-heading { margin-top: 0; margin-bottom: 5px; } .media-list { padding-left: 0; list-style: none; } .list-group { margin-bottom: 20px; padding-left: 0; } .list-group-item { position: relative; display: block; padding: 10px 15px; margin-bottom: -1px; background-color: #ffffff; border: 1px solid #dddddd; } .list-group-item:first-child { border-top-right-radius: 4px; border-top-left-radius: 4px; } .list-group-item:last-child { margin-bottom: 0; border-bottom-right-radius: 4px; border-bottom-left-radius: 4px; } a.list-group-item { color: #555555; } a.list-group-item .list-group-item-heading { color: #333333; } a.list-group-item:hover, a.list-group-item:focus { text-decoration: none; color: #555555; background-color: #f5f5f5; } .list-group-item.disabled, .list-group-item.disabled:hover, .list-group-item.disabled:focus { background-color: #eeeeee; color: #777777; cursor: not-allowed; } .list-group-item.disabled .list-group-item-heading, .list-group-item.disabled:hover .list-group-item-heading, .list-group-item.disabled:focus .list-group-item-heading { color: inherit; } .list-group-item.disabled .list-group-item-text, .list-group-item.disabled:hover .list-group-item-text, .list-group-item.disabled:focus .list-group-item-text { color: #777777; } .list-group-item.active, .list-group-item.active:hover, .list-group-item.active:focus { z-index: 2; color: #ffffff; background-color: #337ab7; border-color: #337ab7; } .list-group-item.active .list-group-item-heading, .list-group-item.active:hover .list-group-item-heading, .list-group-item.active:focus .list-group-item-heading, .list-group-item.active .list-group-item-heading > small, .list-group-item.active:hover .list-group-item-heading > small, .list-group-item.active:focus .list-group-item-heading > small, .list-group-item.active .list-group-item-heading > .small, .list-group-item.active:hover .list-group-item-heading > .small, .list-group-item.active:focus .list-group-item-heading > .small { color: inherit; } .list-group-item.active .list-group-item-text, .list-group-item.active:hover .list-group-item-text, .list-group-item.active:focus .list-group-item-text { color: #c7ddef; } .list-group-item-success { color: #3c763d; background-color: #dff0d8; } a.list-group-item-success { color: #3c763d; } a.list-group-item-success .list-group-item-heading { color: inherit; } a.list-group-item-success:hover, a.list-group-item-success:focus { color: #3c763d; background-color: #d0e9c6; } a.list-group-item-success.active, a.list-group-item-success.active:hover, a.list-group-item-success.active:focus { color: #fff; background-color: #3c763d; border-color: #3c763d; } .list-group-item-info { color: #31708f; background-color: #d9edf7; } a.list-group-item-info { color: #31708f; } a.list-group-item-info .list-group-item-heading { color: inherit; } a.list-group-item-info:hover, a.list-group-item-info:focus { color: #31708f; background-color: #c4e3f3; } a.list-group-item-info.active, a.list-group-item-info.active:hover, a.list-group-item-info.active:focus { color: #fff; background-color: #31708f; border-color: #31708f; } .list-group-item-warning { color: #8a6d3b; background-color: #fcf8e3; } a.list-group-item-warning { color: #8a6d3b; } a.list-group-item-warning .list-group-item-heading { color: inherit; } a.list-group-item-warning:hover, a.list-group-item-warning:focus { color: #8a6d3b; background-color: #faf2cc; } a.list-group-item-warning.active, a.list-group-item-warning.active:hover, a.list-group-item-warning.active:focus { color: #fff; background-color: #8a6d3b; border-color: #8a6d3b; } .list-group-item-danger { color: #a94442; background-color: #f2dede; } a.list-group-item-danger { color: #a94442; } a.list-group-item-danger .list-group-item-heading { color: inherit; } a.list-group-item-danger:hover, a.list-group-item-danger:focus { color: #a94442; background-color: #ebcccc; } a.list-group-item-danger.active, a.list-group-item-danger.active:hover, a.list-group-item-danger.active:focus { color: #fff; background-color: #a94442; border-color: #a94442; } .list-group-item-heading { margin-top: 0; margin-bottom: 5px; } .list-group-item-text { margin-bottom: 0; line-height: 1.3; } .panel { margin-bottom: 20px; background-color: #ffffff; border: 1px solid transparent; border-radius: 4px; box-shadow: 0 1px 1px rgba(0, 0, 0, 0.05); } .panel-body { padding: 15px; } .panel-heading { padding: 10px 15px; border-bottom: 1px solid transparent; border-top-right-radius: 3px; border-top-left-radius: 3px; } .panel-heading > .dropdown .dropdown-toggle { color: inherit; } .panel-title { margin-top: 0; margin-bottom: 0; font-size: 16px; color: inherit; } .panel-title > a { color: inherit; } .panel-footer { padding: 10px 15px; background-color: #f5f5f5; border-top: 1px solid #dddddd; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; } .panel > .list-group, .panel > .panel-collapse > .list-group { margin-bottom: 0; } .panel > .list-group .list-group-item, .panel > .panel-collapse > .list-group .list-group-item { border-width: 1px 0; border-radius: 0; } .panel > .list-group:first-child .list-group-item:first-child, .panel > .panel-collapse > .list-group:first-child .list-group-item:first-child { border-top: 0; border-top-right-radius: 3px; border-top-left-radius: 3px; } .panel > .list-group:last-child .list-group-item:last-child, .panel > .panel-collapse > .list-group:last-child .list-group-item:last-child { border-bottom: 0; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; } .panel-heading + .list-group .list-group-item:first-child { border-top-width: 0; } .list-group + .panel-footer { border-top-width: 0; } .panel > .table, .panel > .table-responsive > .table, .panel > .panel-collapse > .table { margin-bottom: 0; } .panel > .table caption, .panel > .table-responsive > .table caption, .panel > .panel-collapse > .table caption { padding-left: 15px; padding-right: 15px; } .panel > .table:first-child, .panel > .table-responsive:first-child > .table:first-child { border-top-right-radius: 3px; border-top-left-radius: 3px; } .panel > .table:first-child > thead:first-child > tr:first-child, .panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child, .panel > .table:first-child > tbody:first-child > tr:first-child, .panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child { border-top-left-radius: 3px; border-top-right-radius: 3px; } .panel > .table:first-child > thead:first-child > tr:first-child td:first-child, .panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child td:first-child, .panel > .table:first-child > tbody:first-child > tr:first-child td:first-child, .panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child td:first-child, .panel > .table:first-child > thead:first-child > tr:first-child th:first-child, .panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child th:first-child, .panel > .table:first-child > tbody:first-child > tr:first-child th:first-child, .panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child th:first-child { border-top-left-radius: 3px; } .panel > .table:first-child > thead:first-child > tr:first-child td:last-child, .panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child td:last-child, .panel > .table:first-child > tbody:first-child > tr:first-child td:last-child, .panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child td:last-child, .panel > .table:first-child > thead:first-child > tr:first-child th:last-child, .panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child th:last-child, .panel > .table:first-child > tbody:first-child > tr:first-child th:last-child, .panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child th:last-child { border-top-right-radius: 3px; } .panel > .table:last-child, .panel > .table-responsive:last-child > .table:last-child { border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; } .panel > .table:last-child > tbody:last-child > tr:last-child, .panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child, .panel > .table:last-child > tfoot:last-child > tr:last-child, .panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child { border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; } .panel > .table:last-child > tbody:last-child > tr:last-child td:first-child, .panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child td:first-child, .panel > .table:last-child > tfoot:last-child > tr:last-child td:first-child, .panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child td:first-child, .panel > .table:last-child > tbody:last-child > tr:last-child th:first-child, .panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child th:first-child, .panel > .table:last-child > tfoot:last-child > tr:last-child th:first-child, .panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child th:first-child { border-bottom-left-radius: 3px; } .panel > .table:last-child > tbody:last-child > tr:last-child td:last-child, .panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child td:last-child, .panel > .table:last-child > tfoot:last-child > tr:last-child td:last-child, .panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child td:last-child, .panel > .table:last-child > tbody:last-child > tr:last-child th:last-child, .panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child th:last-child, .panel > .table:last-child > tfoot:last-child > tr:last-child th:last-child, .panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child th:last-child { border-bottom-right-radius: 3px; } .panel > .panel-body + .table, .panel > .panel-body + .table-responsive, .panel > .table + .panel-body, .panel > .table-responsive + .panel-body { border-top: 1px solid #dddddd; } .panel > .table > tbody:first-child > tr:first-child th, .panel > .table > tbody:first-child > tr:first-child td { border-top: 0; } .panel > .table-bordered, .panel > .table-responsive > .table-bordered { border: 0; } .panel > .table-bordered > thead > tr > th:first-child, .panel > .table-responsive > .table-bordered > thead > tr > th:first-child, .panel > .table-bordered > tbody > tr > th:first-child, .panel > .table-responsive > .table-bordered > tbody > tr > th:first-child, .panel > .table-bordered > tfoot > tr > th:first-child, .panel > .table-responsive > .table-bordered > tfoot > tr > th:first-child, .panel > .table-bordered > thead > tr > td:first-child, .panel > .table-responsive > .table-bordered > thead > tr > td:first-child, .panel > .table-bordered > tbody > tr > td:first-child, .panel > .table-responsive > .table-bordered > tbody > tr > td:first-child, .panel > .table-bordered > tfoot > tr > td:first-child, .panel > .table-responsive > .table-bordered > tfoot > tr > td:first-child { border-left: 0; } .panel > .table-bordered > thead > tr > th:last-child, .panel > .table-responsive > .table-bordered > thead > tr > th:last-child, .panel > .table-bordered > tbody > tr > th:last-child, .panel > .table-responsive > .table-bordered > tbody > tr > th:last-child, .panel > .table-bordered > tfoot > tr > th:last-child, .panel > .table-responsive > .table-bordered > tfoot > tr > th:last-child, .panel > .table-bordered > thead > tr > td:last-child, .panel > .table-responsive > .table-bordered > thead > tr > td:last-child, .panel > .table-bordered > tbody > tr > td:last-child, .panel > .table-responsive > .table-bordered > tbody > tr > td:last-child, .panel > .table-bordered > tfoot > tr > td:last-child, .panel > .table-responsive > .table-bordered > tfoot > tr > td:last-child { border-right: 0; } .panel > .table-bordered > thead > tr:first-child > td, .panel > .table-responsive > .table-bordered > thead > tr:first-child > td, .panel > .table-bordered > tbody > tr:first-child > td, .panel > .table-responsive > .table-bordered > tbody > tr:first-child > td, .panel > .table-bordered > thead > tr:first-child > th, .panel > .table-responsive > .table-bordered > thead > tr:first-child > th, .panel > .table-bordered > tbody > tr:first-child > th, .panel > .table-responsive > .table-bordered > tbody > tr:first-child > th { border-bottom: 0; } .panel > .table-bordered > tbody > tr:last-child > td, .panel > .table-responsive > .table-bordered > tbody > tr:last-child > td, .panel > .table-bordered > tfoot > tr:last-child > td, .panel > .table-responsive > .table-bordered > tfoot > tr:last-child > td, .panel > .table-bordered > tbody > tr:last-child > th, .panel > .table-responsive > .table-bordered > tbody > tr:last-child > th, .panel > .table-bordered > tfoot > tr:last-child > th, .panel > .table-responsive > .table-bordered > tfoot > tr:last-child > th { border-bottom: 0; } .panel > .table-responsive { border: 0; margin-bottom: 0; } .panel-group { margin-bottom: 20px; } .panel-group .panel { margin-bottom: 0; border-radius: 4px; } .panel-group .panel + .panel { margin-top: 5px; } .panel-group .panel-heading { border-bottom: 0; } .panel-group .panel-heading + .panel-collapse > .panel-body, .panel-group .panel-heading + .panel-collapse > .list-group { border-top: 1px solid #dddddd; } .panel-group .panel-footer { border-top: 0; } .panel-group .panel-footer + .panel-collapse .panel-body { border-bottom: 1px solid #dddddd; } .panel-default { border-color: #dddddd; } .panel-default > .panel-heading { color: #333333; background-color: #f5f5f5; border-color: #dddddd; } .panel-default > .panel-heading + .panel-collapse > .panel-body { border-top-color: #dddddd; } .panel-default > .panel-heading .badge { color: #f5f5f5; background-color: #333333; } .panel-default > .panel-footer + .panel-collapse > .panel-body { border-bottom-color: #dddddd; } .panel-primary { border-color: #337ab7; } .panel-primary > .panel-heading { color: #ffffff; background-color: #337ab7; border-color: #337ab7; } .panel-primary > .panel-heading + .panel-collapse > .panel-body { border-top-color: #337ab7; } .panel-primary > .panel-heading .badge { color: #337ab7; background-color: #ffffff; } .panel-primary > .panel-footer + .panel-collapse > .panel-body { border-bottom-color: #337ab7; } .panel-success { border-color: #d6e9c6; } .panel-success > .panel-heading { color: #3c763d; background-color: #dff0d8; border-color: #d6e9c6; } .panel-success > .panel-heading + .panel-collapse > .panel-body { border-top-color: #d6e9c6; } .panel-success > .panel-heading .badge { color: #dff0d8; background-color: #3c763d; } .panel-success > .panel-footer + .panel-collapse > .panel-body { border-bottom-color: #d6e9c6; } .panel-info { border-color: #bce8f1; } .panel-info > .panel-heading { color: #31708f; background-color: #d9edf7; border-color: #bce8f1; } .panel-info > .panel-heading + .panel-collapse > .panel-body { border-top-color: #bce8f1; } .panel-info > .panel-heading .badge { color: #d9edf7; background-color: #31708f; } .panel-info > .panel-footer + .panel-collapse > .panel-body { border-bottom-color: #bce8f1; } .panel-warning { border-color: #faebcc; } .panel-warning > .panel-heading { color: #8a6d3b; background-color: #fcf8e3; border-color: #faebcc; } .panel-warning > .panel-heading + .panel-collapse > .panel-body { border-top-color: #faebcc; } .panel-warning > .panel-heading .badge { color: #fcf8e3; background-color: #8a6d3b; } .panel-warning > .panel-footer + .panel-collapse > .panel-body { border-bottom-color: #faebcc; } .panel-danger { border-color: #ebccd1; } .panel-danger > .panel-heading { color: #a94442; background-color: #f2dede; border-color: #ebccd1; } .panel-danger > .panel-heading + .panel-collapse > .panel-body { border-top-color: #ebccd1; } .panel-danger > .panel-heading .badge { color: #f2dede; background-color: #a94442; } .panel-danger > .panel-footer + .panel-collapse > .panel-body { border-bottom-color: #ebccd1; } .embed-responsive { position: relative; display: block; height: 0; padding: 0; overflow: hidden; } .embed-responsive .embed-responsive-item, .embed-responsive iframe, .embed-responsive embed, .embed-responsive object, .embed-responsive video { position: absolute; top: 0; left: 0; bottom: 0; height: 100%; width: 100%; border: 0; } .embed-responsive.embed-responsive-16by9 { padding-bottom: 56.25%; } .embed-responsive.embed-responsive-4by3 { padding-bottom: 75%; } .well { min-height: 20px; padding: 19px; margin-bottom: 20px; background-color: #f5f5f5; border: 1px solid #e3e3e3; border-radius: 4px; box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05); } .well blockquote { border-color: #ddd; border-color: rgba(0, 0, 0, 0.15); } .well-lg { padding: 24px; border-radius: 6px; } .well-sm { padding: 9px; border-radius: 3px; } .close { float: right; font-size: 21px; font-weight: bold; line-height: 1; color: #000000; text-shadow: 0 1px 0 #ffffff; opacity: 0.2; filter: alpha(opacity=20); } .close:hover, .close:focus { color: #000000; text-decoration: none; cursor: pointer; opacity: 0.5; filter: alpha(opacity=50); } button.close { padding: 0; cursor: pointer; background: transparent; border: 0; -webkit-appearance: none; } .modal-open { overflow: hidden; } .modal { display: none; overflow: hidden; position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 1040; -webkit-overflow-scrolling: touch; outline: 0; } .modal.fade .modal-dialog { -webkit-transform: translate(0, -25%); -ms-transform: translate(0, -25%); transform: translate(0, -25%); transition: -webkit-transform 0.3s ease-out; transition: transform 0.3s ease-out; } .modal.in .modal-dialog { -webkit-transform: translate(0, 0); -ms-transform: translate(0, 0); transform: translate(0, 0); } .modal-open .modal { overflow-x: hidden; overflow-y: auto; } .modal-dialog { position: relative; width: auto; margin: 10px; } .modal-content { position: relative; background-color: #ffffff; border: 1px solid #999999; border: 1px solid rgba(0, 0, 0, 0.2); border-radius: 6px; box-shadow: 0 3px 9px rgba(0, 0, 0, 0.5); background-clip: padding-box; outline: 0; } .modal-backdrop { position: absolute; top: 0; right: 0; left: 0; background-color: #000000; } .modal-backdrop.fade { opacity: 0; filter: alpha(opacity=0); } .modal-backdrop.in { opacity: 0.5; filter: alpha(opacity=50); } .modal-header { padding: 15px; border-bottom: 1px solid #e5e5e5; min-height: 16.42857143px; } .modal-header .close { margin-top: -2px; } .modal-title { margin: 0; line-height: 1.42857143; } .modal-body { position: relative; padding: 15px; } .modal-footer { padding: 15px; text-align: right; border-top: 1px solid #e5e5e5; } .modal-footer .btn + .btn { margin-left: 5px; margin-bottom: 0; } .modal-footer .btn-group .btn + .btn { margin-left: -1px; } .modal-footer .btn-block + .btn-block { margin-left: 0; } .modal-scrollbar-measure { position: absolute; top: -9999px; width: 50px; height: 50px; overflow: scroll; } @media (min-width: 768px) { .modal-dialog { width: 600px; margin: 30px auto; } .modal-content { box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5); } .modal-sm { width: 300px; } } @media (min-width: 992px) { .modal-lg { width: 900px; } } .tooltip { position: absolute; z-index: 1070; display: block; visibility: visible; font-family: "Roboto", Helvetica, Arial, sans-serif; font-size: 12px; font-weight: normal; line-height: 1.4; opacity: 0; filter: alpha(opacity=0); } .tooltip.in { opacity: 0.9; filter: alpha(opacity=90); } .tooltip.top { margin-top: -3px; padding: 5px 0; } .tooltip.right { margin-left: 3px; padding: 0 5px; } .tooltip.bottom { margin-top: 3px; padding: 5px 0; } .tooltip.left { margin-left: -3px; padding: 0 5px; } .tooltip-inner { max-width: 200px; padding: 3px 8px; color: #ffffff; text-align: center; text-decoration: none; background-color: #000000; border-radius: 4px; } .tooltip-arrow { position: absolute; width: 0; height: 0; border-color: transparent; border-style: solid; } .tooltip.top .tooltip-arrow { bottom: 0; left: 50%; margin-left: -5px; border-width: 5px 5px 0; border-top-color: #000000; } .tooltip.top-left .tooltip-arrow { bottom: 0; right: 5px; margin-bottom: -5px; border-width: 5px 5px 0; border-top-color: #000000; } .tooltip.top-right .tooltip-arrow { bottom: 0; left: 5px; margin-bottom: -5px; border-width: 5px 5px 0; border-top-color: #000000; } .tooltip.right .tooltip-arrow { top: 50%; left: 0; margin-top: -5px; border-width: 5px 5px 5px 0; border-right-color: #000000; } .tooltip.left .tooltip-arrow { top: 50%; right: 0; margin-top: -5px; border-width: 5px 0 5px 5px; border-left-color: #000000; } .tooltip.bottom .tooltip-arrow { top: 0; left: 50%; margin-left: -5px; border-width: 0 5px 5px; border-bottom-color: #000000; } .tooltip.bottom-left .tooltip-arrow { top: 0; right: 5px; margin-top: -5px; border-width: 0 5px 5px; border-bottom-color: #000000; } .tooltip.bottom-right .tooltip-arrow { top: 0; left: 5px; margin-top: -5px; border-width: 0 5px 5px; border-bottom-color: #000000; } .popover { position: absolute; top: 0; left: 0; z-index: 1060; display: none; max-width: 276px; padding: 1px; font-family: "Roboto", Helvetica, Arial, sans-serif; font-size: 14px; font-weight: normal; line-height: 1.42857143; text-align: left; background-color: #ffffff; background-clip: padding-box; border: 1px solid #cccccc; border: 1px solid rgba(0, 0, 0, 0.2); border-radius: 6px; box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2); white-space: normal; } .popover.top { margin-top: -10px; } .popover.right { margin-left: 10px; } .popover.bottom { margin-top: 10px; } .popover.left { margin-left: -10px; } .popover-title { margin: 0; padding: 8px 14px; font-size: 14px; background-color: #f7f7f7; border-bottom: 1px solid #ebebeb; border-radius: 5px 5px 0 0; } .popover-content { padding: 9px 14px; } .popover > .arrow, .popover > .arrow:after { position: absolute; display: block; width: 0; height: 0; border-color: transparent; border-style: solid; } .popover > .arrow { border-width: 11px; } .popover > .arrow:after { border-width: 10px; content: ""; } .popover.top > .arrow { left: 50%; margin-left: -11px; border-bottom-width: 0; border-top-color: #999999; border-top-color: rgba(0, 0, 0, 0.25); bottom: -11px; } .popover.top > .arrow:after { content: " "; bottom: 1px; margin-left: -10px; border-bottom-width: 0; border-top-color: #ffffff; } .popover.right > .arrow { top: 50%; left: -11px; margin-top: -11px; border-left-width: 0; border-right-color: #999999; border-right-color: rgba(0, 0, 0, 0.25); } .popover.right > .arrow:after { content: " "; left: 1px; bottom: -10px; border-left-width: 0; border-right-color: #ffffff; } .popover.bottom > .arrow { left: 50%; margin-left: -11px; border-top-width: 0; border-bottom-color: #999999; border-bottom-color: rgba(0, 0, 0, 0.25); top: -11px; } .popover.bottom > .arrow:after { content: " "; top: 1px; margin-left: -10px; border-top-width: 0; border-bottom-color: #ffffff; } .popover.left > .arrow { top: 50%; right: -11px; margin-top: -11px; border-right-width: 0; border-left-color: #999999; border-left-color: rgba(0, 0, 0, 0.25); } .popover.left > .arrow:after { content: " "; right: 1px; border-right-width: 0; border-left-color: #ffffff; bottom: -10px; } .carousel { position: relative; } .carousel-inner { position: relative; overflow: hidden; width: 100%; } .carousel-inner > .item { display: none; position: relative; transition: 0.6s ease-in-out left; } .carousel-inner > .item > img, .carousel-inner > .item > a > img { line-height: 1; } @media all and (transform-3d), (-webkit-transform-3d) { .carousel-inner > .item { transition: -webkit-transform 0.6s ease-in-out; transition: transform 0.6s ease-in-out; -webkit-backface-visibility: hidden; backface-visibility: hidden; -webkit-perspective: 1000; perspective: 1000; } .carousel-inner > .item.next, .carousel-inner > .item.active.right { -webkit-transform: translate3d(100%, 0, 0); transform: translate3d(100%, 0, 0); left: 0; } .carousel-inner > .item.prev, .carousel-inner > .item.active.left { -webkit-transform: translate3d(-100%, 0, 0); transform: translate3d(-100%, 0, 0); left: 0; } .carousel-inner > .item.next.left, .carousel-inner > .item.prev.right, .carousel-inner > .item.active { -webkit-transform: translate3d(0, 0, 0); transform: translate3d(0, 0, 0); left: 0; } } .carousel-inner > .active, .carousel-inner > .next, .carousel-inner > .prev { display: block; } .carousel-inner > .active { left: 0; } .carousel-inner > .next, .carousel-inner > .prev { position: absolute; top: 0; width: 100%; } .carousel-inner > .next { left: 100%; } .carousel-inner > .prev { left: -100%; } .carousel-inner > .next.left, .carousel-inner > .prev.right { left: 0; } .carousel-inner > .active.left { left: -100%; } .carousel-inner > .active.right { left: 100%; } .carousel-control { position: absolute; top: 0; left: 0; bottom: 0; width: 15%; opacity: 0.5; filter: alpha(opacity=50); font-size: 20px; color: #ffffff; text-align: center; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6); } .carousel-control.left { background-image: linear-gradient(to right, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0.0001) 100%); background-repeat: repeat-x; filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#80000000', endColorstr='#00000000', GradientType=1); } .carousel-control.right { left: auto; right: 0; background-image: linear-gradient(to right, rgba(0, 0, 0, 0.0001) 0%, rgba(0, 0, 0, 0.5) 100%); background-repeat: repeat-x; filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#00000000', endColorstr='#80000000', GradientType=1); } .carousel-control:hover, .carousel-control:focus { outline: 0; color: #ffffff; text-decoration: none; opacity: 0.9; filter: alpha(opacity=90); } .carousel-control .icon-prev, .carousel-control .icon-next, .carousel-control .glyphicon-chevron-left, .carousel-control .glyphicon-chevron-right { position: absolute; top: 50%; z-index: 5; display: inline-block; } .carousel-control .icon-prev, .carousel-control .glyphicon-chevron-left { left: 50%; margin-left: -10px; } .carousel-control .icon-next, .carousel-control .glyphicon-chevron-right { right: 50%; margin-right: -10px; } .carousel-control .icon-prev, .carousel-control .icon-next { width: 20px; height: 20px; margin-top: -10px; font-family: serif; } .carousel-control .icon-prev:before { content: '\2039'; } .carousel-control .icon-next:before { content: '\203a'; } .carousel-indicators { position: absolute; bottom: 10px; left: 50%; z-index: 15; width: 60%; margin-left: -30%; padding-left: 0; list-style: none; text-align: center; } .carousel-indicators li { display: inline-block; width: 10px; height: 10px; margin: 1px; text-indent: -999px; border: 1px solid #ffffff; border-radius: 10px; cursor: pointer; background-color: #000 \9; background-color: rgba(0, 0, 0, 0); } .carousel-indicators .active { margin: 0; width: 12px; height: 12px; background-color: #ffffff; } .carousel-caption { position: absolute; left: 15%; right: 15%; bottom: 20px; z-index: 10; padding-top: 20px; padding-bottom: 20px; color: #ffffff; text-align: center; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6); } .carousel-caption .btn { text-shadow: none; } @media screen and (min-width: 768px) { .carousel-control .glyphicon-chevron-left, .carousel-control .glyphicon-chevron-right, .carousel-control .icon-prev, .carousel-control .icon-next { width: 30px; height: 30px; margin-top: -15px; font-size: 30px; } .carousel-control .glyphicon-chevron-left, .carousel-control .icon-prev { margin-left: -15px; } .carousel-control .glyphicon-chevron-right, .carousel-control .icon-next { margin-right: -15px; } .carousel-caption { left: 20%; right: 20%; padding-bottom: 30px; } .carousel-indicators { bottom: 20px; } } .clearfix:before, .clearfix:after, .dl-horizontal dd:before, .dl-horizontal dd:after, .container:before, .container:after, .container-fluid:before, .container-fluid:after, .row:before, .row:after, .form-horizontal .form-group:before, .form-horizontal .form-group:after, .btn-toolbar:before, .btn-toolbar:after, .btn-group-vertical > .btn-group:before, .btn-group-vertical > .btn-group:after, .nav:before, .nav:after, .navbar:before, .navbar:after, .navbar-header:before, .navbar-header:after, .navbar-collapse:before, .navbar-collapse:after, .pager:before, .pager:after, .panel-body:before, .panel-body:after, .modal-footer:before, .modal-footer:after { content: " "; display: table; } .clearfix:after, .dl-horizontal dd:after, .container:after, .container-fluid:after, .row:after, .form-horizontal .form-group:after, .btn-toolbar:after, .btn-group-vertical > .btn-group:after, .nav:after, .navbar:after, .navbar-header:after, .navbar-collapse:after, .pager:after, .panel-body:after, .modal-footer:after { clear: both; } .center-block { display: block; margin-left: auto; margin-right: auto; } .pull-right { float: right !important; } .pull-left { float: left !important; } .hide { display: none !important; } .show { display: block !important; } .invisible { visibility: hidden; } .text-hide { font: 0/0 a; color: transparent; text-shadow: none; background-color: transparent; border: 0; } .hidden { display: none !important; visibility: hidden !important; } .affix { position: fixed; } @-ms-viewport { width: device-width; } .visible-xs, .visible-sm, .visible-md, .visible-lg { display: none !important; } .visible-xs-block, .visible-xs-inline, .visible-xs-inline-block, .visible-sm-block, .visible-sm-inline, .visible-sm-inline-block, .visible-md-block, .visible-md-inline, .visible-md-inline-block, .visible-lg-block, .visible-lg-inline, .visible-lg-inline-block { display: none !important; } @media (max-width: 767px) { .visible-xs { display: block !important; } table.visible-xs { display: table; } tr.visible-xs { display: table-row !important; } th.visible-xs, td.visible-xs { display: table-cell !important; } } @media (max-width: 767px) { .visible-xs-block { display: block !important; } } @media (max-width: 767px) { .visible-xs-inline { display: inline !important; } } @media (max-width: 767px) { .visible-xs-inline-block { display: inline-block !important; } } @media (min-width: 768px) and (max-width: 991px) { .visible-sm { display: block !important; } table.visible-sm { display: table; } tr.visible-sm { display: table-row !important; } th.visible-sm, td.visible-sm { display: table-cell !important; } } @media (min-width: 768px) and (max-width: 991px) { .visible-sm-block { display: block !important; } } @media (min-width: 768px) and (max-width: 991px) { .visible-sm-inline { display: inline !important; } } @media (min-width: 768px) and (max-width: 991px) { .visible-sm-inline-block { display: inline-block !important; } } @media (min-width: 992px) and (max-width: 1199px) { .visible-md { display: block !important; } table.visible-md { display: table; } tr.visible-md { display: table-row !important; } th.visible-md, td.visible-md { display: table-cell !important; } } @media (min-width: 992px) and (max-width: 1199px) { .visible-md-block { display: block !important; } } @media (min-width: 992px) and (max-width: 1199px) { .visible-md-inline { display: inline !important; } } @media (min-width: 992px) and (max-width: 1199px) { .visible-md-inline-block { display: inline-block !important; } } @media (min-width: 1200px) { .visible-lg { display: block !important; } table.visible-lg { display: table; } tr.visible-lg { display: table-row !important; } th.visible-lg, td.visible-lg { display: table-cell !important; } } @media (min-width: 1200px) { .visible-lg-block { display: block !important; } } @media (min-width: 1200px) { .visible-lg-inline { display: inline !important; } } @media (min-width: 1200px) { .visible-lg-inline-block { display: inline-block !important; } } @media (max-width: 767px) { .hidden-xs { display: none !important; } } @media (min-width: 768px) and (max-width: 991px) { .hidden-sm { display: none !important; } } @media (min-width: 992px) and (max-width: 1199px) { .hidden-md { display: none !important; } } @media (min-width: 1200px) { .hidden-lg { display: none !important; } } .visible-print { display: none !important; } @media print { .visible-print { display: block !important; } table.visible-print { display: table; } tr.visible-print { display: table-row !important; } th.visible-print, td.visible-print { display: table-cell !important; } } .visible-print-block { display: none !important; } @media print { .visible-print-block { display: block !important; } } .visible-print-inline { display: none !important; } @media print { .visible-print-inline { display: inline !important; } } .visible-print-inline-block { display: none !important; } @media print { .visible-print-inline-block { display: inline-block !important; } } @media print { .hidden-print { display: none !important; } } .ansi_box { background-color: black; overflow: auto; padding: 10px 15px; font-family: monospace; } .form-group.required .control-label:after { content: "*"; color: red; } .list-group-item.selected { font-weight: bold; } .list-group-item.selected:before { position: absolute; top: 0; left: 0; bottom: 0; width: 2px; content: ""; background-color: #d26911; } .margin-bottom-xs { margin-bottom: 3px !important; } .margin-bottom-sm { margin-bottom: 6px !important; } .margin-bottom-md { margin-bottom: 15px !important; } .margin-bottom-lg { margin-bottom: 30px !important; } .green { color: #5cb85c; } .red { color: #d9534f; } .gray { color: gray; } body, label, .checkbox label { font-weight: 300; } /*# sourceMappingURL=app.css.map */ ================================================ FILE: public/index.php ================================================ */ /* |-------------------------------------------------------------------------- | Register The Auto Loader |-------------------------------------------------------------------------- | | Composer provides a convenient, automatically generated class loader for | our application. We just need to utilize it! We'll simply require it | into the script here so that we don't have to worry about manual | loading any of our classes later on. It feels nice to relax. | */ require __DIR__.'/../bootstrap/autoload.php'; /* |-------------------------------------------------------------------------- | Turn On The Lights |-------------------------------------------------------------------------- | | We need to illuminate PHP development, so let us turn on the lights. | This bootstraps the framework and gets it ready for use, then it | will load up this application so that we can run it and send | the responses back to the browser and delight our users. | */ $app = require_once __DIR__.'/../bootstrap/app.php'; /* |-------------------------------------------------------------------------- | Run The Application |-------------------------------------------------------------------------- | | Once we have the application, we can handle the incoming request | through the kernel, and send the associated response back to | the client's browser allowing them to enjoy the creative | and wonderful application we have prepared for them. | */ $kernel = $app->make('Illuminate\Contracts\Http\Kernel'); $response = $kernel->handle( $request = Illuminate\Http\Request::capture() ); $response->send(); $kernel->terminate($request, $response); ================================================ FILE: public/js/.gitignore ================================================ /vendor ================================================ FILE: public/robots.txt ================================================ User-agent: * Disallow: ================================================ FILE: resources/assets/less/app.less ================================================ @import "bootstrap/bootstrap"; @import "webloyer/bootstrap"; @btn-font-weight: 300; @font-family-sans-serif: "Roboto", Helvetica, Arial, sans-serif; body, label, .checkbox label { font-weight: 300; } ================================================ FILE: resources/assets/less/bootstrap/alerts.less ================================================ // // Alerts // -------------------------------------------------- // Base styles // ------------------------- .alert { padding: @alert-padding; margin-bottom: @line-height-computed; border: 1px solid transparent; border-radius: @alert-border-radius; // Headings for larger alerts h4 { margin-top: 0; // Specified for the h4 to prevent conflicts of changing @headings-color color: inherit; } // Provide class for links that match alerts .alert-link { font-weight: @alert-link-font-weight; } // Improve alignment and spacing of inner content > p, > ul { margin-bottom: 0; } > p + p { margin-top: 5px; } } // Dismissible alerts // // Expand the right padding and account for the close button's positioning. .alert-dismissable, // The misspelled .alert-dismissable was deprecated in 3.2.0. .alert-dismissible { padding-right: (@alert-padding + 20); // Adjust close link position .close { position: relative; top: -2px; right: -21px; color: inherit; } } // Alternate styles // // Generate contextual modifier classes for colorizing the alert. .alert-success { .alert-variant(@alert-success-bg; @alert-success-border; @alert-success-text); } .alert-info { .alert-variant(@alert-info-bg; @alert-info-border; @alert-info-text); } .alert-warning { .alert-variant(@alert-warning-bg; @alert-warning-border; @alert-warning-text); } .alert-danger { .alert-variant(@alert-danger-bg; @alert-danger-border; @alert-danger-text); } ================================================ FILE: resources/assets/less/bootstrap/badges.less ================================================ // // Badges // -------------------------------------------------- // Base class .badge { display: inline-block; min-width: 10px; padding: 3px 7px; font-size: @font-size-small; font-weight: @badge-font-weight; color: @badge-color; line-height: @badge-line-height; vertical-align: baseline; white-space: nowrap; text-align: center; background-color: @badge-bg; border-radius: @badge-border-radius; // Empty badges collapse automatically (not available in IE8) &:empty { display: none; } // Quick fix for badges in buttons .btn & { position: relative; top: -1px; } .btn-xs & { top: 0; padding: 1px 5px; } // Hover state, but only for links a& { &:hover, &:focus { color: @badge-link-hover-color; text-decoration: none; cursor: pointer; } } // Account for badges in navs .list-group-item.active > &, .nav-pills > .active > a > & { color: @badge-active-color; background-color: @badge-active-bg; } .list-group-item > & { float: right; } .list-group-item > & + & { margin-right: 5px; } .nav-pills > li > a > & { margin-left: 3px; } } ================================================ FILE: resources/assets/less/bootstrap/bootstrap.less ================================================ // Core variables and mixins @import "variables.less"; @import "mixins.less"; // Reset and dependencies @import "normalize.less"; @import "print.less"; @import "glyphicons.less"; // Core CSS @import "scaffolding.less"; @import "type.less"; @import "code.less"; @import "grid.less"; @import "tables.less"; @import "forms.less"; @import "buttons.less"; // Components @import "component-animations.less"; @import "dropdowns.less"; @import "button-groups.less"; @import "input-groups.less"; @import "navs.less"; @import "navbar.less"; @import "breadcrumbs.less"; @import "pagination.less"; @import "pager.less"; @import "labels.less"; @import "badges.less"; @import "jumbotron.less"; @import "thumbnails.less"; @import "alerts.less"; @import "progress-bars.less"; @import "media.less"; @import "list-group.less"; @import "panels.less"; @import "responsive-embed.less"; @import "wells.less"; @import "close.less"; // Components w/ JavaScript @import "modals.less"; @import "tooltip.less"; @import "popovers.less"; @import "carousel.less"; // Utility classes @import "utilities.less"; @import "responsive-utilities.less"; ================================================ FILE: resources/assets/less/bootstrap/breadcrumbs.less ================================================ // // Breadcrumbs // -------------------------------------------------- .breadcrumb { padding: @breadcrumb-padding-vertical @breadcrumb-padding-horizontal; margin-bottom: @line-height-computed; list-style: none; background-color: @breadcrumb-bg; border-radius: @border-radius-base; > li { display: inline-block; + li:before { content: "@{breadcrumb-separator}\00a0"; // Unicode space added since inline-block means non-collapsing white-space padding: 0 5px; color: @breadcrumb-color; } } > .active { color: @breadcrumb-active-color; } } ================================================ FILE: resources/assets/less/bootstrap/button-groups.less ================================================ // // Button groups // -------------------------------------------------- // Make the div behave like a button .btn-group, .btn-group-vertical { position: relative; display: inline-block; vertical-align: middle; // match .btn alignment given font-size hack above > .btn { position: relative; float: left; // Bring the "active" button to the front &:hover, &:focus, &:active, &.active { z-index: 2; } } } // Prevent double borders when buttons are next to each other .btn-group { .btn + .btn, .btn + .btn-group, .btn-group + .btn, .btn-group + .btn-group { margin-left: -1px; } } // Optional: Group multiple button groups together for a toolbar .btn-toolbar { margin-left: -5px; // Offset the first child's margin &:extend(.clearfix all); .btn-group, .input-group { float: left; } > .btn, > .btn-group, > .input-group { margin-left: 5px; } } .btn-group > .btn:not(:first-child):not(:last-child):not(.dropdown-toggle) { border-radius: 0; } // 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 .btn-group > .btn:first-child { margin-left: 0; &:not(:last-child):not(.dropdown-toggle) { .border-right-radius(0); } } // Need .dropdown-toggle since :last-child doesn't apply given a .dropdown-menu immediately after it .btn-group > .btn:last-child:not(:first-child), .btn-group > .dropdown-toggle:not(:first-child) { .border-left-radius(0); } // Custom edits for including btn-groups within btn-groups (useful for including dropdown buttons within a btn-group) .btn-group > .btn-group { float: left; } .btn-group > .btn-group:not(:first-child):not(:last-child) > .btn { border-radius: 0; } .btn-group > .btn-group:first-child { > .btn:last-child, > .dropdown-toggle { .border-right-radius(0); } } .btn-group > .btn-group:last-child > .btn:first-child { .border-left-radius(0); } // On active and open, don't show outline .btn-group .dropdown-toggle:active, .btn-group.open .dropdown-toggle { outline: 0; } // Sizing // // Remix the default button sizing classes into new ones for easier manipulation. .btn-group-xs > .btn { &:extend(.btn-xs); } .btn-group-sm > .btn { &:extend(.btn-sm); } .btn-group-lg > .btn { &:extend(.btn-lg); } // Split button dropdowns // ---------------------- // Give the line between buttons some depth .btn-group > .btn + .dropdown-toggle { padding-left: 8px; padding-right: 8px; } .btn-group > .btn-lg + .dropdown-toggle { padding-left: 12px; padding-right: 12px; } // The clickable button for toggling the menu // Remove the gradient and set the same inset shadow as the :active state .btn-group.open .dropdown-toggle { .box-shadow(inset 0 3px 5px rgba(0,0,0,.125)); // Show no shadow for `.btn-link` since it has no other button styles. &.btn-link { .box-shadow(none); } } // Reposition the caret .btn .caret { margin-left: 0; } // Carets in other button sizes .btn-lg .caret { border-width: @caret-width-large @caret-width-large 0; border-bottom-width: 0; } // Upside down carets for .dropup .dropup .btn-lg .caret { border-width: 0 @caret-width-large @caret-width-large; } // Vertical button groups // ---------------------- .btn-group-vertical { > .btn, > .btn-group, > .btn-group > .btn { display: block; float: none; width: 100%; max-width: 100%; } // Clear floats so dropdown menus can be properly placed > .btn-group { &:extend(.clearfix all); > .btn { float: none; } } > .btn + .btn, > .btn + .btn-group, > .btn-group + .btn, > .btn-group + .btn-group { margin-top: -1px; margin-left: 0; } } .btn-group-vertical > .btn { &:not(:first-child):not(:last-child) { border-radius: 0; } &:first-child:not(:last-child) { border-top-right-radius: @border-radius-base; .border-bottom-radius(0); } &:last-child:not(:first-child) { border-bottom-left-radius: @border-radius-base; .border-top-radius(0); } } .btn-group-vertical > .btn-group:not(:first-child):not(:last-child) > .btn { border-radius: 0; } .btn-group-vertical > .btn-group:first-child:not(:last-child) { > .btn:last-child, > .dropdown-toggle { .border-bottom-radius(0); } } .btn-group-vertical > .btn-group:last-child:not(:first-child) > .btn:first-child { .border-top-radius(0); } // Justified button groups // ---------------------- .btn-group-justified { display: table; width: 100%; table-layout: fixed; border-collapse: separate; > .btn, > .btn-group { float: none; display: table-cell; width: 1%; } > .btn-group .btn { width: 100%; } > .btn-group .dropdown-menu { left: auto; } } // Checkbox and radio options // // In order to support the browser's form validation feedback, powered by the // `required` attribute, we have to "hide" the inputs via `clip`. We cannot use // `display: none;` or `visibility: hidden;` as that also hides the popover. // Simply visually hiding the inputs via `opacity` would leave them clickable in // certain cases which is prevented by using `clip` and `pointer-events`. // This way, we ensure a DOM element is visible to position the popover from. // // See https://github.com/twbs/bootstrap/pull/12794 and // https://github.com/twbs/bootstrap/pull/14559 for more information. [data-toggle="buttons"] { > .btn, > .btn-group > .btn { input[type="radio"], input[type="checkbox"] { position: absolute; clip: rect(0,0,0,0); pointer-events: none; } } } ================================================ FILE: resources/assets/less/bootstrap/buttons.less ================================================ // // Buttons // -------------------------------------------------- // Base styles // -------------------------------------------------- .btn { display: inline-block; margin-bottom: 0; // For input.btn font-weight: @btn-font-weight; text-align: center; vertical-align: middle; touch-action: manipulation; cursor: pointer; background-image: none; // Reset unusual Firefox-on-Android default style; see https://github.com/necolas/normalize.css/issues/214 border: 1px solid transparent; white-space: nowrap; .button-size(@padding-base-vertical; @padding-base-horizontal; @font-size-base; @line-height-base; @border-radius-base); .user-select(none); &, &:active, &.active { &:focus, &.focus { .tab-focus(); } } &:hover, &:focus, &.focus { color: @btn-default-color; text-decoration: none; } &:active, &.active { outline: 0; background-image: none; .box-shadow(inset 0 3px 5px rgba(0,0,0,.125)); } &.disabled, &[disabled], fieldset[disabled] & { cursor: @cursor-disabled; pointer-events: none; // Future-proof disabling of clicks .opacity(.65); .box-shadow(none); } } // Alternate buttons // -------------------------------------------------- .btn-default { .button-variant(@btn-default-color; @btn-default-bg; @btn-default-border); } .btn-primary { .button-variant(@btn-primary-color; @btn-primary-bg; @btn-primary-border); } // Success appears as green .btn-success { .button-variant(@btn-success-color; @btn-success-bg; @btn-success-border); } // Info appears as blue-green .btn-info { .button-variant(@btn-info-color; @btn-info-bg; @btn-info-border); } // Warning appears as orange .btn-warning { .button-variant(@btn-warning-color; @btn-warning-bg; @btn-warning-border); } // Danger and error appear as red .btn-danger { .button-variant(@btn-danger-color; @btn-danger-bg; @btn-danger-border); } // Link buttons // ------------------------- // Make a button look and behave like a link .btn-link { color: @link-color; font-weight: normal; border-radius: 0; &, &:active, &.active, &[disabled], fieldset[disabled] & { background-color: transparent; .box-shadow(none); } &, &:hover, &:focus, &:active { border-color: transparent; } &:hover, &:focus { color: @link-hover-color; text-decoration: underline; background-color: transparent; } &[disabled], fieldset[disabled] & { &:hover, &:focus { color: @btn-link-disabled-color; text-decoration: none; } } } // Button Sizes // -------------------------------------------------- .btn-lg { // line-height: ensure even-numbered height of button next to large input .button-size(@padding-large-vertical; @padding-large-horizontal; @font-size-large; @line-height-large; @border-radius-large); } .btn-sm { // line-height: ensure proper height of button next to small input .button-size(@padding-small-vertical; @padding-small-horizontal; @font-size-small; @line-height-small; @border-radius-small); } .btn-xs { .button-size(@padding-xs-vertical; @padding-xs-horizontal; @font-size-small; @line-height-small; @border-radius-small); } // Block button // -------------------------------------------------- .btn-block { display: block; width: 100%; } // Vertically space out multiple block buttons .btn-block + .btn-block { margin-top: 5px; } // Specificity overrides input[type="submit"], input[type="reset"], input[type="button"] { &.btn-block { width: 100%; } } ================================================ FILE: resources/assets/less/bootstrap/carousel.less ================================================ // // Carousel // -------------------------------------------------- // Wrapper for the slide container and indicators .carousel { position: relative; } .carousel-inner { position: relative; overflow: hidden; width: 100%; > .item { display: none; position: relative; .transition(.6s ease-in-out left); // Account for jankitude on images > img, > a > img { &:extend(.img-responsive); line-height: 1; } // WebKit CSS3 transforms for supported devices @media all and (transform-3d), (-webkit-transform-3d) { transition: transform .6s ease-in-out; backface-visibility: hidden; perspective: 1000; &.next, &.active.right { transform: translate3d(100%, 0, 0); left: 0; } &.prev, &.active.left { transform: translate3d(-100%, 0, 0); left: 0; } &.next.left, &.prev.right, &.active { transform: translate3d(0, 0, 0); left: 0; } } } > .active, > .next, > .prev { display: block; } > .active { left: 0; } > .next, > .prev { position: absolute; top: 0; width: 100%; } > .next { left: 100%; } > .prev { left: -100%; } > .next.left, > .prev.right { left: 0; } > .active.left { left: -100%; } > .active.right { left: 100%; } } // Left/right controls for nav // --------------------------- .carousel-control { position: absolute; top: 0; left: 0; bottom: 0; width: @carousel-control-width; .opacity(@carousel-control-opacity); font-size: @carousel-control-font-size; color: @carousel-control-color; text-align: center; text-shadow: @carousel-text-shadow; // We can't have this transition here because WebKit cancels the carousel // animation if you trip this while in the middle of another animation. // Set gradients for backgrounds &.left { #gradient > .horizontal(@start-color: rgba(0,0,0,.5); @end-color: rgba(0,0,0,.0001)); } &.right { left: auto; right: 0; #gradient > .horizontal(@start-color: rgba(0,0,0,.0001); @end-color: rgba(0,0,0,.5)); } // Hover/focus state &:hover, &:focus { outline: 0; color: @carousel-control-color; text-decoration: none; .opacity(.9); } // Toggles .icon-prev, .icon-next, .glyphicon-chevron-left, .glyphicon-chevron-right { position: absolute; top: 50%; z-index: 5; display: inline-block; } .icon-prev, .glyphicon-chevron-left { left: 50%; margin-left: -10px; } .icon-next, .glyphicon-chevron-right { right: 50%; margin-right: -10px; } .icon-prev, .icon-next { width: 20px; height: 20px; margin-top: -10px; font-family: serif; } .icon-prev { &:before { content: '\2039';// SINGLE LEFT-POINTING ANGLE QUOTATION MARK (U+2039) } } .icon-next { &:before { content: '\203a';// SINGLE RIGHT-POINTING ANGLE QUOTATION MARK (U+203A) } } } // Optional indicator pips // // Add an unordered list with the following class and add a list item for each // slide your carousel holds. .carousel-indicators { position: absolute; bottom: 10px; left: 50%; z-index: 15; width: 60%; margin-left: -30%; padding-left: 0; list-style: none; text-align: center; li { display: inline-block; width: 10px; height: 10px; margin: 1px; text-indent: -999px; border: 1px solid @carousel-indicator-border-color; border-radius: 10px; cursor: pointer; // IE8-9 hack for event handling // // Internet Explorer 8-9 does not support clicks on elements without a set // `background-color`. We cannot use `filter` since that's not viewed as a // background color by the browser. Thus, a hack is needed. // // For IE8, we set solid black as it doesn't support `rgba()`. For IE9, we // set alpha transparency for the best results possible. background-color: #000 \9; // IE8 background-color: rgba(0,0,0,0); // IE9 } .active { margin: 0; width: 12px; height: 12px; background-color: @carousel-indicator-active-bg; } } // Optional captions // ----------------------------- // Hidden by default for smaller viewports .carousel-caption { position: absolute; left: 15%; right: 15%; bottom: 20px; z-index: 10; padding-top: 20px; padding-bottom: 20px; color: @carousel-caption-color; text-align: center; text-shadow: @carousel-text-shadow; & .btn { text-shadow: none; // No shadow for button elements in carousel-caption } } // Scale up controls for tablets and up @media screen and (min-width: @screen-sm-min) { // Scale up the controls a smidge .carousel-control { .glyphicon-chevron-left, .glyphicon-chevron-right, .icon-prev, .icon-next { width: 30px; height: 30px; margin-top: -15px; font-size: 30px; } .glyphicon-chevron-left, .icon-prev { margin-left: -15px; } .glyphicon-chevron-right, .icon-next { margin-right: -15px; } } // Show and left align the captions .carousel-caption { left: 20%; right: 20%; padding-bottom: 30px; } // Move up the indicators .carousel-indicators { bottom: 20px; } } ================================================ FILE: resources/assets/less/bootstrap/close.less ================================================ // // Close icons // -------------------------------------------------- .close { float: right; font-size: (@font-size-base * 1.5); font-weight: @close-font-weight; line-height: 1; color: @close-color; text-shadow: @close-text-shadow; .opacity(.2); &:hover, &:focus { color: @close-color; text-decoration: none; cursor: pointer; .opacity(.5); } // Additional properties for button version // iOS requires the button element instead of an anchor tag. // If you want the anchor version, it requires `href="#"`. button& { padding: 0; cursor: pointer; background: transparent; border: 0; -webkit-appearance: none; } } ================================================ FILE: resources/assets/less/bootstrap/code.less ================================================ // // Code (inline and block) // -------------------------------------------------- // Inline and block code styles code, kbd, pre, samp { font-family: @font-family-monospace; } // Inline code code { padding: 2px 4px; font-size: 90%; color: @code-color; background-color: @code-bg; border-radius: @border-radius-base; } // User input typically entered via keyboard kbd { padding: 2px 4px; font-size: 90%; color: @kbd-color; background-color: @kbd-bg; border-radius: @border-radius-small; box-shadow: inset 0 -1px 0 rgba(0,0,0,.25); kbd { padding: 0; font-size: 100%; font-weight: bold; box-shadow: none; } } // Blocks of code pre { display: block; padding: ((@line-height-computed - 1) / 2); margin: 0 0 (@line-height-computed / 2); font-size: (@font-size-base - 1); // 14px to 13px line-height: @line-height-base; word-break: break-all; word-wrap: break-word; color: @pre-color; background-color: @pre-bg; border: 1px solid @pre-border-color; border-radius: @border-radius-base; // Account for some code outputs that place code tags in pre tags code { padding: 0; font-size: inherit; color: inherit; white-space: pre-wrap; background-color: transparent; border-radius: 0; } } // Enable scrollable blocks of code .pre-scrollable { max-height: @pre-scrollable-max-height; overflow-y: scroll; } ================================================ FILE: resources/assets/less/bootstrap/component-animations.less ================================================ // // Component animations // -------------------------------------------------- // Heads up! // // We don't use the `.opacity()` mixin here since it causes a bug with text // fields in IE7-8. Source: https://github.com/twbs/bootstrap/pull/3552. .fade { opacity: 0; .transition(opacity .15s linear); &.in { opacity: 1; } } .collapse { display: none; visibility: hidden; &.in { display: block; visibility: visible; } tr&.in { display: table-row; } tbody&.in { display: table-row-group; } } .collapsing { position: relative; height: 0; overflow: hidden; .transition-property(~"height, visibility"); .transition-duration(.35s); .transition-timing-function(ease); } ================================================ FILE: resources/assets/less/bootstrap/dropdowns.less ================================================ // // Dropdown menus // -------------------------------------------------- // Dropdown arrow/caret .caret { display: inline-block; width: 0; height: 0; margin-left: 2px; vertical-align: middle; border-top: @caret-width-base solid; border-right: @caret-width-base solid transparent; border-left: @caret-width-base solid transparent; } // The dropdown wrapper (div) .dropdown { position: relative; } // Prevent the focus on the dropdown toggle when closing dropdowns .dropdown-toggle:focus { outline: 0; } // The dropdown menu (ul) .dropdown-menu { position: absolute; top: 100%; left: 0; z-index: @zindex-dropdown; display: none; // none by default, but block on "open" of the menu float: left; min-width: 160px; padding: 5px 0; margin: 2px 0 0; // override default ul list-style: none; font-size: @font-size-base; text-align: left; // Ensures proper alignment if parent has it changed (e.g., modal footer) background-color: @dropdown-bg; border: 1px solid @dropdown-fallback-border; // IE8 fallback border: 1px solid @dropdown-border; border-radius: @border-radius-base; .box-shadow(0 6px 12px rgba(0,0,0,.175)); background-clip: padding-box; // Aligns the dropdown menu to right // // Deprecated as of 3.1.0 in favor of `.dropdown-menu-[dir]` &.pull-right { right: 0; left: auto; } // Dividers (basically an hr) within the dropdown .divider { .nav-divider(@dropdown-divider-bg); } // Links within the dropdown menu > li > a { display: block; padding: 3px 20px; clear: both; font-weight: normal; line-height: @line-height-base; color: @dropdown-link-color; white-space: nowrap; // prevent links from randomly breaking onto new lines } } // Hover/Focus state .dropdown-menu > li > a { &:hover, &:focus { text-decoration: none; color: @dropdown-link-hover-color; background-color: @dropdown-link-hover-bg; } } // Active state .dropdown-menu > .active > a { &, &:hover, &:focus { color: @dropdown-link-active-color; text-decoration: none; outline: 0; background-color: @dropdown-link-active-bg; } } // Disabled state // // Gray out text and ensure the hover/focus state remains gray .dropdown-menu > .disabled > a { &, &:hover, &:focus { color: @dropdown-link-disabled-color; } // Nuke hover/focus effects &:hover, &:focus { text-decoration: none; background-color: transparent; background-image: none; // Remove CSS gradient .reset-filter(); cursor: @cursor-disabled; } } // Open state for the dropdown .open { // Show the menu > .dropdown-menu { display: block; } // Remove the outline when :focus is triggered > a { outline: 0; } } // Menu positioning // // Add extra class to `.dropdown-menu` to flip the alignment of the dropdown // menu with the parent. .dropdown-menu-right { left: auto; // Reset the default from `.dropdown-menu` right: 0; } // With v3, we enabled auto-flipping if you have a dropdown within a right // aligned nav component. To enable the undoing of that, we provide an override // to restore the default dropdown menu alignment. // // This is only for left-aligning a dropdown menu within a `.navbar-right` or // `.pull-right` nav component. .dropdown-menu-left { left: 0; right: auto; } // Dropdown section headers .dropdown-header { display: block; padding: 3px 20px; font-size: @font-size-small; line-height: @line-height-base; color: @dropdown-header-color; white-space: nowrap; // as with > li > a } // Backdrop to catch body clicks on mobile, etc. .dropdown-backdrop { position: fixed; left: 0; right: 0; bottom: 0; top: 0; z-index: (@zindex-dropdown - 10); } // Right aligned dropdowns .pull-right > .dropdown-menu { right: 0; left: auto; } // Allow for dropdowns to go bottom up (aka, dropup-menu) // // Just add .dropup after the standard .dropdown class and you're set, bro. // TODO: abstract this so that the navbar fixed styles are not placed here? .dropup, .navbar-fixed-bottom .dropdown { // Reverse the caret .caret { border-top: 0; border-bottom: @caret-width-base solid; content: ""; } // Different positioning for bottom up menu .dropdown-menu { top: auto; bottom: 100%; margin-bottom: 1px; } } // Component alignment // // Reiterate per navbar.less and the modified component alignment there. @media (min-width: @grid-float-breakpoint) { .navbar-right { .dropdown-menu { .dropdown-menu-right(); } // Necessary for overrides of the default right aligned menu. // Will remove come v4 in all likelihood. .dropdown-menu-left { .dropdown-menu-left(); } } } ================================================ FILE: resources/assets/less/bootstrap/forms.less ================================================ // // Forms // -------------------------------------------------- // Normalize non-controls // // Restyle and baseline non-control form elements. fieldset { padding: 0; margin: 0; border: 0; // Chrome and Firefox set a `min-width: min-content;` on fieldsets, // so we reset that to ensure it behaves more like a standard block element. // See https://github.com/twbs/bootstrap/issues/12359. min-width: 0; } legend { display: block; width: 100%; padding: 0; margin-bottom: @line-height-computed; font-size: (@font-size-base * 1.5); line-height: inherit; color: @legend-color; border: 0; border-bottom: 1px solid @legend-border-color; } label { display: inline-block; max-width: 100%; // Force IE8 to wrap long content (see https://github.com/twbs/bootstrap/issues/13141) margin-bottom: 5px; font-weight: bold; } // Normalize form controls // // While most of our form styles require extra classes, some basic normalization // is required to ensure optimum display with or without those classes to better // address browser inconsistencies. // Override content-box in Normalize (* isn't specific enough) input[type="search"] { .box-sizing(border-box); } // Position radios and checkboxes better input[type="radio"], input[type="checkbox"] { margin: 4px 0 0; margin-top: 1px \9; // IE8-9 line-height: normal; } // Set the height of file controls to match text inputs input[type="file"] { display: block; } // Make range inputs behave like textual form controls input[type="range"] { display: block; width: 100%; } // Make multiple select elements height not fixed select[multiple], select[size] { height: auto; } // Focus for file, radio, and checkbox input[type="file"]:focus, input[type="radio"]:focus, input[type="checkbox"]:focus { .tab-focus(); } // Adjust output element output { display: block; padding-top: (@padding-base-vertical + 1); font-size: @font-size-base; line-height: @line-height-base; color: @input-color; } // Common form controls // // Shared size and type resets for form controls. Apply `.form-control` to any // of the following form controls: // // select // textarea // input[type="text"] // input[type="password"] // input[type="datetime"] // input[type="datetime-local"] // input[type="date"] // input[type="month"] // input[type="time"] // input[type="week"] // input[type="number"] // input[type="email"] // input[type="url"] // input[type="search"] // input[type="tel"] // input[type="color"] .form-control { display: block; width: 100%; height: @input-height-base; // Make inputs at least the height of their button counterpart (base line-height + padding + border) padding: @padding-base-vertical @padding-base-horizontal; font-size: @font-size-base; line-height: @line-height-base; color: @input-color; background-color: @input-bg; background-image: none; // Reset unusual Firefox-on-Android default style; see https://github.com/necolas/normalize.css/issues/214 border: 1px solid @input-border; border-radius: @input-border-radius; .box-shadow(inset 0 1px 1px rgba(0,0,0,.075)); .transition(~"border-color ease-in-out .15s, box-shadow ease-in-out .15s"); // Customize the `:focus` state to imitate native WebKit styles. .form-control-focus(); // Placeholder .placeholder(); // Disabled and read-only inputs // // HTML5 says that controls under a fieldset > legend:first-child won't be // disabled if the fieldset is disabled. Due to implementation difficulty, we // don't honor that edge case; we style them as disabled anyway. &[disabled], &[readonly], fieldset[disabled] & { cursor: @cursor-disabled; background-color: @input-bg-disabled; opacity: 1; // iOS fix for unreadable disabled content } // Reset height for `textarea`s textarea& { height: auto; } } // Search inputs in iOS // // This overrides the extra rounded corners on search inputs in iOS so that our // `.form-control` class can properly style them. Note that this cannot simply // be added to `.form-control` as it's not specific enough. For details, see // https://github.com/twbs/bootstrap/issues/11586. input[type="search"] { -webkit-appearance: none; } // Special styles for iOS temporal inputs // // In Mobile Safari, setting `display: block` on temporal inputs causes the // text within the input to become vertically misaligned. As a workaround, we // set a pixel line-height that matches the given height of the input, but only // for Safari. @media screen and (-webkit-min-device-pixel-ratio: 0) { input[type="date"], input[type="time"], input[type="datetime-local"], input[type="month"] { line-height: @input-height-base; } input[type="date"].input-sm, input[type="time"].input-sm, input[type="datetime-local"].input-sm, input[type="month"].input-sm { line-height: @input-height-small; } input[type="date"].input-lg, input[type="time"].input-lg, input[type="datetime-local"].input-lg, input[type="month"].input-lg { line-height: @input-height-large; } } // Form groups // // Designed to help with the organization and spacing of vertical forms. For // horizontal forms, use the predefined grid classes. .form-group { margin-bottom: 15px; } // Checkboxes and radios // // Indent the labels to position radios/checkboxes as hanging controls. .radio, .checkbox { position: relative; display: block; margin-top: 10px; margin-bottom: 10px; label { min-height: @line-height-computed; // Ensure the input doesn't jump when there is no text padding-left: 20px; margin-bottom: 0; font-weight: normal; cursor: pointer; } } .radio input[type="radio"], .radio-inline input[type="radio"], .checkbox input[type="checkbox"], .checkbox-inline input[type="checkbox"] { position: absolute; margin-left: -20px; margin-top: 4px \9; } .radio + .radio, .checkbox + .checkbox { margin-top: -5px; // Move up sibling radios or checkboxes for tighter spacing } // Radios and checkboxes on same line .radio-inline, .checkbox-inline { display: inline-block; padding-left: 20px; margin-bottom: 0; vertical-align: middle; font-weight: normal; cursor: pointer; } .radio-inline + .radio-inline, .checkbox-inline + .checkbox-inline { margin-top: 0; margin-left: 10px; // space out consecutive inline controls } // Apply same disabled cursor tweak as for inputs // Some special care is needed because