├── app ├── Console │ ├── Commands │ │ └── Inspire.php │ └── Kernel.php ├── Events │ └── Event.php ├── Exceptions │ └── Handler.php ├── Http │ ├── Controllers │ │ ├── Admin │ │ │ ├── AdminController.php │ │ │ ├── PostController.php │ │ │ ├── SettingsController.php │ │ │ └── TaskController.php │ │ ├── Auth │ │ │ ├── AuthController.php │ │ │ └── PasswordController.php │ │ ├── Controller.php │ │ ├── HomeController.php │ │ ├── NoticeController.php │ │ ├── ProfileController.php │ │ └── TaskController.php │ ├── Kernel.php │ ├── Middleware │ │ ├── AdminMiddleware.php │ │ ├── Authenticate.php │ │ ├── EncryptCookies.php │ │ ├── GameMiddleware.php │ │ ├── RedirectIfAuthenticated.php │ │ └── VerifyCsrfToken.php │ ├── Requests │ │ └── Request.php │ └── routes.php ├── Jobs │ └── Job.php ├── Listeners │ └── .gitkeep ├── Policies │ └── .gitkeep ├── Post.php ├── Providers │ ├── AppServiceProvider.php │ ├── AuthServiceProvider.php │ ├── EventServiceProvider.php │ └── RouteServiceProvider.php ├── Settings.php ├── Solved.php ├── Task.php └── User.php ├── artisan ├── bootstrap ├── app.php ├── autoload.php └── cache │ └── .gitignore ├── composer.json ├── composer.lock ├── config ├── app.php ├── auth.php ├── broadcasting.php ├── cache.php ├── compile.php ├── database.php ├── filesystems.php ├── mail.php ├── queue.php ├── services.php ├── session.php └── view.php ├── ctf-docker ├── .bash_aliases ├── Dockerfile ├── LICENSE ├── README.md ├── fastcgi_params ├── homestead ├── src │ └── scripts │ │ ├── beanstalkd.sh │ │ ├── hhvm.sh │ │ ├── letsencrypt.sh │ │ ├── mysql.sh │ │ └── postgresql.sh └── supervisord.conf ├── database ├── .gitignore ├── factories │ └── ModelFactory.php ├── migrations │ ├── .gitkeep │ ├── 2014_10_12_000000_create_users_table.php │ ├── 2014_10_12_100000_create_password_resets_table.php │ ├── 2015_04_09_044813_create_tasks_table.php │ ├── 2015_04_10_071238_create_solveds_table.php │ ├── 2015_10_12_132604_create_posts_table.php │ └── 2015_11_20_071611_create_settings_table.php └── seeds │ ├── .gitkeep │ └── DatabaseSeeder.php ├── example.env ├── gulpfile.js ├── package.json ├── phpunit.xml ├── public ├── .htaccess ├── bower_components │ ├── bootstrap │ │ ├── .bower.json │ │ ├── Gruntfile.js │ │ ├── LICENSE │ │ ├── README.md │ │ ├── bower.json │ │ ├── dist │ │ │ ├── css │ │ │ │ ├── bootstrap-theme.css │ │ │ │ ├── bootstrap-theme.css.map │ │ │ │ ├── bootstrap-theme.min.css │ │ │ │ ├── bootstrap.css │ │ │ │ ├── bootstrap.css.map │ │ │ │ └── bootstrap.min.css │ │ │ ├── fonts │ │ │ │ ├── glyphicons-halflings-regular.eot │ │ │ │ ├── glyphicons-halflings-regular.svg │ │ │ │ ├── glyphicons-halflings-regular.ttf │ │ │ │ └── glyphicons-halflings-regular.woff │ │ │ └── js │ │ │ │ ├── bootstrap.js │ │ │ │ └── bootstrap.min.js │ │ ├── fonts │ │ │ ├── glyphicons-halflings-regular.eot │ │ │ ├── glyphicons-halflings-regular.svg │ │ │ ├── glyphicons-halflings-regular.ttf │ │ │ └── glyphicons-halflings-regular.woff │ │ ├── grunt │ │ │ ├── bs-glyphicons-data-generator.js │ │ │ ├── bs-lessdoc-parser.js │ │ │ ├── bs-raw-files-generator.js │ │ │ └── sauce_browsers.yml │ │ ├── js │ │ │ ├── affix.js │ │ │ ├── alert.js │ │ │ ├── button.js │ │ │ ├── carousel.js │ │ │ ├── collapse.js │ │ │ ├── dropdown.js │ │ │ ├── modal.js │ │ │ ├── popover.js │ │ │ ├── scrollspy.js │ │ │ ├── tab.js │ │ │ ├── tooltip.js │ │ │ └── transition.js │ │ ├── less │ │ │ ├── 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.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 │ │ │ ├── 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 │ │ └── package.json │ ├── jquery │ │ ├── .bower.json │ │ ├── AUTHORS.txt │ │ ├── LICENSE.txt │ │ ├── README.md │ │ ├── bower.json │ │ ├── dist │ │ │ ├── core.js │ │ │ ├── jquery.js │ │ │ ├── jquery.min.js │ │ │ ├── jquery.min.map │ │ │ ├── jquery.slim.js │ │ │ ├── jquery.slim.min.js │ │ │ └── jquery.slim.min.map │ │ ├── external │ │ │ └── sizzle │ │ │ │ ├── LICENSE.txt │ │ │ │ └── dist │ │ │ │ ├── sizzle.js │ │ │ │ ├── sizzle.min.js │ │ │ │ └── sizzle.min.map │ │ └── src │ │ │ ├── .eslintrc │ │ │ ├── ajax.js │ │ │ ├── ajax │ │ │ ├── jsonp.js │ │ │ ├── load.js │ │ │ ├── parseXML.js │ │ │ ├── script.js │ │ │ ├── var │ │ │ │ ├── location.js │ │ │ │ ├── nonce.js │ │ │ │ └── rquery.js │ │ │ └── xhr.js │ │ │ ├── attributes.js │ │ │ ├── attributes │ │ │ ├── attr.js │ │ │ ├── classes.js │ │ │ ├── prop.js │ │ │ ├── support.js │ │ │ └── val.js │ │ │ ├── callbacks.js │ │ │ ├── core.js │ │ │ ├── core │ │ │ ├── DOMEval.js │ │ │ ├── access.js │ │ │ ├── init.js │ │ │ ├── parseHTML.js │ │ │ ├── ready-no-deferred.js │ │ │ ├── ready.js │ │ │ ├── readyException.js │ │ │ ├── support.js │ │ │ └── var │ │ │ │ └── rsingleTag.js │ │ │ ├── css.js │ │ │ ├── css │ │ │ ├── addGetHookIf.js │ │ │ ├── adjustCSS.js │ │ │ ├── curCSS.js │ │ │ ├── hiddenVisibleSelectors.js │ │ │ ├── showHide.js │ │ │ ├── support.js │ │ │ └── var │ │ │ │ ├── cssExpand.js │ │ │ │ ├── getStyles.js │ │ │ │ ├── isHiddenWithinTree.js │ │ │ │ ├── rmargin.js │ │ │ │ ├── rnumnonpx.js │ │ │ │ └── swap.js │ │ │ ├── data.js │ │ │ ├── data │ │ │ ├── Data.js │ │ │ └── var │ │ │ │ ├── acceptData.js │ │ │ │ ├── dataPriv.js │ │ │ │ └── dataUser.js │ │ │ ├── deferred.js │ │ │ ├── deferred │ │ │ └── exceptionHook.js │ │ │ ├── deprecated.js │ │ │ ├── dimensions.js │ │ │ ├── effects.js │ │ │ ├── effects │ │ │ ├── Tween.js │ │ │ └── animatedSelector.js │ │ │ ├── event.js │ │ │ ├── event │ │ │ ├── ajax.js │ │ │ ├── alias.js │ │ │ ├── focusin.js │ │ │ ├── support.js │ │ │ └── trigger.js │ │ │ ├── exports │ │ │ ├── amd.js │ │ │ └── global.js │ │ │ ├── jquery.js │ │ │ ├── manipulation.js │ │ │ ├── manipulation │ │ │ ├── _evalUrl.js │ │ │ ├── buildFragment.js │ │ │ ├── getAll.js │ │ │ ├── setGlobalEval.js │ │ │ ├── support.js │ │ │ ├── var │ │ │ │ ├── rcheckableType.js │ │ │ │ ├── rscriptType.js │ │ │ │ └── rtagName.js │ │ │ └── wrapMap.js │ │ │ ├── offset.js │ │ │ ├── queue.js │ │ │ ├── queue │ │ │ └── delay.js │ │ │ ├── selector-native.js │ │ │ ├── selector-sizzle.js │ │ │ ├── selector.js │ │ │ ├── serialize.js │ │ │ ├── traversing.js │ │ │ ├── traversing │ │ │ ├── findFilter.js │ │ │ └── var │ │ │ │ ├── dir.js │ │ │ │ ├── rneedsContext.js │ │ │ │ └── siblings.js │ │ │ ├── var │ │ │ ├── ObjectFunctionString.js │ │ │ ├── arr.js │ │ │ ├── class2type.js │ │ │ ├── concat.js │ │ │ ├── document.js │ │ │ ├── documentElement.js │ │ │ ├── fnToString.js │ │ │ ├── getProto.js │ │ │ ├── hasOwn.js │ │ │ ├── indexOf.js │ │ │ ├── pnum.js │ │ │ ├── push.js │ │ │ ├── rcssNum.js │ │ │ ├── rnotwhite.js │ │ │ ├── slice.js │ │ │ ├── support.js │ │ │ └── toString.js │ │ │ └── wrap.js │ └── titatoggle │ │ ├── .bower.json │ │ ├── GNU-General-Public-License-v2.0.txt │ │ ├── README.md │ │ ├── bower.json │ │ ├── dist │ │ ├── _titatoggle.less │ │ ├── titatoggle-dist-min.css │ │ └── titatoggle-dist.css │ │ └── gh-pages │ │ ├── GNU-General-Public-License-v2.0.txt │ │ └── README.md ├── css │ ├── app.css │ ├── auth.css │ ├── bg.jpg │ ├── bootstrap.min.css │ └── normalize.css ├── favicon.ico ├── fonts │ ├── glyphicons-halflings-regular.eot │ ├── glyphicons-halflings-regular.svg │ ├── glyphicons-halflings-regular.ttf │ ├── glyphicons-halflings-regular.woff │ └── glyphicons-halflings-regular.woff2 ├── img │ ├── 002.png │ ├── 003.png │ ├── 004.png │ └── 005.png ├── index.php ├── js │ ├── smchuncai.change.js │ ├── smchuncai.js │ ├── smchuncai.menu.js │ ├── smchuncai.move.js │ ├── smchuncai.shell.js │ ├── smchuncai.words.js │ └── vendor │ │ └── jquery-2.1.4.min.js ├── robots.txt └── web.config ├── readme.md ├── resources ├── assets │ └── sass │ │ └── app.scss ├── lang │ └── en │ │ ├── auth.php │ │ ├── pagination.php │ │ ├── passwords.php │ │ └── validation.php └── views │ ├── admin │ ├── add.blade.php │ ├── edit.blade.php │ ├── list.blade.php │ ├── settings.blade.php │ └── sidebar.blade.php │ ├── auth │ ├── emails │ │ └── password.blade.php │ ├── login.blade.php │ ├── passwords │ │ ├── email.blade.php │ │ └── reset.blade.php │ └── register.blade.php │ ├── check.blade.php │ ├── errors │ └── 503.blade.php │ ├── home.blade.php │ ├── layouts │ └── app.blade.php │ ├── message.blade.php │ ├── notice.blade.php │ ├── profile.blade.php │ ├── score.blade.php │ ├── task.blade.php │ ├── vendor │ └── .gitkeep │ └── welcome.blade.php ├── server.php ├── storage ├── app │ ├── .gitignore │ └── public │ │ └── .gitignore ├── framework │ ├── .gitignore │ ├── cache │ │ └── .gitignore │ ├── sessions │ │ └── .gitignore │ └── views │ │ └── .gitignore └── logs │ └── .gitignore └── tests ├── ExampleTest.php └── TestCase.php /app/Console/Commands/Inspire.php: -------------------------------------------------------------------------------- 1 | comment(PHP_EOL.Inspiring::quote().PHP_EOL); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /app/Console/Kernel.php: -------------------------------------------------------------------------------- 1 | command('inspire') 28 | // ->hourly(); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /app/Events/Event.php: -------------------------------------------------------------------------------- 1 | middleware('auth'); 19 | $this->middleware('admin'); 20 | $this->fillable = (new Settings())->fillable; 21 | } 22 | 23 | public function getIndex() 24 | { 25 | return view('admin/settings')->with([ 26 | 'intro' => Settings::getIntro(), 27 | 'started' => Settings::getStat()->value, 28 | ]); 29 | } 30 | 31 | public function postIndex(Request $request) 32 | { 33 | $intro = Settings::getIntro(); 34 | $intro->value = Input::get("intro"); 35 | $intro->save(); 36 | if ($request->exists('started')) { 37 | $started = 1; 38 | } else { 39 | $started = 0; 40 | } 41 | $stat = Settings::getStat(); 42 | $stat->value = $started; 43 | $stat->save(); 44 | return view('message')->with(array 45 | ( 46 | "stat" => 1, 47 | "msg" => 'successful', 48 | "url" => $this->prefix 49 | ) 50 | ); 51 | } 52 | 53 | 54 | } 55 | -------------------------------------------------------------------------------- /app/Http/Controllers/Auth/PasswordController.php: -------------------------------------------------------------------------------- 1 | middleware($this->guestMiddleware()); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /app/Http/Controllers/Controller.php: -------------------------------------------------------------------------------- 1 | value; 33 | return view('home')->with('file',Markdown::convertToHtml($file)); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /app/Http/Controllers/NoticeController.php: -------------------------------------------------------------------------------- 1 | ', '0')->orderBy('id', 'DESC')->take(10)->first(); 21 | return $solved; 22 | } 23 | 24 | public function notice() 25 | { 26 | $notices = Post::getNotice(); 27 | return view('notice')->with('notices',$notices); 28 | } 29 | 30 | 31 | 32 | public function score() 33 | { 34 | try { 35 | $pageId = Input::get('page'); 36 | } catch (Exception $e) { 37 | $pageId = 0; 38 | } 39 | $scores = User::where('id', '>', 0)->orderBy('score', 'DESC')->offset($pageId * 10)->take(10)->get(); 40 | return view('score')->with('scores', $scores)->with('page', $pageId); 41 | 42 | } 43 | 44 | 45 | } 46 | -------------------------------------------------------------------------------- /app/Http/Controllers/TaskController.php: -------------------------------------------------------------------------------- 1 | middleware('game'); 18 | $this->middleware('auth'); 19 | } 20 | 21 | public function anyIndex() 22 | { 23 | 24 | $tasks = Task::all(); 25 | $name = Auth::user()->name; 26 | $solved = Solved::getSolved($name); 27 | foreach ($solved as $i) { 28 | foreach ($tasks as &$task) { 29 | if ($task->id == $i->taskid) { 30 | $task->solved = 1; 31 | } 32 | } 33 | } 34 | $scores = User::getTop10(); 35 | return view('task')->with('tasks', $tasks)->with('scores', $scores); 36 | 37 | } 38 | 39 | 40 | public function anyCheck(Request $request) 41 | { 42 | $params = $request->only(array( 43 | 'id', 'flag' 44 | ) 45 | ); 46 | 47 | $task = Task::where('id', '=', $params["id"])->get()->first(); 48 | $flag = $task->flag; 49 | 50 | if ($flag == $params["flag"] && Solved::isSolved(Auth::user()->name, $params["id"])) { 51 | $name = Auth::user()->name; 52 | $user = User::getUser($name); 53 | $user->score += $task->score; 54 | $user->save(); 55 | $msg = '1'; 56 | $solved = new Solved(); 57 | $solved->taskid = $params["id"]; 58 | $solved->user = $name; 59 | $solved->save(); 60 | } else 61 | $msg = '0'; 62 | 63 | return view('check')->with('msg', $msg); 64 | } 65 | } 66 | -------------------------------------------------------------------------------- /app/Http/Kernel.php: -------------------------------------------------------------------------------- 1 | [ 27 | \App\Http\Middleware\EncryptCookies::class, 28 | \Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class, 29 | \Illuminate\Session\Middleware\StartSession::class, 30 | \Illuminate\View\Middleware\ShareErrorsFromSession::class, 31 | \App\Http\Middleware\VerifyCsrfToken::class, 32 | ], 33 | 34 | 'api' => [ 35 | 'throttle:60,1', 36 | ], 37 | ]; 38 | 39 | /** 40 | * The application's route middleware. 41 | * 42 | * These middleware may be assigned to groups or used individually. 43 | * 44 | * @var array 45 | */ 46 | protected $routeMiddleware = [ 47 | 'auth' => \App\Http\Middleware\Authenticate::class, 48 | 'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class, 49 | 'can' => \Illuminate\Foundation\Http\Middleware\Authorize::class, 50 | 'guest' => \App\Http\Middleware\RedirectIfAuthenticated::class, 51 | 'throttle' => \Illuminate\Routing\Middleware\ThrottleRequests::class, 52 | 'admin' => \App\Http\Middleware\AdminMiddleware::class, 53 | 'game' => \App\Http\Middleware\GameMiddleware::class, 54 | ]; 55 | } 56 | -------------------------------------------------------------------------------- /app/Http/Middleware/AdminMiddleware.php: -------------------------------------------------------------------------------- 1 | isadmin) { 20 | return view('message')->with( 21 | array 22 | ( 23 | "stat" => 0, 24 | "msg" => 'not admin', 25 | "url" => 'login' 26 | ) 27 | ); 28 | } else { 29 | return $next($request); 30 | } 31 | } 32 | 33 | } 34 | -------------------------------------------------------------------------------- /app/Http/Middleware/Authenticate.php: -------------------------------------------------------------------------------- 1 | guest()) { 21 | if ($request->ajax() || $request->wantsJson()) { 22 | return response('Unauthorized.', 401); 23 | } 24 | 25 | return redirect()->guest('login'); 26 | } 27 | 28 | return $next($request); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /app/Http/Middleware/EncryptCookies.php: -------------------------------------------------------------------------------- 1 | value) { 21 | return view('message')->with(array 22 | ( 23 | "stat" => 0, 24 | "msg" => 'Game not started yet', 25 | "url" => 'home' 26 | ) 27 | ); 28 | } else { 29 | return $next($request); 30 | } 31 | } 32 | 33 | } 34 | -------------------------------------------------------------------------------- /app/Http/Middleware/RedirectIfAuthenticated.php: -------------------------------------------------------------------------------- 1 | check()) { 21 | return redirect('/'); 22 | } 23 | 24 | return $next($request); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /app/Http/Middleware/VerifyCsrfToken.php: -------------------------------------------------------------------------------- 1 | 'task'], function() 26 | { 27 | Route::controller("/", 'TaskController'); 28 | 29 | }); 30 | 31 | Route::group(['prefix' => 'admin'], function() 32 | { 33 | Route::controller("/task", 'Admin\TaskController'); 34 | Route::controller("/post", 'Admin\PostController'); 35 | Route::controller("/intro", 'Admin\AdminController'); 36 | Route::controller("/settings", 'Admin\SettingsController'); 37 | }); 38 | 39 | -------------------------------------------------------------------------------- /app/Jobs/Job.php: -------------------------------------------------------------------------------- 1 | ', '0')->orderBy('id', 'DESC')->get(); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /app/Providers/AppServiceProvider.php: -------------------------------------------------------------------------------- 1 | 'App\Policies\ModelPolicy', 17 | ]; 18 | 19 | /** 20 | * Register any application authentication / authorization services. 21 | * 22 | * @param \Illuminate\Contracts\Auth\Access\Gate $gate 23 | * @return void 24 | */ 25 | public function boot(GateContract $gate) 26 | { 27 | $this->registerPolicies($gate); 28 | 29 | // 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /app/Providers/EventServiceProvider.php: -------------------------------------------------------------------------------- 1 | [ 17 | 'App\Listeners\EventListener', 18 | ], 19 | ]; 20 | 21 | /** 22 | * Register any other events for your application. 23 | * 24 | * @param \Illuminate\Contracts\Events\Dispatcher $events 25 | * @return void 26 | */ 27 | public function boot(DispatcherContract $events) 28 | { 29 | parent::boot($events); 30 | 31 | // 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /app/Providers/RouteServiceProvider.php: -------------------------------------------------------------------------------- 1 | mapWebRoutes($router); 41 | 42 | // 43 | } 44 | 45 | /** 46 | * Define the "web" routes for the application. 47 | * 48 | * These routes all receive session state, CSRF protection, etc. 49 | * 50 | * @param \Illuminate\Routing\Router $router 51 | * @return void 52 | */ 53 | protected function mapWebRoutes(Router $router) 54 | { 55 | $router->group([ 56 | 'namespace' => $this->namespace, 'middleware' => 'web', 57 | ], function ($router) { 58 | require app_path('Http/routes.php'); 59 | }); 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /app/Settings.php: -------------------------------------------------------------------------------- 1 | ', '0')->get(); 12 | return $settings; 13 | } 14 | 15 | static function getIntro() 16 | { 17 | return Settings::where('name','=','introduction')->get()->first(); 18 | } 19 | 20 | static function getStat() 21 | { 22 | return Settings::where('name','=','started')->get()->first(); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /app/Solved.php: -------------------------------------------------------------------------------- 1 | where('taskid','=',$taskId)->get()->first() == null ){ 12 | return true; 13 | } 14 | else{ 15 | return false; 16 | } 17 | } 18 | static function getSolved($user){ 19 | return Solved::where('user', '=', $user)->get(['taskid']); 20 | } 21 | 22 | } 23 | -------------------------------------------------------------------------------- /app/Task.php: -------------------------------------------------------------------------------- 1 | ', 0)->take(10)->orderBy('score', 'DESC')->get(); 26 | } 27 | 28 | public static function getUser($username) 29 | { 30 | return User::where('name', '=', $username)->get()->first(); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /artisan: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env php 2 | make(Illuminate\Contracts\Console\Kernel::class); 32 | 33 | $status = $kernel->handle( 34 | $input = new Symfony\Component\Console\Input\ArgvInput, 35 | new Symfony\Component\Console\Output\ConsoleOutput 36 | ); 37 | 38 | /* 39 | |-------------------------------------------------------------------------- 40 | | Shutdown The Application 41 | |-------------------------------------------------------------------------- 42 | | 43 | | Once Artisan has finished running. We will fire off the shutdown events 44 | | so that any final work may be done by the application before we shut 45 | | down the process. This is the last thing to happen to the request. 46 | | 47 | */ 48 | 49 | $kernel->terminate($input, $status); 50 | 51 | exit($status); 52 | -------------------------------------------------------------------------------- /bootstrap/app.php: -------------------------------------------------------------------------------- 1 | singleton( 30 | Illuminate\Contracts\Http\Kernel::class, 31 | App\Http\Kernel::class 32 | ); 33 | 34 | $app->singleton( 35 | Illuminate\Contracts\Console\Kernel::class, 36 | App\Console\Kernel::class 37 | ); 38 | 39 | $app->singleton( 40 | Illuminate\Contracts\Debug\ExceptionHandler::class, 41 | App\Exceptions\Handler::class 42 | ); 43 | 44 | /* 45 | |-------------------------------------------------------------------------- 46 | | Return The Application 47 | |-------------------------------------------------------------------------- 48 | | 49 | | This script returns the application instance. The instance is given to 50 | | the calling script so we can separate the building of the instances 51 | | from the actual running of the application and sending responses. 52 | | 53 | */ 54 | 55 | return $app; 56 | -------------------------------------------------------------------------------- /bootstrap/autoload.php: -------------------------------------------------------------------------------- 1 | =5.5.9", 9 | "laravel/framework": "5.2.*", 10 | "patricktalmadge/bootstrapper": "~5", 11 | "graham-campbell/markdown": "^6.1" 12 | }, 13 | "require-dev": { 14 | "fzaninotto/faker": "~1.4", 15 | "mockery/mockery": "0.9.*", 16 | "phpunit/phpunit": "~4.0", 17 | "symfony/css-selector": "2.8.*|3.0.*", 18 | "symfony/dom-crawler": "2.8.*|3.0.*" 19 | }, 20 | "autoload": { 21 | "classmap": [ 22 | "database" 23 | ], 24 | "psr-4": { 25 | "App\\": "app/" 26 | } 27 | }, 28 | "autoload-dev": { 29 | "classmap": [ 30 | "tests/TestCase.php" 31 | ] 32 | }, 33 | "scripts": { 34 | "post-root-package-install": [ 35 | "php -r \"file_exists('.env') || copy('.env.example', '.env');\"" 36 | ], 37 | "post-create-project-cmd": [ 38 | "php artisan key:generate" 39 | ], 40 | "post-install-cmd": [ 41 | "Illuminate\\Foundation\\ComposerScripts::postInstall", 42 | "php artisan optimize" 43 | ], 44 | "post-update-cmd": [ 45 | "Illuminate\\Foundation\\ComposerScripts::postUpdate", 46 | "php artisan optimize" 47 | ] 48 | }, 49 | "config": { 50 | "preferred-install": "dist" 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /config/broadcasting.php: -------------------------------------------------------------------------------- 1 | env('BROADCAST_DRIVER', 'pusher'), 19 | 20 | /* 21 | |-------------------------------------------------------------------------- 22 | | Broadcast Connections 23 | |-------------------------------------------------------------------------- 24 | | 25 | | Here you may define all of the broadcast connections that will be used 26 | | to broadcast events to other systems or over websockets. Samples of 27 | | each available type of connection are provided inside this array. 28 | | 29 | */ 30 | 31 | 'connections' => [ 32 | 33 | 'pusher' => [ 34 | 'driver' => 'pusher', 35 | 'key' => env('PUSHER_KEY'), 36 | 'secret' => env('PUSHER_SECRET'), 37 | 'app_id' => env('PUSHER_APP_ID'), 38 | 'options' => [ 39 | // 40 | ], 41 | ], 42 | 43 | 'redis' => [ 44 | 'driver' => 'redis', 45 | 'connection' => 'default', 46 | ], 47 | 48 | 'log' => [ 49 | 'driver' => 'log', 50 | ], 51 | 52 | ], 53 | 54 | ]; 55 | -------------------------------------------------------------------------------- /config/cache.php: -------------------------------------------------------------------------------- 1 | env('CACHE_DRIVER', 'file'), 19 | 20 | /* 21 | |-------------------------------------------------------------------------- 22 | | Cache Stores 23 | |-------------------------------------------------------------------------- 24 | | 25 | | Here you may define all of the cache "stores" for your application as 26 | | well as their drivers. You may even define multiple stores for the 27 | | same cache driver to group types of items stored in your caches. 28 | | 29 | */ 30 | 31 | 'stores' => [ 32 | 33 | 'apc' => [ 34 | 'driver' => 'apc', 35 | ], 36 | 37 | 'array' => [ 38 | 'driver' => 'array', 39 | ], 40 | 41 | 'database' => [ 42 | 'driver' => 'database', 43 | 'table' => 'cache', 44 | 'connection' => null, 45 | ], 46 | 47 | 'file' => [ 48 | 'driver' => 'file', 49 | 'path' => storage_path('framework/cache'), 50 | ], 51 | 52 | 'memcached' => [ 53 | 'driver' => 'memcached', 54 | 'servers' => [ 55 | [ 56 | 'host' => env('MEMCACHED_HOST', '127.0.0.1'), 57 | 'port' => env('MEMCACHED_PORT', 11211), 58 | 'weight' => 100, 59 | ], 60 | ], 61 | ], 62 | 63 | 'redis' => [ 64 | 'driver' => 'redis', 65 | 'connection' => 'default', 66 | ], 67 | 68 | ], 69 | 70 | /* 71 | |-------------------------------------------------------------------------- 72 | | Cache Key Prefix 73 | |-------------------------------------------------------------------------- 74 | | 75 | | When utilizing a RAM based store such as APC or Memcached, there might 76 | | be other applications utilizing the same cache. So, we'll specify a 77 | | value to get prefixed to all our keys so we can avoid collisions. 78 | | 79 | */ 80 | 81 | 'prefix' => 'laravel', 82 | 83 | ]; 84 | -------------------------------------------------------------------------------- /config/compile.php: -------------------------------------------------------------------------------- 1 | [ 17 | // 18 | ], 19 | 20 | /* 21 | |-------------------------------------------------------------------------- 22 | | Compiled File Providers 23 | |-------------------------------------------------------------------------- 24 | | 25 | | Here you may list service providers which define a "compiles" function 26 | | that returns additional files that should be compiled, providing an 27 | | easy way to get common files from any packages you are utilizing. 28 | | 29 | */ 30 | 31 | 'providers' => [ 32 | // 33 | ], 34 | 35 | ]; 36 | -------------------------------------------------------------------------------- /config/filesystems.php: -------------------------------------------------------------------------------- 1 | 'local', 19 | 20 | /* 21 | |-------------------------------------------------------------------------- 22 | | Default Cloud Filesystem Disk 23 | |-------------------------------------------------------------------------- 24 | | 25 | | Many applications store files both locally and in the cloud. For this 26 | | reason, you may specify a default "cloud" driver here. This driver 27 | | will be bound as the Cloud disk implementation in the container. 28 | | 29 | */ 30 | 31 | 'cloud' => 's3', 32 | 33 | /* 34 | |-------------------------------------------------------------------------- 35 | | Filesystem Disks 36 | |-------------------------------------------------------------------------- 37 | | 38 | | Here you may configure as many filesystem "disks" as you wish, and you 39 | | may even configure multiple disks of the same driver. Defaults have 40 | | been setup for each driver as an example of the required options. 41 | | 42 | */ 43 | 44 | 'disks' => [ 45 | 46 | 'local' => [ 47 | 'driver' => 'local', 48 | 'root' => storage_path('app'), 49 | ], 50 | 51 | 'public' => [ 52 | 'driver' => 'local', 53 | 'root' => storage_path('app/public'), 54 | 'visibility' => 'public', 55 | ], 56 | 57 | 's3' => [ 58 | 'driver' => 's3', 59 | 'key' => 'your-key', 60 | 'secret' => 'your-secret', 61 | 'region' => 'your-region', 62 | 'bucket' => 'your-bucket', 63 | ], 64 | 65 | ], 66 | 67 | ]; 68 | -------------------------------------------------------------------------------- /config/services.php: -------------------------------------------------------------------------------- 1 | [ 18 | 'domain' => env('MAILGUN_DOMAIN'), 19 | 'secret' => env('MAILGUN_SECRET'), 20 | ], 21 | 22 | 'mandrill' => [ 23 | 'secret' => env('MANDRILL_SECRET'), 24 | ], 25 | 26 | 'ses' => [ 27 | 'key' => env('SES_KEY'), 28 | 'secret' => env('SES_SECRET'), 29 | 'region' => 'us-east-1', 30 | ], 31 | 32 | 'sparkpost' => [ 33 | 'secret' => env('SPARKPOST_SECRET'), 34 | ], 35 | 36 | 'stripe' => [ 37 | 'model' => App\User::class, 38 | 'key' => env('STRIPE_KEY'), 39 | 'secret' => env('STRIPE_SECRET'), 40 | ], 41 | 42 | ]; 43 | -------------------------------------------------------------------------------- /config/view.php: -------------------------------------------------------------------------------- 1 | [ 17 | realpath(base_path('resources/views')), 18 | ], 19 | 20 | /* 21 | |-------------------------------------------------------------------------- 22 | | Compiled View Path 23 | |-------------------------------------------------------------------------- 24 | | 25 | | This option determines where all the compiled Blade templates will be 26 | | stored for your application. Typically, this is within the storage 27 | | directory. However, as usual, you are free to change this value. 28 | | 29 | */ 30 | 31 | 'compiled' => realpath(storage_path('framework/views')), 32 | 33 | ]; 34 | -------------------------------------------------------------------------------- /ctf-docker/.bash_aliases: -------------------------------------------------------------------------------- 1 | alias ..='cd ..' 2 | alias ...='cd ../..' 3 | alias ....='cd ../../..' 4 | 5 | alias c='clear' 6 | alias h='cd ~/' 7 | alias hc='h && c' 8 | alias back='cd $OLDPWD' 9 | 10 | alias ff='find . -type f -name' 11 | alias fd='find . -type d -name' 12 | 13 | alias now='date +%T' 14 | 15 | alias art='php artisan' 16 | 17 | alias phpspec='vendor/bin/phpspec' 18 | alias phpunit='vendor/bin/phpunit' 19 | -------------------------------------------------------------------------------- /ctf-docker/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2016 LaraEdit 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /ctf-docker/README.md: -------------------------------------------------------------------------------- 1 | #A optimized version of laraedit-docker 2 | Dockerized version of Laravel Homestead 3 | -------------------------------------------------------------------------------- /ctf-docker/fastcgi_params: -------------------------------------------------------------------------------- 1 | fastcgi_param QUERY_STRING $query_string; 2 | fastcgi_param REQUEST_METHOD $request_method; 3 | fastcgi_param CONTENT_TYPE $content_type; 4 | fastcgi_param CONTENT_LENGTH $content_length; 5 | fastcgi_param SCRIPT_FILENAME $request_filename; 6 | fastcgi_param SCRIPT_NAME $fastcgi_script_name; 7 | fastcgi_param REQUEST_URI $request_uri; 8 | fastcgi_param DOCUMENT_URI $document_uri; 9 | fastcgi_param DOCUMENT_ROOT $document_root; 10 | fastcgi_param SERVER_PROTOCOL $server_protocol; 11 | fastcgi_param GATEWAY_INTERFACE CGI/1.1; 12 | fastcgi_param SERVER_SOFTWARE nginx/$nginx_version; 13 | fastcgi_param REMOTE_ADDR $remote_addr; 14 | fastcgi_param REMOTE_PORT $remote_port; 15 | fastcgi_param SERVER_ADDR $server_addr; 16 | fastcgi_param SERVER_PORT $server_port; 17 | fastcgi_param SERVER_NAME $server_name; 18 | fastcgi_param HTTPS $https if_not_empty; 19 | fastcgi_param REDIRECT_STATUS 200; 20 | -------------------------------------------------------------------------------- /ctf-docker/homestead: -------------------------------------------------------------------------------- 1 | server { 2 | listen 80 default_server; 3 | 4 | server_name app.dev; 5 | root /var/www/html/app/public; 6 | index index.html index.htm index.php; 7 | charset utf-8; 8 | 9 | location / { 10 | try_files $uri $uri/ /index.php?$query_string; 11 | } 12 | 13 | location = /favicon.ico { access_log off; log_not_found off; } 14 | location = /robots.txt { access_log off; log_not_found off; } 15 | 16 | access_log off; 17 | error_log /var/log/nginx/app-error.log error; 18 | sendfile off; 19 | client_max_body_size 100m; 20 | 21 | location ~ \.php$ { 22 | fastcgi_split_path_info ^(.+\.php)(/.+)$; 23 | fastcgi_pass unix:/var/run/php/php7.0-fpm.sock; 24 | fastcgi_index index.php; 25 | include fastcgi_params; 26 | fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; 27 | fastcgi_intercept_errors off; 28 | fastcgi_buffer_size 16k; 29 | fastcgi_buffers 4 16k; 30 | fastcgi_connect_timeout 300; 31 | fastcgi_send_timeout 300; 32 | fastcgi_read_timeout 300; 33 | } 34 | 35 | location ~ /\.ht { 36 | deny all; 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /ctf-docker/src/scripts/beanstalkd.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # install beanstalkd 4 | apt-get install -y beanstalkd 5 | sed -i "s/#START=yes/START=yes/" /etc/default/beanstalkd 6 | # /etc/init.d/beanstalkd start 7 | -------------------------------------------------------------------------------- /ctf-docker/src/scripts/hhvm.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # install hhvm 4 | apt-get install -y hhvm 5 | # service hhvm stop 6 | # sed -i 's/#RUN_AS_USER="www-data"/RUN_AS_USER="vagrant"/' /etc/default/hhvm 7 | # service hhvm start 8 | # update-rc.d hhvm defaults 9 | -------------------------------------------------------------------------------- /ctf-docker/src/scripts/letsencrypt.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | if [[ $APP_EMAIL != "app@laraedit.com" && $APP_DOMAIN != "app.dev" ]]; then 4 | 5 | git clone https://github.com/letsencrypt/letsencrypt 6 | cd letsencrypt 7 | 8 | cat config.ini > << EOF 9 | rsa-key-size = 4096 10 | email = $APP_EMAIL 11 | domains = $APP_DOMAIN 12 | authenticator = webroot 13 | webroot-path = /var/www/html/$APP_NAME 14 | EOF 15 | 16 | ./letsencrypt-auto --config cli.ini 17 | 18 | fi 19 | -------------------------------------------------------------------------------- /ctf-docker/src/scripts/mysql.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | export DEBIAN_FRONTEND=noninteractive 4 | 5 | # install mysql 6 | debconf-set-selections <<< "mysql-community-server mysql-community-server/data-dir select ''" 7 | debconf-set-selections <<< "mysql-community-server mysql-community-server/root-pass password secret" 8 | debconf-set-selections <<< "mysql-community-server mysql-community-server/re-root-pass password secret" 9 | apt-get install -y mysql-server 10 | 11 | echo "default_password_lifetime = 0" >> /etc/mysql/my.cnf 12 | 13 | sed -i '/^bind-address/s/bind-address.*=.*/bind-address = 0.0.0.0/' /etc/mysql/my.cnf 14 | 15 | mysql --user="root" --password="secret" -e "GRANT ALL ON *.* TO root@'0.0.0.0' IDENTIFIED BY 'secret' WITH GRANT OPTION;" 16 | service mysql restart 17 | 18 | # mysql --user="root" --password="secret" -e "CREATE USER 'homestead'@'0.0.0.0' IDENTIFIED BY 'secret';" 19 | # mysql --user="root" --password="secret" -e "GRANT ALL ON *.* TO 'homestead'@'0.0.0.0' IDENTIFIED BY 'secret' WITH GRANT OPTION;" 20 | # mysql --user="root" --password="secret" -e "GRANT ALL ON *.* TO 'homestead'@'%' IDENTIFIED BY 'secret' WITH GRANT OPTION;" 21 | # mysql --user="root" --password="secret" -e "FLUSH PRIVILEGES;" 22 | # mysql --user="root" --password="secret" -e "CREATE DATABASE homestead;" 23 | # service mysql restart 24 | 25 | mysql_tzinfo_to_sql /usr/share/zoneinfo | mysql --user=root --password=secret mysql 26 | -------------------------------------------------------------------------------- /ctf-docker/src/scripts/postgresql.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # install postgresql 4 | apt-get install -y postgresql-9.4 postgresql-contrib-9.4 5 | sed -i "s/#listen_addresses = 'localhost'/listen_addresses = '*'/g" /etc/postgresql/9.4/main/postgresql.conf 6 | echo "host all all 10.0.2.2/32 md5" | tee -a /etc/postgresql/9.4/main/pg_hba.conf 7 | sudo -u postgres psql -c "CREATE ROLE homestead LOGIN UNENCRYPTED PASSWORD 'secret' SUPERUSER INHERIT NOCREATEDB NOCREATEROLE NOREPLICATION;" 8 | sudo -u postgres /usr/bin/createdb --echo --owner=homestead homestead 9 | service postgresql restart 10 | -------------------------------------------------------------------------------- /ctf-docker/supervisord.conf: -------------------------------------------------------------------------------- 1 | [supervisord] 2 | nodaemon=true 3 | 4 | [program:php-fpm7.0] 5 | command=/usr/sbin/php-fpm7.0 -c /etc/php/7.0/fpm/php-fpm.conf 6 | autostart=true 7 | autorestart=true 8 | priority=5 9 | stdout_logfile=/dev/stdout 10 | stdout_logfile_maxbytes=0 11 | stderr_logfile=/dev/stderr 12 | stderr_logfile_maxbytes=0 13 | 14 | [program:nginx] 15 | command=/usr/sbin/nginx 16 | autostart=true 17 | autorestart=true 18 | priority=10 19 | stdout_logfile=/dev/stdout 20 | stdout_logfile_maxbytes=0 21 | stderr_logfile=/dev/stderr 22 | stderr_logfile_maxbytes=0 23 | stdout_events_enabled=true 24 | stderr_events_enabled=true 25 | 26 | -------------------------------------------------------------------------------- /database/.gitignore: -------------------------------------------------------------------------------- 1 | *.sqlite 2 | -------------------------------------------------------------------------------- /database/factories/ModelFactory.php: -------------------------------------------------------------------------------- 1 | define(App\User::class, function (Faker\Generator $faker) { 15 | return [ 16 | 'name' => $faker->name, 17 | 'email' => $faker->safeEmail, 18 | 'password' => bcrypt(str_random(10)), 19 | 'remember_token' => str_random(10), 20 | ]; 21 | }); 22 | -------------------------------------------------------------------------------- /database/migrations/.gitkeep: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /database/migrations/2014_10_12_000000_create_users_table.php: -------------------------------------------------------------------------------- 1 | increments('id'); 18 | $table->string('name'); 19 | $table->string('email')->unique(); 20 | $table->string('password', 60); 21 | $table->integer('score')->default(0); 22 | $table->boolean('isadmin')->default(0); 23 | $table->string('sid')->unique(); 24 | $table->string('phone'); 25 | $table->string('msg'); 26 | $table->rememberToken(); 27 | $table->timestamps(); 28 | }); 29 | $user = new \App\User(); 30 | $user->name = "admin"; 31 | $user->email = "admin@nlfox.com"; 32 | $ranPsw = str_random(10); 33 | print "New admin password is ".$ranPsw." \n"; 34 | $user->password = Hash::make($ranPsw); 35 | $user->score = "0"; 36 | $user->isadmin = 1; 37 | $user->sid = "201611111"; 38 | $user->phone = "11111111111"; 39 | $user->msg = "admin"; 40 | $user->save(); 41 | 42 | 43 | } 44 | 45 | /** 46 | * Reverse the migrations. 47 | * 48 | * @return void 49 | */ 50 | public function down() 51 | { 52 | Schema::drop('users'); 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /database/migrations/2014_10_12_100000_create_password_resets_table.php: -------------------------------------------------------------------------------- 1 | string('email')->index(); 17 | $table->string('token')->index(); 18 | $table->timestamp('created_at')->nullable(); 19 | }); 20 | } 21 | 22 | /** 23 | * Reverse the migrations. 24 | * 25 | * @return void 26 | */ 27 | public function down() 28 | { 29 | Schema::drop('password_resets'); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /database/migrations/2015_04_09_044813_create_tasks_table.php: -------------------------------------------------------------------------------- 1 | increments('id'); 18 | $table->string('category'); 19 | $table->integer('score'); 20 | $table->string('title'); 21 | $table->string('flag'); 22 | $table->string('content'); 23 | $table->timestamps(); 24 | }); 25 | } 26 | 27 | /** 28 | * Reverse the migrations. 29 | * 30 | * @return void 31 | */ 32 | public function down() 33 | { 34 | Schema::drop('tasks'); 35 | } 36 | 37 | } 38 | -------------------------------------------------------------------------------- /database/migrations/2015_04_10_071238_create_solveds_table.php: -------------------------------------------------------------------------------- 1 | increments('id'); 18 | $table->integer('taskid'); 19 | $table->string('user'); 20 | $table->timestamps(); 21 | 22 | }); 23 | } 24 | 25 | /** 26 | * Reverse the migrations. 27 | * 28 | * @return void 29 | */ 30 | public function down() 31 | { 32 | Schema::drop('solveds'); 33 | } 34 | 35 | } 36 | -------------------------------------------------------------------------------- /database/migrations/2015_10_12_132604_create_posts_table.php: -------------------------------------------------------------------------------- 1 | increments('id'); 18 | $table->text('content'); 19 | $table->text('title'); 20 | $table->string('category')->default('notice'); 21 | $table->timestamps(); 22 | }); 23 | } 24 | 25 | /** 26 | * Reverse the migrations. 27 | * 28 | * @return void 29 | */ 30 | public function down() 31 | { 32 | Schema::drop('posts'); 33 | } 34 | 35 | } 36 | -------------------------------------------------------------------------------- /database/migrations/2015_11_20_071611_create_settings_table.php: -------------------------------------------------------------------------------- 1 | increments('id'); 18 | $table->text('name'); 19 | $table->text('value'); 20 | $table->timestamps(); 21 | 22 | }); 23 | $intro = new \App\Settings(); 24 | $intro->name = 'introduction'; 25 | $intro->value = '2333'; 26 | $intro->save(); 27 | $stat = new \App\Settings(); 28 | $stat->name = 'started'; 29 | $stat->value = 0; 30 | $stat->save(); 31 | 32 | } 33 | 34 | /** 35 | * Reverse the migrations. 36 | * 37 | * @return void 38 | */ 39 | public function down() 40 | { 41 | Schema::drop('settings'); 42 | } 43 | 44 | } 45 | -------------------------------------------------------------------------------- /database/seeds/.gitkeep: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /database/seeds/DatabaseSeeder.php: -------------------------------------------------------------------------------- 1 | call(UsersTableSeeder::class); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /example.env: -------------------------------------------------------------------------------- 1 | APP_ENV=local 2 | APP_KEY=base64:iHKuQx7MNC4hF6ICx/+zGhcs7fePhkuXzY+ftKeCGYI= 3 | APP_DEBUG=false 4 | APP_LOG_LEVEL=debug 5 | APP_URL=http://localhost 6 | 7 | DB_CONNECTION=sqlite 8 | DB_HOST=127.0.0.1 9 | DB_PORT=3306 10 | DB_USERNAME=homestead 11 | DB_PASSWORD=secret 12 | 13 | CACHE_DRIVER=file 14 | SESSION_DRIVER=file 15 | QUEUE_DRIVER=sync 16 | 17 | REDIS_HOST=127.0.0.1 18 | REDIS_PASSWORD=null 19 | REDIS_PORT=6379 20 | 21 | MAIL_DRIVER=smtp 22 | MAIL_HOST=mailtrap.io 23 | MAIL_PORT=2525 24 | MAIL_USERNAME=null 25 | MAIL_PASSWORD=null 26 | MAIL_ENCRYPTION=null 27 | 28 | CTF_NAME=CTF 29 | -------------------------------------------------------------------------------- /gulpfile.js: -------------------------------------------------------------------------------- 1 | var elixir = require('laravel-elixir'); 2 | 3 | /* 4 | |-------------------------------------------------------------------------- 5 | | Elixir Asset Management 6 | |-------------------------------------------------------------------------- 7 | | 8 | | Elixir provides a clean, fluent API for defining some basic Gulp tasks 9 | | for your Laravel application. By default, we are compiling the Sass 10 | | file for our application, as well as publishing vendor resources. 11 | | 12 | */ 13 | 14 | elixir(function(mix) { 15 | mix.sass('app.scss'); 16 | }); 17 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "private": true, 3 | "scripts": { 4 | "prod": "gulp --production", 5 | "dev": "gulp watch" 6 | }, 7 | "devDependencies": { 8 | "gulp": "^3.9.1", 9 | "laravel-elixir": "^5.0.0", 10 | "bootstrap-sass": "^3.3.0" 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /phpunit.xml: -------------------------------------------------------------------------------- 1 | 2 | 11 | 12 | 13 | ./tests 14 | 15 | 16 | 17 | 18 | ./app 19 | 20 | ./app/Http/routes.php 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /public/.htaccess: -------------------------------------------------------------------------------- 1 | 2 | 3 | Options -MultiViews 4 | 5 | 6 | RewriteEngine On 7 | 8 | # Redirect Trailing Slashes If Not A Folder... 9 | RewriteCond %{REQUEST_FILENAME} !-d 10 | RewriteRule ^(.*)/$ /$1 [L,R=301] 11 | 12 | # Handle Front Controller... 13 | RewriteCond %{REQUEST_FILENAME} !-d 14 | RewriteCond %{REQUEST_FILENAME} !-f 15 | RewriteRule ^ index.php [L] 16 | 17 | # Handle Authorization Header 18 | RewriteCond %{HTTP:Authorization} . 19 | RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}] 20 | 21 | -------------------------------------------------------------------------------- /public/bower_components/bootstrap/.bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "bootstrap", 3 | "description": "The most popular front-end framework for developing responsive, mobile first projects on the web.", 4 | "version": "3.2.0", 5 | "keywords": [ 6 | "css", 7 | "js", 8 | "less", 9 | "mobile-first", 10 | "responsive", 11 | "front-end", 12 | "framework", 13 | "web" 14 | ], 15 | "homepage": "http://getbootstrap.com", 16 | "main": [ 17 | "less/bootstrap.less", 18 | "dist/css/bootstrap.css", 19 | "dist/js/bootstrap.js", 20 | "dist/fonts/glyphicons-halflings-regular.eot", 21 | "dist/fonts/glyphicons-halflings-regular.svg", 22 | "dist/fonts/glyphicons-halflings-regular.ttf", 23 | "dist/fonts/glyphicons-halflings-regular.woff" 24 | ], 25 | "ignore": [ 26 | ".*", 27 | "_config.yml", 28 | "CNAME", 29 | "composer.json", 30 | "CONTRIBUTING.md", 31 | "docs", 32 | "js/tests", 33 | "test-infra" 34 | ], 35 | "dependencies": { 36 | "jquery": ">= 1.9.0" 37 | }, 38 | "_release": "3.2.0", 39 | "_resolution": { 40 | "type": "version", 41 | "tag": "v3.2.0", 42 | "commit": "c068162161154a4b85110ea1e7dd3d7897ce2b72" 43 | }, 44 | "_source": "https://github.com/twbs/bootstrap.git", 45 | "_target": "~3.2.0", 46 | "_originalSource": "bootstrap" 47 | } -------------------------------------------------------------------------------- /public/bower_components/bootstrap/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2011-2014 Twitter, Inc 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /public/bower_components/bootstrap/bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "bootstrap", 3 | "description": "The most popular front-end framework for developing responsive, mobile first projects on the web.", 4 | "version": "3.2.0", 5 | "keywords": [ 6 | "css", 7 | "js", 8 | "less", 9 | "mobile-first", 10 | "responsive", 11 | "front-end", 12 | "framework", 13 | "web" 14 | ], 15 | "homepage": "http://getbootstrap.com", 16 | "main": [ 17 | "less/bootstrap.less", 18 | "dist/css/bootstrap.css", 19 | "dist/js/bootstrap.js", 20 | "dist/fonts/glyphicons-halflings-regular.eot", 21 | "dist/fonts/glyphicons-halflings-regular.svg", 22 | "dist/fonts/glyphicons-halflings-regular.ttf", 23 | "dist/fonts/glyphicons-halflings-regular.woff" 24 | ], 25 | "ignore": [ 26 | ".*", 27 | "_config.yml", 28 | "CNAME", 29 | "composer.json", 30 | "CONTRIBUTING.md", 31 | "docs", 32 | "js/tests", 33 | "test-infra" 34 | ], 35 | "dependencies": { 36 | "jquery": ">= 1.9.0" 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /public/bower_components/bootstrap/dist/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nlfox/ctfPlatform/67948850a89c0af8345412b102e2b68593363910/public/bower_components/bootstrap/dist/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /public/bower_components/bootstrap/dist/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nlfox/ctfPlatform/67948850a89c0af8345412b102e2b68593363910/public/bower_components/bootstrap/dist/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /public/bower_components/bootstrap/dist/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nlfox/ctfPlatform/67948850a89c0af8345412b102e2b68593363910/public/bower_components/bootstrap/dist/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /public/bower_components/bootstrap/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nlfox/ctfPlatform/67948850a89c0af8345412b102e2b68593363910/public/bower_components/bootstrap/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /public/bower_components/bootstrap/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nlfox/ctfPlatform/67948850a89c0af8345412b102e2b68593363910/public/bower_components/bootstrap/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /public/bower_components/bootstrap/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nlfox/ctfPlatform/67948850a89c0af8345412b102e2b68593363910/public/bower_components/bootstrap/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /public/bower_components/bootstrap/grunt/bs-glyphicons-data-generator.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * Bootstrap Grunt task for Glyphicons data generation 3 | * http://getbootstrap.com 4 | * Copyright 2014 Twitter, Inc. 5 | * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) 6 | */ 7 | 'use strict'; 8 | var fs = require('fs'); 9 | 10 | module.exports = function generateGlyphiconsData(grunt) { 11 | // Pass encoding, utf8, so `readFileSync` will return a string instead of a 12 | // buffer 13 | var glyphiconsFile = fs.readFileSync('less/glyphicons.less', 'utf8'); 14 | var glyphiconsLines = glyphiconsFile.split('\n'); 15 | 16 | // Use any line that starts with ".glyphicon-" and capture the class name 17 | var iconClassName = /^\.(glyphicon-[^\s]+)/; 18 | var glyphiconsData = '# This file is generated via Grunt task. **Do not edit directly.**\n' + 19 | '# See the \'build-glyphicons-data\' task in Gruntfile.js.\n\n'; 20 | var glyphiconsYml = 'docs/_data/glyphicons.yml'; 21 | for (var i = 0, len = glyphiconsLines.length; i < len; i++) { 22 | var match = glyphiconsLines[i].match(iconClassName); 23 | 24 | if (match !== null) { 25 | glyphiconsData += '- ' + match[1] + '\n'; 26 | } 27 | } 28 | 29 | // Create the `_data` directory if it doesn't already exist 30 | if (!fs.existsSync('docs/_data')) { 31 | fs.mkdirSync('docs/_data'); 32 | } 33 | 34 | try { 35 | fs.writeFileSync(glyphiconsYml, glyphiconsData); 36 | } 37 | catch (err) { 38 | grunt.fail.warn(err); 39 | } 40 | grunt.log.writeln('File ' + glyphiconsYml.cyan + ' created.'); 41 | }; 42 | -------------------------------------------------------------------------------- /public/bower_components/bootstrap/grunt/bs-raw-files-generator.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * Bootstrap Grunt task for generating raw-files.min.js for the Customizer 3 | * http://getbootstrap.com 4 | * Copyright 2014 Twitter, Inc. 5 | * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) 6 | */ 7 | 8 | /* global btoa: true */ 9 | 10 | 'use strict'; 11 | var fs = require('fs'); 12 | var btoa = require('btoa'); 13 | var glob = require('glob'); 14 | 15 | function getFiles(type) { 16 | var files = {}; 17 | var recursive = (type === 'less'); 18 | var globExpr = (recursive ? '/**/*' : '/*'); 19 | glob.sync(type + globExpr) 20 | .filter(function (path) { 21 | return type === 'fonts' ? true : new RegExp('\\.' + type + '$').test(path); 22 | }) 23 | .forEach(function (fullPath) { 24 | var relativePath = fullPath.replace(/^[^/]+\//, ''); 25 | files[relativePath] = (type === 'fonts' ? btoa(fs.readFileSync(fullPath)) : fs.readFileSync(fullPath, 'utf8')); 26 | }); 27 | return 'var __' + type + ' = ' + JSON.stringify(files) + '\n'; 28 | } 29 | 30 | module.exports = function generateRawFilesJs(grunt, banner) { 31 | if (!banner) { 32 | banner = ''; 33 | } 34 | var dirs = ['js', 'less', 'fonts']; 35 | var files = banner + dirs.map(getFiles).reduce(function (combined, file) { 36 | return combined + file; 37 | }, ''); 38 | var rawFilesJs = 'docs/assets/js/raw-files.min.js'; 39 | try { 40 | fs.writeFileSync(rawFilesJs, files); 41 | } 42 | catch (err) { 43 | grunt.fail.warn(err); 44 | } 45 | grunt.log.writeln('File ' + rawFilesJs.cyan + ' created.'); 46 | }; 47 | -------------------------------------------------------------------------------- /public/bower_components/bootstrap/grunt/sauce_browsers.yml: -------------------------------------------------------------------------------- 1 | [ 2 | # Docs: https://saucelabs.com/docs/platforms/webdriver 3 | 4 | { 5 | browserName: "safari", 6 | platform: "OS X 10.9" 7 | }, 8 | { 9 | browserName: "chrome", 10 | platform: "OS X 10.9" 11 | }, 12 | { 13 | browserName: "firefox", 14 | platform: "OS X 10.9" 15 | }, 16 | 17 | # Mac Opera not currently supported by Sauce Labs 18 | 19 | { 20 | browserName: "internet explorer", 21 | version: "11", 22 | platform: "Windows 8.1" 23 | }, 24 | { 25 | browserName: "internet explorer", 26 | version: "10", 27 | platform: "Windows 8" 28 | }, 29 | { 30 | browserName: "internet explorer", 31 | version: "9", 32 | platform: "Windows 7" 33 | }, 34 | { 35 | browserName: "internet explorer", 36 | version: "8", 37 | platform: "Windows 7" 38 | }, 39 | 40 | # { # Unofficial 41 | # browserName: "internet explorer", 42 | # version: "7", 43 | # platform: "Windows XP" 44 | # }, 45 | 46 | { 47 | browserName: "chrome", 48 | platform: "Windows 8.1" 49 | }, 50 | { 51 | browserName: "firefox", 52 | platform: "Windows 8.1" 53 | }, 54 | 55 | # Win Opera 15+ not currently supported by Sauce Labs 56 | 57 | { 58 | browserName: "iphone", 59 | platform: "OS X 10.9", 60 | version: "7.1" 61 | }, 62 | 63 | # iOS Chrome not currently supported by Sauce Labs 64 | 65 | # Linux (unofficial) 66 | { 67 | browserName: "chrome", 68 | platform: "Linux" 69 | }, 70 | { 71 | browserName: "firefox", 72 | platform: "Linux" 73 | } 74 | 75 | # Android Chrome not currently supported by Sauce Labs 76 | 77 | # { # Android Browser (super-unofficial) 78 | # browserName: "android", 79 | # version: "4.0", 80 | # platform: "Linux" 81 | # } 82 | ] 83 | -------------------------------------------------------------------------------- /public/bower_components/bootstrap/js/alert.js: -------------------------------------------------------------------------------- 1 | /* ======================================================================== 2 | * Bootstrap: alert.js v3.2.0 3 | * http://getbootstrap.com/javascript/#alerts 4 | * ======================================================================== 5 | * Copyright 2011-2014 Twitter, Inc. 6 | * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) 7 | * ======================================================================== */ 8 | 9 | 10 | +function ($) { 11 | 'use strict'; 12 | 13 | // ALERT CLASS DEFINITION 14 | // ====================== 15 | 16 | var dismiss = '[data-dismiss="alert"]' 17 | var Alert = function (el) { 18 | $(el).on('click', dismiss, this.close) 19 | } 20 | 21 | Alert.VERSION = '3.2.0' 22 | 23 | Alert.prototype.close = function (e) { 24 | var $this = $(this) 25 | var selector = $this.attr('data-target') 26 | 27 | if (!selector) { 28 | selector = $this.attr('href') 29 | selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') // strip for ie7 30 | } 31 | 32 | var $parent = $(selector) 33 | 34 | if (e) e.preventDefault() 35 | 36 | if (!$parent.length) { 37 | $parent = $this.hasClass('alert') ? $this : $this.parent() 38 | } 39 | 40 | $parent.trigger(e = $.Event('close.bs.alert')) 41 | 42 | if (e.isDefaultPrevented()) return 43 | 44 | $parent.removeClass('in') 45 | 46 | function removeElement() { 47 | // detach from parent, fire event then clean up data 48 | $parent.detach().trigger('closed.bs.alert').remove() 49 | } 50 | 51 | $.support.transition && $parent.hasClass('fade') ? 52 | $parent 53 | .one('bsTransitionEnd', removeElement) 54 | .emulateTransitionEnd(150) : 55 | removeElement() 56 | } 57 | 58 | 59 | // ALERT PLUGIN DEFINITION 60 | // ======================= 61 | 62 | function Plugin(option) { 63 | return this.each(function () { 64 | var $this = $(this) 65 | var data = $this.data('bs.alert') 66 | 67 | if (!data) $this.data('bs.alert', (data = new Alert(this))) 68 | if (typeof option == 'string') data[option].call($this) 69 | }) 70 | } 71 | 72 | var old = $.fn.alert 73 | 74 | $.fn.alert = Plugin 75 | $.fn.alert.Constructor = Alert 76 | 77 | 78 | // ALERT NO CONFLICT 79 | // ================= 80 | 81 | $.fn.alert.noConflict = function () { 82 | $.fn.alert = old 83 | return this 84 | } 85 | 86 | 87 | // ALERT DATA-API 88 | // ============== 89 | 90 | $(document).on('click.bs.alert.data-api', dismiss, Alert.prototype.close) 91 | 92 | }(jQuery); 93 | -------------------------------------------------------------------------------- /public/bower_components/bootstrap/js/transition.js: -------------------------------------------------------------------------------- 1 | /* ======================================================================== 2 | * Bootstrap: transition.js v3.2.0 3 | * http://getbootstrap.com/javascript/#transitions 4 | * ======================================================================== 5 | * Copyright 2011-2014 Twitter, Inc. 6 | * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) 7 | * ======================================================================== */ 8 | 9 | 10 | +function ($) { 11 | 'use strict'; 12 | 13 | // CSS TRANSITION SUPPORT (Shoutout: http://www.modernizr.com/) 14 | // ============================================================ 15 | 16 | function transitionEnd() { 17 | var el = document.createElement('bootstrap') 18 | 19 | var transEndEventNames = { 20 | WebkitTransition : 'webkitTransitionEnd', 21 | MozTransition : 'transitionend', 22 | OTransition : 'oTransitionEnd otransitionend', 23 | transition : 'transitionend' 24 | } 25 | 26 | for (var name in transEndEventNames) { 27 | if (el.style[name] !== undefined) { 28 | return { end: transEndEventNames[name] } 29 | } 30 | } 31 | 32 | return false // explicit for ie8 ( ._.) 33 | } 34 | 35 | // http://blog.alexmaccaw.com/css-transitions 36 | $.fn.emulateTransitionEnd = function (duration) { 37 | var called = false 38 | var $el = this 39 | $(this).one('bsTransitionEnd', function () { called = true }) 40 | var callback = function () { if (!called) $($el).trigger($.support.transition.end) } 41 | setTimeout(callback, duration) 42 | return this 43 | } 44 | 45 | $(function () { 46 | $.support.transition = transitionEnd() 47 | 48 | if (!$.support.transition) return 49 | 50 | $.event.special.bsTransitionEnd = { 51 | bindType: $.support.transition.end, 52 | delegateType: $.support.transition.end, 53 | handle: function (e) { 54 | if ($(e.target).is(this)) return e.handleObj.handler.apply(this, arguments) 55 | } 56 | } 57 | }) 58 | 59 | }(jQuery); 60 | -------------------------------------------------------------------------------- /public/bower_components/bootstrap/less/alerts.less: -------------------------------------------------------------------------------- 1 | // 2 | // Alerts 3 | // -------------------------------------------------- 4 | 5 | 6 | // Base styles 7 | // ------------------------- 8 | 9 | .alert { 10 | padding: @alert-padding; 11 | margin-bottom: @line-height-computed; 12 | border: 1px solid transparent; 13 | border-radius: @alert-border-radius; 14 | 15 | // Headings for larger alerts 16 | h4 { 17 | margin-top: 0; 18 | // Specified for the h4 to prevent conflicts of changing @headings-color 19 | color: inherit; 20 | } 21 | // Provide class for links that match alerts 22 | .alert-link { 23 | font-weight: @alert-link-font-weight; 24 | } 25 | 26 | // Improve alignment and spacing of inner content 27 | > p, 28 | > ul { 29 | margin-bottom: 0; 30 | } 31 | > p + p { 32 | margin-top: 5px; 33 | } 34 | } 35 | 36 | // Dismissible alerts 37 | // 38 | // Expand the right padding and account for the close button's positioning. 39 | 40 | .alert-dismissable, // The misspelled .alert-dismissable was deprecated in 3.2.0. 41 | .alert-dismissible { 42 | padding-right: (@alert-padding + 20); 43 | 44 | // Adjust close link position 45 | .close { 46 | position: relative; 47 | top: -2px; 48 | right: -21px; 49 | color: inherit; 50 | } 51 | } 52 | 53 | // Alternate styles 54 | // 55 | // Generate contextual modifier classes for colorizing the alert. 56 | 57 | .alert-success { 58 | .alert-variant(@alert-success-bg; @alert-success-border; @alert-success-text); 59 | } 60 | .alert-info { 61 | .alert-variant(@alert-info-bg; @alert-info-border; @alert-info-text); 62 | } 63 | .alert-warning { 64 | .alert-variant(@alert-warning-bg; @alert-warning-border; @alert-warning-text); 65 | } 66 | .alert-danger { 67 | .alert-variant(@alert-danger-bg; @alert-danger-border; @alert-danger-text); 68 | } 69 | -------------------------------------------------------------------------------- /public/bower_components/bootstrap/less/badges.less: -------------------------------------------------------------------------------- 1 | // 2 | // Badges 3 | // -------------------------------------------------- 4 | 5 | 6 | // Base class 7 | .badge { 8 | display: inline-block; 9 | min-width: 10px; 10 | padding: 3px 7px; 11 | font-size: @font-size-small; 12 | font-weight: @badge-font-weight; 13 | color: @badge-color; 14 | line-height: @badge-line-height; 15 | vertical-align: baseline; 16 | white-space: nowrap; 17 | text-align: center; 18 | background-color: @badge-bg; 19 | border-radius: @badge-border-radius; 20 | 21 | // Empty badges collapse automatically (not available in IE8) 22 | &:empty { 23 | display: none; 24 | } 25 | 26 | // Quick fix for badges in buttons 27 | .btn & { 28 | position: relative; 29 | top: -1px; 30 | } 31 | .btn-xs & { 32 | top: 0; 33 | padding: 1px 5px; 34 | } 35 | 36 | // Hover state, but only for links 37 | a& { 38 | &:hover, 39 | &:focus { 40 | color: @badge-link-hover-color; 41 | text-decoration: none; 42 | cursor: pointer; 43 | } 44 | } 45 | 46 | // Account for badges in navs 47 | a.list-group-item.active > &, 48 | .nav-pills > .active > a > & { 49 | color: @badge-active-color; 50 | background-color: @badge-active-bg; 51 | } 52 | .nav-pills > li > a > & { 53 | margin-left: 3px; 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /public/bower_components/bootstrap/less/bootstrap.less: -------------------------------------------------------------------------------- 1 | // Core variables and mixins 2 | @import "variables.less"; 3 | @import "mixins.less"; 4 | 5 | // Reset and dependencies 6 | @import "normalize.less"; 7 | @import "print.less"; 8 | @import "glyphicons.less"; 9 | 10 | // Core CSS 11 | @import "scaffolding.less"; 12 | @import "type.less"; 13 | @import "code.less"; 14 | @import "grid.less"; 15 | @import "tables.less"; 16 | @import "forms.less"; 17 | @import "buttons.less"; 18 | 19 | // Components 20 | @import "component-animations.less"; 21 | @import "dropdowns.less"; 22 | @import "button-groups.less"; 23 | @import "input-groups.less"; 24 | @import "navs.less"; 25 | @import "navbar.less"; 26 | @import "breadcrumbs.less"; 27 | @import "pagination.less"; 28 | @import "pager.less"; 29 | @import "labels.less"; 30 | @import "badges.less"; 31 | @import "jumbotron.less"; 32 | @import "thumbnails.less"; 33 | @import "alerts.less"; 34 | @import "progress-bars.less"; 35 | @import "media.less"; 36 | @import "list-group.less"; 37 | @import "panels.less"; 38 | @import "responsive-embed.less"; 39 | @import "wells.less"; 40 | @import "close.less"; 41 | 42 | // Components w/ JavaScript 43 | @import "modals.less"; 44 | @import "tooltip.less"; 45 | @import "popovers.less"; 46 | @import "carousel.less"; 47 | 48 | // Utility classes 49 | @import "utilities.less"; 50 | @import "responsive-utilities.less"; 51 | -------------------------------------------------------------------------------- /public/bower_components/bootstrap/less/breadcrumbs.less: -------------------------------------------------------------------------------- 1 | // 2 | // Breadcrumbs 3 | // -------------------------------------------------- 4 | 5 | 6 | .breadcrumb { 7 | padding: @breadcrumb-padding-vertical @breadcrumb-padding-horizontal; 8 | margin-bottom: @line-height-computed; 9 | list-style: none; 10 | background-color: @breadcrumb-bg; 11 | border-radius: @border-radius-base; 12 | 13 | > li { 14 | display: inline-block; 15 | 16 | + li:before { 17 | content: "@{breadcrumb-separator}\00a0"; // Unicode space added since inline-block means non-collapsing white-space 18 | padding: 0 5px; 19 | color: @breadcrumb-color; 20 | } 21 | } 22 | 23 | > .active { 24 | color: @breadcrumb-active-color; 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /public/bower_components/bootstrap/less/close.less: -------------------------------------------------------------------------------- 1 | // 2 | // Close icons 3 | // -------------------------------------------------- 4 | 5 | 6 | .close { 7 | float: right; 8 | font-size: (@font-size-base * 1.5); 9 | font-weight: @close-font-weight; 10 | line-height: 1; 11 | color: @close-color; 12 | text-shadow: @close-text-shadow; 13 | .opacity(.2); 14 | 15 | &:hover, 16 | &:focus { 17 | color: @close-color; 18 | text-decoration: none; 19 | cursor: pointer; 20 | .opacity(.5); 21 | } 22 | 23 | // Additional properties for button version 24 | // iOS requires the button element instead of an anchor tag. 25 | // If you want the anchor version, it requires `href="#"`. 26 | button& { 27 | padding: 0; 28 | cursor: pointer; 29 | background: transparent; 30 | border: 0; 31 | -webkit-appearance: none; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /public/bower_components/bootstrap/less/code.less: -------------------------------------------------------------------------------- 1 | // 2 | // Code (inline and block) 3 | // -------------------------------------------------- 4 | 5 | 6 | // Inline and block code styles 7 | code, 8 | kbd, 9 | pre, 10 | samp { 11 | font-family: @font-family-monospace; 12 | } 13 | 14 | // Inline code 15 | code { 16 | padding: 2px 4px; 17 | font-size: 90%; 18 | color: @code-color; 19 | background-color: @code-bg; 20 | border-radius: @border-radius-base; 21 | } 22 | 23 | // User input typically entered via keyboard 24 | kbd { 25 | padding: 2px 4px; 26 | font-size: 90%; 27 | color: @kbd-color; 28 | background-color: @kbd-bg; 29 | border-radius: @border-radius-small; 30 | box-shadow: inset 0 -1px 0 rgba(0,0,0,.25); 31 | 32 | kbd { 33 | padding: 0; 34 | font-size: 100%; 35 | box-shadow: none; 36 | } 37 | } 38 | 39 | // Blocks of code 40 | pre { 41 | display: block; 42 | padding: ((@line-height-computed - 1) / 2); 43 | margin: 0 0 (@line-height-computed / 2); 44 | font-size: (@font-size-base - 1); // 14px to 13px 45 | line-height: @line-height-base; 46 | word-break: break-all; 47 | word-wrap: break-word; 48 | color: @pre-color; 49 | background-color: @pre-bg; 50 | border: 1px solid @pre-border-color; 51 | border-radius: @border-radius-base; 52 | 53 | // Account for some code outputs that place code tags in pre tags 54 | code { 55 | padding: 0; 56 | font-size: inherit; 57 | color: inherit; 58 | white-space: pre-wrap; 59 | background-color: transparent; 60 | border-radius: 0; 61 | } 62 | } 63 | 64 | // Enable scrollable blocks of code 65 | .pre-scrollable { 66 | max-height: @pre-scrollable-max-height; 67 | overflow-y: scroll; 68 | } 69 | -------------------------------------------------------------------------------- /public/bower_components/bootstrap/less/component-animations.less: -------------------------------------------------------------------------------- 1 | // 2 | // Component animations 3 | // -------------------------------------------------- 4 | 5 | // Heads up! 6 | // 7 | // We don't use the `.opacity()` mixin here since it causes a bug with text 8 | // fields in IE7-8. Source: https://github.com/twbs/bootstrap/pull/3552. 9 | 10 | .fade { 11 | opacity: 0; 12 | .transition(opacity .15s linear); 13 | &.in { 14 | opacity: 1; 15 | } 16 | } 17 | 18 | .collapse { 19 | display: none; 20 | 21 | &.in { display: block; } 22 | tr&.in { display: table-row; } 23 | tbody&.in { display: table-row-group; } 24 | } 25 | 26 | .collapsing { 27 | position: relative; 28 | height: 0; 29 | overflow: hidden; 30 | .transition(height .35s ease); 31 | } 32 | -------------------------------------------------------------------------------- /public/bower_components/bootstrap/less/grid.less: -------------------------------------------------------------------------------- 1 | // 2 | // Grid system 3 | // -------------------------------------------------- 4 | 5 | 6 | // Container widths 7 | // 8 | // Set the container width, and override it for fixed navbars in media queries. 9 | 10 | .container { 11 | .container-fixed(); 12 | 13 | @media (min-width: @screen-sm-min) { 14 | width: @container-sm; 15 | } 16 | @media (min-width: @screen-md-min) { 17 | width: @container-md; 18 | } 19 | @media (min-width: @screen-lg-min) { 20 | width: @container-lg; 21 | } 22 | } 23 | 24 | 25 | // Fluid container 26 | // 27 | // Utilizes the mixin meant for fixed width containers, but without any defined 28 | // width for fluid, full width layouts. 29 | 30 | .container-fluid { 31 | .container-fixed(); 32 | } 33 | 34 | 35 | // Row 36 | // 37 | // Rows contain and clear the floats of your columns. 38 | 39 | .row { 40 | .make-row(); 41 | } 42 | 43 | 44 | // Columns 45 | // 46 | // Common styles for small and large grid columns 47 | 48 | .make-grid-columns(); 49 | 50 | 51 | // Extra small grid 52 | // 53 | // Columns, offsets, pushes, and pulls for extra small devices like 54 | // smartphones. 55 | 56 | .make-grid(xs); 57 | 58 | 59 | // Small grid 60 | // 61 | // Columns, offsets, pushes, and pulls for the small device range, from phones 62 | // to tablets. 63 | 64 | @media (min-width: @screen-sm-min) { 65 | .make-grid(sm); 66 | } 67 | 68 | 69 | // Medium grid 70 | // 71 | // Columns, offsets, pushes, and pulls for the desktop device range. 72 | 73 | @media (min-width: @screen-md-min) { 74 | .make-grid(md); 75 | } 76 | 77 | 78 | // Large grid 79 | // 80 | // Columns, offsets, pushes, and pulls for the large desktop device range. 81 | 82 | @media (min-width: @screen-lg-min) { 83 | .make-grid(lg); 84 | } 85 | -------------------------------------------------------------------------------- /public/bower_components/bootstrap/less/jumbotron.less: -------------------------------------------------------------------------------- 1 | // 2 | // Jumbotron 3 | // -------------------------------------------------- 4 | 5 | 6 | .jumbotron { 7 | padding: @jumbotron-padding; 8 | margin-bottom: @jumbotron-padding; 9 | color: @jumbotron-color; 10 | background-color: @jumbotron-bg; 11 | 12 | h1, 13 | .h1 { 14 | color: @jumbotron-heading-color; 15 | } 16 | p { 17 | margin-bottom: (@jumbotron-padding / 2); 18 | font-size: @jumbotron-font-size; 19 | font-weight: 200; 20 | } 21 | 22 | > hr { 23 | border-top-color: darken(@jumbotron-bg, 10%); 24 | } 25 | 26 | .container & { 27 | border-radius: @border-radius-large; // Only round corners at higher resolutions if contained in a container 28 | } 29 | 30 | .container { 31 | max-width: 100%; 32 | } 33 | 34 | @media screen and (min-width: @screen-sm-min) { 35 | padding-top: (@jumbotron-padding * 1.6); 36 | padding-bottom: (@jumbotron-padding * 1.6); 37 | 38 | .container & { 39 | padding-left: (@jumbotron-padding * 2); 40 | padding-right: (@jumbotron-padding * 2); 41 | } 42 | 43 | h1, 44 | .h1 { 45 | font-size: (@font-size-base * 4.5); 46 | } 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /public/bower_components/bootstrap/less/labels.less: -------------------------------------------------------------------------------- 1 | // 2 | // Labels 3 | // -------------------------------------------------- 4 | 5 | .label { 6 | display: inline; 7 | padding: .2em .6em .3em; 8 | font-size: 75%; 9 | font-weight: bold; 10 | line-height: 1; 11 | color: @label-color; 12 | text-align: center; 13 | white-space: nowrap; 14 | vertical-align: baseline; 15 | border-radius: .25em; 16 | 17 | // Add hover effects, but only for links 18 | a& { 19 | &:hover, 20 | &:focus { 21 | color: @label-link-hover-color; 22 | text-decoration: none; 23 | cursor: pointer; 24 | } 25 | } 26 | 27 | // Empty labels collapse automatically (not available in IE8) 28 | &:empty { 29 | display: none; 30 | } 31 | 32 | // Quick fix for labels in buttons 33 | .btn & { 34 | position: relative; 35 | top: -1px; 36 | } 37 | } 38 | 39 | // Colors 40 | // Contextual variations (linked labels get darker on :hover) 41 | 42 | .label-default { 43 | .label-variant(@label-default-bg); 44 | } 45 | 46 | .label-primary { 47 | .label-variant(@label-primary-bg); 48 | } 49 | 50 | .label-success { 51 | .label-variant(@label-success-bg); 52 | } 53 | 54 | .label-info { 55 | .label-variant(@label-info-bg); 56 | } 57 | 58 | .label-warning { 59 | .label-variant(@label-warning-bg); 60 | } 61 | 62 | .label-danger { 63 | .label-variant(@label-danger-bg); 64 | } 65 | -------------------------------------------------------------------------------- /public/bower_components/bootstrap/less/media.less: -------------------------------------------------------------------------------- 1 | // Media objects 2 | // Source: http://stubbornella.org/content/?p=497 3 | // -------------------------------------------------- 4 | 5 | 6 | // Common styles 7 | // ------------------------- 8 | 9 | // Clear the floats 10 | .media, 11 | .media-body { 12 | overflow: hidden; 13 | zoom: 1; 14 | } 15 | 16 | // Proper spacing between instances of .media 17 | .media, 18 | .media .media { 19 | margin-top: 15px; 20 | } 21 | .media:first-child { 22 | margin-top: 0; 23 | } 24 | 25 | // For images and videos, set to block 26 | .media-object { 27 | display: block; 28 | } 29 | 30 | // Reset margins on headings for tighter default spacing 31 | .media-heading { 32 | margin: 0 0 5px; 33 | } 34 | 35 | 36 | // Media image alignment 37 | // ------------------------- 38 | 39 | .media { 40 | > .pull-left { 41 | margin-right: 10px; 42 | } 43 | > .pull-right { 44 | margin-left: 10px; 45 | } 46 | } 47 | 48 | 49 | // Media list variation 50 | // ------------------------- 51 | 52 | // Undo default ul/ol styles 53 | .media-list { 54 | padding-left: 0; 55 | list-style: none; 56 | } 57 | -------------------------------------------------------------------------------- /public/bower_components/bootstrap/less/mixins.less: -------------------------------------------------------------------------------- 1 | // Mixins 2 | // -------------------------------------------------- 3 | 4 | // Utilities 5 | @import "mixins/hide-text.less"; 6 | @import "mixins/opacity.less"; 7 | @import "mixins/image.less"; 8 | @import "mixins/labels.less"; 9 | @import "mixins/reset-filter.less"; 10 | @import "mixins/resize.less"; 11 | @import "mixins/responsive-visibility.less"; 12 | @import "mixins/size.less"; 13 | @import "mixins/tab-focus.less"; 14 | @import "mixins/text-emphasis.less"; 15 | @import "mixins/text-overflow.less"; 16 | @import "mixins/vendor-prefixes.less"; 17 | 18 | // Components 19 | @import "mixins/alerts.less"; 20 | @import "mixins/buttons.less"; 21 | @import "mixins/panels.less"; 22 | @import "mixins/pagination.less"; 23 | @import "mixins/list-group.less"; 24 | @import "mixins/nav-divider.less"; 25 | @import "mixins/forms.less"; 26 | @import "mixins/progress-bar.less"; 27 | @import "mixins/table-row.less"; 28 | 29 | // Skins 30 | @import "mixins/background-variant.less"; 31 | @import "mixins/border-radius.less"; 32 | @import "mixins/gradients.less"; 33 | 34 | // Layout 35 | @import "mixins/clearfix.less"; 36 | @import "mixins/center-block.less"; 37 | @import "mixins/nav-vertical-align.less"; 38 | @import "mixins/grid-framework.less"; 39 | @import "mixins/grid.less"; 40 | -------------------------------------------------------------------------------- /public/bower_components/bootstrap/less/mixins/alerts.less: -------------------------------------------------------------------------------- 1 | // Alerts 2 | 3 | .alert-variant(@background; @border; @text-color) { 4 | background-color: @background; 5 | border-color: @border; 6 | color: @text-color; 7 | 8 | hr { 9 | border-top-color: darken(@border, 5%); 10 | } 11 | .alert-link { 12 | color: darken(@text-color, 10%); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /public/bower_components/bootstrap/less/mixins/background-variant.less: -------------------------------------------------------------------------------- 1 | // Contextual backgrounds 2 | 3 | .bg-variant(@color) { 4 | background-color: @color; 5 | a&:hover { 6 | background-color: darken(@color, 10%); 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /public/bower_components/bootstrap/less/mixins/border-radius.less: -------------------------------------------------------------------------------- 1 | // Single side border-radius 2 | 3 | .border-top-radius(@radius) { 4 | border-top-right-radius: @radius; 5 | border-top-left-radius: @radius; 6 | } 7 | .border-right-radius(@radius) { 8 | border-bottom-right-radius: @radius; 9 | border-top-right-radius: @radius; 10 | } 11 | .border-bottom-radius(@radius) { 12 | border-bottom-right-radius: @radius; 13 | border-bottom-left-radius: @radius; 14 | } 15 | .border-left-radius(@radius) { 16 | border-bottom-left-radius: @radius; 17 | border-top-left-radius: @radius; 18 | } 19 | -------------------------------------------------------------------------------- /public/bower_components/bootstrap/less/mixins/buttons.less: -------------------------------------------------------------------------------- 1 | // Button variants 2 | // 3 | // Easily pump out default styles, as well as :hover, :focus, :active, 4 | // and disabled options for all buttons 5 | 6 | .button-variant(@color; @background; @border) { 7 | color: @color; 8 | background-color: @background; 9 | border-color: @border; 10 | 11 | &:hover, 12 | &:focus, 13 | &:active, 14 | &.active, 15 | .open > .dropdown-toggle& { 16 | color: @color; 17 | background-color: darken(@background, 10%); 18 | border-color: darken(@border, 12%); 19 | } 20 | &:active, 21 | &.active, 22 | .open > .dropdown-toggle& { 23 | background-image: none; 24 | } 25 | &.disabled, 26 | &[disabled], 27 | fieldset[disabled] & { 28 | &, 29 | &:hover, 30 | &:focus, 31 | &:active, 32 | &.active { 33 | background-color: @background; 34 | border-color: @border; 35 | } 36 | } 37 | 38 | .badge { 39 | color: @background; 40 | background-color: @color; 41 | } 42 | } 43 | 44 | // Button sizes 45 | .button-size(@padding-vertical; @padding-horizontal; @font-size; @line-height; @border-radius) { 46 | padding: @padding-vertical @padding-horizontal; 47 | font-size: @font-size; 48 | line-height: @line-height; 49 | border-radius: @border-radius; 50 | } 51 | -------------------------------------------------------------------------------- /public/bower_components/bootstrap/less/mixins/center-block.less: -------------------------------------------------------------------------------- 1 | // Center-align a block level element 2 | 3 | .center-block() { 4 | display: block; 5 | margin-left: auto; 6 | margin-right: auto; 7 | } 8 | -------------------------------------------------------------------------------- /public/bower_components/bootstrap/less/mixins/clearfix.less: -------------------------------------------------------------------------------- 1 | // Clearfix 2 | // 3 | // For modern browsers 4 | // 1. The space content is one way to avoid an Opera bug when the 5 | // contenteditable attribute is included anywhere else in the document. 6 | // Otherwise it causes space to appear at the top and bottom of elements 7 | // that are clearfixed. 8 | // 2. The use of `table` rather than `block` is only necessary if using 9 | // `:before` to contain the top-margins of child elements. 10 | // 11 | // Source: http://nicolasgallagher.com/micro-clearfix-hack/ 12 | 13 | .clearfix() { 14 | &:before, 15 | &:after { 16 | content: " "; // 1 17 | display: table; // 2 18 | } 19 | &:after { 20 | clear: both; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /public/bower_components/bootstrap/less/mixins/hide-text.less: -------------------------------------------------------------------------------- 1 | // CSS image replacement 2 | // 3 | // Heads up! v3 launched with with only `.hide-text()`, but per our pattern for 4 | // mixins being reused as classes with the same name, this doesn't hold up. As 5 | // of v3.0.1 we have added `.text-hide()` and deprecated `.hide-text()`. 6 | // 7 | // Source: https://github.com/h5bp/html5-boilerplate/commit/aa0396eae757 8 | 9 | // Deprecated as of v3.0.1 (will be removed in v4) 10 | .hide-text() { 11 | font: ~"0/0" a; 12 | color: transparent; 13 | text-shadow: none; 14 | background-color: transparent; 15 | border: 0; 16 | } 17 | 18 | // New mixin to use as of v3.0.1 19 | .text-hide() { 20 | .hide-text(); 21 | } 22 | -------------------------------------------------------------------------------- /public/bower_components/bootstrap/less/mixins/image.less: -------------------------------------------------------------------------------- 1 | // Image Mixins 2 | // - Responsive image 3 | // - Retina image 4 | 5 | 6 | // Responsive image 7 | // 8 | // Keep images from scaling beyond the width of their parents. 9 | .img-responsive(@display: block) { 10 | display: @display; 11 | width: 100% \9; // Force IE10 and below to size SVG images correctly 12 | max-width: 100%; // Part 1: Set a maximum relative to the parent 13 | height: auto; // Part 2: Scale the height according to the width, otherwise you get stretching 14 | } 15 | 16 | 17 | // Retina image 18 | // 19 | // Short retina mixin for setting background-image and -size. Note that the 20 | // spelling of `min--moz-device-pixel-ratio` is intentional. 21 | .img-retina(@file-1x; @file-2x; @width-1x; @height-1x) { 22 | background-image: url("@{file-1x}"); 23 | 24 | @media 25 | only screen and (-webkit-min-device-pixel-ratio: 2), 26 | only screen and ( min--moz-device-pixel-ratio: 2), 27 | only screen and ( -o-min-device-pixel-ratio: 2/1), 28 | only screen and ( min-device-pixel-ratio: 2), 29 | only screen and ( min-resolution: 192dpi), 30 | only screen and ( min-resolution: 2dppx) { 31 | background-image: url("@{file-2x}"); 32 | background-size: @width-1x @height-1x; 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /public/bower_components/bootstrap/less/mixins/labels.less: -------------------------------------------------------------------------------- 1 | // Labels 2 | 3 | .label-variant(@color) { 4 | background-color: @color; 5 | 6 | &[href] { 7 | &:hover, 8 | &:focus { 9 | background-color: darken(@color, 10%); 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /public/bower_components/bootstrap/less/mixins/list-group.less: -------------------------------------------------------------------------------- 1 | // List Groups 2 | 3 | .list-group-item-variant(@state; @background; @color) { 4 | .list-group-item-@{state} { 5 | color: @color; 6 | background-color: @background; 7 | 8 | a& { 9 | color: @color; 10 | 11 | .list-group-item-heading { 12 | color: inherit; 13 | } 14 | 15 | &:hover, 16 | &:focus { 17 | color: @color; 18 | background-color: darken(@background, 5%); 19 | } 20 | &.active, 21 | &.active:hover, 22 | &.active:focus { 23 | color: #fff; 24 | background-color: @color; 25 | border-color: @color; 26 | } 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /public/bower_components/bootstrap/less/mixins/nav-divider.less: -------------------------------------------------------------------------------- 1 | // Horizontal dividers 2 | // 3 | // Dividers (basically an hr) within dropdowns and nav lists 4 | 5 | .nav-divider(@color: #e5e5e5) { 6 | height: 1px; 7 | margin: ((@line-height-computed / 2) - 1) 0; 8 | overflow: hidden; 9 | background-color: @color; 10 | } 11 | -------------------------------------------------------------------------------- /public/bower_components/bootstrap/less/mixins/nav-vertical-align.less: -------------------------------------------------------------------------------- 1 | // Navbar vertical align 2 | // 3 | // Vertically center elements in the navbar. 4 | // Example: an element has a height of 30px, so write out `.navbar-vertical-align(30px);` to calculate the appropriate top margin. 5 | 6 | .navbar-vertical-align(@element-height) { 7 | margin-top: ((@navbar-height - @element-height) / 2); 8 | margin-bottom: ((@navbar-height - @element-height) / 2); 9 | } 10 | -------------------------------------------------------------------------------- /public/bower_components/bootstrap/less/mixins/opacity.less: -------------------------------------------------------------------------------- 1 | // Opacity 2 | 3 | .opacity(@opacity) { 4 | opacity: @opacity; 5 | // IE8 filter 6 | @opacity-ie: (@opacity * 100); 7 | filter: ~"alpha(opacity=@{opacity-ie})"; 8 | } 9 | -------------------------------------------------------------------------------- /public/bower_components/bootstrap/less/mixins/pagination.less: -------------------------------------------------------------------------------- 1 | // Pagination 2 | 3 | .pagination-size(@padding-vertical; @padding-horizontal; @font-size; @border-radius) { 4 | > li { 5 | > a, 6 | > span { 7 | padding: @padding-vertical @padding-horizontal; 8 | font-size: @font-size; 9 | } 10 | &:first-child { 11 | > a, 12 | > span { 13 | .border-left-radius(@border-radius); 14 | } 15 | } 16 | &:last-child { 17 | > a, 18 | > span { 19 | .border-right-radius(@border-radius); 20 | } 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /public/bower_components/bootstrap/less/mixins/panels.less: -------------------------------------------------------------------------------- 1 | // Panels 2 | 3 | .panel-variant(@border; @heading-text-color; @heading-bg-color; @heading-border) { 4 | border-color: @border; 5 | 6 | & > .panel-heading { 7 | color: @heading-text-color; 8 | background-color: @heading-bg-color; 9 | border-color: @heading-border; 10 | 11 | + .panel-collapse > .panel-body { 12 | border-top-color: @border; 13 | } 14 | .badge { 15 | color: @heading-bg-color; 16 | background-color: @heading-text-color; 17 | } 18 | } 19 | & > .panel-footer { 20 | + .panel-collapse > .panel-body { 21 | border-bottom-color: @border; 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /public/bower_components/bootstrap/less/mixins/progress-bar.less: -------------------------------------------------------------------------------- 1 | // Progress bars 2 | 3 | .progress-bar-variant(@color) { 4 | background-color: @color; 5 | 6 | // Deprecated parent class requirement as of v3.2.0 7 | .progress-striped & { 8 | #gradient > .striped(); 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /public/bower_components/bootstrap/less/mixins/reset-filter.less: -------------------------------------------------------------------------------- 1 | // Reset filters for IE 2 | // 3 | // When you need to remove a gradient background, do not forget to use this to reset 4 | // the IE filter for IE9 and below. 5 | 6 | .reset-filter() { 7 | filter: e(%("progid:DXImageTransform.Microsoft.gradient(enabled = false)")); 8 | } 9 | -------------------------------------------------------------------------------- /public/bower_components/bootstrap/less/mixins/resize.less: -------------------------------------------------------------------------------- 1 | // Resize anything 2 | 3 | .resizable(@direction) { 4 | resize: @direction; // Options: horizontal, vertical, both 5 | overflow: auto; // Per CSS3 UI, `resize` only applies when `overflow` isn't `visible` 6 | } 7 | -------------------------------------------------------------------------------- /public/bower_components/bootstrap/less/mixins/responsive-visibility.less: -------------------------------------------------------------------------------- 1 | // Responsive utilities 2 | 3 | // 4 | // More easily include all the states for responsive-utilities.less. 5 | .responsive-visibility() { 6 | display: block !important; 7 | table& { display: table; } 8 | tr& { display: table-row !important; } 9 | th&, 10 | td& { display: table-cell !important; } 11 | } 12 | 13 | .responsive-invisibility() { 14 | display: none !important; 15 | } 16 | -------------------------------------------------------------------------------- /public/bower_components/bootstrap/less/mixins/size.less: -------------------------------------------------------------------------------- 1 | // Sizing shortcuts 2 | 3 | .size(@width; @height) { 4 | width: @width; 5 | height: @height; 6 | } 7 | 8 | .square(@size) { 9 | .size(@size; @size); 10 | } 11 | -------------------------------------------------------------------------------- /public/bower_components/bootstrap/less/mixins/tab-focus.less: -------------------------------------------------------------------------------- 1 | // WebKit-style focus 2 | 3 | .tab-focus() { 4 | // Default 5 | outline: thin dotted; 6 | // WebKit 7 | outline: 5px auto -webkit-focus-ring-color; 8 | outline-offset: -2px; 9 | } 10 | -------------------------------------------------------------------------------- /public/bower_components/bootstrap/less/mixins/table-row.less: -------------------------------------------------------------------------------- 1 | // Tables 2 | 3 | .table-row-variant(@state; @background) { 4 | // Exact selectors below required to override `.table-striped` and prevent 5 | // inheritance to nested tables. 6 | .table > thead > tr, 7 | .table > tbody > tr, 8 | .table > tfoot > tr { 9 | > td.@{state}, 10 | > th.@{state}, 11 | &.@{state} > td, 12 | &.@{state} > th { 13 | background-color: @background; 14 | } 15 | } 16 | 17 | // Hover states for `.table-hover` 18 | // Note: this is not available for cells or rows within `thead` or `tfoot`. 19 | .table-hover > tbody > tr { 20 | > td.@{state}:hover, 21 | > th.@{state}:hover, 22 | &.@{state}:hover > td, 23 | &:hover > .@{state}, 24 | &.@{state}:hover > th { 25 | background-color: darken(@background, 5%); 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /public/bower_components/bootstrap/less/mixins/text-emphasis.less: -------------------------------------------------------------------------------- 1 | // Typography 2 | 3 | .text-emphasis-variant(@color) { 4 | color: @color; 5 | a&:hover { 6 | color: darken(@color, 10%); 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /public/bower_components/bootstrap/less/mixins/text-overflow.less: -------------------------------------------------------------------------------- 1 | // Text overflow 2 | // Requires inline-block or block for proper styling 3 | 4 | .text-overflow() { 5 | overflow: hidden; 6 | text-overflow: ellipsis; 7 | white-space: nowrap; 8 | } 9 | -------------------------------------------------------------------------------- /public/bower_components/bootstrap/less/pager.less: -------------------------------------------------------------------------------- 1 | // 2 | // Pager pagination 3 | // -------------------------------------------------- 4 | 5 | 6 | .pager { 7 | padding-left: 0; 8 | margin: @line-height-computed 0; 9 | list-style: none; 10 | text-align: center; 11 | &:extend(.clearfix all); 12 | li { 13 | display: inline; 14 | > a, 15 | > span { 16 | display: inline-block; 17 | padding: 5px 14px; 18 | background-color: @pager-bg; 19 | border: 1px solid @pager-border; 20 | border-radius: @pager-border-radius; 21 | } 22 | 23 | > a:hover, 24 | > a:focus { 25 | text-decoration: none; 26 | background-color: @pager-hover-bg; 27 | } 28 | } 29 | 30 | .next { 31 | > a, 32 | > span { 33 | float: right; 34 | } 35 | } 36 | 37 | .previous { 38 | > a, 39 | > span { 40 | float: left; 41 | } 42 | } 43 | 44 | .disabled { 45 | > a, 46 | > a:hover, 47 | > a:focus, 48 | > span { 49 | color: @pager-disabled-color; 50 | background-color: @pager-bg; 51 | cursor: not-allowed; 52 | } 53 | } 54 | 55 | } 56 | -------------------------------------------------------------------------------- /public/bower_components/bootstrap/less/pagination.less: -------------------------------------------------------------------------------- 1 | // 2 | // Pagination (multiple pages) 3 | // -------------------------------------------------- 4 | .pagination { 5 | display: inline-block; 6 | padding-left: 0; 7 | margin: @line-height-computed 0; 8 | border-radius: @border-radius-base; 9 | 10 | > li { 11 | display: inline; // Remove list-style and block-level defaults 12 | > a, 13 | > span { 14 | position: relative; 15 | float: left; // Collapse white-space 16 | padding: @padding-base-vertical @padding-base-horizontal; 17 | line-height: @line-height-base; 18 | text-decoration: none; 19 | color: @pagination-color; 20 | background-color: @pagination-bg; 21 | border: 1px solid @pagination-border; 22 | margin-left: -1px; 23 | } 24 | &:first-child { 25 | > a, 26 | > span { 27 | margin-left: 0; 28 | .border-left-radius(@border-radius-base); 29 | } 30 | } 31 | &:last-child { 32 | > a, 33 | > span { 34 | .border-right-radius(@border-radius-base); 35 | } 36 | } 37 | } 38 | 39 | > li > a, 40 | > li > span { 41 | &:hover, 42 | &:focus { 43 | color: @pagination-hover-color; 44 | background-color: @pagination-hover-bg; 45 | border-color: @pagination-hover-border; 46 | } 47 | } 48 | 49 | > .active > a, 50 | > .active > span { 51 | &, 52 | &:hover, 53 | &:focus { 54 | z-index: 2; 55 | color: @pagination-active-color; 56 | background-color: @pagination-active-bg; 57 | border-color: @pagination-active-border; 58 | cursor: default; 59 | } 60 | } 61 | 62 | > .disabled { 63 | > span, 64 | > span:hover, 65 | > span:focus, 66 | > a, 67 | > a:hover, 68 | > a:focus { 69 | color: @pagination-disabled-color; 70 | background-color: @pagination-disabled-bg; 71 | border-color: @pagination-disabled-border; 72 | cursor: not-allowed; 73 | } 74 | } 75 | } 76 | 77 | // Sizing 78 | // -------------------------------------------------- 79 | 80 | // Large 81 | .pagination-lg { 82 | .pagination-size(@padding-large-vertical; @padding-large-horizontal; @font-size-large; @border-radius-large); 83 | } 84 | 85 | // Small 86 | .pagination-sm { 87 | .pagination-size(@padding-small-vertical; @padding-small-horizontal; @font-size-small; @border-radius-small); 88 | } 89 | -------------------------------------------------------------------------------- /public/bower_components/bootstrap/less/print.less: -------------------------------------------------------------------------------- 1 | // 2 | // Basic print styles 3 | // -------------------------------------------------- 4 | // Source: https://github.com/h5bp/html5-boilerplate/blob/master/css/main.css 5 | 6 | @media print { 7 | 8 | * { 9 | text-shadow: none !important; 10 | color: #000 !important; // Black prints faster: h5bp.com/s 11 | background: transparent !important; 12 | box-shadow: none !important; 13 | } 14 | 15 | a, 16 | a:visited { 17 | text-decoration: underline; 18 | } 19 | 20 | a[href]:after { 21 | content: " (" attr(href) ")"; 22 | } 23 | 24 | abbr[title]:after { 25 | content: " (" attr(title) ")"; 26 | } 27 | 28 | // Don't show links for images, or javascript/internal links 29 | a[href^="javascript:"]:after, 30 | a[href^="#"]:after { 31 | content: ""; 32 | } 33 | 34 | pre, 35 | blockquote { 36 | border: 1px solid #999; 37 | page-break-inside: avoid; 38 | } 39 | 40 | thead { 41 | display: table-header-group; // h5bp.com/t 42 | } 43 | 44 | tr, 45 | img { 46 | page-break-inside: avoid; 47 | } 48 | 49 | img { 50 | max-width: 100% !important; 51 | } 52 | 53 | p, 54 | h2, 55 | h3 { 56 | orphans: 3; 57 | widows: 3; 58 | } 59 | 60 | h2, 61 | h3 { 62 | page-break-after: avoid; 63 | } 64 | 65 | // Chrome (OSX) fix for https://github.com/twbs/bootstrap/issues/11245 66 | // Once fixed, we can just straight up remove this. 67 | select { 68 | background: #fff !important; 69 | } 70 | 71 | // Bootstrap components 72 | .navbar { 73 | display: none; 74 | } 75 | .table { 76 | td, 77 | th { 78 | background-color: #fff !important; 79 | } 80 | } 81 | .btn, 82 | .dropup > .btn { 83 | > .caret { 84 | border-top-color: #000 !important; 85 | } 86 | } 87 | .label { 88 | border: 1px solid #000; 89 | } 90 | 91 | .table { 92 | border-collapse: collapse !important; 93 | } 94 | .table-bordered { 95 | th, 96 | td { 97 | border: 1px solid #ddd !important; 98 | } 99 | } 100 | 101 | } 102 | -------------------------------------------------------------------------------- /public/bower_components/bootstrap/less/responsive-embed.less: -------------------------------------------------------------------------------- 1 | // Embeds responsive 2 | // 3 | // Credit: Nicolas Gallagher and SUIT CSS. 4 | 5 | .embed-responsive { 6 | position: relative; 7 | display: block; 8 | height: 0; 9 | padding: 0; 10 | overflow: hidden; 11 | 12 | .embed-responsive-item, 13 | iframe, 14 | embed, 15 | object { 16 | position: absolute; 17 | top: 0; 18 | left: 0; 19 | bottom: 0; 20 | height: 100%; 21 | width: 100%; 22 | border: 0; 23 | } 24 | 25 | // Modifier class for 16:9 aspect ratio 26 | &.embed-responsive-16by9 { 27 | padding-bottom: 56.25%; 28 | } 29 | 30 | // Modifier class for 4:3 aspect ratio 31 | &.embed-responsive-4by3 { 32 | padding-bottom: 75%; 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /public/bower_components/bootstrap/less/thumbnails.less: -------------------------------------------------------------------------------- 1 | // 2 | // Thumbnails 3 | // -------------------------------------------------- 4 | 5 | 6 | // Mixin and adjust the regular image class 7 | .thumbnail { 8 | display: block; 9 | padding: @thumbnail-padding; 10 | margin-bottom: @line-height-computed; 11 | line-height: @line-height-base; 12 | background-color: @thumbnail-bg; 13 | border: 1px solid @thumbnail-border; 14 | border-radius: @thumbnail-border-radius; 15 | .transition(all .2s ease-in-out); 16 | 17 | > img, 18 | a > img { 19 | &:extend(.img-responsive); 20 | margin-left: auto; 21 | margin-right: auto; 22 | } 23 | 24 | // Add a hover state for linked versions only 25 | a&:hover, 26 | a&:focus, 27 | a&.active { 28 | border-color: @link-color; 29 | } 30 | 31 | // Image captions 32 | .caption { 33 | padding: @thumbnail-caption-padding; 34 | color: @thumbnail-caption-color; 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /public/bower_components/bootstrap/less/utilities.less: -------------------------------------------------------------------------------- 1 | // 2 | // Utility classes 3 | // -------------------------------------------------- 4 | 5 | 6 | // Floats 7 | // ------------------------- 8 | 9 | .clearfix { 10 | .clearfix(); 11 | } 12 | .center-block { 13 | .center-block(); 14 | } 15 | .pull-right { 16 | float: right !important; 17 | } 18 | .pull-left { 19 | float: left !important; 20 | } 21 | 22 | 23 | // Toggling content 24 | // ------------------------- 25 | 26 | // Note: Deprecated .hide in favor of .hidden or .sr-only (as appropriate) in v3.0.1 27 | .hide { 28 | display: none !important; 29 | } 30 | .show { 31 | display: block !important; 32 | } 33 | .invisible { 34 | visibility: hidden; 35 | } 36 | .text-hide { 37 | .text-hide(); 38 | } 39 | 40 | 41 | // Hide from screenreaders and browsers 42 | // 43 | // Credit: HTML5 Boilerplate 44 | 45 | .hidden { 46 | display: none !important; 47 | visibility: hidden !important; 48 | } 49 | 50 | 51 | // For Affix plugin 52 | // ------------------------- 53 | 54 | .affix { 55 | position: fixed; 56 | .translate3d(0, 0, 0); 57 | } 58 | -------------------------------------------------------------------------------- /public/bower_components/bootstrap/less/wells.less: -------------------------------------------------------------------------------- 1 | // 2 | // Wells 3 | // -------------------------------------------------- 4 | 5 | 6 | // Base class 7 | .well { 8 | min-height: 20px; 9 | padding: 19px; 10 | margin-bottom: 20px; 11 | background-color: @well-bg; 12 | border: 1px solid @well-border; 13 | border-radius: @border-radius-base; 14 | .box-shadow(inset 0 1px 1px rgba(0,0,0,.05)); 15 | blockquote { 16 | border-color: #ddd; 17 | border-color: rgba(0,0,0,.15); 18 | } 19 | } 20 | 21 | // Sizes 22 | .well-lg { 23 | padding: 24px; 24 | border-radius: @border-radius-large; 25 | } 26 | .well-sm { 27 | padding: 9px; 28 | border-radius: @border-radius-small; 29 | } 30 | -------------------------------------------------------------------------------- /public/bower_components/bootstrap/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "bootstrap", 3 | "description": "The most popular front-end framework for developing responsive, mobile first projects on the web.", 4 | "version": "3.2.0", 5 | "keywords": [ 6 | "css", 7 | "less", 8 | "mobile-first", 9 | "responsive", 10 | "front-end", 11 | "framework", 12 | "web" 13 | ], 14 | "homepage": "http://getbootstrap.com", 15 | "author": "Twitter, Inc.", 16 | "scripts": { 17 | "test": "grunt test" 18 | }, 19 | "style": "dist/css/bootstrap.css", 20 | "less": "less/bootstrap.less", 21 | "repository": { 22 | "type": "git", 23 | "url": "https://github.com/twbs/bootstrap.git" 24 | }, 25 | "bugs": { 26 | "url": "https://github.com/twbs/bootstrap/issues" 27 | }, 28 | "license": { 29 | "type": "MIT", 30 | "url": "https://github.com/twbs/bootstrap/blob/master/LICENSE" 31 | }, 32 | "devDependencies": { 33 | "btoa": "~1.1.2", 34 | "glob": "~4.0.2", 35 | "grunt": "~0.4.5", 36 | "grunt-autoprefixer": "~0.7.6", 37 | "grunt-banner": "~0.2.3", 38 | "grunt-contrib-clean": "~0.5.0", 39 | "grunt-contrib-concat": "~0.4.0", 40 | "grunt-contrib-connect": "~0.8.0", 41 | "grunt-contrib-copy": "~0.5.0", 42 | "grunt-contrib-csslint": "~0.2.0", 43 | "grunt-contrib-cssmin": "~0.10.0", 44 | "grunt-contrib-jade": "~0.12.0", 45 | "grunt-contrib-jshint": "~0.10.0", 46 | "grunt-contrib-less": "~0.11.3", 47 | "grunt-contrib-qunit": "~0.5.1", 48 | "grunt-contrib-uglify": "~0.5.0", 49 | "grunt-contrib-watch": "~0.6.1", 50 | "grunt-csscomb": "~2.0.1", 51 | "grunt-exec": "~0.4.5", 52 | "grunt-html-validation": "~0.1.18", 53 | "grunt-jekyll": "~0.4.2", 54 | "grunt-jscs-checker": "~0.6.0", 55 | "grunt-saucelabs": "~8.1.0", 56 | "grunt-sed": "~0.1.1", 57 | "load-grunt-tasks": "~0.6.0", 58 | "markdown": "~0.5.0", 59 | "npm-shrinkwrap": "~3.1.6", 60 | "time-grunt": "~0.3.2" 61 | }, 62 | "engines": { 63 | "node": "~0.10.1" 64 | }, 65 | "jspm": { 66 | "main": "js/bootstrap", 67 | "directories": { 68 | "example": "examples", 69 | "lib": "dist" 70 | }, 71 | "shim": { 72 | "js/bootstrap": { 73 | "imports": "jquery", 74 | "exports": "$" 75 | } 76 | }, 77 | "buildConfig": { 78 | "uglify": true 79 | } 80 | } 81 | } 82 | -------------------------------------------------------------------------------- /public/bower_components/jquery/.bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "jquery", 3 | "main": "dist/jquery.js", 4 | "license": "MIT", 5 | "ignore": [ 6 | "package.json" 7 | ], 8 | "keywords": [ 9 | "jquery", 10 | "javascript", 11 | "browser", 12 | "library" 13 | ], 14 | "homepage": "https://github.com/jquery/jquery-dist", 15 | "version": "3.1.0", 16 | "_release": "3.1.0", 17 | "_resolution": { 18 | "type": "version", 19 | "tag": "3.1.0", 20 | "commit": "6f02bc382c0529d3b4f68f6b2ad21876642dbbfe" 21 | }, 22 | "_source": "https://github.com/jquery/jquery-dist.git", 23 | "_target": ">= 1.9.0", 24 | "_originalSource": "jquery" 25 | } -------------------------------------------------------------------------------- /public/bower_components/jquery/LICENSE.txt: -------------------------------------------------------------------------------- 1 | Copyright jQuery Foundation and other contributors, https://jquery.org/ 2 | 3 | This software consists of voluntary contributions made by many 4 | individuals. For exact contribution history, see the revision history 5 | available at https://github.com/jquery/jquery 6 | 7 | The following license applies to all parts of this software except as 8 | documented below: 9 | 10 | ==== 11 | 12 | Permission is hereby granted, free of charge, to any person obtaining 13 | a copy of this software and associated documentation files (the 14 | "Software"), to deal in the Software without restriction, including 15 | without limitation the rights to use, copy, modify, merge, publish, 16 | distribute, sublicense, and/or sell copies of the Software, and to 17 | permit persons to whom the Software is furnished to do so, subject to 18 | the following conditions: 19 | 20 | The above copyright notice and this permission notice shall be 21 | included in all copies or substantial portions of the Software. 22 | 23 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 24 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 25 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 26 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 27 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 28 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 29 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 30 | 31 | ==== 32 | 33 | All files located in the node_modules and external directories are 34 | externally maintained libraries used by this software which have their 35 | own licenses; we recommend you read them, as their terms may differ from 36 | the terms above. 37 | -------------------------------------------------------------------------------- /public/bower_components/jquery/README.md: -------------------------------------------------------------------------------- 1 | # jQuery 2 | 3 | > jQuery is a fast, small, and feature-rich JavaScript library. 4 | 5 | For information on how to get started and how to use jQuery, please see [jQuery's documentation](http://api.jquery.com/). 6 | For source files and issues, please visit the [jQuery repo](https://github.com/jquery/jquery). 7 | 8 | ## Including jQuery 9 | 10 | Below are some of the most common ways to include jQuery. 11 | 12 | ### Browser 13 | 14 | #### Script tag 15 | 16 | ```html 17 | 18 | ``` 19 | 20 | #### Babel 21 | 22 | [Babel](http://babeljs.io/) is a next generation JavaScript compiler. One of the features is the ability to use ES6/ES2015 modules now, even though browsers do not yet support this feature natively. 23 | 24 | ```js 25 | import $ from "jquery"; 26 | ``` 27 | 28 | #### Browserify/Webpack 29 | 30 | There are several ways to use [Browserify](http://browserify.org/) and [Webpack](https://webpack.github.io/). For more information on using these tools, please refer to the corresponding project's documention. In the script, including jQuery will usually look like this... 31 | 32 | ```js 33 | var $ = require("jquery"); 34 | ``` 35 | 36 | #### AMD (Asynchronous Module Definition) 37 | 38 | AMD is a module format built for the browser. For more information, we recommend [require.js' documentation](http://requirejs.org/docs/whyamd.html). 39 | 40 | ```js 41 | define(["jquery"], function($) { 42 | 43 | }); 44 | ``` 45 | 46 | ### Node 47 | 48 | To include jQuery in [Node](nodejs.org), first install with npm. 49 | 50 | ```sh 51 | npm install jquery 52 | ``` 53 | 54 | For jQuery to work in Node, a window with a document is required. Since no such window exists natively in Node, one can be mocked by tools such as [jsdom](https://github.com/tmpvar/jsdom). This can be useful for testing purposes. 55 | 56 | ```js 57 | require("jsdom").env("", function(err, window) { 58 | if (err) { 59 | console.error(err); 60 | return; 61 | } 62 | 63 | var $ = require("jquery")(window); 64 | }); 65 | ``` 66 | -------------------------------------------------------------------------------- /public/bower_components/jquery/bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "jquery", 3 | "main": "dist/jquery.js", 4 | "license": "MIT", 5 | "ignore": [ 6 | "package.json" 7 | ], 8 | "keywords": [ 9 | "jquery", 10 | "javascript", 11 | "browser", 12 | "library" 13 | ] 14 | } -------------------------------------------------------------------------------- /public/bower_components/jquery/external/sizzle/LICENSE.txt: -------------------------------------------------------------------------------- 1 | Copyright jQuery Foundation and other contributors, https://jquery.org/ 2 | 3 | This software consists of voluntary contributions made by many 4 | individuals. For exact contribution history, see the revision history 5 | available at https://github.com/jquery/sizzle 6 | 7 | The following license applies to all parts of this software except as 8 | documented below: 9 | 10 | ==== 11 | 12 | Permission is hereby granted, free of charge, to any person obtaining 13 | a copy of this software and associated documentation files (the 14 | "Software"), to deal in the Software without restriction, including 15 | without limitation the rights to use, copy, modify, merge, publish, 16 | distribute, sublicense, and/or sell copies of the Software, and to 17 | permit persons to whom the Software is furnished to do so, subject to 18 | the following conditions: 19 | 20 | The above copyright notice and this permission notice shall be 21 | included in all copies or substantial portions of the Software. 22 | 23 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 24 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 25 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 26 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 27 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 28 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 29 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 30 | 31 | ==== 32 | 33 | All files located in the node_modules and external directories are 34 | externally maintained libraries used by this software which have their 35 | own licenses; we recommend you read them, as their terms may differ from 36 | the terms above. 37 | -------------------------------------------------------------------------------- /public/bower_components/jquery/src/.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | // Support: IE <=9 only, Android <=4.0 only 3 | // The above browsers are failing a lot of tests in the ES5 4 | // test suite at http://test262.ecmascript.org. 5 | "parserOptions": { 6 | "ecmaVersion": 3 7 | }, 8 | "globals": { 9 | "window": true, 10 | "jQuery": true, 11 | "define": true, 12 | "module": true, 13 | "noGlobal": true 14 | }, 15 | "rules": { 16 | "strict": ["error", "function"] 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /public/bower_components/jquery/src/ajax/load.js: -------------------------------------------------------------------------------- 1 | define( [ 2 | "../core", 3 | "../core/parseHTML", 4 | "../ajax", 5 | "../traversing", 6 | "../manipulation", 7 | "../selector" 8 | ], function( jQuery ) { 9 | 10 | "use strict"; 11 | 12 | /** 13 | * Load a url into a page 14 | */ 15 | jQuery.fn.load = function( url, params, callback ) { 16 | var selector, type, response, 17 | self = this, 18 | off = url.indexOf( " " ); 19 | 20 | if ( off > -1 ) { 21 | selector = jQuery.trim( url.slice( off ) ); 22 | url = url.slice( 0, off ); 23 | } 24 | 25 | // If it's a function 26 | if ( jQuery.isFunction( params ) ) { 27 | 28 | // We assume that it's the callback 29 | callback = params; 30 | params = undefined; 31 | 32 | // Otherwise, build a param string 33 | } else if ( params && typeof params === "object" ) { 34 | type = "POST"; 35 | } 36 | 37 | // If we have elements to modify, make the request 38 | if ( self.length > 0 ) { 39 | jQuery.ajax( { 40 | url: url, 41 | 42 | // If "type" variable is undefined, then "GET" method will be used. 43 | // Make value of this field explicit since 44 | // user can override it through ajaxSetup method 45 | type: type || "GET", 46 | dataType: "html", 47 | data: params 48 | } ).done( function( responseText ) { 49 | 50 | // Save response for use in complete callback 51 | response = arguments; 52 | 53 | self.html( selector ? 54 | 55 | // If a selector was specified, locate the right elements in a dummy div 56 | // Exclude scripts to avoid IE 'Permission Denied' errors 57 | jQuery( "
" ).append( jQuery.parseHTML( responseText ) ).find( selector ) : 58 | 59 | // Otherwise use the full result 60 | responseText ); 61 | 62 | // If the request succeeds, this function gets "data", "status", "jqXHR" 63 | // but they are ignored because response was set above. 64 | // If it fails, this function gets "jqXHR", "status", "error" 65 | } ).always( callback && function( jqXHR, status ) { 66 | self.each( function() { 67 | callback.apply( this, response || [ jqXHR.responseText, status, jqXHR ] ); 68 | } ); 69 | } ); 70 | } 71 | 72 | return this; 73 | }; 74 | 75 | } ); 76 | -------------------------------------------------------------------------------- /public/bower_components/jquery/src/ajax/parseXML.js: -------------------------------------------------------------------------------- 1 | define( [ 2 | "../core" 3 | ], function( jQuery ) { 4 | 5 | "use strict"; 6 | 7 | // Cross-browser xml parsing 8 | jQuery.parseXML = function( data ) { 9 | var xml; 10 | if ( !data || typeof data !== "string" ) { 11 | return null; 12 | } 13 | 14 | // Support: IE 9 - 11 only 15 | // IE throws on parseFromString with invalid input. 16 | try { 17 | xml = ( new window.DOMParser() ).parseFromString( data, "text/xml" ); 18 | } catch ( e ) { 19 | xml = undefined; 20 | } 21 | 22 | if ( !xml || xml.getElementsByTagName( "parsererror" ).length ) { 23 | jQuery.error( "Invalid XML: " + data ); 24 | } 25 | return xml; 26 | }; 27 | 28 | return jQuery.parseXML; 29 | 30 | } ); 31 | -------------------------------------------------------------------------------- /public/bower_components/jquery/src/ajax/script.js: -------------------------------------------------------------------------------- 1 | define( [ 2 | "../core", 3 | "../var/document", 4 | "../ajax" 5 | ], function( jQuery, document ) { 6 | 7 | "use strict"; 8 | 9 | // Prevent auto-execution of scripts when no explicit dataType was provided (See gh-2432) 10 | jQuery.ajaxPrefilter( function( s ) { 11 | if ( s.crossDomain ) { 12 | s.contents.script = false; 13 | } 14 | } ); 15 | 16 | // Install script dataType 17 | jQuery.ajaxSetup( { 18 | accepts: { 19 | script: "text/javascript, application/javascript, " + 20 | "application/ecmascript, application/x-ecmascript" 21 | }, 22 | contents: { 23 | script: /\b(?:java|ecma)script\b/ 24 | }, 25 | converters: { 26 | "text script": function( text ) { 27 | jQuery.globalEval( text ); 28 | return text; 29 | } 30 | } 31 | } ); 32 | 33 | // Handle cache's special case and crossDomain 34 | jQuery.ajaxPrefilter( "script", function( s ) { 35 | if ( s.cache === undefined ) { 36 | s.cache = false; 37 | } 38 | if ( s.crossDomain ) { 39 | s.type = "GET"; 40 | } 41 | } ); 42 | 43 | // Bind script tag hack transport 44 | jQuery.ajaxTransport( "script", function( s ) { 45 | 46 | // This transport only deals with cross domain requests 47 | if ( s.crossDomain ) { 48 | var script, callback; 49 | return { 50 | send: function( _, complete ) { 51 | script = jQuery( "