Repository: Ucer/codehaoshi Branch: master Commit: b7db5bf9a3ba Files: 1215 Total size: 13.6 MB Directory structure: gitextract_2fo6ji28/ ├── .gitattributes ├── .gitignore ├── app/ │ ├── Activities/ │ │ ├── BaseActivity.php │ │ ├── UserCommentArticle.php │ │ ├── UserFollowedUser.php │ │ ├── UserReplyQuestion.php │ │ ├── UserUpvoteArticle.php │ │ └── UserUpvoteQuestion.php │ ├── Codehaoshi/ │ │ ├── Core/ │ │ │ └── CreatorListener.php │ │ ├── Creators/ │ │ │ ├── CommentCreator.php │ │ │ ├── ReplyCreator.php │ │ │ └── UserCreator.php │ │ ├── Handler/ │ │ │ ├── BackupHandler.php │ │ │ └── ImageUploadHandler.php │ │ ├── Listeners/ │ │ │ └── UserCreatorListener.php │ │ ├── Notification/ │ │ │ └── Metion.php │ │ ├── Selectors/ │ │ │ ├── ArticleSelector.php │ │ │ └── QuestionSelector.php │ │ ├── Stat/ │ │ │ ├── Stat.php │ │ │ └── StatEntity.php │ │ └── Vote/ │ │ └── Voter.php │ ├── Console/ │ │ ├── Commands/ │ │ │ ├── BaseCommand.php │ │ │ ├── BindAdmin.php │ │ │ └── CodehaoshiInstall.php │ │ └── Kernel.php │ ├── Exceptions/ │ │ └── Handler.php │ ├── Helpers.php │ ├── Http/ │ │ ├── Controllers/ │ │ │ ├── ActivityController.php │ │ │ ├── Api/ │ │ │ │ ├── Apicontroller.php │ │ │ │ ├── ArticleController.php │ │ │ │ ├── CommentController.php │ │ │ │ ├── FollowerController.php │ │ │ │ ├── QuestionController.php │ │ │ │ ├── ReplyController.php │ │ │ │ ├── UploadController.php │ │ │ │ └── Votecontroller.php │ │ │ ├── ArticlesController.php │ │ │ ├── Auth/ │ │ │ │ ├── ForgotPasswordController.php │ │ │ │ ├── LoginController.php │ │ │ │ ├── RegisterController.php │ │ │ │ ├── ResetPasswordController.php │ │ │ │ └── Traits/ │ │ │ │ └── SocialiteHelper.php │ │ │ ├── CommentsController.php │ │ │ ├── Controller.php │ │ │ ├── Dashboard/ │ │ │ │ ├── AboutsController.php │ │ │ │ ├── ArticleCategoryController.php │ │ │ │ ├── ArticlesController.php │ │ │ │ ├── IndexController.php │ │ │ │ ├── LinksController.php │ │ │ │ ├── PermissionsController.php │ │ │ │ ├── QuestionCategoryController.php │ │ │ │ ├── QuestionsController.php │ │ │ │ ├── RolesController.php │ │ │ │ ├── TagsController.php │ │ │ │ ├── Traits/ │ │ │ │ │ └── ArticleHelper.php │ │ │ │ └── UsersController.php │ │ │ ├── HomeController.php │ │ │ ├── NotificationsController.php │ │ │ ├── PagesController.php │ │ │ ├── QuestionsController.php │ │ │ ├── TagController.php │ │ │ └── UserController.php │ │ ├── Kernel.php │ │ ├── Middleware/ │ │ │ ├── EncryptCookies.php │ │ │ ├── MustBeAdmin.php │ │ │ ├── RedirectIfAuthenticated.php │ │ │ ├── TrimStrings.php │ │ │ └── VerifyCsrfToken.php │ │ └── Requests/ │ │ ├── ArticleRequest.php │ │ ├── ImageUploadRequest.php │ │ ├── QuestionRequest.php │ │ ├── ResetPasswordRequest.php │ │ ├── StoreArticleCategoryRequest.php │ │ ├── StorePermissionRequest.php │ │ ├── StoreQuestionCategoryRequest.php │ │ ├── StoreReplyOrCommentRequest.php │ │ ├── StoreRoleRequest.php │ │ ├── StoreTagRequest.php │ │ ├── StoreUserRequest.php │ │ ├── UpdateArticleCategoryRequest.php │ │ ├── UpdatePermissionRequest.php │ │ ├── UpdateQuestionCategoryRequest.php │ │ ├── UpdateRoleRequest.php │ │ ├── UpdateTagRequest.php │ │ └── UpdateUserRequest.php │ ├── Models/ │ │ ├── About.php │ │ ├── Activity.php │ │ ├── Article.php │ │ ├── ArticleCategory.php │ │ ├── Comment.php │ │ ├── Follower.php │ │ ├── Link.php │ │ ├── Permission.php │ │ ├── Question.php │ │ ├── QuestionCategory.php │ │ ├── Reply.php │ │ ├── Role.php │ │ ├── SiteStatus.php │ │ ├── Tag.php │ │ ├── Traits/ │ │ │ ├── ArticleFilterable.php │ │ │ ├── BaseFilterable.php │ │ │ ├── FollowerHelper.php │ │ │ └── UserAvatorHelper.php │ │ ├── User.php │ │ └── Vote.php │ ├── Notifications/ │ │ ├── NewUserFollowNotification.php │ │ ├── ReceivedComment.php │ │ ├── ReceivedReply.php │ │ ├── UserVoteArticle.php │ │ └── UserVoteQuestion.php │ ├── Policies/ │ │ ├── ArticlePolicy.php │ │ ├── CommentPolicy.php │ │ ├── QuestionPolicy.php │ │ ├── ReplyPolicy.php │ │ └── UserPolicy.php │ ├── Providers/ │ │ ├── AppServiceProvider.php │ │ ├── AuthServiceProvider.php │ │ ├── BroadcastServiceProvider.php │ │ ├── CommonDataServiceProvider.php │ │ ├── EventServiceProvider.php │ │ └── RouteServiceProvider.php │ ├── Repositories/ │ │ ├── AboutRepository.php │ │ ├── ArticleCategoryRepository.php │ │ ├── ArticleRepository.php │ │ ├── BaseRepository.php │ │ ├── CommentRepository.php │ │ ├── LinkRepository.php │ │ ├── PermissionRepository.php │ │ ├── QuestionCategoryRepository.php │ │ ├── QuestionRepository.php │ │ ├── ReplyRepository.php │ │ ├── RoleRepository.php │ │ ├── TagRepository.php │ │ └── UserRepository.php │ ├── Tools/ │ │ ├── FileManager/ │ │ │ ├── BaseManager.php │ │ │ └── UpyunManager.php │ │ ├── Mailer.php │ │ ├── Markdowner.php │ │ └── UserMailer.php │ └── Transformers/ │ ├── CommentTransformer.php │ ├── ReplyTransformer.php │ └── UserTransformer.php ├── artisan ├── bootstrap/ │ ├── app.php │ ├── autoload.php │ └── cache/ │ └── .gitignore ├── composer.json ├── config/ │ ├── app.php │ ├── auth.php │ ├── broadcasting.php │ ├── cache.php │ ├── codehaoshi.php │ ├── dashboardMenu.php │ ├── database.php │ ├── entrust.php │ ├── filesystems.php │ ├── laravel-backup.php │ ├── mail.php │ ├── queue.php │ ├── scout.php │ ├── services.php │ ├── session.php │ └── view.php ├── database/ │ ├── .gitignore │ ├── factories/ │ │ └── ModelFactory.php │ ├── migrations/ │ │ ├── 2014_10_12_000000_create_users_table.php │ │ ├── 2014_10_12_100000_create_password_resets_table.php │ │ ├── 2017_08_03_153641_entrust_setup_tables.php │ │ ├── 2017_08_05_175713_create_article_categories_table.php │ │ ├── 2017_08_05_175737_create_articles_table.php │ │ ├── 2017_08_07_070242_create_tags_table.php │ │ ├── 2017_08_07_070317_create_taggables_table.php │ │ ├── 2017_08_10_054604_create_comments_table.php │ │ ├── 2017_08_13_063712_create_votes_table.php │ │ ├── 2017_08_14_090729_create_followers_table.php │ │ ├── 2017_08_14_124526_create_notifications_table.php │ │ ├── 2017_08_18_154806_create_question_categories_table.php │ │ ├── 2017_08_19_105055_create_questions_table.php │ │ ├── 2017_08_19_153441_create_replies_table.php │ │ ├── 2017_08_20_072744_create_activities_table.php │ │ ├── 2017_08_22_111854_create_links_table.php │ │ ├── 2017_08_22_111936_create_abouts_table.php │ │ └── 2017_08_25_164526_create_sitestatus_table.php │ └── seeds/ │ ├── ArticleCategoriesTableSeeder.php │ ├── ArticlesTableSeeder.php │ ├── DatabaseSeeder.php │ ├── PermissionsTableSeeder.php │ ├── QuestionCategoriesTableSeeder.php │ ├── QuestionsTableSeeder.php │ ├── RolesTableSeeder.php │ ├── TaggablesTableSeeder.php │ ├── TagsTableSeeder.php │ └── UsersTableSeeder.php ├── package.json ├── phpunit.xml ├── public/ │ ├── .htaccess │ ├── assets/ │ │ ├── css/ │ │ │ ├── components/ │ │ │ │ ├── accordion.css │ │ │ │ ├── accordion.js │ │ │ │ ├── ad.css │ │ │ │ ├── api.js │ │ │ │ ├── breadcrumb.css │ │ │ │ ├── button.css │ │ │ │ ├── card.css │ │ │ │ ├── checkbox.css │ │ │ │ ├── checkbox.js │ │ │ │ ├── comment.css │ │ │ │ ├── container.css │ │ │ │ ├── dimmer.css │ │ │ │ ├── dimmer.js │ │ │ │ ├── divider.css │ │ │ │ ├── dropdown.css │ │ │ │ ├── dropdown.js │ │ │ │ ├── embed.css │ │ │ │ ├── embed.js │ │ │ │ ├── feed.css │ │ │ │ ├── flag.css │ │ │ │ ├── form.css │ │ │ │ ├── form.js │ │ │ │ ├── grid.css │ │ │ │ ├── header.css │ │ │ │ ├── icon.css │ │ │ │ ├── image.css │ │ │ │ ├── input.css │ │ │ │ ├── item.css │ │ │ │ ├── label.css │ │ │ │ ├── list.css │ │ │ │ ├── loader.css │ │ │ │ ├── menu.css │ │ │ │ ├── message.css │ │ │ │ ├── modal.css │ │ │ │ ├── modal.js │ │ │ │ ├── nag.css │ │ │ │ ├── nag.js │ │ │ │ ├── popup.css │ │ │ │ ├── popup.js │ │ │ │ ├── progress.css │ │ │ │ ├── progress.js │ │ │ │ ├── rail.css │ │ │ │ ├── rating.css │ │ │ │ ├── rating.js │ │ │ │ ├── reset.css │ │ │ │ ├── reveal.css │ │ │ │ ├── search.css │ │ │ │ ├── search.js │ │ │ │ ├── segment.css │ │ │ │ ├── shape.css │ │ │ │ ├── shape.js │ │ │ │ ├── sidebar.css │ │ │ │ ├── sidebar.js │ │ │ │ ├── site.css │ │ │ │ ├── site.js │ │ │ │ ├── state.js │ │ │ │ ├── statistic.css │ │ │ │ ├── step.css │ │ │ │ ├── sticky.css │ │ │ │ ├── sticky.js │ │ │ │ ├── tab.css │ │ │ │ ├── tab.js │ │ │ │ ├── table.css │ │ │ │ ├── transition.css │ │ │ │ ├── transition.js │ │ │ │ └── visibility.js │ │ │ └── editor.css │ │ ├── dashboard/ │ │ │ ├── css/ │ │ │ │ ├── fileinput.css │ │ │ │ └── plugins/ │ │ │ │ ├── awesome-bootstrap-checkbox/ │ │ │ │ │ └── awesome-bootstrap-checkbox.css │ │ │ │ ├── chosen/ │ │ │ │ │ └── chosen.css │ │ │ │ ├── clockpicker/ │ │ │ │ │ └── clockpicker.css │ │ │ │ ├── codemirror/ │ │ │ │ │ ├── ambiance.css │ │ │ │ │ └── codemirror.css │ │ │ │ ├── dataTables/ │ │ │ │ │ └── dataTables.bootstrap.css │ │ │ │ ├── datapicker/ │ │ │ │ │ └── datepicker3.css │ │ │ │ ├── dropzone/ │ │ │ │ │ ├── basic.css │ │ │ │ │ └── dropzone.css │ │ │ │ ├── footable/ │ │ │ │ │ └── footable.core.css │ │ │ │ ├── fullcalendar/ │ │ │ │ │ ├── fullcalendar.css │ │ │ │ │ └── fullcalendar.print.css │ │ │ │ ├── iCheck/ │ │ │ │ │ └── custom.css │ │ │ │ ├── ionRangeSlider/ │ │ │ │ │ ├── ion.rangeSlider.css │ │ │ │ │ └── ion.rangeSlider.skinFlat.css │ │ │ │ ├── jqgrid/ │ │ │ │ │ └── ui.jqgridffe4.css │ │ │ │ ├── nouslider/ │ │ │ │ │ └── jquery.nouislider.css │ │ │ │ ├── plyr/ │ │ │ │ │ └── plyr.css │ │ │ │ ├── simditor/ │ │ │ │ │ └── simditor.css │ │ │ │ ├── steps/ │ │ │ │ │ └── jquery.steps.css │ │ │ │ ├── summernote/ │ │ │ │ │ ├── summernote-bs3.css │ │ │ │ │ └── summernote.css │ │ │ │ ├── sweetalert/ │ │ │ │ │ └── sweetalert.css │ │ │ │ ├── switchery/ │ │ │ │ │ └── switchery.css │ │ │ │ ├── treeview/ │ │ │ │ │ └── bootstrap-treeview.css │ │ │ │ └── webuploader/ │ │ │ │ └── webuploader.css │ │ │ ├── dist/ │ │ │ │ ├── css/ │ │ │ │ │ ├── AdminLTE.css │ │ │ │ │ └── skins/ │ │ │ │ │ ├── _all-skins.css │ │ │ │ │ ├── skin-black-light.css │ │ │ │ │ ├── skin-black.css │ │ │ │ │ ├── skin-blue-light.css │ │ │ │ │ ├── skin-blue.css │ │ │ │ │ ├── skin-green-light.css │ │ │ │ │ ├── skin-green.css │ │ │ │ │ ├── skin-purple-light.css │ │ │ │ │ ├── skin-purple.css │ │ │ │ │ ├── skin-red-light.css │ │ │ │ │ ├── skin-red.css │ │ │ │ │ ├── skin-yellow-light-s.css │ │ │ │ │ ├── skin-yellow-light.css │ │ │ │ │ └── skin-yellow.css │ │ │ │ └── js/ │ │ │ │ ├── app.js │ │ │ │ ├── demo.js │ │ │ │ └── pages/ │ │ │ │ ├── dashboard.js │ │ │ │ └── dashboard2.js │ │ │ ├── iCheck/ │ │ │ │ ├── all.css │ │ │ │ ├── flat/ │ │ │ │ │ ├── _all.css │ │ │ │ │ ├── aero.css │ │ │ │ │ ├── blue.css │ │ │ │ │ ├── flat.css │ │ │ │ │ ├── green.css │ │ │ │ │ ├── grey.css │ │ │ │ │ ├── orange.css │ │ │ │ │ ├── pink.css │ │ │ │ │ ├── purple.css │ │ │ │ │ ├── red.css │ │ │ │ │ └── yellow.css │ │ │ │ ├── futurico/ │ │ │ │ │ └── futurico.css │ │ │ │ ├── icheck.js │ │ │ │ ├── line/ │ │ │ │ │ ├── _all.css │ │ │ │ │ ├── aero.css │ │ │ │ │ ├── blue.css │ │ │ │ │ ├── green.css │ │ │ │ │ ├── grey.css │ │ │ │ │ ├── line.css │ │ │ │ │ ├── orange.css │ │ │ │ │ ├── pink.css │ │ │ │ │ ├── purple.css │ │ │ │ │ ├── red.css │ │ │ │ │ └── yellow.css │ │ │ │ ├── minimal/ │ │ │ │ │ ├── _all.css │ │ │ │ │ ├── aero.css │ │ │ │ │ ├── blue.css │ │ │ │ │ ├── green.css │ │ │ │ │ ├── grey.css │ │ │ │ │ ├── minimal.css │ │ │ │ │ ├── orange.css │ │ │ │ │ ├── pink.css │ │ │ │ │ ├── purple.css │ │ │ │ │ ├── red.css │ │ │ │ │ └── yellow.css │ │ │ │ ├── polaris/ │ │ │ │ │ └── polaris.css │ │ │ │ └── square/ │ │ │ │ ├── _all.css │ │ │ │ ├── aero.css │ │ │ │ ├── blue.css │ │ │ │ ├── green.css │ │ │ │ ├── grey.css │ │ │ │ ├── orange.css │ │ │ │ ├── pink.css │ │ │ │ ├── purple.css │ │ │ │ ├── red.css │ │ │ │ ├── square.css │ │ │ │ └── yellow.css │ │ │ ├── js/ │ │ │ │ ├── chosen/ │ │ │ │ │ ├── chosen.css │ │ │ │ │ ├── chosen.jquery.js │ │ │ │ │ └── jquery-1.9.1.js │ │ │ │ ├── contabs.js │ │ │ │ ├── contabs1.js │ │ │ │ ├── fileinput.js │ │ │ │ ├── fileinput_locale_zh.js │ │ │ │ ├── global.js │ │ │ │ ├── jquery.form.js │ │ │ │ ├── layer/ │ │ │ │ │ ├── extend/ │ │ │ │ │ │ └── layer.ext.js │ │ │ │ │ ├── layer.js │ │ │ │ │ └── skin/ │ │ │ │ │ ├── layer.css │ │ │ │ │ ├── layer.ext.css │ │ │ │ │ └── moon/ │ │ │ │ │ └── style.css │ │ │ │ ├── laypage/ │ │ │ │ │ ├── laypage.js │ │ │ │ │ └── skin/ │ │ │ │ │ └── laypage.css │ │ │ │ ├── laytpl/ │ │ │ │ │ └── laytpl.js │ │ │ │ ├── plugins/ │ │ │ │ │ ├── beautifyhtml/ │ │ │ │ │ │ └── beautifyhtml.js │ │ │ │ │ ├── chosen/ │ │ │ │ │ │ └── chosen.jquery.js │ │ │ │ │ ├── clockpicker/ │ │ │ │ │ │ └── clockpicker.js │ │ │ │ │ ├── codemirror/ │ │ │ │ │ │ ├── codemirror.js │ │ │ │ │ │ └── mode/ │ │ │ │ │ │ └── javascript/ │ │ │ │ │ │ └── javascript.js │ │ │ │ │ ├── dataTables/ │ │ │ │ │ │ ├── dataTables.bootstrap.js │ │ │ │ │ │ └── jquery.dataTables.js │ │ │ │ │ ├── datapicker/ │ │ │ │ │ │ └── bootstrap-datepicker.js │ │ │ │ │ ├── diff_match_patch/ │ │ │ │ │ │ └── diff_match_patch.js │ │ │ │ │ ├── dropzone/ │ │ │ │ │ │ └── dropzone.js │ │ │ │ │ ├── easypiechart/ │ │ │ │ │ │ └── jquery.easypiechart.js │ │ │ │ │ ├── echarts/ │ │ │ │ │ │ └── echarts-all.js │ │ │ │ │ ├── fancybox/ │ │ │ │ │ │ ├── jquery.fancybox.css │ │ │ │ │ │ └── jquery.fancybox.js │ │ │ │ │ ├── flot/ │ │ │ │ │ │ ├── curvedLines.js │ │ │ │ │ │ ├── jquery.flot.js │ │ │ │ │ │ ├── jquery.flot.pie.js │ │ │ │ │ │ ├── jquery.flot.resize.js │ │ │ │ │ │ ├── jquery.flot.spline.js │ │ │ │ │ │ └── jquery.flot.symbol.js │ │ │ │ │ ├── gritter/ │ │ │ │ │ │ └── jquery.gritter.css │ │ │ │ │ ├── jeditable/ │ │ │ │ │ │ └── jquery.jeditable.js │ │ │ │ │ ├── jqgrid/ │ │ │ │ │ │ ├── i18n/ │ │ │ │ │ │ │ └── grid.locale-cnffe4.js │ │ │ │ │ │ └── jquery.jqGrid.minffe4.js │ │ │ │ │ ├── jsKnob/ │ │ │ │ │ │ └── jquery.knob.js │ │ │ │ │ ├── jvectormap/ │ │ │ │ │ │ └── jquery-jvectormap-world-mill-en.js │ │ │ │ │ ├── layer/ │ │ │ │ │ │ ├── extend/ │ │ │ │ │ │ │ └── layer.ext.js │ │ │ │ │ │ ├── laydate/ │ │ │ │ │ │ │ ├── laydate.js │ │ │ │ │ │ │ ├── need/ │ │ │ │ │ │ │ │ └── laydate.css │ │ │ │ │ │ │ └── skins/ │ │ │ │ │ │ │ ├── dahong/ │ │ │ │ │ │ │ │ └── laydate.css │ │ │ │ │ │ │ ├── default/ │ │ │ │ │ │ │ │ └── laydate.css │ │ │ │ │ │ │ └── molv/ │ │ │ │ │ │ │ └── laydate.css │ │ │ │ │ │ ├── laydate-v1.1/ │ │ │ │ │ │ │ ├── demo.html │ │ │ │ │ │ │ ├── layDate官网.url │ │ │ │ │ │ │ ├── laydate/ │ │ │ │ │ │ │ │ ├── laydate.js │ │ │ │ │ │ │ │ ├── need/ │ │ │ │ │ │ │ │ │ └── laydate.css │ │ │ │ │ │ │ │ └── skins/ │ │ │ │ │ │ │ │ ├── dahong/ │ │ │ │ │ │ │ │ │ └── laydate.css │ │ │ │ │ │ │ │ ├── default/ │ │ │ │ │ │ │ │ │ └── laydate.css │ │ │ │ │ │ │ │ └── molv/ │ │ │ │ │ │ │ │ └── laydate.css │ │ │ │ │ │ │ └── 更新日志.txt │ │ │ │ │ │ ├── layim/ │ │ │ │ │ │ │ ├── layim.css │ │ │ │ │ │ │ └── layim.js │ │ │ │ │ │ └── skin/ │ │ │ │ │ │ ├── layer.css │ │ │ │ │ │ ├── layer.ext.css │ │ │ │ │ │ └── moon/ │ │ │ │ │ │ └── style.css │ │ │ │ │ ├── markdown/ │ │ │ │ │ │ ├── bootstrap-markdown.js │ │ │ │ │ │ ├── bootstrap-markdown.zh.js │ │ │ │ │ │ ├── markdown.js │ │ │ │ │ │ └── to-markdown.js │ │ │ │ │ ├── metisMenu/ │ │ │ │ │ │ └── jquery.metisMenu.js │ │ │ │ │ ├── morris/ │ │ │ │ │ │ └── morris.js │ │ │ │ │ ├── nestable/ │ │ │ │ │ │ └── jquery.nestable.js │ │ │ │ │ ├── plyr/ │ │ │ │ │ │ └── plyr.js │ │ │ │ │ ├── prettyfile/ │ │ │ │ │ │ └── bootstrap-prettyfile.js │ │ │ │ │ ├── rickshaw/ │ │ │ │ │ │ └── vendor/ │ │ │ │ │ │ └── d3.v3.js │ │ │ │ │ ├── simditor/ │ │ │ │ │ │ ├── hotkeys.js │ │ │ │ │ │ ├── module.js │ │ │ │ │ │ ├── simditor.js │ │ │ │ │ │ └── uploader.js │ │ │ │ │ ├── suggest/ │ │ │ │ │ │ └── data.json │ │ │ │ │ ├── summernote/ │ │ │ │ │ │ └── summernote-zh-CN.js │ │ │ │ │ ├── switchery/ │ │ │ │ │ │ └── switchery.js │ │ │ │ │ ├── treeview/ │ │ │ │ │ │ └── bootstrap-treeview.js │ │ │ │ │ ├── webuploader/ │ │ │ │ │ │ └── index.html │ │ │ │ │ └── zTree/ │ │ │ │ │ ├── jquery.ztree.core-3.5.js │ │ │ │ │ ├── jquery.ztree.excheck-3.5.js │ │ │ │ │ ├── jquery.ztree.exedit-3.5.js │ │ │ │ │ ├── jquery.ztree.exhide-3.5.js │ │ │ │ │ └── zTreeStyle.css │ │ │ │ └── xss.js │ │ │ ├── uploadify/ │ │ │ │ ├── uploadify.css │ │ │ │ └── uploadify.swf │ │ │ ├── wangeditor/ │ │ │ │ ├── css/ │ │ │ │ │ ├── wangEditor-huise.css │ │ │ │ │ ├── wangEditor.css │ │ │ │ │ └── wangEditor.less │ │ │ │ └── js/ │ │ │ │ ├── emotions.data │ │ │ │ ├── lib/ │ │ │ │ │ └── jquery-2.2.1.js │ │ │ │ └── wangEditor.js │ │ │ └── webupload/ │ │ │ ├── Uploader.swf │ │ │ ├── style.css │ │ │ ├── upload.js │ │ │ └── webuploader.css │ │ └── images/ │ │ └── emoji/ │ │ └── emojify.css │ ├── baidu_verify_SEGRBySjTy.html │ ├── baidu_verify_qaS2BJWI63.html │ ├── css/ │ │ └── app.css │ ├── index.php │ ├── js/ │ │ └── app.js │ ├── mix-manifest.json │ ├── robots.txt │ └── web.config ├── readme.md ├── resources/ │ ├── assets/ │ │ ├── js/ │ │ │ ├── app.js │ │ │ ├── bootstrap.js │ │ │ ├── components/ │ │ │ │ ├── Avatar.vue │ │ │ │ ├── Avatar.vue.old │ │ │ │ ├── Comment.vue │ │ │ │ ├── Cropper.vue │ │ │ │ ├── Parse.vue │ │ │ │ ├── Reply.vue │ │ │ │ └── VoteButton.vue │ │ │ ├── config/ │ │ │ │ ├── base.js │ │ │ │ ├── helper.js │ │ │ │ ├── menu.js │ │ │ │ └── toastr.js │ │ │ ├── front.app.js │ │ │ ├── front.js │ │ │ ├── main.js │ │ │ ├── plugins/ │ │ │ │ └── http/ │ │ │ │ └── index.js │ │ │ └── vendor/ │ │ │ ├── codemirror-4.inline-attachment.js │ │ │ ├── emoji.js │ │ │ ├── github_emoji.js │ │ │ ├── inline-attachment.js │ │ │ ├── jquery.highlight.js │ │ │ ├── jquery.jscroll.js │ │ │ ├── jquery.pjax.js │ │ │ ├── jquery.scroll.up.js │ │ │ ├── jquery.textcomplete.js │ │ │ ├── nprogress.js │ │ │ └── sweetalert.js │ │ ├── sass/ │ │ │ ├── _variables.scss │ │ │ ├── app.scss │ │ │ ├── front.scss │ │ │ └── vendor/ │ │ │ ├── emoji.scss │ │ │ ├── fluidbox.scss │ │ │ ├── jquery.tocify.scss │ │ │ ├── markdown.scss │ │ │ ├── nprogress.scss │ │ │ ├── reset-style.scss │ │ │ ├── simplemde.min.scss │ │ │ ├── sweetalert.scss │ │ │ └── toastr.min.scss │ │ └── semantic/ │ │ ├── dist/ │ │ │ ├── components/ │ │ │ │ ├── accordion.css │ │ │ │ ├── accordion.js │ │ │ │ ├── ad.css │ │ │ │ ├── api.js │ │ │ │ ├── breadcrumb.css │ │ │ │ ├── button.css │ │ │ │ ├── card.css │ │ │ │ ├── checkbox.css │ │ │ │ ├── checkbox.js │ │ │ │ ├── comment.css │ │ │ │ ├── container.css │ │ │ │ ├── dimmer.css │ │ │ │ ├── dimmer.js │ │ │ │ ├── divider.css │ │ │ │ ├── dropdown.css │ │ │ │ ├── dropdown.js │ │ │ │ ├── embed.css │ │ │ │ ├── embed.js │ │ │ │ ├── feed.css │ │ │ │ ├── flag.css │ │ │ │ ├── form.css │ │ │ │ ├── form.js │ │ │ │ ├── grid.css │ │ │ │ ├── header.css │ │ │ │ ├── icon.css │ │ │ │ ├── image.css │ │ │ │ ├── input.css │ │ │ │ ├── item.css │ │ │ │ ├── label.css │ │ │ │ ├── list.css │ │ │ │ ├── loader.css │ │ │ │ ├── menu.css │ │ │ │ ├── message.css │ │ │ │ ├── modal.css │ │ │ │ ├── modal.js │ │ │ │ ├── nag.css │ │ │ │ ├── nag.js │ │ │ │ ├── popup.css │ │ │ │ ├── popup.js │ │ │ │ ├── progress.css │ │ │ │ ├── progress.js │ │ │ │ ├── rail.css │ │ │ │ ├── rating.css │ │ │ │ ├── rating.js │ │ │ │ ├── reset.css │ │ │ │ ├── reveal.css │ │ │ │ ├── search.css │ │ │ │ ├── search.js │ │ │ │ ├── segment.css │ │ │ │ ├── shape.css │ │ │ │ ├── shape.js │ │ │ │ ├── sidebar.css │ │ │ │ ├── sidebar.js │ │ │ │ ├── site.css │ │ │ │ ├── site.js │ │ │ │ ├── state.js │ │ │ │ ├── statistic.css │ │ │ │ ├── step.css │ │ │ │ ├── sticky.css │ │ │ │ ├── sticky.js │ │ │ │ ├── tab.css │ │ │ │ ├── tab.js │ │ │ │ ├── table.css │ │ │ │ ├── transition.css │ │ │ │ ├── transition.js │ │ │ │ └── visibility.js │ │ │ ├── semantic.css │ │ │ └── semantic.js │ │ ├── gulpfile.js │ │ ├── src/ │ │ │ ├── definitions/ │ │ │ │ ├── behaviors/ │ │ │ │ │ ├── api.js │ │ │ │ │ ├── colorize.js │ │ │ │ │ ├── form.js │ │ │ │ │ ├── state.js │ │ │ │ │ ├── visibility.js │ │ │ │ │ └── visit.js │ │ │ │ ├── collections/ │ │ │ │ │ ├── breadcrumb.less │ │ │ │ │ ├── form.less │ │ │ │ │ ├── grid.less │ │ │ │ │ ├── menu.less │ │ │ │ │ ├── message.less │ │ │ │ │ └── table.less │ │ │ │ ├── elements/ │ │ │ │ │ ├── button.less │ │ │ │ │ ├── container.less │ │ │ │ │ ├── divider.less │ │ │ │ │ ├── flag.less │ │ │ │ │ ├── header.less │ │ │ │ │ ├── icon.less │ │ │ │ │ ├── image.less │ │ │ │ │ ├── input.less │ │ │ │ │ ├── label.less │ │ │ │ │ ├── list.less │ │ │ │ │ ├── loader.less │ │ │ │ │ ├── rail.less │ │ │ │ │ ├── reveal.less │ │ │ │ │ ├── segment.less │ │ │ │ │ └── step.less │ │ │ │ ├── globals/ │ │ │ │ │ ├── reset.less │ │ │ │ │ ├── site.js │ │ │ │ │ └── site.less │ │ │ │ ├── modules/ │ │ │ │ │ ├── accordion.js │ │ │ │ │ ├── accordion.less │ │ │ │ │ ├── checkbox.js │ │ │ │ │ ├── checkbox.less │ │ │ │ │ ├── dimmer.js │ │ │ │ │ ├── dimmer.less │ │ │ │ │ ├── dropdown.js │ │ │ │ │ ├── dropdown.less │ │ │ │ │ ├── embed.js │ │ │ │ │ ├── embed.less │ │ │ │ │ ├── modal.js │ │ │ │ │ ├── modal.less │ │ │ │ │ ├── nag.js │ │ │ │ │ ├── nag.less │ │ │ │ │ ├── popup.js │ │ │ │ │ ├── popup.less │ │ │ │ │ ├── progress.js │ │ │ │ │ ├── progress.less │ │ │ │ │ ├── rating.js │ │ │ │ │ ├── rating.less │ │ │ │ │ ├── search.js │ │ │ │ │ ├── search.less │ │ │ │ │ ├── shape.js │ │ │ │ │ ├── shape.less │ │ │ │ │ ├── sidebar.js │ │ │ │ │ ├── sidebar.less │ │ │ │ │ ├── sticky.js │ │ │ │ │ ├── sticky.less │ │ │ │ │ ├── tab.js │ │ │ │ │ ├── tab.less │ │ │ │ │ ├── transition.js │ │ │ │ │ └── transition.less │ │ │ │ └── views/ │ │ │ │ ├── ad.less │ │ │ │ ├── card.less │ │ │ │ ├── comment.less │ │ │ │ ├── feed.less │ │ │ │ ├── item.less │ │ │ │ └── statistic.less │ │ │ ├── semantic.less │ │ │ ├── site/ │ │ │ │ ├── collections/ │ │ │ │ │ ├── breadcrumb.overrides │ │ │ │ │ ├── breadcrumb.variables │ │ │ │ │ ├── form.overrides │ │ │ │ │ ├── form.variables │ │ │ │ │ ├── grid.overrides │ │ │ │ │ ├── grid.variables │ │ │ │ │ ├── menu.overrides │ │ │ │ │ ├── menu.variables │ │ │ │ │ ├── message.overrides │ │ │ │ │ ├── message.variables │ │ │ │ │ ├── table.overrides │ │ │ │ │ └── table.variables │ │ │ │ ├── elements/ │ │ │ │ │ ├── button.overrides │ │ │ │ │ ├── button.variables │ │ │ │ │ ├── container.overrides │ │ │ │ │ ├── container.variables │ │ │ │ │ ├── divider.overrides │ │ │ │ │ ├── divider.variables │ │ │ │ │ ├── flag.overrides │ │ │ │ │ ├── flag.variables │ │ │ │ │ ├── header.overrides │ │ │ │ │ ├── header.variables │ │ │ │ │ ├── icon.overrides │ │ │ │ │ ├── icon.variables │ │ │ │ │ ├── image.overrides │ │ │ │ │ ├── image.variables │ │ │ │ │ ├── input.overrides │ │ │ │ │ ├── input.variables │ │ │ │ │ ├── label.overrides │ │ │ │ │ ├── label.variables │ │ │ │ │ ├── list.overrides │ │ │ │ │ ├── list.variables │ │ │ │ │ ├── loader.overrides │ │ │ │ │ ├── loader.variables │ │ │ │ │ ├── rail.overrides │ │ │ │ │ ├── rail.variables │ │ │ │ │ ├── reveal.overrides │ │ │ │ │ ├── reveal.variables │ │ │ │ │ ├── segment.overrides │ │ │ │ │ ├── segment.variables │ │ │ │ │ ├── step.overrides │ │ │ │ │ └── step.variables │ │ │ │ ├── globals/ │ │ │ │ │ ├── reset.overrides │ │ │ │ │ ├── reset.variables │ │ │ │ │ ├── site.overrides │ │ │ │ │ └── site.variables │ │ │ │ ├── modules/ │ │ │ │ │ ├── accordion.overrides │ │ │ │ │ ├── accordion.variables │ │ │ │ │ ├── chatroom.overrides │ │ │ │ │ ├── chatroom.variables │ │ │ │ │ ├── checkbox.overrides │ │ │ │ │ ├── checkbox.variables │ │ │ │ │ ├── dimmer.overrides │ │ │ │ │ ├── dimmer.variables │ │ │ │ │ ├── dropdown.overrides │ │ │ │ │ ├── dropdown.variables │ │ │ │ │ ├── embed.overrides │ │ │ │ │ ├── embed.variables │ │ │ │ │ ├── modal.overrides │ │ │ │ │ ├── modal.variables │ │ │ │ │ ├── nag.overrides │ │ │ │ │ ├── nag.variables │ │ │ │ │ ├── popup.overrides │ │ │ │ │ ├── popup.variables │ │ │ │ │ ├── progress.overrides │ │ │ │ │ ├── progress.variables │ │ │ │ │ ├── rating.overrides │ │ │ │ │ ├── rating.variables │ │ │ │ │ ├── search.overrides │ │ │ │ │ ├── search.variables │ │ │ │ │ ├── shape.overrides │ │ │ │ │ ├── shape.variables │ │ │ │ │ ├── sidebar.overrides │ │ │ │ │ ├── sidebar.variables │ │ │ │ │ ├── sticky.overrides │ │ │ │ │ ├── sticky.variables │ │ │ │ │ ├── tab.overrides │ │ │ │ │ ├── tab.variables │ │ │ │ │ ├── transition.overrides │ │ │ │ │ └── transition.variables │ │ │ │ └── views/ │ │ │ │ ├── ad.overrides │ │ │ │ ├── ad.variables │ │ │ │ ├── card.overrides │ │ │ │ ├── card.variables │ │ │ │ ├── comment.overrides │ │ │ │ ├── comment.variables │ │ │ │ ├── feed.overrides │ │ │ │ ├── feed.variables │ │ │ │ ├── item.overrides │ │ │ │ ├── item.variables │ │ │ │ ├── statistic.overrides │ │ │ │ └── statistic.variables │ │ │ ├── theme.config │ │ │ ├── theme.less │ │ │ └── themes/ │ │ │ ├── amazon/ │ │ │ │ ├── elements/ │ │ │ │ │ ├── button.overrides │ │ │ │ │ └── button.variables │ │ │ │ └── globals/ │ │ │ │ └── site.variables │ │ │ ├── basic/ │ │ │ │ ├── collections/ │ │ │ │ │ ├── table.overrides │ │ │ │ │ └── table.variables │ │ │ │ ├── elements/ │ │ │ │ │ ├── button.overrides │ │ │ │ │ ├── button.variables │ │ │ │ │ ├── icon.overrides │ │ │ │ │ ├── icon.variables │ │ │ │ │ ├── step.overrides │ │ │ │ │ └── step.variables │ │ │ │ ├── globals/ │ │ │ │ │ ├── reset.overrides │ │ │ │ │ └── reset.variables │ │ │ │ ├── modules/ │ │ │ │ │ ├── progress.overrides │ │ │ │ │ └── progress.variables │ │ │ │ └── views/ │ │ │ │ ├── card.overrides │ │ │ │ └── card.variables │ │ │ ├── bookish/ │ │ │ │ └── elements/ │ │ │ │ ├── header.overrides │ │ │ │ └── header.variables │ │ │ ├── bootstrap3/ │ │ │ │ └── elements/ │ │ │ │ ├── button.overrides │ │ │ │ └── button.variables │ │ │ ├── chubby/ │ │ │ │ ├── collections/ │ │ │ │ │ ├── form.overrides │ │ │ │ │ ├── form.variables │ │ │ │ │ ├── menu.overrides │ │ │ │ │ └── menu.variables │ │ │ │ ├── elements/ │ │ │ │ │ ├── button.overrides │ │ │ │ │ ├── button.variables │ │ │ │ │ ├── header.overrides │ │ │ │ │ └── header.variables │ │ │ │ ├── modules/ │ │ │ │ │ ├── accordion.overrides │ │ │ │ │ └── accordion.variables │ │ │ │ └── views/ │ │ │ │ ├── comment.overrides │ │ │ │ └── comment.variables │ │ │ ├── classic/ │ │ │ │ ├── collections/ │ │ │ │ │ ├── table.overrides │ │ │ │ │ └── table.variables │ │ │ │ ├── elements/ │ │ │ │ │ ├── button.overrides │ │ │ │ │ ├── button.variables │ │ │ │ │ ├── header.overrides │ │ │ │ │ └── header.variables │ │ │ │ ├── modules/ │ │ │ │ │ ├── progress.overrides │ │ │ │ │ └── progress.variables │ │ │ │ └── views/ │ │ │ │ ├── card.overrides │ │ │ │ └── card.variables │ │ │ ├── colored/ │ │ │ │ └── modules/ │ │ │ │ ├── checkbox.overrides │ │ │ │ └── checkbox.variables │ │ │ ├── default/ │ │ │ │ ├── collections/ │ │ │ │ │ ├── breadcrumb.overrides │ │ │ │ │ ├── breadcrumb.variables │ │ │ │ │ ├── form.overrides │ │ │ │ │ ├── form.variables │ │ │ │ │ ├── grid.overrides │ │ │ │ │ ├── grid.variables │ │ │ │ │ ├── menu.overrides │ │ │ │ │ ├── menu.variables │ │ │ │ │ ├── message.overrides │ │ │ │ │ ├── message.variables │ │ │ │ │ ├── table.overrides │ │ │ │ │ └── table.variables │ │ │ │ ├── elements/ │ │ │ │ │ ├── button.overrides │ │ │ │ │ ├── button.variables │ │ │ │ │ ├── container.overrides │ │ │ │ │ ├── container.variables │ │ │ │ │ ├── divider.overrides │ │ │ │ │ ├── divider.variables │ │ │ │ │ ├── flag.overrides │ │ │ │ │ ├── flag.variables │ │ │ │ │ ├── header.overrides │ │ │ │ │ ├── header.variables │ │ │ │ │ ├── icon.overrides │ │ │ │ │ ├── icon.variables │ │ │ │ │ ├── image.overrides │ │ │ │ │ ├── image.variables │ │ │ │ │ ├── input.overrides │ │ │ │ │ ├── input.variables │ │ │ │ │ ├── label.overrides │ │ │ │ │ ├── label.variables │ │ │ │ │ ├── list.overrides │ │ │ │ │ ├── list.variables │ │ │ │ │ ├── loader.overrides │ │ │ │ │ ├── loader.variables │ │ │ │ │ ├── rail.overrides │ │ │ │ │ ├── rail.variables │ │ │ │ │ ├── reveal.overrides │ │ │ │ │ ├── reveal.variables │ │ │ │ │ ├── segment.overrides │ │ │ │ │ ├── segment.variables │ │ │ │ │ ├── step.overrides │ │ │ │ │ └── step.variables │ │ │ │ ├── globals/ │ │ │ │ │ ├── reset.overrides │ │ │ │ │ ├── reset.variables │ │ │ │ │ ├── site.overrides │ │ │ │ │ └── site.variables │ │ │ │ ├── modules/ │ │ │ │ │ ├── accordion.overrides │ │ │ │ │ ├── accordion.variables │ │ │ │ │ ├── chatroom.overrides │ │ │ │ │ ├── chatroom.variables │ │ │ │ │ ├── checkbox.overrides │ │ │ │ │ ├── checkbox.variables │ │ │ │ │ ├── dimmer.overrides │ │ │ │ │ ├── dimmer.variables │ │ │ │ │ ├── dropdown.overrides │ │ │ │ │ ├── dropdown.variables │ │ │ │ │ ├── embed.overrides │ │ │ │ │ ├── embed.variables │ │ │ │ │ ├── modal.overrides │ │ │ │ │ ├── modal.variables │ │ │ │ │ ├── nag.overrides │ │ │ │ │ ├── nag.variables │ │ │ │ │ ├── popup.overrides │ │ │ │ │ ├── popup.variables │ │ │ │ │ ├── progress.overrides │ │ │ │ │ ├── progress.variables │ │ │ │ │ ├── rating.overrides │ │ │ │ │ ├── rating.variables │ │ │ │ │ ├── search.overrides │ │ │ │ │ ├── search.variables │ │ │ │ │ ├── shape.overrides │ │ │ │ │ ├── shape.variables │ │ │ │ │ ├── sidebar.overrides │ │ │ │ │ ├── sidebar.variables │ │ │ │ │ ├── sticky.overrides │ │ │ │ │ ├── sticky.variables │ │ │ │ │ ├── tab.overrides │ │ │ │ │ ├── tab.variables │ │ │ │ │ ├── transition.overrides │ │ │ │ │ └── transition.variables │ │ │ │ └── views/ │ │ │ │ ├── ad.overrides │ │ │ │ ├── ad.variables │ │ │ │ ├── card.overrides │ │ │ │ ├── card.variables │ │ │ │ ├── comment.overrides │ │ │ │ ├── comment.variables │ │ │ │ ├── feed.overrides │ │ │ │ ├── feed.variables │ │ │ │ ├── item.overrides │ │ │ │ ├── item.variables │ │ │ │ ├── statistic.overrides │ │ │ │ └── statistic.variables │ │ │ ├── duo/ │ │ │ │ └── elements/ │ │ │ │ ├── loader.overrides │ │ │ │ └── loader.variables │ │ │ ├── fixed-width/ │ │ │ │ ├── collections/ │ │ │ │ │ ├── grid.overrides │ │ │ │ │ └── grid.variables │ │ │ │ └── modules/ │ │ │ │ ├── modal.overrides │ │ │ │ └── modal.variables │ │ │ ├── flat/ │ │ │ │ ├── collections/ │ │ │ │ │ ├── form.overrides │ │ │ │ │ └── form.variables │ │ │ │ └── globals/ │ │ │ │ ├── site.overrides │ │ │ │ └── site.variables │ │ │ ├── github/ │ │ │ │ ├── collections/ │ │ │ │ │ ├── breadcrumb.variables │ │ │ │ │ ├── form.overrides │ │ │ │ │ ├── form.variables │ │ │ │ │ ├── grid.variables │ │ │ │ │ ├── menu.overrides │ │ │ │ │ ├── menu.variables │ │ │ │ │ ├── message.overrides │ │ │ │ │ ├── message.variables │ │ │ │ │ └── table.variables │ │ │ │ ├── elements/ │ │ │ │ │ ├── button.overrides │ │ │ │ │ ├── button.variables │ │ │ │ │ ├── header.variables │ │ │ │ │ ├── icon.overrides │ │ │ │ │ ├── icon.variables │ │ │ │ │ ├── image.variables │ │ │ │ │ ├── input.overrides │ │ │ │ │ ├── input.variables │ │ │ │ │ ├── label.overrides │ │ │ │ │ ├── label.variables │ │ │ │ │ ├── segment.overrides │ │ │ │ │ ├── segment.variables │ │ │ │ │ ├── step.overrides │ │ │ │ │ └── step.variables │ │ │ │ ├── globals/ │ │ │ │ │ └── site.variables │ │ │ │ └── modules/ │ │ │ │ ├── dropdown.overrides │ │ │ │ ├── dropdown.variables │ │ │ │ └── popup.variables │ │ │ ├── gmail/ │ │ │ │ └── collections/ │ │ │ │ ├── message.overrides │ │ │ │ └── message.variables │ │ │ ├── instagram/ │ │ │ │ └── views/ │ │ │ │ ├── card.overrides │ │ │ │ └── card.variables │ │ │ ├── material/ │ │ │ │ ├── collections/ │ │ │ │ │ ├── menu.overrides │ │ │ │ │ └── menu.variables │ │ │ │ ├── elements/ │ │ │ │ │ ├── button.overrides │ │ │ │ │ ├── button.variables │ │ │ │ │ ├── header.overrides │ │ │ │ │ ├── header.variables │ │ │ │ │ ├── icon.overrides │ │ │ │ │ └── icon.variables │ │ │ │ ├── globals/ │ │ │ │ │ ├── site.overrides │ │ │ │ │ └── site.variables │ │ │ │ └── modules/ │ │ │ │ ├── dropdown.overrides │ │ │ │ ├── dropdown.variables │ │ │ │ ├── modal.overrides │ │ │ │ └── modal.variables │ │ │ ├── pulsar/ │ │ │ │ └── elements/ │ │ │ │ ├── loader.overrides │ │ │ │ └── loader.variables │ │ │ ├── raised/ │ │ │ │ └── elements/ │ │ │ │ ├── button.overrides │ │ │ │ └── button.variables │ │ │ ├── resetcss/ │ │ │ │ └── globals/ │ │ │ │ ├── reset.overrides │ │ │ │ └── reset.variables │ │ │ ├── round/ │ │ │ │ └── elements/ │ │ │ │ ├── button.overrides │ │ │ │ └── button.variables │ │ │ ├── rtl/ │ │ │ │ └── globals/ │ │ │ │ ├── site.overrides │ │ │ │ └── site.variables │ │ │ ├── striped/ │ │ │ │ └── modules/ │ │ │ │ ├── progress.overrides │ │ │ │ └── progress.variables │ │ │ ├── timeline/ │ │ │ │ └── views/ │ │ │ │ ├── feed.overrides │ │ │ │ └── feed.variables │ │ │ └── twitter/ │ │ │ └── elements/ │ │ │ ├── button.overrides │ │ │ └── button.variables │ │ └── tasks/ │ │ ├── README.md │ │ ├── admin/ │ │ │ ├── components/ │ │ │ │ ├── create.js │ │ │ │ ├── init.js │ │ │ │ └── update.js │ │ │ ├── distributions/ │ │ │ │ ├── create.js │ │ │ │ ├── init.js │ │ │ │ └── update.js │ │ │ ├── publish.js │ │ │ ├── register.js │ │ │ └── release.js │ │ ├── build/ │ │ │ ├── assets.js │ │ │ ├── css.js │ │ │ └── javascript.js │ │ ├── build.js │ │ ├── check-install.js │ │ ├── clean.js │ │ ├── collections/ │ │ │ ├── README.md │ │ │ ├── admin.js │ │ │ ├── build.js │ │ │ ├── internal.js │ │ │ └── rtl.js │ │ ├── config/ │ │ │ ├── admin/ │ │ │ │ ├── github.js │ │ │ │ ├── oauth.example.js │ │ │ │ ├── release.js │ │ │ │ └── templates/ │ │ │ │ ├── README.md │ │ │ │ ├── bower.json │ │ │ │ ├── component-package.js │ │ │ │ ├── composer.json │ │ │ │ ├── css-package.js │ │ │ │ ├── less-package.js │ │ │ │ └── package.json │ │ │ ├── defaults.js │ │ │ ├── docs.js │ │ │ ├── npm/ │ │ │ │ └── gulpfile.js │ │ │ ├── project/ │ │ │ │ ├── config.js │ │ │ │ ├── install.js │ │ │ │ └── release.js │ │ │ ├── tasks.js │ │ │ └── user.js │ │ ├── docs/ │ │ │ ├── build.js │ │ │ ├── metadata.js │ │ │ └── serve.js │ │ ├── install.js │ │ ├── rtl/ │ │ │ ├── build.js │ │ │ └── watch.js │ │ ├── version.js │ │ └── watch.js │ ├── lang/ │ │ ├── en/ │ │ │ ├── auth.php │ │ │ ├── codehaoshi.php │ │ │ ├── pagination.php │ │ │ ├── passwords.php │ │ │ └── validation.php │ │ ├── th/ │ │ │ ├── auth.php │ │ │ ├── pagination.php │ │ │ ├── passwords.php │ │ │ └── validation.php │ │ ├── tk/ │ │ │ ├── auth.php │ │ │ ├── pagination.php │ │ │ ├── passwords.php │ │ │ └── validation.php │ │ ├── vendor/ │ │ │ └── laravel-backup/ │ │ │ ├── ar/ │ │ │ │ └── notifications.php │ │ │ ├── da/ │ │ │ │ └── notifications.php │ │ │ ├── de/ │ │ │ │ └── notifications.php │ │ │ ├── en/ │ │ │ │ └── notifications.php │ │ │ ├── es/ │ │ │ │ └── notifications.php │ │ │ ├── fr/ │ │ │ │ └── notifications.php │ │ │ ├── pt-BR/ │ │ │ │ └── notifications.php │ │ │ ├── ro/ │ │ │ │ └── notifications.php │ │ │ ├── ru/ │ │ │ │ └── notifications.php │ │ │ └── uk/ │ │ │ └── notifications.php │ │ ├── zh-CN/ │ │ │ ├── auth.php │ │ │ ├── codehaoshi.php │ │ │ ├── pagination.php │ │ │ ├── passwords.php │ │ │ └── validation.php │ │ └── zh-HK/ │ │ ├── auth.php │ │ ├── pagination.php │ │ ├── passwords.php │ │ └── validation.php │ └── views/ │ ├── activities/ │ │ ├── article.blade.php │ │ ├── followings.blade.php │ │ ├── question.blade.php │ │ ├── type/ │ │ │ ├── user-comment-article.blade.php │ │ │ ├── user-followed-user.blade.php │ │ │ ├── user-reply-question.blade.php │ │ │ ├── user-upvote-article.blade.php │ │ │ └── user-upvote-question.blade.php │ │ └── voted.blade.php │ ├── articles/ │ │ ├── all-articles.blade.php │ │ ├── article-list.blade.php │ │ ├── create.blade.php │ │ ├── edit.blade.php │ │ ├── partials/ │ │ │ ├── article-info-form.blade.php │ │ │ ├── article-list-form.blade.php │ │ │ ├── info-right-item.blade.php │ │ │ ├── right-item.blade.php │ │ │ └── show.blade.php.old │ │ └── show.blade.php │ ├── auth/ │ │ ├── passwords/ │ │ │ ├── email.blade.php │ │ │ └── reset.blade.php │ │ ├── signin.blade.php │ │ └── signup.blade.php │ ├── dashboard/ │ │ ├── abouts/ │ │ │ ├── about-list.blade.php │ │ │ ├── create.blade.php │ │ │ └── edit.blade.php │ │ ├── article-categories/ │ │ │ ├── category-list.blade.php │ │ │ ├── create.blade.php │ │ │ └── edit.blade.php │ │ ├── articles/ │ │ │ ├── ajax-article-list.blade.php │ │ │ ├── article-list.blade.php │ │ │ ├── create.blade.php │ │ │ └── edit.blade.php │ │ ├── index/ │ │ │ ├── index.blade.php │ │ │ └── welcome.blade.php │ │ ├── layouts/ │ │ │ ├── base.blade.php │ │ │ └── partials/ │ │ │ ├── body_head.blade.php │ │ │ ├── footer.blade.php │ │ │ ├── head.blade.php │ │ │ ├── header.blade.php │ │ │ ├── left.blade.php │ │ │ └── right.blade.php │ │ ├── links/ │ │ │ ├── create.blade.php │ │ │ ├── edit.blade.php │ │ │ └── link-list.blade.php │ │ ├── permissions/ │ │ │ ├── ajax-permission-list.blade.php │ │ │ ├── create.blade.php │ │ │ ├── edit.blade.php │ │ │ └── permission-list.blade.php │ │ ├── question-categories/ │ │ │ ├── category-list.blade.php │ │ │ ├── create.blade.php │ │ │ └── edit.blade.php │ │ ├── questions/ │ │ │ ├── ajax-question-list.blade.php │ │ │ ├── create.blade.php │ │ │ ├── edit.blade.php │ │ │ └── question-list.blade.php │ │ ├── roles/ │ │ │ ├── ajax-role-list.blade.php │ │ │ ├── create.blade.php │ │ │ ├── edit.blade.php │ │ │ └── role-list.blade.php │ │ ├── tags/ │ │ │ ├── create.blade.php │ │ │ ├── edit.blade.php │ │ │ └── tag-list.blade.php │ │ └── users/ │ │ ├── ajax-user-list.blade.php │ │ ├── create.blade.php │ │ ├── edit.blade.php │ │ └── user-list.blade.php │ ├── errors/ │ │ ├── 403.blade.php │ │ ├── 404.blade.php │ │ └── 500.blade.php │ ├── form-validate/ │ │ └── auth/ │ │ ├── v-register.blade.php │ │ └── v-topic.blade.php │ ├── layouts/ │ │ ├── app.blade.php │ │ ├── base.blade.php │ │ └── partials/ │ │ ├── footer.blade.php │ │ ├── messages.blade.php │ │ ├── navbar.blade.php │ │ └── sidebar-menu.blade.php │ ├── messages/ │ │ ├── message.blade.php │ │ ├── notifications.blade.php │ │ └── partials/ │ │ └── left-bar.blade.php │ ├── notifications/ │ │ ├── new-user-follow-notification.blade.php │ │ ├── received-comment.blade.php │ │ ├── received-reply.blade.php │ │ ├── user-vote-article.blade.php │ │ └── user-vote-question.blade.php │ ├── pages/ │ │ ├── about.blade.php │ │ ├── home.blade.php │ │ ├── partials/ │ │ │ ├── hot-article.blade.php │ │ │ ├── hot-question.blade.php │ │ │ ├── information-channel.blade.php │ │ │ ├── information-channel.blade.php.old │ │ │ └── question-channel.blade.php │ │ └── search.blade.php │ ├── questions/ │ │ ├── all-questions.blade.php │ │ ├── create.blade.php │ │ ├── edit.blade.php │ │ ├── partials/ │ │ │ ├── info-right-item.blade.php │ │ │ ├── question-info-form.blade.php │ │ │ ├── question-list-form.blade.php │ │ │ └── right-item.blade.php │ │ ├── question-list.blade.php │ │ └── show.blade.php │ ├── static-pages/ │ │ ├── article/ │ │ │ ├── all-articles.blade.php │ │ │ ├── article-info.blade.php │ │ │ ├── article-list.blade.php │ │ │ ├── partials/ │ │ │ │ ├── article-comment.blade.php │ │ │ │ ├── article-info-form.blade.php │ │ │ │ ├── article-list-form.blade.php │ │ │ │ ├── info-right-item.blade.php │ │ │ │ └── right-item.blade.php │ │ │ └── test.blade.php │ │ ├── auth/ │ │ │ ├── login.blade.php │ │ │ └── register.blade.php │ │ ├── home.blade.php │ │ ├── messages/ │ │ │ ├── message.blade.php │ │ │ ├── notifications.blade.php │ │ │ └── partials/ │ │ │ └── left-bar.blade.php │ │ ├── partials/ │ │ │ ├── hot-article.blade.php │ │ │ ├── hot-question.blade.php │ │ │ ├── hot-question.blade.php___jb_tmp___ │ │ │ ├── information-channel.blade.php │ │ │ └── question-channel.blade.php │ │ ├── questions/ │ │ │ ├── all-questions.blade.php │ │ │ ├── partials/ │ │ │ │ ├── article-comment.blade.php │ │ │ │ ├── info-right-item.blade.php │ │ │ │ ├── question-info-form.blade.php │ │ │ │ ├── question-list-form.blade.php │ │ │ │ └── right-item.blade.php │ │ │ ├── question-info.blade.php │ │ │ └── question-list.blade.php │ │ └── user/ │ │ ├── center.blade.php │ │ ├── edit.blade.php │ │ ├── email.blade.php │ │ ├── partials/ │ │ │ ├── left-menu.blade.php │ │ │ └── right-item.blade.php │ │ └── password.blade.php │ ├── tags/ │ │ ├── show-article.blade.php │ │ └── show-question.blade.php │ ├── users/ │ │ ├── edit-email.blade.php │ │ ├── edit-password.blade.php │ │ ├── edit.blade.php │ │ ├── partials/ │ │ │ ├── left-menu.blade.php │ │ │ └── right-item.blade.php │ │ └── personal-center.blade.php │ └── vendor/ │ ├── mail/ │ │ ├── html/ │ │ │ ├── button.blade.php │ │ │ ├── footer.blade.php │ │ │ ├── header.blade.php │ │ │ ├── layout.blade.php │ │ │ ├── message.blade.php │ │ │ ├── panel.blade.php │ │ │ ├── promotion/ │ │ │ │ └── button.blade.php │ │ │ ├── promotion.blade.php │ │ │ ├── subcopy.blade.php │ │ │ ├── table.blade.php │ │ │ └── themes/ │ │ │ └── default.css │ │ └── markdown/ │ │ ├── button.blade.php │ │ ├── footer.blade.php │ │ ├── header.blade.php │ │ ├── layout.blade.php │ │ ├── message.blade.php │ │ ├── panel.blade.php │ │ ├── promotion/ │ │ │ └── button.blade.php │ │ ├── promotion.blade.php │ │ ├── subcopy.blade.php │ │ └── table.blade.php │ ├── notifications/ │ │ └── email.blade.php │ └── pagination/ │ ├── bootstrap-4.blade.php │ ├── default.blade.php │ ├── simple-bootstrap-4.blade.php │ └── simple-default.blade.php ├── routes/ │ ├── api.php │ ├── channels.php │ ├── console.php │ └── web.php ├── semantic.json ├── server.php ├── storage/ │ ├── app/ │ │ └── .gitignore │ ├── debugbar/ │ │ └── .gitignore │ ├── framework/ │ │ ├── .gitignore │ │ ├── cache/ │ │ │ └── .gitignore │ │ ├── sessions/ │ │ │ └── .gitignore │ │ ├── testing/ │ │ │ └── .gitignore │ │ └── views/ │ │ └── .gitignore │ └── logs/ │ └── .gitignore ├── tests/ │ ├── CreatesApplication.php │ ├── Feature/ │ │ └── ExampleTest.php │ ├── TestCase.php │ └── Unit/ │ └── ExampleTest.php └── webpack.mix.js ================================================ FILE CONTENTS ================================================ ================================================ FILE: .gitattributes ================================================ * text=auto CHANGELOG.md export-ignore *.css linguist-language=php *.js linguist-language=php *.scss linguist-language=php ================================================ FILE: .gitignore ================================================ /node_modules /public/hot /public/storage /storage/*.key /vendor /.idea /.vagrant Homestead.json Homestead.yaml npm-debug.log yarn-error.log .env _ide_helper.php /config/debugbar.php /public/assets/js /public/assets/css/styles.css /public/uploads/ ================================================ FILE: app/Activities/BaseActivity.php ================================================ id; $indentifier = $indentifier ?: 'a' . $article->id; $data = array_merge([ 'article_type' => 'article', 'article_id' => $article->id, 'article_slug' => $article->slug, 'article_title' => $article->title, ], $extra_data); $this->addActivity($causer, $user, $indentifier, $data); } public function addQuestionActivity(User $user, Question $question, $extra_data = [], $indentifier = null) { $causer = 'u' . $user->id; $indentifier = $indentifier ?: 'q' . $question->id; $data = array_merge([ 'article_type' => 'question', 'article_id' => $question->id, 'article_slug' => $question->slug, 'article_title' => $question->title, ], $extra_data); $this->addActivity($causer, $user, $indentifier, $data); } public function addActivity($causer, $user, $indentifier, $data) { $type = class_basename(get_class($this)); $activities[] = [ 'causer' => $causer, 'user_id' => $user->id, 'type' => $type, 'indentifier' => $indentifier, 'data' => serialize($data), 'created_at' => Carbon::now(), 'updated_at' => Carbon::now(), ]; Activity::insert($activities); } public function removeBy($causer, $indentifier) { Activity::where('causer', $causer) ->where('indentifier', $indentifier) ->where('type', class_basename(get_class($this))) ->delete(); } } ================================================ FILE: app/Activities/UserCommentArticle.php ================================================ addArticleActivity($user, $article); } public function remove($user, $article) { $this->removeBy('u'.$user->id, 'a'.$article->id); } } ================================================ FILE: app/Activities/UserFollowedUser.php ================================================ id; $indentifier = 'u' . $following->id; $data = array_merge([ 'following_user_name' => $following->user_name, 'following_id' => $following->id, ]); $this->addActivity($causer, $user, $indentifier, $data); } public function remove($user, $following) { $this->removeBy('u' . $user->id, 'u' . $following->id); } } ================================================ FILE: app/Activities/UserReplyQuestion.php ================================================ addQuestionActivity($user, $question); } public function remove($user, $question) { $this->removeBy('u'.$user->id, 'q'.$question->id); } } ================================================ FILE: app/Activities/UserUpvoteArticle.php ================================================ addArticleActivity($user, $article); } public function remove($user, $article) { $this->removeBy('u'.$user->id, 'a'.$article->id); } } ================================================ FILE: app/Activities/UserUpvoteQuestion.php ================================================ addQuestionActivity($user, $question); } public function remove($user, $question) { $this->removeBy('u'.$user->id, 'q'.$question->id); } } ================================================ FILE: app/Codehaoshi/Core/CreatorListener.php ================================================ metion = $metion; } public function create(CreatorListener $observer, $data) { // 检查是否重复发布评论 if ($this->isDuplicateComment($data)) { return $observer->creatorFailed('请不要发布重复评论。'); } $data['user_id'] = Auth::id(); $data['body'] = $this->metion->parse($data['body']); $markdown = new Markdowner(); $data['body_original'] = $data['body']; $data['body'] = $markdown->convertMarkdownToHtml($data['body']); $comment = Comment::create($data); if (!$comment) { return $observer->creatorFailed($comment->getErrors()); } // Add the comment user $article = Article::findOrFail($data['article_id']); $article->last_comment_user_id = Auth::id(); $article->comment_count++; $article->updated_at = Carbon::now()->toDateTimeString(); $article->save(); Auth::user()->increment('comment_count', 1); // Todo 用户评论后发送站内通知消息给被评论文章的作者 User::findOrFail($article['user_id'])->notify(new ReceivedComment($comment)); app(UserCommentArticle::class)->generate(Auth::user(), $article); return $observer->creatorSucceed($comment); } protected function isDuplicateComment($data) { $lastComment = Comment::where('user_id', Auth::id()) ->where('article_id', $data['article_id']) ->orderBy('created_at', 'desc') ->first(); return count($lastComment) && strcmp($lastComment->body_original, $data['body']) === 0; } } ================================================ FILE: app/Codehaoshi/Creators/ReplyCreator.php ================================================ metion = $metion; } public function create(CreatorListener $observer, $data) { // 检查是否重复发布评论 if ($this->isDuplicateReply($data)) { return $observer->creatorFailed('请不要发布重复评论。'); } $data['user_id'] = Auth::id(); $data['body'] = $this->metion->parse($data['body']); $markdown = new Markdowner; $data['body_original'] = $data['body']; $data['body'] = $markdown->convertMarkdownToHtml($data['body']); $reply = Reply::create($data); if (!$reply) { return $observer->creatorFailed($reply->getErrors()); } // Add the comment user $question = Question::findOrFail($data['question_id']); $question->last_reply_user_id = Auth::id(); $question->reply_count++; $question->updated_at = Carbon::now()->toDateTimeString(); $question->save(); Auth::user()->increment('reply_count', 1); // Todo 用户评论后发送站内通知消息给被评论文章的作者 User::findOrFail($question['user_id'])->notify(new ReceivedReply($reply)); app(UserReplyQuestion::class)->generate(Auth::user(), $question); return $observer->creatorSucceed($reply); } protected function isDuplicateReply($data) { $lastReply = Reply::where('user_id', Auth::id()) ->where('question_id', $data['question_id']) ->orderBy('created_at', 'desc') ->first(); return count($lastReply) && strcmp($lastReply->body_original, $data['body']) === 0; } } ================================================ FILE: app/Codehaoshi/Creators/UserCreator.php ================================================ userModel = $user; } public function create(UserCreatorListener $observre, $userData) { if($userData['password']) { $userData['password'] = bcrypt($userData['password']); } $user = $this->userModel->store($userData); if (!$user) { return $observre->userValidationError($user->getErrors()); } if($userData['image_url']) { $user->cacheAvatar(); } return $observre->userCreated($user); } } ================================================ FILE: app/Codehaoshi/Handler/BackupHandler.php ================================================ $notifications ]; $template = new SendCloudTemplate('codehaoshi_notification', $data);//模板调用名称-zhihu_app_register Mail::raw($template, function ($message) { $message->from('18313852226@sina.cn', 'code 好事'); $message->to('185429135@qq.com');//发给谁 }); } } ================================================ FILE: app/Codehaoshi/Handler/ImageUploadHandler.php ================================================ baseManager = new BaseManager(); } public function fileUpload(ImageUploadRequest $request, $img) { $result = $this->baseManager->storeUploadImgByConfigPath($img, $request->path); $res = ['status' => 1, 'msg' => $result['relative_url']]; return response()->json($res); } } ================================================ FILE: app/Codehaoshi/Listeners/UserCreatorListener.php ================================================ body_original = $body; $this->usernames = $this->getMentionedUsername(); count($this->usernames) > 0 && $this->users = User::whereIn('user_name', $this->usernames)->get(); $this->replace(); return $this->body_parsed; } protected function getMentionedUsername() { preg_match_all("/(\S*)\@([^\r\n\s]*)/i", $this->body_original, $atlist_tmp); $usernames = []; foreach ($atlist_tmp[2] as $k => $v) { if ($atlist_tmp[1][$k] || strlen($v) > 25) { continue; } $usernames[] = $v; } return array_unique($usernames); } public function replace() { $this->body_parsed = $this->body_original; foreach ($this->users as $user) { $search = '@' . $user->user_name; $place = '[' . $search . '](' . route('users.show', $user->id) . ')'; $this->body_parsed = str_replace($search, $place, $this->body_parsed); } } } ================================================ FILE: app/Codehaoshi/Selectors/ArticleSelector.php ================================================ articleRepository = $articleRepository; } public function articleInfoWithPrevAndNext($id) { return [ 'prev' => $this->articleRepository->getByIdWithoutException($id, '<'), 'next' => $this->articleRepository->getByIdWithoutException($id , '>'), ]; } } ================================================ FILE: app/Codehaoshi/Selectors/QuestionSelector.php ================================================ questionRepository = $questionRepository; } public function questionInfoWithPrevAndNext($id) { return [ 'prev' => $this->questionRepository->getByIdWithoutException($id, '<'), 'next' => $this->questionRepository->getByIdWithoutException($id , '>'), ]; } } ================================================ FILE: app/Codehaoshi/Stat/Stat.php ================================================ articleCategoryRepository = $articleCategoryRepository; $this->questionCategoryRepository = $questionCategoryRepository; } public function getCategoryAndQuestion() { return Cache::remember(self::CACHE_KEY, self::CACHE_MINUTES, function () { $entity = new StatEntity(); $entity->questionList = $this->questionCategoryRepository->getAllData('*', false); $entity->categoryList = $this->articleCategoryRepository->getAllData('*', false); $entity->categoryList->each(function($item, $key) { $item->recent_update = $item->articles()->max('created_at'); }); $entity->questionList->each(function($item, $key) { $item->recent_update = $item->questions()->max('created_at'); }); return $entity; }); } } ================================================ FILE: app/Codehaoshi/Stat/StatEntity.php ================================================ votes(); if ($query->ByWhom(Auth::id())->count()) { $result = 0; } else { $result = $query->create(['user_id' => Auth::id()]); User::findOrfail($article->user_id)->notify(new UserVoteArticle($article)); app(UserUpvoteArticle::class)->generate(Auth::user(), $article); $article->increment('vote_count', 1); } return $result ? ['status' => 1] : ['status' => -1]; } public function articleDownVote(Article $article) { $query = $article->votes()->ByWhom(Auth::id()); if (!$query->count()) { $result = 0; } else { $result = $query->delete(); $article->decrement('vote_count', 1); app(UserUpvoteArticle::class)->remove(Auth::user(), $article); } return $result ? ['status' => 1] : ['status' => -1]; } public function questionUpVote(Question $question) { $query = $question->votes(); if ($query->ByWhom(Auth::id())->count()) { $result = 0; } else { $result = $query->create(['user_id' => Auth::id()]); User::findOrfail($question->user_id)->notify(new UserVoteQuestion($question)); app(UserUpvoteQuestion::class)->generate(Auth::user(), $question); $question->increment('vote_count', 1); } return $result ? ['status' => 1] : ['status' => -1]; } public function questionDownVote(Question $question) { $query = $question->votes()->ByWhom(Auth::id()); if (!$query->count()) { $result = 0; } else { $result = $query->delete(); $question->decrement('vote_count', 1); app(UserUpvoteQuestion::class)->remove(Auth::user(), $question); } return $result ? ['status' => 1] : ['status' => -1]; } } ================================================ FILE: app/Console/Commands/BaseCommand.php ================================================ info('-- Start to install -'); $this->info($command); $output = shell_exec($command); $this->info($output); $this->info('----'); } } ================================================ FILE: app/Console/Commands/BindAdmin.php ================================================ info('-- Start... --'); $supper_admin = Role::findOrFail(1); User::findOrFail(1)->attachRole($supper_admin); User::findOrFail(1)->update(['is_admin'=>'yes']); $this->info('-- The end --'); } } ================================================ FILE: app/Console/Commands/CodehaoshiInstall.php ================================================ execShellWithPrettyPrint('php artisan key:generate'); $this->execShellWithPrettyPrint('php artisan migrate'); $this->execShellWithPrettyPrint('php artisan passport:install'); $this->execShellWithPrettyPrint('php artisan db:seed --class=RolesTableSeeder'); $this->execShellWithPrettyPrint('php artisan db:seed --class=PermissionsTableSeeder'); } } ================================================ FILE: app/Console/Kernel.php ================================================ command('inspire') // ->hourly(); // $schedule->command('backup:clean')->daily()->everyMinute(); $schedule->command('backup:run --only-db')->daily(); $schedule->command('backup:run')->weekly(); // $schedule->command('backup:run --only-db')->everyMinute(); } /** * Register the Closure based commands for the application. * * @return void */ protected function commands() { require base_path('routes/console.php'); } } ================================================ FILE: app/Exceptions/Handler.php ================================================ expectsJson()) { return response()->json(['error' => 'Unauthenticated.'], 401); } return redirect()->guest(route('login')); } } ================================================ FILE: app/Helpers.php ================================================ to($path, $parameters, $secure); } /** * Put session to flash. * @param string $status * @param string $msg * @param string $key */ function flash($status = 'success', $msg = '操作成功', $key = 'toastrMsg') { session()->flash($key, ['status' => $status, 'msg' => $msg]); } /** * @param $text * @param array $parameters * @return mixed */ function lang($text, $parameters = []) { return str_replace('codehaoshi.', '', trans('codehaoshi.' . $text, $parameters)); } /** * @param string $url * @param int $status * @param string $msg * @param array $data * @return array */ function ajaxReturn($url = "", $status = 1, $msg = '操作成功', $data = []) { return ['status' => $status, 'msg' => $msg, 'url' => $url, 'data' => $data]; } function ajaxReturnError($url = "", $status = 0, $msg = '操作失败', $data = []) { return ['status' => $status, 'msg' => $msg, 'url' => $url, 'data' => $data]; } /** * @param $array * @param $all * @return string */ function roleOrPermissionDataHandle($array, $all) { $str = ""; $intersect = array_intersect($array, array_column($all, 'id')); if (count($all) > 0) { foreach ($all as $key => $vo) { $intro = "【" . $vo['display_name'] . "】"; $str .= '{ "id": "' . $vo['id'] . '", "pId":"0", "name":"' . $vo['name'] . $intro . '"'; if (!empty($array) && in_array($vo['id'], $intersect)) { $str .= ' ,"checked":1'; } $str .= '},'; } } return "[" . substr($str, 0, -1) . "]"; } function getCdnDomain() { return config('app.url_static') ?: config('app.url'); } function getTagWeight($useCount) { $style = 'mini'; if ($useCount >= 2 && $useCount < 5) { $style = 'tiny'; } elseif ($useCount >= 5 && $useCount < 10) { $style = 'small'; } elseif ($useCount >= 10 && $useCount < 50) { $style = 'large'; } elseif ($useCount >= 50) { $style = 'big'; } return $style; } function getDateWithSub($date) { $the_time = strtotime($date); $now_time = time(); $show_time = $the_time; $dur = $now_time - $show_time; if($dur < 60){ return $dur.'秒前'; }else if($dur < 3600){ return floor($dur/60).'分钟前'; }else if($dur < 86400) { return floor($dur/3600).'小时前'; }else if($dur < 259200) {//3天内 return floor($dur / 86400) . '天前'; }else{ return substr($date,0,-8); } return substr($date,0,-8); } ================================================ FILE: app/Http/Controllers/ActivityController.php ================================================ userRepository = $userRepository; $this->article = $article; $this->question = $question; } public function index($user_name, $view = null, Request $request) { $user = $this->userRepository->getByName($user_name); if (!isset($user)) abort(404); switch ($view) { case 'article': $activities = $this->article->getArticlesWithWhoFilter('default', 10, $user->id);; break; case 'question': $activities = $this->question->getArticlesWithWhoFilter('default', 10, $user->id);; break; case 'following': $activities = $user->followings;; break; case 'followed': $activities = $user->followers; break; case 'vote': $activities = $user->activities()->recent()->whereIn('type', ['UserUpvoteArticle', 'UserUpvoteQuestion'])->paginate(10); break; default: $activities = $user->activities()->recent()->paginate(10); break; } $user_name = $user->user_name; return view('users.personal-center', [ 'info' => $user, 'activities' => $activities, 'view' => $view, 'nowUrl' => $request->url(), 'articleView' => route('user_center', ['user_name' => $user_name, 'view' => 'article']), 'questionView' => route('user_center', ['user_name' => $user_name, 'view' => 'question']), 'followingView' => route('user_center', ['user_name' => $user_name, 'view' => 'following']), 'followedView' => route('user_center', ['user_name' => $user_name, 'view' => 'followed']), 'defaultView' => route('user_center', ['user_name' => $user_name, 'view' => null]), 'voteView' => route('user_center', ['user_name' => $user_name, 'view' => 'vote']), ]); } } ================================================ FILE: app/Http/Controllers/Api/Apicontroller.php ================================================ fractal = new Manager; if (isset($_GET['include'])) { $this->fractal->parseIncludes($_GET['include']); } } /** * Respond the collection data. * * @param $collection * @param $callback * @return mixed */ public function respondWithCollection($collection, $callback) { $resource = new Collection($collection, $callback); $rootScope = $this->fractal->createData($resource); return $this->respondWithArray($rootScope->toArray()); } /** * Respond the data. * * @param array $array * @param array $headers * @return mixed */ public function respondWithArray(array $array, array $headers = []) { return response()->json($array, $this->statusCode, $headers); } /** * Respond the error message. * * @param string $message * @param string $errorCode * @return json */ protected function respondWithError($message, $errorCode) { if ($this->statusCode === 200) { trigger_error( "You better have a really good reason for erroring on a 200...", E_USER_WARNING ); } return $this->respondWithArray([ 'error' => [ 'code' => $errorCode, 'http_code' => $this->statusCode, 'message' => $message, ] ]); } /** * Respond the error of 'Wrong Arguments'. * * @param string $message * @return json */ public function errorWrongArgs($message = 'Wrong Arguments') { return $this->setStatusCode(400) ->respondWithError($message, self::CODE_WRONG_ARGS); } /** * Get the status code. * * @return int $statusCode */ public function getStatusCode() { return $this->statusCode; } /** * Set the status code. * * @param $statusCode * @return $this */ public function setStatusCode($statusCode) { $this->statusCode = $statusCode; return $this; } /** * Respond the error of 'Unauthorized'. * * @param string $message * @return json */ public function errorUnauthorized($message = 'Unauthorized') { return $this->setStatusCode(401) ->respondWithError($message, self::CODE_UNAUTHORIZED); } /** * Respond the item data. * * @param $item * @param $callback * @return mixed */ public function respondWithItem($item, $callback) { $resource = new Item($item, $callback); $rootScope = $this->fractal->createData($resource); return $this->respondWithArray($rootScope->toArray()); } /** * Repond a no content response. * * @return response */ public function noContent() { return response()->json(null, 204); } } ================================================ FILE: app/Http/Controllers/Api/ArticleController.php ================================================ getById($article_id)->votes()->orderBy('created_at', 'desc')->with('user')->get()->pluck('user'); return $this->respondWithArray($info->toArray()); } public function vote(ArticleRepository $articleRepository, Request $request, $article_id) { $article = $articleRepository->getById($article_id); if ($request->type == 'up') { $result = app('Codehaoshi\Vote\Voter')->articleUpVote($article); if ($result['status'] == 1) return $this->respondWithItem(Auth::user(), new UserTransformer); } else { $result = app('Codehaoshi\Vote\Voter')->articleDownVote($article); } if ($result['status'] === 1) return $this->noContent(); return $this->errorWrongArgs('出错了,请稍后再试'); } } ================================================ FILE: app/Http/Controllers/Api/CommentController.php ================================================ commentRepository = $commentRepository; $this->articleRepository = $articleRepository; } public function show(Request $request, $article_id) { $article = $this->articleRepository->getById($article_id); $replies = $article->getCommentsWithLimit(config('codehaoshi.comments_perpage', '200'), $request->order_by); return $this->respondWithCollection($replies, new CommentTransformer); } public function store(StoreReplyOrCommentRequest $request) { return app(CommentCreator::class)->create($this, $request->all()); } public function creatorSucceed($comment) { return $this->respondWithItem($comment, new CommentTransformer); } public function creatorFailed($error) { return $this->errorWrongArgs($error); } public function destroy($comment_id) { $comment = $this->commentRepository->getById($comment_id); $this->authorize('delete', $comment); $comment->delete(); $articleModel = $comment->article(); $this->articleRepository->decrementCommentCount($articleModel); $article = $this->articleRepository->getById($comment->article_id); $this->articleRepository->generateLastReplyUserInfo($article); app(UserCommentArticle::class)->remove(Auth::user(), $article); return $this->noContent(); } } ================================================ FILE: app/Http/Controllers/Api/FollowerController.php ================================================ userRepository = $userRepository; } /** * @param $id * @return \Illuminate\Http\JsonResponse */ public function index($id) { $author = $this->userRepository->getById($id); return response()->json(['followed' => Auth::user()->isFollowing($author)]); } /** * Follow or unfollow the other user. * * @param int $id * @return \Illuminate\Http\Response */ public function doFollow() { $id = request('user'); $userToFollow = $this->userRepository->getById(request('user')); $user = Auth::user(); if ($user->isFollowing($id)) { app(UserFollowedUser::class)->remove($user, $userToFollow); $user->unfollow($id); $userToFollow->decrement('follower_count'); return response()->json(['followed' => false]); } else { $user->follow($id); $userToFollow->notify(new NewUserFollowNotification()); $userToFollow->increment('follower_count'); app(UserFollowedUser::class)->generate($user, $userToFollow); } return response()->json(['followed' => true]); } } ================================================ FILE: app/Http/Controllers/Api/QuestionController.php ================================================ getById($question_id)->votes()->orderBy('created_at', 'desc')->with('user')->get()->pluck('user'); return $this->respondWithArray($info->toArray()); } public function vote(QuestionRepository $questionRepository, Request $request, $question_id) { $question = $questionRepository->getById($question_id); if ($request->type == 'up') { $result = app('Codehaoshi\Vote\Voter')->questionUpVote($question); if ($result['status'] == 1) return $this->respondWithItem(Auth::user(), new UserTransformer); } else { $result = app('Codehaoshi\Vote\Voter')->questionDownVote($question); } if ($result['status'] === 1) return $this->noContent(); return $this->errorWrongArgs('出错了,请稍后再试'); } } ================================================ FILE: app/Http/Controllers/Api/ReplyController.php ================================================ replyRepository = $replyRepository; $this->questionRepository = $questionRepository; } public function show(Request $request, $question_id) { $question = $this->questionRepository->getById($question_id); $replies = $question->getRepliesWithLimit(config('codehaoshi.comments_perpage', '200'), $request->order_by); return $this->respondWithCollection($replies, new ReplyTransformer); } public function store(StoreReplyOrCommentRequest $request) { return app(ReplyCreator::class)->create($this, $request->all()); } public function creatorSucceed($reply) { return $this->respondWithItem($reply, new ReplyTransformer); } public function creatorFailed($error) { return $this->errorWrongArgs($error); } public function destroy($reply_id) { $reply = $this->replyRepository->getById($reply_id); $this->authorize('delete', $reply); $reply->delete(); $questionModel = $reply->question(); $this->questionRepository->decrementReplyCount($questionModel); $question = $this->questionRepository->getById($reply->question_id); $this->questionRepository->generateLastReplyUserInfo($question); app(UserReplyQuestion::class)->remove(Auth::user(), $question); return $this->noContent(); } } ================================================ FILE: app/Http/Controllers/Api/UploadController.php ================================================ baseManager = new BaseManager(); } public function fileUpload(ImageUploadRequest $request) { if (!$request->hasFile('myfile')) { return ajaxReturnError('', '找不到文件'); } $img = $request->file('myfile'); $result = $this->baseManager->storeUploadImgByConfigPath($img, $request->path); $res = ['status' => 1, 'msg' => $result['relative_url']]; if ($request->path == 'avatar') { $user = (new User)->findOrFail($request->id); $user->avatar = $result['relative_url']; $user->save(); } return response()->json($res); } } ================================================ FILE: app/Http/Controllers/Api/Votecontroller.php ================================================ tagRepository = $tagRepository; $this->articleRepository = $articleRepository; $this->articleCategoryRepository = $articleCategoryRepository; $this->questionRepository = $questionRepository; } /** * Get article list by category * * @param $slug * @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View */ public function index($slug) { $category = $this->articleCategoryRepository->getInfoBySlug($slug); $articles = $this->articleRepository->getThisModel()->getArticlesWithFilter('category', 20, $category->id); $hotArticles = $this->articleRepository->getThisModel()->getArticlesWithFilter('hot', 5); $recentArticles = $this->articleRepository->getThisModel()->getArticlesWithFilter('recent', 5); $tags = $this->tagRepository->getAllTagWithCount(); return view('articles.article-list', compact('articles', 'category', 'hotArticles', 'recentArticles', 'tags')); } /** * Show article-info page * @param $slug * @param Article $articleModel * @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View */ public function show($slug, Article $articleModel) { $article = $this->articleRepository->getArticleInfoBySlug($slug); if ($article->is_draft == 'yes' || $article->only_owner_can_see == 'yes') { $this->authorize('showDraft', $article); } $article->increment('view_count'); $recentArticles = $articleModel->withoutDraft()->withoutPrivate()->where('id', '<>', $article['id'])->orderBy('created_at', 'desc')->select('id', 'title', 'slug')->paginate(6); $prevAndNext = app(ArticleSelector::class)->articleInfoWithPrevAndNext($article->id); return view('articles.show', ['info' => $article, 'recentArticles' => $recentArticles, 'prev' => $prevAndNext['prev'], 'next' => $prevAndNext['next'] ]); } /** * Get All articles * * @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View */ public function allArticles() { $articles = $this->articleRepository->getThisModel()->getArticlesWithFilter('recent', 20); return view('articles.all-articles', compact('articles')); } public function create() { $recentArticles = $this->articleRepository->getThisModel()->getArticlesWithFilter('recent', 5); $recentQuestions = $this->questionRepository->getThisModel()->getArticlesWithFilter('recent', 5); $tags = $this->tagRepository->getAllTagWithCount(); $catList = $this->articleCategoryRepository->getAllData(['id', 'name'], false); $tagList = $this->tagRepository->getAllData(['id', 'tag'], false); return view('articles.create', compact('tagList', 'catList', 'recentQuestions', 'recentArticles', 'tags')); } public function store(ArticleRequest $request) { $data = array_merge($request->all(), ['user_id' => Auth::id()]); $res =$this->articleRepository->store($data); $this->articleCategoryRepository->getById($request->category_id)->increment('article_count'); Auth::user()->increment('article_count'); $this->articleRepository->syncTag(explode(',', $request->tags)); flash('info', '文章发布成功'); return redirect()->route('article.show', ['slug' => $res->slug]); } public function edit($id) { $recentArticles = $this->articleRepository->getThisModel()->getArticlesWithFilter('recent', 5); $recentQuestions = $this->questionRepository->getThisModel()->getArticlesWithFilter('recent', 5); $tags = $this->tagRepository->getAllTagWithCount(); $catList = $this->articleCategoryRepository->getAllData(['id', 'name'], false); $tagList = $this->tagRepository->getAllData(['id', 'tag'], false); $info = $this->articleRepository->getById($id); $infoTag = implode(',', array_column($info->tags->toArray(), 'id')); return view('articles.edit',compact('info','infoTag', 'catList', 'tagList', 'tags', 'recentArticles', 'recentQuestions')); } public function update(ArticleRequest $request, $id) { $oldData = $this->articleRepository->getById($id)->category_id; if ($oldData != $request->category_id) { $this->articleCategoryRepository->getById($request->category_id)->increment('article_count'); $this->articleCategoryRepository->getById($oldData)->decrement('article_count'); } $data = $request->only('title', 'category_id', 'description', 'content', 'tags', 'is_draft'); $res = $this->articleRepository->update($id, $data); $this->articleRepository->syncTag(explode(',', $request->tags)); flash('info', '文章更新成功'); return redirect()->route('article.show', ['slug' => $res->slug]); } } ================================================ FILE: app/Http/Controllers/Auth/ForgotPasswordController.php ================================================ validateEmail($request); // We will send the password reset link to this user. Once we have attempted // to send the link, we will examine the response then see the message we // need to show to the user. Finally, we'll send out a proper response. $response = $this->broker()->sendResetLink( $request->only('email') ); return $response == Password::RESET_LINK_SENT ? $this->sendResetLinkResponse($response, $request) : $this->sendResetLinkFailedResponse($request, $response); } /** * Get the response for a successful password reset link. * * @param string $response * @return \Illuminate\Http\RedirectResponse */ protected function sendResetLinkResponse($response, $request) { return back()->with('status', trans($response))->with('old-email', $request->email);; } /** * Create a new controller instance. * * @return void */ public function __construct() { $this->middleware('guest'); } } ================================================ FILE: app/Http/Controllers/Auth/LoginController.php ================================================ middleware('guest')->except('logout'); $this->userRepository = $userRepository; } // public function username() // { // return ['user_name','email']; // } /** * Show the application's login form. * * @return \Illuminate\Http\Response */ public function showLoginForm() { return view('auth.signin'); } /** * ---------------------------------------- * GithubAuthenticatorListener Delegate * ---------------------------------------- */ public function userNotFound($driver, $registerUserData) { if ($driver == 'github') { $oauthData['image_url'] = $registerUserData->avatar; $oauthData['github_id'] = $registerUserData->user['id']; $oauthData['github_name'] = $registerUserData->user['login']; $oauthData['nickname'] = $registerUserData->nickname; $oauthData['user_name'] = $registerUserData->user['login']; $oauthData['email'] = $registerUserData->email; } elseif ($driver == 'wechat') { return '暂不支持微信登录'; } $oauthData['register_source'] = $driver; $oauthData['status'] = 1; $oauthData['password'] = ''; Session::put('oauthData', $oauthData); return app(UserCreator::class)->create($this, $oauthData); } /** * Implements UserCreatorLister * * @param [type] $errors [description] * @return [type] [description] */ public function userValidationError($errors) { return redirect('/'); } /** * Implements UserCreatorLister. * When user was created success, excute this method * * @param [type] $user [description] * @return [type] [description] */ public function userCreated($user) { $this->userRepository->save($user, ['last_actived_at' => Carbon::now()]); Auth::login($user, true); Session::forget('oauthData'); flash('info', lang('login_Successful')); return redirect('/'); } /** * User's account had been disabled * * @return \Illuminate\Http\RedirectResponse|\Illuminate\Routing\Redirector */ public function accountDisabled() { Session::forget('oauthData'); flash('error', lang('sorry,your account has been disabled.')); return redirect('/'); } /** * Log the user out of the application. * * @param \Illuminate\Http\Request $request * @return \Illuminate\Http\Response */ public function logout() { Auth::logout(); flash('info', lang('operation succeeded.')); return redirect('/'); } /** * to login user * @param [type] $user [description] * @return [type] [description] */ private function loginUser($user) { return $this->userCreated($user); } /** * Handle a login request to the application. * * @param \Illuminate\Http\Request $request * @return \Illuminate\Http\RedirectResponse|\Illuminate\Http\Response */ public function login(Request $request) { $this->validateLogin($request); // If the class is using the ThrottlesLogins trait, we can automatically throttle // the login attempts for this application. We'll key this by the username and // the IP address of the client making these requests into this application. if ($this->hasTooManyLoginAttempts($request)) { $this->fireLockoutEvent($request); return $this->sendLockoutResponse($request); } if ($this->attemptLogin($request)) { flash('info', '登录成功'); $this->userRepository->save(Auth::user(), ['last_actived_at' => Carbon::now()]); return $this->sendLoginResponse($request); } // If the login attempt was unsuccessful we will increment the number of attempts // to login and redirect the user back to the login form. Of course, when this // user surpasses their maximum number of attempts they will get locked out. $this->incrementLoginAttempts($request); return $this->sendFailedLoginResponse($request); } } ================================================ FILE: app/Http/Controllers/Auth/RegisterController.php ================================================ middleware('guest'); } /** * Show the application's login form. * * @return \Illuminate\Http\Response */ public function showRegistrationForm() { return view('auth.signup'); } /** * Get a validator for an incoming registration request. * * @param array $data * @return \Illuminate\Contracts\Validation\Validator */ protected function validator(array $data) { return Validator::make($data, [ 'user_name' => 'alpha_num|required|unique:users', 'email' => 'email|required|unique:users', 'password' => 'required|confirmed|min:6', ]); } /** * Create a new user instance after a valid registration. * * @param array $data * @return User */ protected function create(array $data) { return User::create([ 'user_name' => $data['user_name'], 'email' => $data['email'], 'password' => bcrypt($data['password']), 'avatar' => '/assets/dashboard/images/head_default.gif', 'register_source' => 'front-register', 'status' => 1, 'is_admin' => 'no', ]); } /** * Handle a registration request for the application. * * @param \Illuminate\Http\Request $request * @return \Illuminate\Http\Response */ public function register(Request $request) { $data = $request->all(); $this->validator($data)->validate(); $this->guard()->login($this->create($data)); flash('info', '注册成功,欢迎加入'); return redirect()->to($this->redirectTo); } } ================================================ FILE: app/Http/Controllers/Auth/ResetPasswordController.php ================================================ middleware('guest'); } } ================================================ FILE: app/Http/Controllers/Auth/Traits/SocialiteHelper.php ================================================ 'github', 'wechat' => 'weixin']; /** * Redirect the user to the GitHub authentication page. * * @return Response */ public function redirectToGithubProvider(Request $request) { $driver = 'github'; if (Auth::check() && Auth::user()->register_source == $driver) { return redirect('/'); } return Socialite::driver($driver)->redirect(); } /** * Obtain the user information from GitHub. * * @return Response */ public function handleGithubProviderCallback(Request $request) { $driver = 'github'; if ( (Auth::check() && Auth::user()->register_source == $driver) // If is github register user signined. ) { return redirect()->intended('/'); } $oauthUser = Socialite::driver($driver)->user(); $user = $this->userRepository->getFirstRecordByWhere([$driver . '_id' => $oauthUser->id]);// Select database is existence the user. if (Auth::check()) { // TODO if ($user && $user->id != Auth::id()) { flash('error', 'Sorry, this socialite account has been registed.', ['driver' => $driver]); } else { return '绑定账号功能待完善'; } } else { if ($user) { if ($user->status < 1) return $this->accountDisabled(); return $this->loginUser($user); } return $this->userNotFound($driver, $oauthUser); } } } ================================================ FILE: app/Http/Controllers/CommentsController.php ================================================ middleware('auth'); $this->articleRepository = $articleRepository; } public function store(StoreReplyOrCommentRequest $request) { return app(CommentCreator::class)->create($this, $request->except('_token')); } public function creatorSucceed($article) { flash('info', lang('Operation succeed.')); $articleSlug = $this->articleRepository->getById($article->article_id)->slug; return redirect()->route('article.show', ['slug' => $articleSlug]); } public function creatorFailed($error) { flash('error', '发布失败:' . $error); return redirect('/'); } } ================================================ FILE: app/Http/Controllers/Controller.php ================================================ about = $about; } public function abouts() { $list = $this->about->getAllData('*', false); return view('dashboard.abouts.about-list', ['lists' => $list]); } public function create() { return view('dashboard.abouts.create'); } public function store(Request $request) { $data = $request->all(); $this->about->store($data); return ajaxReturn(dashboardUrl('/abouts')); } public function edit($id) { return view('dashboard.abouts.edit', ['info' => $this->about->getById($id)]); } public function update(Request $request, $id) { $data = $request->all(); $this->about->update($id, $data); return ajaxReturn(dashboardUrl('/abouts')); } public function destroy($id) { $this->about->destroy($id); return ajaxReturn(redirect()->back()); } } ================================================ FILE: app/Http/Controllers/Dashboard/ArticleCategoryController.php ================================================ articleCategoryRepository = $articleCategoryRepository; $this->baseManager = $baseManager; } public function articleCategories() { $list = $this->articleCategoryRepository->getAllData('*', false); return view('dashboard.article-categories.category-list', ['lists' => $list]); } public function create() { return view('dashboard.article-categories.create'); } public function store(StoreArticleCategoryRequest $request) { $data = array_merge($request->all(), [ 'image_url' => $this->baseManager->moveFileTorealPath($request->image_url), 'weight' => $request->weight ?: 50 ]); $this->articleCategoryRepository->store($data); return ajaxReturn(dashboardUrl('/articleCategory')); } public function edit($id) { return view('dashboard.article-categories.edit', ['info' => $this->articleCategoryRepository->getById($id)]); } public function update(UpdateArticleCategoryRequest $request, $id) { $data = array_merge($request->all(), [ 'image_url' => $this->baseManager->moveFileTorealPath($request->image_url), 'weight' => $request->weight ?: 50 ]); $this->articleCategoryRepository->update($id, $data); return ajaxReturn(dashboardUrl('/articleCategory')); } public function destroy($id) { $permissions = $this->articleCategoryRepository->getById($id)->articles()->count(); if ($permissions > 0) return ajaxReturnError('', 0, '有文章正在使用该分类,不允许删除'); $this->articleCategoryRepository->destroy($id); return ajaxReturn(redirect()->back()); } } ================================================ FILE: app/Http/Controllers/Dashboard/ArticlesController.php ================================================ articleRepository = $articleRepository; $this->articleCategoryRepository = $articleCategoryRepository; $this->tagRepository = $tagRepository; } public function articles() { $category_list = $this->articleCategoryRepository->getAllData('*', false); return view('dashboard.articles.article-list', compact('category_list')); } /** * Article List ajax page date * * @param Request $request * @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View */ public function ajaxArticles(Request $request) { $order = $request->order?: 'weight'; $sort = $request->sort?: 'asc'; $keywords = $request->keywords; $is_hot = $request->is_hot; $only_owner_can_see = $request->only_owner_can_see; $is_excellent = $request->is_excellent; $is_draft = $request->is_draft; $category_id = $request->cat_id; $where = []; if ($request->keywords) { $where[] = ['title', 'like', "%$keywords%"]; } if($is_hot) $where[] = ['is_hot' , '=', $is_hot]; if($only_owner_can_see) $where[] = ['only_owner_can_see' , '=', $only_owner_can_see]; if($is_excellent) $where[] = ['is_excellent' , '=', $is_excellent]; if($is_draft) $where[] = ['is_draft' , '=', $is_draft]; if($category_id) $where[] = ['category_id' , '=', $category_id]; $lists = $this->articleRepository->page($where, Config::get('dashboard.pagesize'), $order, $sort); return view('dashboard.articles.ajax-article-list', compact('lists', 'order', 'sort')); } public function create() { $catList = $this->articleCategoryRepository->getAllData(['id', 'name'], false); $tagList = $this->tagRepository->getAllData(['id', 'tag'], false); return view('dashboard.articles.create', ['catList' => $catList, 'tagList' => $tagList]); } public function store(ArticleRequest $request) { $data = $this->handleArticleDate($request->all()); $this->articleRepository->store($data); $this->articleCategoryRepository->getById($request->category_id)->increment('article_count'); Auth::user()->increment('article_count'); $this->articleRepository->syncTag(explode(',', $request->tags)); return ajaxReturn(dashboardUrl('/article')); } public function edit($id) { $catList = $this->articleCategoryRepository->getAllData(['id', 'name'], false); $tagList = $this->tagRepository->getAllData(['id', 'tag'], false); $model = $this->articleRepository->getById($id); $attribute = $this->handleArticleDateToStr($model); return view('dashboard.articles.edit', ['info' => $model, 'catList' => $catList, 'tagList' => $tagList, 'tags' => array_column($model->tags->toArray(), 'id'), 'attribute' => $attribute ]); } public function update(ArticleRequest $request, $id) { $oldData = $this->articleRepository->getById($id)->category_id; if ($oldData != $request->category_id) { $this->articleCategoryRepository->getById($request->category_id)->increment('article_count'); $this->articleCategoryRepository->getById($oldData)->decrement('article_count'); } $data = $this->handleArticleDate($request->all()); unset($data['user_id']); $this->articleRepository->update($id, $data); $this->articleRepository->syncTag(explode(',', $request->tags)); return ajaxReturn(dashboardUrl('/article')); } public function destroy($id) { $info = $this->articleRepository->getById($id); $this->articleCategoryRepository->getById($info->category_id)->decrement('article_count'); Auth::user()->decrement('article_count'); $info->tags()->sync([]); $this->articleRepository->destroy($id); return ajaxReturn(dashboardUrl('/article')); } } ================================================ FILE: app/Http/Controllers/Dashboard/IndexController.php ================================================ user = new User(); $this->role = new Role(); // $this->permission = new Permission(); } public function index() { // dd(Config::get('dashboardMenu.leftMenu')); return view('dashboard.index.index', ['menu_list' => Config::get('dashboardMenu.leftMenu')]); } public function welcome() { return view('dashboard.index.welcome'); } /*修改某个表的一个字段值公共方法*/ public function commonStatusHandle(Request $request) { $data = $request->all(); $id = $data['id']; $table = $data['table']; $column = $data['column']; $value = $data['value']; $rs = DB::table($table)->where(['id' => $id])->update([$column => $value]); if ($rs) return ajaxReturn(); return ajaxReturnError(); } public function test($model) { $res = $this->$model->saveFunction(); dd($res); } } ================================================ FILE: app/Http/Controllers/Dashboard/LinksController.php ================================================ link = $link; } public function links() { $list = $this->link->getAllData('*', false); return view('dashboard.links.link-list', ['lists' => $list]); } public function create() { return view('dashboard.links.create'); } public function store(Request $request) { $data = $request->all(); $this->link->store($data); return ajaxReturn(dashboardUrl('/links')); } public function edit($id) { return view('dashboard.links.edit', ['info' => $this->link->getById($id)]); } public function update(Request $request, $id) { $data = $request->all(); $this->link->update($id, $data); return ajaxReturn(dashboardUrl('/links')); } public function destroy($id) { $this->link->destroy($id); return ajaxReturn(redirect()->back()); } } ================================================ FILE: app/Http/Controllers/Dashboard/PermissionsController.php ================================================ permissionRepository = $permissionRepository; } public function roles() { return view('dashboard.permissions.permission-list'); } public function ajaxPermissions(Request $request) { $keywords = $request->keywords; $where = []; if ($request->keywords) { $where[] = ['name', 'like', "%$keywords%"]; } $list = $this->permissionRepository->page($where, Config::get('dashboard.pagesize'), 'created_at', 'desc'); return view('dashboard.permissions.ajax-permission-list', ['lists' => $list]); } public function create() { return view('dashboard.permissions.create'); } public function store(StorePermissionRequest $request) { $this->permissionRepository->store($request->all()); return ajaxReturn(dashboardUrl('/permission')); } public function edit($id) { return view('dashboard.permissions.edit', ['info' => $this->permissionRepository->getById($id)]); } public function update(UpdatePermissionRequest $request, $id) { $this->permissionRepository->update($id, $request->all()); return ajaxReturn(dashboardUrl('/permission')); } public function destroy($id) { $permissions = $this->permissionRepository->getById($id)->roles()->count(); if ($permissions > 0) return ajaxReturnError('', 0, '有角色正在使用该权限,不允许删除'); $this->permissionRepository->destroy($id); return ajaxReturn(redirect()->back()); } } ================================================ FILE: app/Http/Controllers/Dashboard/QuestionCategoryController.php ================================================ questionCategoryRepository = $questionCategoryRepository; $this->baseManager = $baseManager; } public function questionCategories() { $list = $this->questionCategoryRepository->getAllData('*', false); return view('dashboard.question-categories.category-list', ['lists' => $list]); } public function create() { return view('dashboard.question-categories.create'); } public function store(StoreQuestionCategoryRequest $request) { $data = array_merge($request->all(), [ 'image_url' => $this->baseManager->moveFileTorealPath($request->image_url,'question'), 'weight' => $request->weight ?: 50 ]); $this->questionCategoryRepository->store($data); return ajaxReturn(dashboardUrl('/questionCategory')); } public function edit($id) { return view('dashboard.question-categories.edit', ['info' => $this->questionCategoryRepository->getById($id)]); } public function update(UpdateQuestionCategoryRequest $request, $id) { $data = array_merge($request->all(), [ 'image_url' => $this->baseManager->moveFileTorealPath($request->image_url, 'question'), 'weight' => $request->weight ?: 50 ]); $this->questionCategoryRepository->update($id, $data); return ajaxReturn(dashboardUrl('/questionCategory')); } public function destroy($id) { $permissions = $this->questionCategoryRepository->getById($id)->questions()->count(); if ($permissions > 0) return ajaxReturnError('', 0, '有问题正在使用该分类,不允许删除'); $this->questionCategoryRepository->destroy($id); return ajaxReturn(redirect()->back()); } } ================================================ FILE: app/Http/Controllers/Dashboard/QuestionsController.php ================================================ questionRepository = $questionRepository; $this->questionCategoryRepository = $questionCategoryRepository; $this->tagRepository = $tagRepository; } public function questions() { $category_list = $this->questionCategoryRepository->getAllData('*', false); return view('dashboard.questions.question-list', compact('category_list')); } /** * Article List ajax page date * * @param Request $request * @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View */ public function ajaxQuestions(Request $request) { $order = $request->order?: 'weight'; $sort = $request->sort?: 'asc'; $keywords = $request->keywords; $is_hot = $request->is_hot; $only_owner_can_see = $request->only_owner_can_see; $is_excellent = $request->is_excellent; $is_draft = $request->is_draft; $category_id = $request->cat_id; $where = []; if ($request->keywords) { $where[] = ['title', 'like', "%$keywords%"]; } if($is_hot) $where[] = ['is_hot' , '=', $is_hot]; if($only_owner_can_see) $where[] = ['only_owner_can_see' , '=', $only_owner_can_see]; if($is_excellent) $where[] = ['is_excellent' , '=', $is_excellent]; if($is_draft) $where[] = ['is_draft' , '=', $is_draft]; if($category_id) $where[] = ['category_id' , '=', $category_id]; $lists = $this->questionRepository->page($where, Config::get('dashboard.pagesize'), $order, $sort); return view('dashboard.questions.ajax-question-list', compact('lists', 'order', 'sort')); } public function create() { $catList = $this->questionCategoryRepository->getAllData(['id', 'name'], false); $tagList = $this->tagRepository->getAllData(['id', 'tag'], false); return view('dashboard.questions.create', ['catList' => $catList, 'tagList' => $tagList]); } public function store(QuestionRequest $request) { $data = $this->handleArticleDate($request->all()); $this->questionRepository->store($data); $this->questionCategoryRepository->getById($request->category_id)->increment('question_count'); Auth::user()->increment('question_count'); $this->questionRepository->syncTag(explode(',', $request->tags)); return ajaxReturn(dashboardUrl('/question')); } public function edit($id) { $catList = $this->questionCategoryRepository->getAllData(['id', 'name'], false); $tagList = $this->tagRepository->getAllData(['id', 'tag'], false); $model = $this->questionRepository->getById($id); $attribute = $this->handleArticleDateToStr($model); return view('dashboard.questions.edit', ['info' => $model, 'catList' => $catList, 'tagList' => $tagList, 'tags' => array_column($model->tags->toArray(), 'id'), 'attribute' => $attribute ]); } public function update(QuestionRequest $request, $id) { $oldData = $this->questionRepository->getById($id)->category_id; if ($oldData != $request->category_id) { $this->questionCategoryRepository->getById($request->category_id)->increment('question_count'); $this->questionCategoryRepository->getById($oldData)->decrement('question_count'); } $data = $this->handleArticleDate($request->all()); unset($data['user_id']); $this->questionRepository->update($id, $data); $this->questionRepository->syncTag(explode(',', $request->tags)); return ajaxReturn(dashboardUrl('/question')); } public function destroy($id) { $info = $this->questionRepository->getById($id); $this->questionCategoryRepository->getById($info->category_id)->decrement('question_count'); Auth::user()->decrement('question_count'); $info->tags()->sync([]); $this->questionRepository->destroy($id); return ajaxReturn(dashboardUrl('/question')); } } ================================================ FILE: app/Http/Controllers/Dashboard/RolesController.php ================================================ roleRepository = $roleRepository; $this->permissionRepository = $permissionRepository; } public function roles() { return view('dashboard.roles.role-list'); } public function ajaxRoles(Request $request) { $keywords = $request->keywords; $where = []; if ($request->keywords) { $where[] = ['name', 'like', "%$keywords%"]; } $list = $this->roleRepository->page($where, Config::get('dashboard.pagesize'), 'created_at', 'desc'); return view('dashboard.roles.ajax-role-list', ['lists' => $list]); } public function create() { return view('dashboard.roles.create'); } public function store(StoreRoleRequest $request) { $this->roleRepository->store($request->all()); return ajaxReturn(dashboardUrl('/role')); } public function edit($id) { return view('dashboard.roles.edit', ['info' => $this->roleRepository->getById($id)]); } public function update(UpdateRoleRequest $request, $id) { $this->roleRepository->update($id, $request->all()); return ajaxReturn(dashboardUrl('/role')); } public function giveRolePermissions(Request $request) { $permissions = $this->roleRepository->getById($request->id)->cachedPermissions(); return response()->json( ajaxReturn('', 1, '成功', roleOrPermissionDataHandle(array_column($permissions->toArray(), 'id'), $this->permissionRepository->getAllData(['id', 'name', 'display_name']) ))); } public function giveRolePermissionsStore(Request $request) { $ids = []; if ($request->data) { $ids = explode(',', $request->data); } $this->roleRepository->syncPermission($ids, $request->id); return ajaxReturn(redirect()->back()); } public function destroy($id) { $permissions = $this->roleRepository->getById($id)->users()->count(); if ($permissions > 0) return ajaxReturnError('', 0, '有用户正在使用该角色,不允许删除'); $this->roleRepository->syncPermission([], $id); $this->roleRepository->destroy($id); return ajaxReturn(redirect()->back()); } } ================================================ FILE: app/Http/Controllers/Dashboard/TagsController.php ================================================ tagRepository = $tagRepository; } public function tags() { $list = $this->tagRepository->getAllData('*', false); return view('dashboard.tags.tag-list', ['lists' => $list]); } public function create() { return view('dashboard.tags.create'); } public function store(StoreTagRequest $request) { $this->tagRepository->store($request->all()); return ajaxReturn(dashboardUrl('/tag')); } public function edit($id) { return view('dashboard.tags.edit', ['info' => $this->tagRepository->getById($id)]); } public function update(UpdateTagRequest $request, $id) { $this->tagRepository->update($id, $request->all()); return ajaxReturn(dashboardUrl('/tag')); } public function destroy($id) { $tagArticle = $this->tagRepository->getById($id)->articles()->count(); if ($tagArticle > 0) return ajaxReturnError('', 0, '该标签下有文章,不允许删除'); // if ($tagArticle > 0) return ajaxReturnError('', 0, '该标签下有问题,不允许删除'); // TODO $this->tagRepository->destroy($id); return ajaxReturn(dashboardUrl('/tag')); } } ================================================ FILE: app/Http/Controllers/Dashboard/Traits/ArticleHelper.php ================================================ is_excellent == 'yes') $attribute[] = '1'; if ($model->is_hot == 'yes') $attribute[] = '2'; if ($model->only_owner_can_see == 'yes') $attribute[] = '3'; if ($model->is_draft == 'yes') $attribute[] = '4'; if (count($attribute) > 0) { return implode(',', $attribute); } else { return ''; } } } ================================================ FILE: app/Http/Controllers/Dashboard/UsersController.php ================================================ userRepository = $userRepository; $this->roleRepository = $roleRepository; } public function users() { return view('dashboard.users.user-list'); } public function ajaxUsers(Request $request) { $keywords = $request->keywords; $where = []; if ($request->keywords) { $where['k'][] = ['user_name', 'like', "%$keywords%"]; $where['k2'][] = ['email', 'like', "%$keywords%"]; } $list = $this->userRepository->page($where, Config::get('dashboard.pagesize')); return view('dashboard.users.ajax-user-list', ['lists' => $list]); } public function create() { return view('dashboard.users.create'); } public function store(StoreUserRequest $request) { $data = array_merge($request->all(), [ 'avatar' => '/assets/dashboard/images/head_default.gif', 'register_source' => 'admin', 'password' => bcrypt($request->password), 'status' => 1 ]); $this->userRepository->store($data); return ajaxReturn(dashboardUrl('/user')); } public function edit($id) { return view('dashboard.users.edit', ['info' => $this->userRepository->getById($id)]); } public function update(UpdateUserRequest $request, $id) { $data = $request->all(); if ($request->password) { $data = array_merge($data, [ 'password' => bcrypt($request->password) ]); } else { unset($data['password']); } $this->userRepository->update($id, $data); return ajaxReturn(dashboardUrl('/user')); } public function destroy($id) { if (Auth::user()->id == $id) { return ajaxReturnError('', 0, '您不能删除您自己'); } $user = $this->userRepository->getById($id); $article = $user->articles()->count(); $question = $user->questions()->count(); if( $article > 0 || $question > 0) return ajaxReturnError('', 0, '用户发表过文章或问题,不允许删除'); $this->userRepository->syncRole([], $id); $this->userRepository->destroy($id); return ajaxReturn(redirect()->back()); } public function giveUserRoles(Request $request) { $roles = $this->userRepository->getById($request->id)->cachedRoles(); return response()->json( ajaxReturn('', 1, '成功', roleOrPermissionDataHandle(array_column($roles->toArray(), 'id'), $this->roleRepository->getAllData(['id', 'name', 'display_name']) ))); } public function giveUserRolesStore(Request $request) { $ids = []; if ($request->data) { $ids = explode(',', $request->data); } $this->userRepository->syncRole($ids, $request->id); return ajaxReturn(redirect()->back()); } } ================================================ FILE: app/Http/Controllers/HomeController.php ================================================ middleware('auth'); } /** * Show the application dashboard. * * @return \Illuminate\Http\Response */ public function index() { return view('home'); } } ================================================ FILE: app/Http/Controllers/NotificationsController.php ================================================ route('notifications.index'); } public function index() { $user = Auth::user(); $user->unreadNotifications->markAsRead(); $notifications = $user->notifications; return view('messages.notifications', compact('notifications')); } public function messages() { return view('messages.message'); } } ================================================ FILE: app/Http/Controllers/PagesController.php ================================================ getArticlesWithFilter('excellent', 10); $tenExcellentQuestions = $question->getArticlesWithFilter('excellent', 10); return view('pages.home', compact('tenExcellentArticles', 'tenExcellentQuestions')); } public function search(Request $request) { $query = $request->q; $article_search = Article::search($query, null, true)->withoutDraft()->WithoutPrivate()->recent()->weightAsc()->paginate(20); $question_search = Question::search($query, null, true)->withoutDraft()->WithoutPrivate()->recent()->weightAsc()->paginate(20); return view('pages.search', compact('article_search', 'question_search', 'query')); } public function about(ArticleRepository $articleRepository, QuestionRepository $questionRepository, TagRepository $tagRepository) { $info = About::where('is_enabled', 'yes')->first() ; $recentArticles = $articleRepository->getThisModel()->withoutDraft()->withoutPrivate()->orderBy('created_at', 'desc')->select('id', 'title', 'slug')->paginate(6); $recentQuestions = $questionRepository->getThisModel()->withoutDraft()->withoutPrivate()->orderBy('created_at', 'desc')->select('id', 'title', 'slug')->paginate(6); $tags = $tagRepository->getAllTagWithCount(); return view('pages.about', compact('info', 'recentArticles', 'recentQuestions', 'tags')); } } ================================================ FILE: app/Http/Controllers/QuestionsController.php ================================================ questionCategoryRepository = $questionCategoryRepository; $this->questionRepository = $questionRepository; $this->tagRepository = $tagRepository; $this->articleRepository = $articleRepository; } /** * Show article-info page * @param $slug * @param Article $articleModel * @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View */ public function show($slug, Question $questionModel) { $question = $this->questionRepository->getQuestionInfoBySlug($slug); //sdfsadf if ($question->is_draft == 'yes' || $question->only_owner_can_see == 'yes') { $this->authorize('showDraft', $question); } $question->increment('view_count'); $recentQuestions = $questionModel->withoutDraft()->withoutPrivate()->where('id', '<>', $question['id'])->orderBy('created_at', 'desc')->select('id', 'title', 'slug')->paginate(6); $prevAndNext = app(QuestionSelector::class)->questionInfoWithPrevAndNext($question->id); return view('questions.show', ['info' => $question, 'recentQuestions' => $recentQuestions, 'prev' => $prevAndNext['prev'], 'next' => $prevAndNext['next'] ]); } /** * Get article list by category * * @param $slug * @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View */ public function index($slug) { $category = $this->questionCategoryRepository->getInfoBySlug($slug); $questions = $this->questionRepository->getThisModel()->getArticlesWithFilter('category', 20, $category->id); $hotQuestions = $this->questionRepository->getThisModel()->getArticlesWithFilter('hot', 5); $recentQuestions = $this->questionRepository->getThisModel()->getArticlesWithFilter('recent', 5); $tags = $this->tagRepository->getAllTagWithCount(); return view('questions.question-list', compact('questions', 'category', 'hotQuestions', 'recentQuestions', 'tags')); } /** * Get All articles * * @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View */ public function allQuestions() { $questions = $this->questionRepository->getThisModel()->getArticlesWithFilter('recent', 20); return view('questions.all-questions', compact('questions')); } public function create() { $recentArticles = $this->articleRepository->getThisModel()->getArticlesWithFilter('recent', 5); $recentQuestions = $this->questionRepository->getThisModel()->getArticlesWithFilter('recent', 5); $tags = $this->tagRepository->getAllTagWithCount(); $catList = $this->questionCategoryRepository->getAllData(['id', 'name'], false); $tagList = $this->tagRepository->getAllData(['id', 'tag'], false); return view('questions.create', compact('tagList', 'catList', 'recentQuestions', 'recentArticles', 'tags')); } public function store(QuestionRequest $request) { $data = array_merge($request->all(), ['user_id' => Auth::id()]); $res =$this->questionRepository->store($data); $this->questionCategoryRepository->getById($request->category_id)->increment('question_count'); Auth::user()->increment('question_count'); $this->questionRepository->syncTag(explode(',', $request->tags)); flash('info', '问题发布成功'); return redirect()->route('question.show', ['slug' => $res->slug]); } public function uploadImage(ImageUploadRequest $request) { if ($file = $request->file('file')) { try { $upload_status = app(BaseManager::class)->storeUploadImgByConfigPath($file, 'front_images'); } catch (\Exception $exception) { return ['error' => $exception->getMessage()]; } $data['filename'] = $upload_status['url']; } else { $data['error'] = 'Error while uploading file'; } return $data; } public function edit($id) { $recentArticles = $this->articleRepository->getThisModel()->getArticlesWithFilter('recent', 5); $recentQuestions = $this->questionRepository->getThisModel()->getArticlesWithFilter('recent', 5); $tags = $this->tagRepository->getAllTagWithCount(); $catList = $this->questionCategoryRepository->getAllData(['id', 'name'], false); $tagList = $this->tagRepository->getAllData(['id', 'tag'], false); $info = $this->questionRepository->getById($id); $infoTag = implode(',', array_column($info->tags->toArray(), 'id')); return view('questions.edit',compact('info','infoTag', 'catList', 'tagList', 'tags', 'recentArticles', 'recentQuestions')); } public function update(QuestionRequest $request, $id) { $oldData = $this->questionRepository->getById($id)->category_id; if ($oldData != $request->category_id) { $this->questionCategoryRepository->getById($request->category_id)->increment('question_count'); $this->questionCategoryRepository->getById($oldData)->decrement('question_count'); } $data = $request->only('title', 'category_id', 'description', 'content', 'tags', 'is_draft', 'slug'); $res = $this->questionRepository->update($id, $data); $this->questionRepository->syncTag(explode(',', $request->tags)); flash('info', '问题更新成功'); return redirect()->route('question.show', ['slug' => $res->slug]); } } ================================================ FILE: app/Http/Controllers/TagController.php ================================================ tagRepository = $tagRepository; $this->articleRepository = $articleRepository; } public function show($slug, $type = null) { $tag = $this->tagRepository->getTagInfoBySlug($slug); if (!$tag) abort(404); $articles = $tag->articles->take(15); $questions = $tag->questions->take(15); if($type) return view('tags.show-question', compact('articles', 'tag', 'questions')); return view('tags.show-article', compact('articles', 'tag' ,'questions')); } } ================================================ FILE: app/Http/Controllers/UserController.php ================================================ userRepository = $userRepository; } /** * To check is current user has the permission to edit the infomation * * @param $id * @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View */ public function edit($id) { $user = $this->userRepository->getById($id); $this->authorize('update', $user); // Use UserPolicy's update function return view('users.edit', ['info' => $user]); } /** * @param $id * @param UpdateUserRequest $request * @return \Illuminate\Http\RedirectResponse */ public function update($id, Request $request) { $user = $this->userRepository->getById($id); $this->authorize('update', $user); try { $this->userRepository->save($user, $request->except(['user_name', 'email', '_token', ''])); flash('info', '操作成功'); } catch (\Exception $e) { flash('error', $e); } return redirect()->back(); } /** * @param $id * @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View */ public function editPassword($id) { $user = $this->userRepository->getById($id); $this->authorize('update', $user); return view('users.edit-password', ['info' => $user]); } /** * @param $id * @param ResetPasswordRequest $request * @return \Illuminate\Http\RedirectResponse */ public function updatePassword($id, ResetPasswordRequest $request) { $user = $this->userRepository->getById($id); $this->authorize('update', $user); $this->userRepository->changePassword($user, $request->password); flash('info', '密码修改成功!'); return redirect()->back(); } public function editEmail($id) { return view('users.edit-email'); } } ================================================ FILE: app/Http/Kernel.php ================================================ [ \App\Http\Middleware\EncryptCookies::class, \Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class, \Illuminate\Session\Middleware\StartSession::class, // \Illuminate\Session\Middleware\AuthenticateSession::class, \Illuminate\View\Middleware\ShareErrorsFromSession::class, \App\Http\Middleware\VerifyCsrfToken::class, \Illuminate\Routing\Middleware\SubstituteBindings::class, // Self Add Webs \Laravel\Passport\Http\Middleware\CreateFreshApiToken::class, ], 'api' => [ 'throttle:60,1', 'bindings', ], ]; /** * The application's route middleware. * * These middleware may be assigned to groups or used individually. * * @var array */ protected $routeMiddleware = [ 'auth' => \Illuminate\Auth\Middleware\Authenticate::class, 'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class, 'bindings' => \Illuminate\Routing\Middleware\SubstituteBindings::class, 'can' => \Illuminate\Auth\Middleware\Authorize::class, 'guest' => \App\Http\Middleware\RedirectIfAuthenticated::class, 'throttle' => \Illuminate\Routing\Middleware\ThrottleRequests::class, // Self Add RouteMiddleware 'role' => \Ucer\Entrust\Middlewares\EntrustRole::class, 'permission' => \Ucer\Entrust\Middlewares\EntrustPermission::class, 'ability' => \Ucer\Entrust\Middlewares\EntrustAbility::class, 'admin' => \App\Http\Middleware\MustBeAdmin::class ]; } ================================================ FILE: app/Http/Middleware/EncryptCookies.php ================================================ is_admin != 'yes')) { abort(403); } return $next($request); } } ================================================ FILE: app/Http/Middleware/RedirectIfAuthenticated.php ================================================ check()) { return redirect('/'); } return $next($request); } } ================================================ FILE: app/Http/Middleware/TrimStrings.php ================================================ 'required|min:3', 'category_id' => 'required', 'description' => 'required', 'content' => 'required', ]; } } ================================================ FILE: app/Http/Requests/ImageUploadRequest.php ================================================ 'image|mimes:jpeg,jpg,png,gif', 'file' => 'image|mimes:jpeg,jpg,png,gif', 'myfile' => 'image|mimes:jpeg,jpg,png,gif', ]; } } ================================================ FILE: app/Http/Requests/QuestionRequest.php ================================================ 'required|min:3', 'category_id' => 'required', 'description' => 'required', 'content' => 'required', ]; } } ================================================ FILE: app/Http/Requests/ResetPasswordRequest.php ================================================ 'required|confirmed|min:6', ]; } } ================================================ FILE: app/Http/Requests/StoreArticleCategoryRequest.php ================================================ 'required', 'slug' => 'required|unique:article_categories', 'image_url' => 'required', 'description' => 'required', ]; } } ================================================ FILE: app/Http/Requests/StorePermissionRequest.php ================================================ 'required|unique:permissions', 'description' => 'required', ]; } } ================================================ FILE: app/Http/Requests/StoreQuestionCategoryRequest.php ================================================ 'required', 'slug' => 'required|unique:question_categories', 'image_url' => 'required', 'description' => 'required', ]; } } ================================================ FILE: app/Http/Requests/StoreReplyOrCommentRequest.php ================================================ 'required|min:2', ]; } } ================================================ FILE: app/Http/Requests/StoreRoleRequest.php ================================================ 'required|unique:roles', 'description' => 'required', ]; } } ================================================ FILE: app/Http/Requests/StoreTagRequest.php ================================================ 'required', 'slug' => 'required|unique:tags', 'description' => 'required', ]; } } ================================================ FILE: app/Http/Requests/StoreUserRequest.php ================================================ 'alpha_num|required|unique:users', 'email' => 'email|required|unique:users', 'password' => 'required|confirmed|min:6', ]; } } ================================================ FILE: app/Http/Requests/UpdateArticleCategoryRequest.php ================================================ route('id'); return [ 'name' => 'required', 'slug' => 'required', Rule::unique('article_categories')->ignore($id), 'image_url' => 'required', 'description' => 'required', ]; } } ================================================ FILE: app/Http/Requests/UpdatePermissionRequest.php ================================================ route('id'); return [ 'name' => 'required', Rule::unique('permissions')->ignore($id), 'description' => 'required', ]; } } ================================================ FILE: app/Http/Requests/UpdateQuestionCategoryRequest.php ================================================ route('id'); return [ 'name' => 'required', 'slug' => 'required', Rule::unique('question_categories')->ignore($id), 'image_url' => 'required', 'description' => 'required', ]; } } ================================================ FILE: app/Http/Requests/UpdateRoleRequest.php ================================================ route('id'); return [ 'name' => 'required', Rule::unique('roles')->ignore($id), 'description' => 'required', ]; } } ================================================ FILE: app/Http/Requests/UpdateTagRequest.php ================================================ route('id'); return [ 'tag' => 'required', 'slug' => 'required', Rule::unique('tags')->ignore($id), 'description' => 'required', ]; } } ================================================ FILE: app/Http/Requests/UpdateUserRequest.php ================================================ route('id'); return [ 'user_name' => 'alpha_num|required', Rule::unique('users')->ignore($id), 'email' => 'email|required', Rule::unique('users')->ignore($id), ]; } } ================================================ FILE: app/Models/About.php ================================================ $value, 'html' => (new Markdowner)->convertMarkdownToHtml($value) ]; $this->attributes['content'] = json_encode($data); } } ================================================ FILE: app/Models/Activity.php ================================================ belongsTo(User::class); } public function scopeRecent($query) { return $query->orderBy('id', 'desc'); } public function getDataAttribute($value) { return unserialize($value); } } ================================================ FILE: app/Models/Article.php ================================================ [ 'articles.slug' => 5, 'articles.title' => 5, 'articles.content' => 5, 'articles.description' =>5, ], ]; /** * @return mixed */ public function category() { return $this->belongsTo(ArticleCategory::class); } public function user() { return $this->belongsTo(User::class); } /** * Get the category for the blog article. * * @return \Illuminate\Database\Eloquent\Relations\BelongsTo */ public function tags() { return $this->morphToMany(Tag::class, 'taggable'); } /** * Set the title and the readable slug. * * @param $value */ public function setTitleAttribute($value) { $this->attributes['title'] = $value; if (!config('services.youdao.appKey') || !config('services.youdao.appSecret')) { $this->setUniqueSlug($value, str_random(7)); } else { $this->setUniqueSlug(translug($value), ''); } } /** * Set the unique slug. * * @param $value * @param $extra */ public function setUniqueSlug($value, $extra) { $slug = str_slug($value . '-' . $extra); if (static::whereSlug($slug)->exists()) { $this->setUniqueSlug($slug, (int)$extra + 1); return; } $this->attributes['slug'] = $slug; } /** * @param $value */ public function setContentAttribute($value) { $data = [ 'raw' => $value, 'html' => (new Markdowner)->convertMarkdownToHtml($value) ]; $this->attributes['content'] = json_encode($data); } public function getCommentsWithLimit($limit = 30, $order = 'created_at') { $pageName = 'page'; // Default display the latest reply $latest_page = is_null(request($pageName)) ? ceil($this->comment_count / $limit) : 1; $query = $this->comments()->with('user'); $query = ($order == 'vote_count') ? $query->orderBy('vote_count', 'desc') : $query->orderBy('created_at', 'asc'); return $query->paginate($limit, ['*'], $pageName, $latest_page); } public function comments() { return $this->hasMany(Comment::class); } public function votes() { return $this->morphMany(Vote::class, 'votable'); } } ================================================ FILE: app/Models/ArticleCategory.php ================================================ hasMany(Article::class, 'category_id'); } } ================================================ FILE: app/Models/Comment.php ================================================ belongsTo(User::class, 'user_id'); } public function article() { return $this->belongsTo(Article::class); } } ================================================ FILE: app/Models/Follower.php ================================================ name = 'create-post'; // $this->display_name = 'Create Posts'; // optional //// Allow a user to... // $this->description = 'create new blog posts'; // optional // $this->save(); // // $this->name = 'edit-user'; // $this->display_name = 'Edit Users'; // optional //// Allow a user to... // $this->description = 'edit existing users'; // optional // $this->save(); return 'success'; } } ================================================ FILE: app/Models/Question.php ================================================ [ 'questions.slug' => 5, 'questions.title' => 3, 'questions.content' => 1, 'questions.description' =>2, ], ]; /** * @return mixed */ public function category() { return $this->belongsTo(QuestionCategory::class); } public function replies() { return $this->hasMany(Reply::class); } public function user() { return $this->belongsTo(User::class); } /** * Get the category for the blog article. * * @return \Illuminate\Database\Eloquent\Relations\BelongsTo */ public function tags() { return $this->morphToMany(Tag::class, 'taggable'); } public function votes() { return $this->morphMany(Vote::class, 'votable'); } /** * Set the title and the readable slug. * * @param $value */ public function setTitleAttribute($value) { $this->attributes['title'] = $value; if (!config('services.youdao.appKey') || !config('services.youdao.appSecret')) { $this->setUniqueSlug($value, str_random(7)); } else { $this->setUniqueSlug(translug($value), ''); } } /** * Set the unique slug. * * @param $value * @param $extra */ public function setUniqueSlug($value, $extra) { $slug = str_slug($value . '-' . $extra); if (static::whereSlug($slug)->exists()) { $this->setUniqueSlug($slug, (int)$extra + 1); return; } $this->attributes['slug'] = $slug; } /** * @param $value */ public function setContentAttribute($value) { $data = [ 'raw' => $value, 'html' => (new Markdowner)->convertMarkdownToHtml($value) ]; $this->attributes['content'] = json_encode($data); } public function getRepliesWithLimit($limit = 30, $order = 'created_at') { $pageName = 'page'; // Default display the latest reply $latest_page = is_null(request($pageName)) ? ceil($this->reply_count / $limit) : 1; $query = $this->replies()->with('user'); $query = ($order == 'vote_count') ? $query->orderBy('vote_count', 'desc') : $query->orderBy('created_at', 'asc'); return $query->paginate($limit, ['*'], $pageName, $latest_page); } } ================================================ FILE: app/Models/QuestionCategory.php ================================================ hasMany(Question::class, 'category_id'); } } ================================================ FILE: app/Models/Reply.php ================================================ belongsTo(User::class, 'user_id'); } public function question() { return $this->belongsTo(Question::class); } } ================================================ FILE: app/Models/Role.php ================================================ name = 'owner'; // $this->display_name = 'Project Owner'; // optional // $this->description = 'User is the owner of a given project'; // optional // $this->save(); // $this->name = 'admin'; // $this->display_name = 'User Administrator'; // optional // $this->description = 'User is allowed to manage and edit other users'; // optional // $this->save(); $result = 'success'; $role = $this->findOrFail(1); // $role->attachPermission(1); // 为角色 1 添加1权限 // $role->attachPermissions(['1','2']); // $role->detachPermission(1); // $role->detachPermissions(['1','2']); // $result = $role->hasPermission('edit-user'); return $result; } } ================================================ FILE: app/Models/SiteStatus.php ================================================ morphedByMany(Article::class, 'taggable'); } public function questions() { return $this->morphedByMany(Question::class, 'taggable'); } } ================================================ FILE: app/Models/Traits/ArticleFilterable.php ================================================ getArticleFilter($filter); return $this->applyFilter($filter, $category_id) ->with('user', 'category') ->paginate($limit); } public function getArticlesWithWhoFilter($filter, $limit = 5, $user_id = 0) { $filter = $this->getArticleFilter($filter); return $this->applyFilter($filter,0) ->where('user_id', '=', $user_id) ->paginate($limit); } protected function getArticleFilter($request_filter) { $filters = ['hot', 'recent', 'excellent', 'category']; if (in_array($request_filter, $filters)) { return $request_filter; } return 'default'; } public function applyFilter($filter, $category_id) { $query = $this->withoutDraft()->WithoutPrivate(); switch ($filter) { case 'hot' : return $query->weightAsc()->hot(); break; case 'recent': return $query->recent()->weightAsc(); break; case 'excellent': return $query->excellent()->weightAsc(); break; case 'category': return $query->category($category_id)->weightAsc()->recent(); break; case 'default': return $query->weightAsc()->recent(); break; } } public function scopeVote($query, $sort="asc") { return $query->orderBy('vote_count', $sort); } public function scopeRecent($query) { return $query->orderBy('created_at', 'desc'); } public function scopeWeightAsc($query) { return $query->orderBy('weight', 'asc'); } public function scopeHot($query) { return $query->where('is_hot', 'yes'); } public function scopeExcellent($query) { return $query->where('is_excellent', '=', 'yes'); } public function scopeWithoutDraft($query) { return $query->where('is_draft', '=', 'no'); } public function scopeWithoutPrivate($query) { return $query->where('only_owner_can_see', '=', 'no'); } public function scopeCategory($query, $category_id) { return $query->where('category_id', '=', $category_id); } } ================================================ FILE: app/Models/Traits/BaseFilterable.php ================================================ orderBy('created_at', 'desc'); } } ================================================ FILE: app/Models/Traits/FollowerHelper.php ================================================ followers->contains($user); } /** * Check if user is following given user. * * @param $user * * @return bool */ public function isFollowing($user) { return $this->followings->contains($user); } /** * Return user followers. * * @return \Illuminate\Database\Eloquent\Relations\BelongsToMany */ public function followers() { return $this->belongsToMany(__CLASS__, 'followers', 'follow_id', 'user_id')->withTimestamps(); } /** * Return user following users. * * @return \Illuminate\Database\Eloquent\Relations\BelongsToMany */ public function followings() { return $this->belongsToMany(__CLASS__, 'followers', 'user_id', 'follow_id')->withTimestamps();// 用户1正在关注哪些用户 } /** * Follow a user or users. * * @param int|array $user * * @return int */ public function follow($user) { return $this->followings()->sync((array)$user, false); } /** * Unfollow a user or users. * * @param int|array $user * * @return int */ public function unfollow($user) { return $this->followings()->detach((array)$user); } } ================================================ FILE: app/Models/Traits/UserAvatorHelper.php ================================================ get($this->image_url); // Get next $content_type = explode('/', $response->getHeader('Content-Type')[0]); $ext = array_pop($content_type); $avatar_name = $this->id . '_' . time() . '.' . $ext; $base_path = public_path($uploadAvatarPath); $save_path = $base_path. $avatar_name; if (!file_exists($base_path)) { mkdir($base_path, 0777, true); } //Save File $content = $response->getBody()->getContents(); file_put_contents($save_path, $content); //Delete old file if ($this->avatar) { @unlink($base_path. $this->avatar); } //Save to database $this->avatar = $uploadAvatarPath.$avatar_name; $this->save(); } } ================================================ FILE: app/Models/User.php ================================================ hasMany(Activity::class); } public function articles() { return $this->hasMany(Article::class); } public function questions() { return $this->hasMany(Question::class); } /** * send password reset email to user's email base on token. * * @param string $token */ public function sendPasswordResetNotification($token) { (new UserMailer)->passwordReset($this->email, $token); } public function saveFunction() { $user = $this->findOrFail(6); // $user->attachRole(6); // 为用户 1 添加两1身份 $user->attachRoles(['1', '2']); // 为用户 1 添加两个身份 // $user->detachRole(1); // 移除用户1的1身份 // $user->detachRoles(); // 移除用户1的所有身份 $result = 'success'; // $result = $user->hasRole(['admin','owner']); // 不加第二个参数,只匹配数组中的第一个身份:w // $result = $user->hasRole(['admin','owner','hellow'],true); // 加 ture 参数 后要完全匹配 // $result = $user->hasRole('admin'); // $result = $user->can('edit-user'); // $result = $user->ability(array('admin', 'owner'), array('create-post', 'edit-user')); return $result; } } ================================================ FILE: app/Models/Vote.php ================================================ belongsTo(User::class); } public function scopeByWhom($query, $user_id) { return $query->where('user_id', '=', $user_id); } } ================================================ FILE: app/Notifications/NewUserFollowNotification.php ================================================ line('The introduction to the notification.') ->action('Notification Action', url('/')) ->line('Thank you for using our application!'); } /** * @param $notifiable * @return array */ public function toDatabase($notifiable)//注意方法的命名格式 { return [ 'user_name' => Auth::user()->user_name, ]; } /** * Get the array representation of the notification. * * @param mixed $notifiable * @return array */ public function toArray($notifiable) { return [ // ]; } } ================================================ FILE: app/Notifications/ReceivedComment.php ================================================ comment = $comment; } /** * Get the notification's delivery channels. * * @param mixed $notifiable * @return array */ public function via($notifiable) { return ['database']; } /** * Get the mail representation of the notification. * * @param mixed $notifiable * @return \Illuminate\Notifications\Messages\MailMessage */ public function toMail($notifiable) { $comment = $this->comment; } /** * Get the array representation of the notification. * * @param mixed $notifiable * @return array */ public function toArray($notifiable) { $comment = $this->comment; $article = Article::findOrFail($comment->article_id); $user = User::findOrFail($comment->user_id); return [ 'user_id' => $comment->user_id, 'user_name' => $user->user_name, 'article_id' => $comment->article_id, 'article_title' => $article->title, 'article_slug' => $article->slug, 'comment_content' => $comment->body, ]; } } ================================================ FILE: app/Notifications/ReceivedReply.php ================================================ reply = $reply; } /** * Get the notification's delivery channels. * * @param mixed $notifiable * @return array */ public function via($notifiable) { return ['database']; } /** * Get the mail representation of the notification. * * @param mixed $notifiable * @return \Illuminate\Notifications\Messages\MailMessage */ public function toMail($notifiable) { $comment = $this->reply; } /** * Get the array representation of the notification. * * @param mixed $notifiable * @return array */ public function toArray($notifiable) { $comment = $this->reply; $question = Question::findOrFail($comment->question_id); $user = User::findOrFail($comment->user_id); return [ 'user_id' => $comment->user_id, 'user_name' => $user->user_name, 'question_id' => $comment->question_id, 'question_title' => $question->title, 'question_slug' => $question->slug, 'comment_content' => $comment->body, ]; } } ================================================ FILE: app/Notifications/UserVoteArticle.php ================================================ article = $article; } /** * Get the notification's delivery channels. * * @param mixed $notifiable * @return array */ public function via($notifiable) { return ['database']; } /** * Get the mail representation of the notification. * * @param mixed $notifiable * @return \Illuminate\Notifications\Messages\MailMessage */ public function toMail($notifiable) { return (new MailMessage) ->line('The introduction to the notification.') ->action('Notification Action', url('/')) ->line('Thank you for using our application!'); } /** * Get the array representation of the notification. * * @param mixed $notifiable * @return array */ public function toArray($notifiable) { return [ 'user_name' => Auth::user()->user_name, 'article_slug' => $this->article->slug, 'article_title' => $this->article->title, ]; } } ================================================ FILE: app/Notifications/UserVoteQuestion.php ================================================ question = $question; } /** * Get the notification's delivery channels. * * @param mixed $notifiable * @return array */ public function via($notifiable) { return ['database']; } /** * Get the mail representation of the notification. * * @param mixed $notifiable * @return \Illuminate\Notifications\Messages\MailMessage */ public function toMail($notifiable) { return (new MailMessage) ->line('The introduction to the notification.') ->action('Notification Action', url('/')) ->line('Thank you for using our application!'); } /** * Get the array representation of the notification. * * @param mixed $notifiable * @return array */ public function toArray($notifiable) { return [ 'user_name' => Auth::user()->user_name, 'question_slug' => $this->question->slug, 'question_title' => $this->question->title, ]; } } ================================================ FILE: app/Policies/ArticlePolicy.php ================================================ user_id == $user->id || $user->hasRole('supper_admin'); } } ================================================ FILE: app/Policies/CommentPolicy.php ================================================ hasRole('supper_admin') || $user->id == $comment->user_id; } } ================================================ FILE: app/Policies/QuestionPolicy.php ================================================ user_id == $user->id || $user->hasRole('supper_admin'); } } ================================================ FILE: app/Policies/ReplyPolicy.php ================================================ hasRole('supper_admin') || $user->id == $reply->user_id; } } ================================================ FILE: app/Policies/UserPolicy.php ================================================ id ==$user->id; } } ================================================ FILE: app/Providers/AppServiceProvider.php ================================================ 'App\Policies\ModelPolicy', Article::class => ArticlePolicy::class, Question::class => QuestionPolicy::class, Comment::class => CommentPolicy::class, User::class => UserPolicy::class, Reply::class => ReplyPolicy::class, ]; /** * Register any authentication / authorization services. * * @return void */ public function boot() { $this->registerPolicies(); Passport::routes(); } } ================================================ FILE: app/Providers/BroadcastServiceProvider.php ================================================ with('authUser', \Auth::user()); $categoryAndQuestions = app('Codehaoshi\Stat\Stat')->getCategoryAndQuestion(); $view->with('categoryList', $categoryAndQuestions->categoryList); $view->with('questionCategoryList', $categoryAndQuestions->questionList); $view->with('linkList',Link::where('is_enabled' , 'yes')->where('type', 'link')->get()); $view->with('recommendList',Link::where('is_enabled' , 'yes')->where('type', 'recommend')->get()); }); } /** * Register the application services. * * @return void */ public function register() { // } } ================================================ FILE: app/Providers/EventServiceProvider.php ================================================ [ 'App\Listeners\EventListener', ], ]; /** * Register any events for your application. * * @return void */ public function boot() { parent::boot(); // } } ================================================ FILE: app/Providers/RouteServiceProvider.php ================================================ mapApiRoutes(); $this->mapWebRoutes(); // } /** * Define the "web" routes for the application. * * These routes all receive session state, CSRF protection, etc. * * @return void */ protected function mapWebRoutes() { Route::middleware('web') ->namespace($this->namespace) ->group(base_path('routes/web.php')); } /** * Define the "api" routes for the application. * * These routes are typically stateless. * * @return void */ protected function mapApiRoutes() { Route::prefix('api') ->middleware('api') ->namespace($this->namespace) ->group(base_path('routes/api.php')); } } ================================================ FILE: app/Repositories/AboutRepository.php ================================================ model = $about; } } ================================================ FILE: app/Repositories/ArticleCategoryRepository.php ================================================ model = $articleCategory; } public function getInfoBySlug($slug) { return $this->model->where('slug', $slug)->firstOrFail(); } } ================================================ FILE: app/Repositories/ArticleRepository.php ================================================ model = $article; } /** * Sync the tags for the article. * * @param int $number * @return Paginate */ public function syncTag($tags = '') { $this->model->tags()->sync($tags); } public function getArticleInfoBySlug($slug) { return $this->model->where('slug', $slug)->with('user', 'category')->firstOrFail(); } public function decrementCommentCount($model) { return $model->decrement('comment_count'); } public function generateLastReplyUserInfo($articleModel) { $lastComment = $articleModel->comments()->recent()->first(); $articleModel->last_comment_user_id = $lastComment ? $lastComment->user_id : 0; $articleModel->save(); } /** * Get one record without draft scope * * @param $id * @return mixed */ public function getByIdWithoutException($id, $type = '>' ,$field = ['id','title','slug']) { return $this->model->withoutDraft()->where('id' , $type, $id)->select($field)->first(); } } ================================================ FILE: app/Repositories/BaseRepository.php ================================================ save($this->model, $input); } /** * Save the input's data. * * @param $model * @param $input * @return mixed */ public function save($model, $input) { $model->fill($input); $model->save(); return $model; } /** * Get one record without draft scope * * @param $id * @return mixed */ public function getById($id) { return $this->model->findOrFail($id); } /** * Delete the draft article. * * @param int $id * @return boolean */ public function destroy($id) { return $this->getById($id)->delete(); } /** * @param $field * @return mixed */ public function getAllData($field = "*", $needToArray = true) { if ($needToArray) { return $this->model->select($field)->get()->toArray(); } else { return $this->model->select($field)->get(); } } /** * To judge the record is existence in you table * * @param $where */ public function getFirstRecordByWhere($where) { return $this->model->where($where)->first(); } /** * @param $id * @param $input * @return mixed */ public function update($id, $input) { $this->model = $this->getById($id); return $this->save($this->model, $input); } /** * return paginate list * * @param int $pagesize * @param string $sort * @param string $sortColumn * @return mixed */ public function page($where = false, $pagesize = 20, $sortColumn = 'weight', $sort = 'asc') { if ($where) { if($sortColumn != 'created_at'){ return $this->model->where($where)->orderBy($sortColumn, $sort)->orderBy('created_at', 'desc')->paginate($pagesize); } return $this->model->where($where)->orderBy($sortColumn, $sort)->paginate($pagesize); } else { return $this->model->orderBy($sortColumn, $sort)->paginate($pagesize); } } public function getThisModel() { return $this->model; } /** * Get all the records * * @return array User */ public function all() { return $this->model->get(); } } ================================================ FILE: app/Repositories/CommentRepository.php ================================================ model = $comment; } } ================================================ FILE: app/Repositories/LinkRepository.php ================================================ model = $link; } } ================================================ FILE: app/Repositories/PermissionRepository.php ================================================ model = $permission; } } ================================================ FILE: app/Repositories/QuestionCategoryRepository.php ================================================ model = $questionCategory; } public function getInfoBySlug($slug) { return $this->model->where('slug', $slug)->firstOrFail(); } } ================================================ FILE: app/Repositories/QuestionRepository.php ================================================ model = $article; } /** * Sync the tags for the article. * * @param int $number * @return Paginate */ public function syncTag($tags = '') { $this->model->tags()->sync($tags); } public function getQuestionInfoBySlug($slug) { return $this->model->where('slug', $slug)->with('user', 'category')->firstOrFail(); } /** * Get one record without draft scope * * @param $id * @return mixed */ public function getByIdWithoutException($id, $type = '>' ,$field = ['id','title','slug']) { return $this->model->withoutDraft()->where('id' , $type, $id)->select($field)->first(); } public function decrementReplyCount($model) { return $model->decrement('reply_count'); } public function generateLastReplyUserInfo($questionModel) { $lastComment = $questionModel->replies()->recent()->first(); $questionModel->last_reply_user_id = $lastComment ? $lastComment->user_id : 0; $questionModel->save(); } } ================================================ FILE: app/Repositories/ReplyRepository.php ================================================ model = $comment; } } ================================================ FILE: app/Repositories/RoleRepository.php ================================================ model = $role; } /** * @param $id * @param $input * @return mixed */ public function update($id, $input) { $this->model = $this->getById($id); return $this->save($this->model, $input); } /** * Sync the tags for the article. * @param array $roleIds * @param int $userId */ public function syncPermission($permissionIds = [], $userId = 0) { $this->getById($userId)->perms()->sync($permissionIds); } } ================================================ FILE: app/Repositories/TagRepository.php ================================================ model = $tag; } /** * get All tags with used count as weight */ public function getAllTagWithCount() { $tags = $this->all(); $tags = $tags->each( function ($item, $key) { $item->weight = DB::table('taggables')->where('tag_id', '=', $item->id)->count(); }); return $tags; } public function getTagInfoBySlug($slug) { return $this->model->where('slug', $slug)->firstOrFail(); } } ================================================ FILE: app/Repositories/UserRepository.php ================================================ model = $user; } /** * return paginate list * * @param int $pagesize * @param string $sort * @param string $sortColumn * @return mixed */ public function page($where = false, $pagesize = 20, $sortColumn = 'last_actived_at', $sort = 'desc') { if ($where) { return $this->model->where($where['k'])->orWhere($where['k2'])->orderBy($sortColumn, $sort)->paginate($pagesize); } else { return $this->model->orderBy($sortColumn, $sort)->paginate($pagesize); } } /** * Sync the tags for the article. * @param array $roleIds * @param int $userId */ public function syncRole($roleIds = [], $userId = 0) { $this->getById($userId)->roles()->sync($roleIds); } /** * @param $user * @param $password * @return mixed */ public function changePassword($user,$password) { return $user->update(['password'=>bcrypt($password)]); } /** * Get the user by name. * * @param string $name * @return mixed */ public function getByName($user_name) { return $this->model ->where('user_name', $user_name) ->first(); } } ================================================ FILE: app/Tools/FileManager/BaseManager.php ================================================ disk = Storage::disk(config('filesystems.default')); } /** * @param $img * @return array|bool */ public function storeUploadImgByConfigPath($img, $configPath = 'temp') { $savePath = config('codehaoshi.uploadsPath.' . $configPath) . date('Y') . '/' . date('m'); $path = $img->store($savePath, 'public'); $realPath = env('UPLOAD_PATH', 'uploads') . '/' . $path; return [ 'real_path' => $savePath, 'relative_url' => '/' . $realPath, 'url' => asset($realPath), ]; } public function moveFileTorealPath($tempFile, $realPathDir = 'article') { if (strstr($tempFile, '/temp/')) { $newFile = str_replace('/temp/', '/' . $realPathDir . '/', $tempFile); $new_dir = public_path(dirname($newFile)); if (!is_dir($new_dir)) mkdir($new_dir, 0777, true); rename(public_path($tempFile), public_path($newFile)); return $newFile; } else { return $tempFile; } } } ================================================ FILE: app/Tools/FileManager/UpyunManager.php ================================================ hashName()) : $name; $mime = $file->getMimeType(); $realPath = $this->disk->put($dir, $file); return [ 'success' => true, 'filename' => $hashName, 'original_name' => $file->getClientOriginalName(), 'mime' => $mime, 'size' => human_filesize($file->getClientSize()), 'real_path' => $realPath, 'relative_url' => '/'.$realPath, 'url' => $this->disk->getUrl($realPath), ]; } } ================================================ FILE: app/Tools/Mailer.php ================================================ from('18313852226@qq.com', 'Code好事'); $message->to($email); }); } } ================================================ FILE: app/Tools/Markdowner.php ================================================ htmlConverter = new HtmlConverter(); $this->markdownConverter = new Parsedown(); } /** * Convert Markdown To Html. * * @param $markdown * @return string */ public function convertMarkdownToHtml($markdown) { return $this->markdownConverter ->setBreaksEnabled(true) ->text($markdown); } /** * Convert Html To Markdown. * * @param $html * @return string */ public function convertHtmlToMarkdown($html) { return $this->htmlConverter->convert($html); } } ================================================ FILE: app/Tools/UserMailer.php ================================================ url('password/reset', $token)]; $this->sendTo('codehaoshi_password_reset', $email, $data); } } ================================================ FILE: app/Transformers/CommentTransformer.php ================================================ $comment->id, 'user_id' => $comment->user_id, 'user_name' => isset($comment->user) ? $comment->user->user_name : 'Null', 'avatar' => isset($comment->user) ? $comment->user->avatar : config('codehaoshi.default_avatar'), 'content_raw' => $comment->body, 'created_at' => $comment->created_at->diffForHumans(), 'vote_count' => $comment->vote_count, ]; } /** * Include User * * @param Comment $comment * @return \League\Fractal\Resource\Collection */ public function includeUser(Comment $comment) { $user = $comment->user; return $this->item($user, new UserTransformer); } } ================================================ FILE: app/Transformers/ReplyTransformer.php ================================================ $reply->id, 'user_id' => $reply->user_id, 'user_name' => isset($reply->user) ? $reply->user->user_name : 'Null', 'avatar' => isset($reply->user) ? $reply->user->avatar : config('codehaoshi.default_avatar'), 'content_raw' => $reply->body, 'created_at' => $reply->created_at->diffForHumans(), 'vote_count' => $reply->vote_count, ]; } /** * Include User * * @param Comment $comment * @return \League\Fractal\Resource\Collection */ public function includeUser(Reply $reply) { $user = $reply->user; return $this->item($user, new UserTransformer); } } ================================================ FILE: app/Transformers/UserTransformer.php ================================================ $user->id, 'avatar' => $user->avatar, 'user_name' => $user->name, 'created_at' => $user->created_at->toDateTimeString(), ]; } } ================================================ FILE: artisan ================================================ #!/usr/bin/env php make(Illuminate\Contracts\Console\Kernel::class); $status = $kernel->handle( $input = new Symfony\Component\Console\Input\ArgvInput, new Symfony\Component\Console\Output\ConsoleOutput ); /* |-------------------------------------------------------------------------- | Shutdown The Application |-------------------------------------------------------------------------- | | Once Artisan has finished running, we will fire off the shutdown events | so that any final work may be done by the application before we shut | down the process. This is the last thing to happen to the request. | */ $kernel->terminate($input, $status); exit($status); ================================================ FILE: bootstrap/app.php ================================================ singleton( Illuminate\Contracts\Http\Kernel::class, App\Http\Kernel::class ); $app->singleton( Illuminate\Contracts\Console\Kernel::class, App\Console\Kernel::class ); $app->singleton( Illuminate\Contracts\Debug\ExceptionHandler::class, App\Exceptions\Handler::class ); /* |-------------------------------------------------------------------------- | Return The Application |-------------------------------------------------------------------------- | | This script returns the application instance. The instance is given to | the calling script so we can separate the building of the instances | from the actual running of the application and sending responses. | */ return $app; ================================================ FILE: bootstrap/autoload.php ================================================ =5.6.4", "guzzlehttp/guzzle": "^6.3", "jellybool/translug": "^2.0", "laravel/framework": "5.5.*", "laravel/passport": "^3.0", "laravel/scout": "^3.0", "laravel/socialite": "^3.0", "laravel/tinker": "~1.0", "league/fractal": "^0.16.0", "league/html-to-markdown": "^4.4", "naux/sendcloud": "^1.1", "nicolaslopezj/searchable": "1.*", "overtrue/easy-sms": "^0.0.9", "overtrue/laravel-lang": "~3.0", "predis/predis": "^1.1", "rap2hpoutre/laravel-log-viewer": "^0.10.4", "spatie/laravel-backup": "^4.19", "spatie/laravel-pjax": "^1.3", "ucer/entrust": "^1.0.1" }, "require-dev": { "barryvdh/laravel-debugbar": "^2.4", "fzaninotto/faker": "~1.4", "mockery/mockery": "0.9.*", "phpunit/phpunit": "~5.7" }, "autoload": { "classmap": [ "database" ], "psr-4": { "App\\": "app/", "Codehaoshi\\": "app/Codehaoshi" }, "files": [ "app/Helpers.php" ] }, "autoload-dev": { "psr-4": { "Tests\\": "tests/" } }, "scripts": { "post-root-package-install": [ "php -r \"file_exists('.env') || copy('.env.example', '.env');\"" ], "post-create-project-cmd": [ "php artisan key:generate" ], "post-install-cmd": [ "Illuminate\\Foundation\\ComposerScripts::postInstall", "php artisan optimize" ], "post-update-cmd": [ "Illuminate\\Foundation\\ComposerScripts::postUpdate", "php artisan optimize" ] }, "config": { "preferred-install": "dist", "sort-packages": true, "optimize-autoloader": true } } ================================================ FILE: config/app.php ================================================ env('APP_NAME', 'Laravel'), /* |-------------------------------------------------------------------------- | Application Environment |-------------------------------------------------------------------------- | | This value determines the "environment" your application is currently | running in. This may determine how you prefer to configure various | services your application utilizes. Set this in your ".env" file. | */ 'env' => env('APP_ENV', 'production'), /* |-------------------------------------------------------------------------- | Application Debug Mode |-------------------------------------------------------------------------- | | When your application is in debug mode, detailed error messages with | stack traces will be shown on every error that occurs within your | application. If disabled, a simple generic error page is shown. | */ 'debug' => env('APP_DEBUG', false), /* |-------------------------------------------------------------------------- | Application URL |-------------------------------------------------------------------------- | | This URL is used by the console to properly generate URLs when using | the Artisan command line tool. You should set this to the root of | your application so that it is used when running Artisan tasks. | */ 'url' => env('APP_URL', 'http://localhost'), /* |-------------------------------------------------------------------------- | Application Timezone |-------------------------------------------------------------------------- | | Here you may specify the default timezone for your application, which | will be used by the PHP date and date-time functions. We have gone | ahead and set this to a sensible default for you out of the box. | */ 'timezone' => 'PRC', /* |-------------------------------------------------------------------------- | Application Locale Configuration |-------------------------------------------------------------------------- | | The application locale determines the default locale that will be used | by the translation service provider. You are free to set this value | to any of the locales which will be supported by the application. | */ 'locale' => 'zh-CN', /* |-------------------------------------------------------------------------- | Application Fallback Locale |-------------------------------------------------------------------------- | | The fallback locale determines the locale to use when the current one | is not available. You may change the value to correspond to any of | the language folders that are provided through your application. | */ 'fallback_locale' => 'en', /* |-------------------------------------------------------------------------- | Encryption Key |-------------------------------------------------------------------------- | | This key is used by the Illuminate encrypter service and should be set | to a random, 32 character string, otherwise these encrypted strings | will not be safe. Please do this before deploying an application! | */ 'key' => env('APP_KEY'), 'cipher' => 'AES-256-CBC', /* |-------------------------------------------------------------------------- | Logging Configuration |-------------------------------------------------------------------------- | | Here you may configure the log settings for your application. Out of | the box, Laravel uses the Monolog PHP logging library. This gives | you a variety of powerful log handlers / formatters to utilize. | | Available Settings: "single", "daily", "syslog", "errorlog" | */ 'log' => env('APP_LOG', 'daily'), 'log_max_files' => 30, 'log_level' => env('APP_LOG_LEVEL', 'debug'), /* |-------------------------------------------------------------------------- | Autoloaded Service Providers |-------------------------------------------------------------------------- | | The service providers listed here will be automatically loaded on the | request to your application. Feel free to add your own services to | this array to grant expanded functionality to your applications. | */ 'providers' => [ /* * Laravel Framework Service Providers... */ Illuminate\Auth\AuthServiceProvider::class, Illuminate\Broadcasting\BroadcastServiceProvider::class, Illuminate\Bus\BusServiceProvider::class, Illuminate\Cache\CacheServiceProvider::class, Illuminate\Foundation\Providers\ConsoleSupportServiceProvider::class, Illuminate\Cookie\CookieServiceProvider::class, Illuminate\Database\DatabaseServiceProvider::class, Illuminate\Encryption\EncryptionServiceProvider::class, Illuminate\Filesystem\FilesystemServiceProvider::class, Illuminate\Foundation\Providers\FoundationServiceProvider::class, Illuminate\Hashing\HashServiceProvider::class, Illuminate\Mail\MailServiceProvider::class, Illuminate\Notifications\NotificationServiceProvider::class, Illuminate\Pagination\PaginationServiceProvider::class, Illuminate\Pipeline\PipelineServiceProvider::class, Illuminate\Queue\QueueServiceProvider::class, Illuminate\Redis\RedisServiceProvider::class, Illuminate\Auth\Passwords\PasswordResetServiceProvider::class, Illuminate\Session\SessionServiceProvider::class, // Illuminate\Translation\TranslationServiceProvider::class, Overtrue\LaravelLang\TranslationServiceProvider::class, Illuminate\Validation\ValidationServiceProvider::class, Illuminate\View\ViewServiceProvider::class, /* * Package Service Providers... */ Laravel\Tinker\TinkerServiceProvider::class, /* * Application Service Providers... */ App\Providers\AppServiceProvider::class, App\Providers\AuthServiceProvider::class, // App\Providers\BroadcastServiceProvider::class, App\Providers\EventServiceProvider::class, App\Providers\RouteServiceProvider::class, // Self Add Providers... Laravel\Passport\PassportServiceProvider::class, // Barryvdh\Debugbar\ServiceProvider::class, Ucer\Entrust\EntrustServiceProvider::class, Laravel\Socialite\SocialiteServiceProvider::class, \JellyBool\Translug\TranslugServiceProvider::class, App\Providers\CommonDataServiceProvider::class, Spatie\Backup\BackupServiceProvider::class, Rap2hpoutre\LaravelLogViewer\LaravelLogViewerServiceProvider::class, Naux\Mail\SendCloudServiceProvider::class, ], /* |-------------------------------------------------------------------------- | Class Aliases |-------------------------------------------------------------------------- | | This array of class aliases will be registered when this application | is started. However, feel free to register as many as you wish as | the aliases are "lazy" loaded so they don't hinder performance. | */ 'aliases' => [ 'App' => Illuminate\Support\Facades\App::class, 'Artisan' => Illuminate\Support\Facades\Artisan::class, 'Auth' => Illuminate\Support\Facades\Auth::class, 'Blade' => Illuminate\Support\Facades\Blade::class, 'Broadcast' => Illuminate\Support\Facades\Broadcast::class, 'Bus' => Illuminate\Support\Facades\Bus::class, 'Cache' => Illuminate\Support\Facades\Cache::class, 'Config' => Illuminate\Support\Facades\Config::class, 'Cookie' => Illuminate\Support\Facades\Cookie::class, 'Crypt' => Illuminate\Support\Facades\Crypt::class, 'DB' => Illuminate\Support\Facades\DB::class, 'Eloquent' => Illuminate\Database\Eloquent\Model::class, 'Event' => Illuminate\Support\Facades\Event::class, 'File' => Illuminate\Support\Facades\File::class, 'Gate' => Illuminate\Support\Facades\Gate::class, 'Hash' => Illuminate\Support\Facades\Hash::class, 'Lang' => Illuminate\Support\Facades\Lang::class, 'Log' => Illuminate\Support\Facades\Log::class, 'Mail' => Illuminate\Support\Facades\Mail::class, 'Notification' => Illuminate\Support\Facades\Notification::class, 'Password' => Illuminate\Support\Facades\Password::class, 'Queue' => Illuminate\Support\Facades\Queue::class, 'Redirect' => Illuminate\Support\Facades\Redirect::class, 'Redis' => Illuminate\Support\Facades\Redis::class, 'Request' => Illuminate\Support\Facades\Request::class, 'Response' => Illuminate\Support\Facades\Response::class, 'Route' => Illuminate\Support\Facades\Route::class, 'Schema' => Illuminate\Support\Facades\Schema::class, 'Session' => Illuminate\Support\Facades\Session::class, 'Storage' => Illuminate\Support\Facades\Storage::class, 'URL' => Illuminate\Support\Facades\URL::class, 'Validator' => Illuminate\Support\Facades\Validator::class, 'View' => Illuminate\Support\Facades\View::class, // Self Add aliases 'Socialite' => Laravel\Socialite\Facades\Socialite::class, 'Translug' => \JellyBool\Translug\TranslugFacade::class, // 'Entrust' => \Ucer\Entrust\EntrustFacade::class, ], ]; ================================================ FILE: config/auth.php ================================================ [ 'guard' => 'web', 'passwords' => 'users', ], /* |-------------------------------------------------------------------------- | Authentication Guards |-------------------------------------------------------------------------- | | Next, you may define every authentication guard for your application. | Of course, a great default configuration has been defined for you | here which uses session storage and the Eloquent user provider. | | All authentication drivers have a user provider. This defines how the | users are actually retrieved out of your database or other storage | mechanisms used by this application to persist your user's data. | | Supported: "session", "token" | */ 'guards' => [ 'web' => [ 'driver' => 'session', 'provider' => 'users', ], 'api' => [ 'driver' => 'passport', 'provider' => 'users', ], ], /* |-------------------------------------------------------------------------- | User Providers |-------------------------------------------------------------------------- | | All authentication drivers have a user provider. This defines how the | users are actually retrieved out of your database or other storage | mechanisms used by this application to persist your user's data. | | If you have multiple user tables or models you may configure multiple | sources which represent each model / table. These sources may then | be assigned to any extra authentication guards you have defined. | | Supported: "database", "eloquent" | */ 'providers' => [ 'users' => [ 'driver' => 'eloquent', 'model' => \App\Models\User::class, 'table' => 'users', ], // 'users' => [ // 'driver' => 'database', // 'table' => 'users', // ], ], /* |-------------------------------------------------------------------------- | Resetting Passwords |-------------------------------------------------------------------------- | | You may specify multiple password reset configurations if you have more | than one user table or model in the application and you want to have | separate password reset settings based on the specific user types. | | The expire time is the number of minutes that the reset token should be | considered valid. This security feature keeps tokens short-lived so | they have less time to be guessed. You may change this as needed. | */ 'passwords' => [ 'users' => [ 'provider' => 'users', 'table' => 'password_resets', 'expire' => 60, ], ], ]; ================================================ FILE: config/broadcasting.php ================================================ env('BROADCAST_DRIVER', 'null'), /* |-------------------------------------------------------------------------- | Broadcast Connections |-------------------------------------------------------------------------- | | Here you may define all of the broadcast connections that will be used | to broadcast events to other systems or over websockets. Samples of | each available type of connection are provided inside this array. | */ 'connections' => [ 'pusher' => [ 'driver' => 'pusher', 'key' => env('PUSHER_APP_KEY'), 'secret' => env('PUSHER_APP_SECRET'), 'app_id' => env('PUSHER_APP_ID'), 'options' => [ // ], ], 'redis' => [ 'driver' => 'redis', 'connection' => 'default', ], 'log' => [ 'driver' => 'log', ], 'null' => [ 'driver' => 'null', ], ], ]; ================================================ FILE: config/cache.php ================================================ env('CACHE_DRIVER', 'file'), /* |-------------------------------------------------------------------------- | Cache Stores |-------------------------------------------------------------------------- | | Here you may define all of the cache "stores" for your application as | well as their drivers. You may even define multiple stores for the | same cache driver to group types of items stored in your caches. | */ 'stores' => [ 'apc' => [ 'driver' => 'apc', ], 'array' => [ 'driver' => 'array', ], 'database' => [ 'driver' => 'database', 'table' => 'cache', 'connection' => null, ], 'file' => [ 'driver' => 'file', 'path' => storage_path('framework/cache/data'), ], 'memcached' => [ 'driver' => 'memcached', 'persistent_id' => env('MEMCACHED_PERSISTENT_ID'), 'sasl' => [ env('MEMCACHED_USERNAME'), env('MEMCACHED_PASSWORD'), ], 'options' => [ // Memcached::OPT_CONNECT_TIMEOUT => 2000, ], 'servers' => [ [ 'host' => env('MEMCACHED_HOST', '127.0.0.1'), 'port' => env('MEMCACHED_PORT', 11211), 'weight' => 100, ], ], ], 'redis' => [ 'driver' => 'redis', 'connection' => 'default', ], ], /* |-------------------------------------------------------------------------- | Cache Key Prefix |-------------------------------------------------------------------------- | | When utilizing a RAM based store such as APC or Memcached, there might | be other applications utilizing the same cache. So, we'll specify a | value to get prefixed to all our keys so we can avoid collisions. | */ 'prefix' => 'laravel', ]; ================================================ FILE: config/codehaoshi.php ================================================ [ 'github' => true, 'qq' => false ], 'uploadsPath' => [ 'avatar' => 'avatar/', 'temp' => 'temp/', 'article' => 'article/', 'question' => 'question/' ], 'dashboard' => [ 'pagesize' => 20 ], 'comments_perpage' => 200, 'default_avatar' => '/images/header_default.gif', // Social Share 'social_share' => [ 'article_share' => env('ARTICLE_SHARE') ?: true, 'discussion_share' => env('DISCUSSION_SHARE') ?: true, 'sites' => env('SOCIAL_SHARE_SITES') ?: 'qzone,qq,weibo,wechat,douban,twitter', 'mobile_sites' => env('SOCIAL_SHARE_MOBILE_SITES') ?: 'qzone,qq,weibo,wechat,douban,twitter', ], 'notice' => [ 'home_page_article' => 'Record some cool articles.', 'home_page_question' => 'A hodgepodge of problems.', 'info_page_article' => 'Good good study.', 'info_page_question' => 'Day day up.', ], 'description' => 'Loading . . .' ]; ================================================ FILE: config/dashboardMenu.php ================================================ [ [ 'name' => '用户管理', 'style' => 'users', 'sun' => [ [ 'name' => '用户管理', 'href' => '/dashboard/user', ], [ 'name' => '角色管理', 'href' => '/dashboard/role', ], [ 'name' => '权限管理', 'href' => '/dashboard/permission', ], ] ], [ 'name' => '内容管理', 'style' => 'ils', 'sun' => [ [ 'name' => '文章分类', 'href' => '/dashboard/articleCategory', ], [ 'name' => '文章管理', 'href' => '/dashboard/article', ], [ 'name' => '标签管理', 'href' => '/dashboard/tag', ] ] ], [ 'name' => '问题管理', 'style' => 'question', 'sun' => [ [ 'name' => '问题分类', 'href' => '/dashboard/questionCategory', ], [ 'name' => '问题管理', 'href' => '/dashboard/question', ], ] ], [ 'name' => '站点管理', 'style' => 'gear', 'sun' => [ [ 'name' => '友情链接', 'href' => '/dashboard/links', ], [ 'name' => '关于我们', 'href' => '/dashboard/abouts', ], ] ] ], ]; ================================================ FILE: config/database.php ================================================ env('DB_CONNECTION', 'mysql'), /* |-------------------------------------------------------------------------- | Database Connections |-------------------------------------------------------------------------- | | Here are each of the database connections setup for your application. | Of course, examples of configuring each database platform that is | supported by Laravel is shown below to make development simple. | | | All database work in Laravel is done through the PHP PDO facilities | so make sure you have the driver for your particular database of | choice installed on your machine before you begin development. | */ 'connections' => [ 'sqlite' => [ 'driver' => 'sqlite', 'database' => env('DB_DATABASE', database_path('database.sqlite')), 'prefix' => '', ], 'mysql' => [ 'driver' => 'mysql', 'host' => env('DB_HOST', '127.0.0.1'), 'port' => env('DB_PORT', '3306'), 'database' => env('DB_DATABASE', 'forge'), 'username' => env('DB_USERNAME', 'forge'), 'password' => env('DB_PASSWORD', ''), 'unix_socket' => env('DB_SOCKET', ''), 'charset' => 'utf8mb4', 'collation' => 'utf8mb4_unicode_ci', 'prefix' => '', 'strict' => true, 'engine' => null, 'dump' => [ 'dump_binary_path' => '/usr/local/mysql/bin', ], ], 'pgsql' => [ 'driver' => 'pgsql', 'host' => env('DB_HOST', '127.0.0.1'), 'port' => env('DB_PORT', '5432'), 'database' => env('DB_DATABASE', 'forge'), 'username' => env('DB_USERNAME', 'forge'), 'password' => env('DB_PASSWORD', ''), 'charset' => 'utf8', 'prefix' => '', 'schema' => 'public', 'sslmode' => 'prefer', ], 'sqlsrv' => [ 'driver' => 'sqlsrv', 'host' => env('DB_HOST', 'localhost'), 'port' => env('DB_PORT', '1433'), 'database' => env('DB_DATABASE', 'forge'), 'username' => env('DB_USERNAME', 'forge'), 'password' => env('DB_PASSWORD', ''), 'charset' => 'utf8', 'prefix' => '', ], ], /* |-------------------------------------------------------------------------- | Migration Repository Table |-------------------------------------------------------------------------- | | This table keeps track of all the migrations that have already run for | your application. Using this information, we can determine which of | the migrations on disk haven't actually been run in the database. | */ 'migrations' => 'migrations', /* |-------------------------------------------------------------------------- | Redis Databases |-------------------------------------------------------------------------- | | Redis is an open source, fast, and advanced key-value store that also | provides a richer set of commands than a typical key-value systems | such as APC or Memcached. Laravel makes it easy to dig right in. | */ 'redis' => [ 'client' => 'predis', 'default' => [ 'host' => env('REDIS_HOST', '127.0.0.1'), 'password' => env('REDIS_PASSWORD', null), 'port' => env('REDIS_PORT', 6379), 'database' => 0, ], 'session' => [ 'host' => env('REDIS_HOST', 'localhost'), 'password' => env('REDIS_PASSWORD', null), 'port' => env('REDIS_PORT', 6379), 'database' => 1, ], ], ]; ================================================ FILE: config/entrust.php ================================================ 'App\Models\Role', /* |-------------------------------------------------------------------------- | Entrust Roles Table |-------------------------------------------------------------------------- | | This is the roles table used by Entrust to save roles to the database. | */ 'roles_table' => 'roles', /* |-------------------------------------------------------------------------- | Entrust Permission Model |-------------------------------------------------------------------------- | | This is the Permission model used by Entrust to create correct relations. | Update the permission if it is in a different namespace. | */ 'permission' => 'App\Models\Permission', /* |-------------------------------------------------------------------------- | Entrust Permissions Table |-------------------------------------------------------------------------- | | This is the permissions table used by Entrust to save permissions to the | database. | */ 'permissions_table' => 'permissions', /* |-------------------------------------------------------------------------- | Entrust permission_role Table |-------------------------------------------------------------------------- | | This is the permission_role table used by Entrust to save relationship | between permissions and roles to the database. | */ 'permission_role_table' => 'permission_role', /* |-------------------------------------------------------------------------- | Entrust role_user Table |-------------------------------------------------------------------------- | | This is the role_user table used by Entrust to save assigned roles to the | database. | */ 'role_user_table' => 'role_user', /* |-------------------------------------------------------------------------- | User Foreign key on Entrust's role_user Table (Pivot) |-------------------------------------------------------------------------- */ 'user_foreign_key' => 'user_id', /* |-------------------------------------------------------------------------- | Role Foreign key on Entrust's role_user and permission_role Tables (Pivot) |-------------------------------------------------------------------------- */ 'role_foreign_key' => 'role_id', /* |-------------------------------------------------------------------------- | Permission Foreign key on Entrust's permission_role Table (Pivot) |-------------------------------------------------------------------------- */ 'permission_foreign_key' => 'permission_id', ]; ================================================ FILE: config/filesystems.php ================================================ env('FILESYSTEM_DRIVER', 'public'), /* |-------------------------------------------------------------------------- | Default Cloud Filesystem Disk |-------------------------------------------------------------------------- | | Many applications store files both locally and in the cloud. For this | reason, you may specify a default "cloud" driver here. This driver | will be bound as the Cloud disk implementation in the container. | */ 'cloud' => env('FILESYSTEM_CLOUD', 's3'), /* |-------------------------------------------------------------------------- | Filesystem Disks |-------------------------------------------------------------------------- | | Here you may configure as many filesystem "disks" as you wish, and you | may even configure multiple disks of the same driver. Defaults have | been setup for each driver as an example of the required options. | | Supported Drivers: "local", "ftp", "s3", "rackspace" | */ 'disks' => [ 'local' => [ 'driver' => 'local', 'root' => storage_path('app'), ], 'public' => [ 'driver' => 'local', 'root' => public_path(env('UPLOAD_PATH','uploads')), ], 'backup' => [ 'driver' => 'local', 'root' => env('BACKUP_DISK', storage_path('app')), ], 'qiniu' => [ 'driver' => 'qiniu', 'access_key' => env('QINIU_ACCESS_KEY', 'xxxxxxxxxxxxxxxx'), 'secret_key' => env('QINIU_SECRET_KEY', 'xxxxxxxxxxxxxxxx'), 'bucket' => env('QINIU_BUCKET', 'test'), 'domain' => env('QINIU_DOMAIN', 'xxx.clouddn.com'), // or host: https://xxxx.clouddn.com ], 's3' => [ 'driver' => 's3', 'key' => env('AWS_KEY'), 'secret' => env('AWS_SECRET'), 'region' => env('AWS_REGION'), 'bucket' => env('AWS_BUCKET'), ], ], ]; ================================================ FILE: config/laravel-backup.php ================================================ [ /* * The name of this application. You can use this name to monitor * the backups. */ 'name' => 'codehaoshi.com', 'source' => [ 'files' => [ /* * The list of directories and files that will be included in the backup. */ 'include' => [ base_path(), ], /* * These directories and files will be excluded from the backup. * * Directories used by the backup process will automatically be excluded. */ 'exclude' => [ base_path('vendor'), base_path('node_modules'), public_path('assets/dashboard'), storage_path() ], /* * Determines if symlinks should be followed. */ 'followLinks' => false, ], /* * The names of the connections to the databases that should be backed up * MySQL, PostgreSQL, SQLite and Mongo databases are supported. */ 'databases' => [ 'mysql', ], ], /* * The database dump can be gzipped to decrease diskspace usage. */ 'gzip_database_dump' => false, 'destination' => [ /* * The filename prefix used for the backup zip file. */ 'filename_prefix' => '', /* * The disk names on which the backups will be stored. */ 'disks' => [ 'backup', ], ], ], /* * You can get notified when specific events occur. Out of the box you can use 'mail' and 'slack'. * For Slack you need to install guzzlehttp/guzzle. * * You can also use your own notification classes, just make sure the class is named after one of * the `Spatie\Backup\Events` classes. */ 'notifications' => [ 'notifications' => [ \Spatie\Backup\Notifications\Notifications\BackupHasFailed::class => ['mail'], \Spatie\Backup\Notifications\Notifications\UnhealthyBackupWasFound::class => ['mail'], \Spatie\Backup\Notifications\Notifications\CleanupHasFailed::class => ['mail'], \Spatie\Backup\Notifications\Notifications\BackupWasSuccessful::class => ['mail'], \Spatie\Backup\Notifications\Notifications\HealthyBackupWasFound::class => ['mail'], \Spatie\Backup\Notifications\Notifications\CleanupWasSuccessful::class => ['mail'], ], /* * Here you can specify the notifiable to which the notifications should be sent. The default * notifiable will use the variables specified in this config file. */ 'notifiable' => \Spatie\Backup\Notifications\Notifiable::class, 'mail' => [ 'from' => 'code好事', 'to' => '18313852226@sina.cn', ], 'slack' => [ 'webhook_url' => '', /* * If this is set to null the default channel of the webhook will be used. */ 'channel' => null, ], ], /* * Here you can specify which backups should be monitored. * If a backup does not meet the specified requirements the * UnHealthyBackupWasFound event will be fired. */ 'monitorBackups' => [ [ 'name' => env('APP_URL'), 'disks' => ['local'], 'newestBackupsShouldNotBeOlderThanDays' => 1, 'storageUsedMayNotBeHigherThanMegabytes' => 5000, ], /* [ 'name' => 'name of the second app', 'disks' => ['local', 's3'], 'newestBackupsShouldNotBeOlderThanDays' => 1, 'storageUsedMayNotBeHigherThanMegabytes' => 5000, ], */ ], 'cleanup' => [ /* * The strategy that will be used to cleanup old backups. The default strategy * will keep all backups for a certain amount of days. After that period only * a daily backup will be kept. After that period only weekly backups will * be kept and so on. * * No matter how you configure it the default strategy will never * delete the newest backup. */ 'strategy' => \Spatie\Backup\Tasks\Cleanup\Strategies\DefaultStrategy::class, 'defaultStrategy' => [ /* * The number of days for which backups must be kept. */ 'keepAllBackupsForDays' => 7, /* * The number of days for which daily backups must be kept. */ 'keepDailyBackupsForDays' => 16, /* * The number of weeks for which one weekly backup must be kept. */ 'keepWeeklyBackupsForWeeks' => 8, /* * The number of months for which one monthly backup must be kept. */ 'keepMonthlyBackupsForMonths' => 4, /* * The number of years for which one yearly backup must be kept. */ 'keepYearlyBackupsForYears' => 2, /* * After cleaning up the backups remove the oldest backup until * this amount of megabytes has been reached. */ 'deleteOldestBackupsWhenUsingMoreMegabytesThan' => 5000, ], ], ]; ================================================ FILE: config/mail.php ================================================ env('MAIL_DRIVER', 'smtp'), /* |-------------------------------------------------------------------------- | SMTP Host Address |-------------------------------------------------------------------------- | | Here you may provide the host address of the SMTP server used by your | applications. A default option is provided that is compatible with | the Mailgun mail service which will provide reliable deliveries. | */ 'host' => env('MAIL_HOST', 'smtp.mailgun.org'), /* |-------------------------------------------------------------------------- | SMTP Host Port |-------------------------------------------------------------------------- | | This is the SMTP port used by your application to deliver e-mails to | users of the application. Like the host we have set this value to | stay compatible with the Mailgun e-mail application by default. | */ 'port' => env('MAIL_PORT', 587), /* |-------------------------------------------------------------------------- | Global "From" Address |-------------------------------------------------------------------------- | | You may wish for all e-mails sent by your application to be sent from | the same address. Here, you may specify a name and address that is | used globally for all e-mails that are sent by your application. | */ 'from' => [ 'address' => env('MAIL_FROM_ADDRESS', '18313852226@sina.cn'), 'name' => env('MAIL_FROM_NAME', 'Code好事'), ], /* |-------------------------------------------------------------------------- | E-Mail Encryption Protocol |-------------------------------------------------------------------------- | | Here you may specify the encryption protocol that should be used when | the application send e-mail messages. A sensible default using the | transport layer security protocol should provide great security. | */ 'encryption' => env('MAIL_ENCRYPTION', 'tls'), /* |-------------------------------------------------------------------------- | SMTP Server Username |-------------------------------------------------------------------------- | | If your SMTP server requires a username for authentication, you should | set it here. This will get used to authenticate with your server on | connection. You may also set the "password" value below this one. | */ 'username' => env('MAIL_USERNAME'), 'password' => env('MAIL_PASSWORD'), /* |-------------------------------------------------------------------------- | Sendmail System Path |-------------------------------------------------------------------------- | | When using the "sendmail" driver to send e-mails, we will need to know | the path to where Sendmail lives on this server. A default path has | been provided here, which will work well on most of your systems. | */ 'sendmail' => '/usr/sbin/sendmail -bs', /* |-------------------------------------------------------------------------- | Markdown Mail Settings |-------------------------------------------------------------------------- | | If you are using Markdown based email rendering, you may configure your | theme and component paths here, allowing you to customize the design | of the emails. Or, you may simply stick with the Laravel defaults! | */ 'markdown' => [ 'theme' => 'default', 'paths' => [ resource_path('views/vendor/mail'), ], ], ]; ================================================ FILE: config/queue.php ================================================ env('QUEUE_DRIVER', 'sync'), /* |-------------------------------------------------------------------------- | Queue Connections |-------------------------------------------------------------------------- | | Here you may configure the connection information for each server that | is used by your application. A default configuration has been added | for each back-end shipped with Laravel. You are free to add more. | */ 'connections' => [ 'sync' => [ 'driver' => 'sync', ], 'database' => [ 'driver' => 'database', 'table' => 'jobs', 'queue' => 'default', 'retry_after' => 90, ], 'beanstalkd' => [ 'driver' => 'beanstalkd', 'host' => 'localhost', 'queue' => 'default', 'retry_after' => 90, ], 'sqs' => [ 'driver' => 'sqs', 'key' => 'your-public-key', 'secret' => 'your-secret-key', 'prefix' => 'https://sqs.us-east-1.amazonaws.com/your-account-id', 'queue' => 'your-queue-name', 'region' => 'us-east-1', ], 'redis' => [ 'driver' => 'redis', 'connection' => 'default', 'queue' => 'default', 'retry_after' => 90, ], ], /* |-------------------------------------------------------------------------- | Failed Queue Jobs |-------------------------------------------------------------------------- | | These options configure the behavior of failed queue job logging so you | can control which database and table are used to store the jobs that | have failed. You may change them to any database / table you wish. | */ 'failed' => [ 'database' => env('DB_CONNECTION', 'mysql'), 'table' => 'failed_jobs', ], ]; ================================================ FILE: config/scout.php ================================================ env('SCOUT_DRIVER', 'algolia'), /* |-------------------------------------------------------------------------- | Index Prefix |-------------------------------------------------------------------------- | | Here you may specify a prefix that will be applied to all search index | names used by Scout. This prefix may be useful if you have multiple | "tenants" or applications sharing the same search infrastructure. | */ 'prefix' => env('SCOUT_PREFIX', ''), /* |-------------------------------------------------------------------------- | Queue Data Syncing |-------------------------------------------------------------------------- | | This option allows you to control if the operations that sync your data | with your search engines are queued. When this is set to "true" then | all automatic data syncing will get queued for better performance. | */ 'queue' => env('SCOUT_QUEUE', false), /* |-------------------------------------------------------------------------- | Chuck Sizes |-------------------------------------------------------------------------- | | These options allow you to control the maximum chunk size when you are | mass importing data into the search engine. This allows you to fine | tune these chunk sizes based on the capabilites of your machines. | */ 'chunk' => [ 'searchable' => 500, 'unsearchable' => 500, ], /* |-------------------------------------------------------------------------- | Algolia Configuration |-------------------------------------------------------------------------- | | Here you may configure your Algolia settings. Algolia is a cloud hosted | search engine which works great with Scout out of the box. Just plug | in your application ID and admin API key to get started searching. | */ 'algolia' => [ 'id' => env('ALGOLIA_APP_ID', ''), 'secret' => env('ALGOLIA_SECRET', ''), ], ]; ================================================ FILE: config/services.php ================================================ [ 'domain' => env('MAILGUN_DOMAIN'), 'secret' => env('MAILGUN_SECRET'), ], 'ses' => [ 'key' => env('SES_KEY'), 'secret' => env('SES_SECRET'), 'region' => 'us-east-1', ], 'sparkpost' => [ 'secret' => env('SPARKPOST_SECRET'), ], 'stripe' => [ 'model' => App\User::class, 'key' => env('STRIPE_KEY'), 'secret' => env('STRIPE_SECRET'), ], // Self add services config 'github' => [ 'client_id' => env('CLIENT_ID'), 'client_secret' => env('CLIENT_SECRET'), 'redirect' => str_finish(env('APP_URL'), '/').'login/github/callback',// str_finish方法是 laravel 自带的助手函数 ], 'youdao' => [ 'appKey' => env('YOUDAO_APP_KEY'), 'appSecret' => env('YOUDAO_APP_SECRET'), ], ]; ================================================ FILE: config/session.php ================================================ env('SESSION_DRIVER', 'file'), /* |-------------------------------------------------------------------------- | Session Lifetime |-------------------------------------------------------------------------- | | Here you may specify the number of minutes that you wish the session | to be allowed to remain idle before it expires. If you want them | to immediately expire on the browser closing, set that option. | */ 'lifetime' => 120, 'expire_on_close' => false, /* |-------------------------------------------------------------------------- | Session Encryption |-------------------------------------------------------------------------- | | This option allows you to easily specify that all of your session data | should be encrypted before it is stored. All encryption will be run | automatically by Laravel and you can use the Session like normal. | */ 'encrypt' => false, /* |-------------------------------------------------------------------------- | Session File Location |-------------------------------------------------------------------------- | | When using the native session driver, we need a location where session | files may be stored. A default has been set for you but a different | location may be specified. This is only needed for file sessions. | */ 'files' => storage_path('framework/sessions'), /* |-------------------------------------------------------------------------- | Session Database Connection |-------------------------------------------------------------------------- | | When using the "database" or "redis" session drivers, you may specify a | connection that should be used to manage these sessions. This should | correspond to a connection in your database configuration options. | */ 'connection' => 'session', /* |-------------------------------------------------------------------------- | Session Database Table |-------------------------------------------------------------------------- | | When using the "database" session driver, you may specify the table we | should use to manage the sessions. Of course, a sensible default is | provided for you; however, you are free to change this as needed. | */ 'table' => 'sessions', /* |-------------------------------------------------------------------------- | Session Cache Store |-------------------------------------------------------------------------- | | When using the "apc" or "memcached" session drivers, you may specify a | cache store that should be used for these sessions. This value must | correspond with one of the application's configured cache stores. | */ 'store' => null, /* |-------------------------------------------------------------------------- | Session Sweeping Lottery |-------------------------------------------------------------------------- | | Some session drivers must manually sweep their storage location to get | rid of old sessions from storage. Here are the chances that it will | happen on a given request. By default, the odds are 2 out of 100. | */ 'lottery' => [2, 100], /* |-------------------------------------------------------------------------- | Session Cookie Name |-------------------------------------------------------------------------- | | Here you may change the name of the cookie used to identify a session | instance by ID. The name specified here will get used every time a | new session cookie is created by the framework for every driver. | */ 'cookie' => 'laravel_session', /* |-------------------------------------------------------------------------- | Session Cookie Path |-------------------------------------------------------------------------- | | The session cookie path determines the path for which the cookie will | be regarded as available. Typically, this will be the root path of | your application but you are free to change this when necessary. | */ 'path' => '/', /* |-------------------------------------------------------------------------- | Session Cookie Domain |-------------------------------------------------------------------------- | | Here you may change the domain of the cookie used to identify a session | in your application. This will determine which domains the cookie is | available to in your application. A sensible default has been set. | */ 'domain' => env('SESSION_DOMAIN', null), /* |-------------------------------------------------------------------------- | HTTPS Only Cookies |-------------------------------------------------------------------------- | | By setting this option to true, session cookies will only be sent back | to the server if the browser has a HTTPS connection. This will keep | the cookie from being sent to you if it can not be done securely. | */ 'secure' => env('SESSION_SECURE_COOKIE', false), /* |-------------------------------------------------------------------------- | HTTP Access Only |-------------------------------------------------------------------------- | | Setting this value to true will prevent JavaScript from accessing the | value of the cookie and the cookie will only be accessible through | the HTTP protocol. You are free to modify this option if needed. | */ 'http_only' => true, ]; ================================================ FILE: config/view.php ================================================ [ resource_path('views'), ], /* |-------------------------------------------------------------------------- | Compiled View Path |-------------------------------------------------------------------------- | | This option determines where all the compiled Blade templates will be | stored for your application. Typically, this is within the storage | directory. However, as usual, you are free to change this value. | */ 'compiled' => realpath(storage_path('framework/views')), ]; ================================================ FILE: database/.gitignore ================================================ *.sqlite ================================================ FILE: database/factories/ModelFactory.php ================================================ define(\App\Models\User::class, function (Faker\Generator $faker) { static $password; return [ 'city' => $faker->city, 'user_name' => $faker->userName, 'is_admin' => 'no', 'github_name' => $faker->userName, 'company' => $faker->userName, 'personal_website' => $faker->url, 'introduction' => $faker->sentence, 'email' => $faker->email, 'password' => $password ?: $password = bcrypt('secret'), 'avatar' => '/assets/dashboard/images/head_default.gif', 'status' => '1', 'article_count' => '0', 'question_count' => '0', 'created_at' => \Carbon\Carbon::now() ]; }); $factory->define(\App\Models\Article::class, function (Faker\Generator $faker) { $title = $faker->sentence(mt_rand(3,10)); return [ 'last_comment_user_id' => 0, 'slug' => str_slug($title), 'title' => $title, 'content' => $faker->paragraph, 'description' => $faker->sentence, 'published_at' => \Carbon\Carbon::now(), 'created_at' => \Carbon\Carbon::now(), ]; }); $factory->define(\App\Models\Question::class, function (Faker\Generator $faker) { $title = $faker->sentence(mt_rand(3,10)); return [ 'last_reply_user_id' => 0, 'slug' => str_slug($title), 'title' => $title, 'content' => $faker->paragraph, 'description' => $faker->sentence, 'published_at' => \Carbon\Carbon::now(), 'created_at' => \Carbon\Carbon::now(), ]; }); ================================================ FILE: database/migrations/2014_10_12_000000_create_users_table.php ================================================ increments('id'); $table->string('user_name')->nullable()->unique()->comment('用户名')->index(); $table->string('nickname')->nullable()->comment('昵称')->index(); $table->string('email')->nullable()->unique()->comment('email'); $table->text('avatar')->nullable()->comment('头像'); $table->string('password')->nullable()->comment('密码'); $table->tinyInteger('status')->default(0)->comment('用户状态:0禁用,1启用'); $table->enum('is_admin', ['yes','no'])->default('no')->index()->comment('是否为后台管理员:no 否,yes 是'); $table->string('city')->nullable()->comment('城市'); $table->string('company')->nullable()->comment('公司'); $table->string('personal_website')->nullable()->comment('个人网站'); $table->string('introduction')->nullable()->comment('个人介绍'); $table->integer('notification_count')->default(0)->comment('通告消息数量'); $table->integer('article_count')->default(0)->index()->comment('发布的文章数量'); $table->integer('question_count')->default(0)->index()->comment('发布的问题数量'); $table->integer('follower_count')->default(0)->index()->comment('粉丝数量'); $table->integer('comment_count')->default(0)->index()->comment('评论的文章数量'); $table->integer('reply_count')->default(0)->index()->comment('评论的问题数量'); $table->integer('github_id')->nullable()->index(); $table->string('github_name')->nullable()->index(); $table->string('image_url')->nullable(); $table->string('register_source')->nullable()->index(); $table->string('remember_token')->nullable(); $table->string('login_token')->nullable()->comment('登录 token'); $table->string('verification_token')->nullable(); $table->timestamp('last_actived_at')->nullable(); $table->timestamp('created_at')->nullable(); $table->timestamp('updated_at')->nullable(); $table->softDeletes(); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::dropIfExists('users'); } } ================================================ FILE: database/migrations/2014_10_12_100000_create_password_resets_table.php ================================================ string('email')->index(); $table->string('token'); $table->timestamp('created_at')->nullable(); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::dropIfExists('password_resets'); } } ================================================ FILE: database/migrations/2017_08_03_153641_entrust_setup_tables.php ================================================ increments('id'); $table->string('name')->unique(); $table->string('display_name')->nullable(); $table->string('description')->nullable(); $table->timestamps(); }); // Create table for associating roles to users (Many-to-Many) Schema::create('role_user', function (Blueprint $table) { $table->integer('user_id')->unsigned(); $table->integer('role_id')->unsigned(); $table->foreign('user_id')->references('id')->on('users') ->onUpdate('cascade')->onDelete('cascade'); $table->foreign('role_id')->references('id')->on('roles') ->onUpdate('cascade')->onDelete('cascade'); $table->primary(['user_id', 'role_id']); }); // Create table for storing permissions Schema::create('permissions', function (Blueprint $table) { $table->increments('id'); $table->string('name')->unique(); $table->string('display_name')->nullable(); $table->string('description')->nullable(); $table->timestamps(); }); // Create table for associating permissions to roles (Many-to-Many) Schema::create('permission_role', function (Blueprint $table) { $table->integer('permission_id')->unsigned(); $table->integer('role_id')->unsigned(); $table->foreign('permission_id')->references('id')->on('permissions') ->onUpdate('cascade')->onDelete('cascade'); $table->foreign('role_id')->references('id')->on('roles') ->onUpdate('cascade')->onDelete('cascade'); $table->primary(['permission_id', 'role_id']); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::drop('permission_role'); Schema::drop('permissions'); Schema::drop('role_user'); Schema::drop('roles'); } } ================================================ FILE: database/migrations/2017_08_05_175713_create_article_categories_table.php ================================================ increments('id'); $table->tinyInteger('parent_id')->unsigned()->default(0)->comment('父id'); $table->string('name')->index()->comment('名称'); $table->string('slug', 60)->unique()->comment('缩略名'); $table->tinyInteger('weight')->default(0)->comment('权重'); $table->integer('article_count')->default(0)->comment('文章数'); $table->string('description')->nullable(); $table->string('image_url')->nullable()->comment('封面图片'); $table->string('style', 30)->default('violet')->comment('样式'); $table->timestamps(); $table->softDeletes(); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::dropIfExists('article_categories'); } } ================================================ FILE: database/migrations/2017_08_05_175737_create_articles_table.php ================================================ increments('id'); $table->integer('category_id')->unsigned()->index()->comment('分类id'); $table->integer('user_id')->unsigned()->comment('作者id'); $table->integer('comment_count')->default(0)->index()->comment('评论数量'); $table->integer('view_count')->unsigned()->default(0)->index()->comment('查看数量'); $table->integer('vote_count')->default(0)->index()->comment('点赞数量'); $table->integer('last_comment_user_id')->unsigned()->default(0)->index()->comment('最近一次评论者'); $table->integer('weight')->default(50)->index()->comment('权重'); $table->enum('is_excellent', ['yes', 'no'])->default('no')->index()->comment('是否是优秀文章'); $table->enum('is_hot', ['yes', 'no'])->default('no')->index()->comment('是否是热门文章'); $table->enum('only_owner_can_see', ['yes', 'no'])->default('no')->index()->comment('是否仅自己可见'); $table->enum('is_draft', ['yes', 'no'])->default('no')->index()->comment('是否为草稿'); $table->string('title')->index()->comment('标题'); $table->string('slug')->unique()->comment('缩略标题'); $table->text('content')->comment('文章内容'); $table->string('description')->nullable()->comment('描述'); $table->timestamp('published_at')->nullable()->index()->comment('发布时间'); $table->timestamps(); $table->softDeletes(); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::dropIfExists('articles'); } } ================================================ FILE: database/migrations/2017_08_07_070242_create_tags_table.php ================================================ increments('id'); $table->string('tag')->unique(); $table->string('slug'); $table->string('description'); $table->string('style', 30)->default('violet')->comment('样式'); $table->timestamps(); $table->softDeletes(); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::dropIfExists('tags'); } } ================================================ FILE: database/migrations/2017_08_07_070317_create_taggables_table.php ================================================ integer('tag_id')->unsigned()->index(); $table->integer('taggable_id')->unsigned()->index(); $table->string('taggable_type')->index(); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::dropIfExists('taggables'); } } ================================================ FILE: database/migrations/2017_08_10_054604_create_comments_table.php ================================================ increments('id'); $table->integer('article_id')->unsigned()->default(0)->index(); $table->integer('user_id')->unsigned()->default(0)->index(); $table->enum('is_blocked', ['yes', 'no'])->default('no')->index(); $table->integer('vote_count')->default(0)->index(); $table->text('body'); $table->text('body_original')->nullable(); $table->softDeletes(); $table->timestamps(); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::dropIfExists('comments'); } } ================================================ FILE: database/migrations/2017_08_13_063712_create_votes_table.php ================================================ increments('id'); $table->integer('user_id')->unsigned()->default(0); $table->integer('votable_id')->unsigned()->default(0); $table->string('votable_type')->index(); $table->timestamps(); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::dropIfExists('votes'); } } ================================================ FILE: database/migrations/2017_08_14_090729_create_followers_table.php ================================================ increments('id'); $table->unsignedInteger('user_id'); $table->unsignedInteger('follow_id'); $table->timestamps(); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::dropIfExists('followers'); } } ================================================ FILE: database/migrations/2017_08_14_124526_create_notifications_table.php ================================================ uuid('id')->primary(); $table->string('type'); $table->morphs('notifiable'); $table->text('data'); $table->timestamp('read_at')->nullable(); $table->timestamps(); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::dropIfExists('notifications'); } } ================================================ FILE: database/migrations/2017_08_18_154806_create_question_categories_table.php ================================================ increments('id'); $table->tinyInteger('parent_id')->unsigned()->default(0)->comment('父id'); $table->string('name')->index()->comment('名称'); $table->string('slug', 60)->unique()->comment('缩略名'); $table->tinyInteger('weight')->default(0)->comment('权重'); $table->integer('question_count')->default(0)->comment('问题数'); $table->string('description')->nullable(); $table->string('image_url')->nullable()->comment('封面图片'); $table->string('style', 30)->default('violet')->comment('样式'); $table->timestamps(); $table->softDeletes(); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::dropIfExists('question_categories'); } } ================================================ FILE: database/migrations/2017_08_19_105055_create_questions_table.php ================================================ increments('id'); $table->integer('category_id')->unsigned()->index()->comment('分类id'); $table->integer('user_id')->unsigned()->comment('作者id'); $table->integer('reply_count')->default(0)->index()->comment('评论数量'); $table->integer('view_count')->unsigned()->default(0)->index()->comment('查看数量'); $table->integer('vote_count')->default(0)->index()->comment('点赞数量'); $table->integer('last_reply_user_id')->unsigned()->default(0)->index()->comment('最近一次回复者'); $table->integer('weight')->default(50)->index()->comment('权重'); $table->enum('is_excellent', ['yes', 'no'])->default('no')->index()->comment('是否是优秀问题'); $table->enum('is_hot', ['yes', 'no'])->default('no')->index()->comment('是否是热门问题'); $table->enum('only_owner_can_see', ['yes', 'no'])->default('no')->index()->comment('是否仅自己可见'); $table->enum('is_draft', ['yes', 'no'])->default('no')->index()->comment('是否为草稿'); $table->string('title')->index()->comment('标题'); $table->string('slug')->unique()->comment('缩略标题'); $table->text('content')->comment('问题内容'); $table->string('description')->nullable()->comment('简单描述'); $table->timestamp('published_at')->nullable()->index()->comment('发布时间'); $table->timestamps(); $table->softDeletes(); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::dropIfexists('questions'); } } ================================================ FILE: database/migrations/2017_08_19_153441_create_replies_table.php ================================================ increments('id'); $table->integer('question_id')->unsigned()->default(0)->index(); $table->integer('user_id')->unsigned()->default(0)->index(); $table->enum('is_blocked', ['yes', 'no'])->default('no')->index(); $table->integer('vote_count')->default(0)->index(); $table->text('body'); $table->text('body_original')->nullable(); $table->softDeletes(); $table->timestamps(); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::dropIfExists('replies'); } } ================================================ FILE: database/migrations/2017_08_20_072744_create_activities_table.php ================================================ increments('id'); $table->string('causer')->index(); $table->string('type')->index(); $table->string('indentifier')->index(); $table->integer('user_id')->unsigned()->index(); $table->text('data')->nullable(); $table->timestamps(); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::drop('activities'); } } ================================================ FILE: database/migrations/2017_08_22_111854_create_links_table.php ================================================ increments('id'); $table->string('title')->index(); $table->enum('type', ['link', 'recommend'])->default('link')->index(); $table->string('link'); $table->enum('is_enabled', ['yes', 'no'])->default('yes')->index(); $table->timestamps(); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::dropIfExists('links'); } } ================================================ FILE: database/migrations/2017_08_22_111936_create_abouts_table.php ================================================ increments('id'); $table->string('title')->index(); $table->text('content'); $table->enum('is_enabled', ['yes', 'no'])->default('yes')->index(); $table->softDeletes(); $table->timestamps(); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::dropIfExists('abouts'); } } ================================================ FILE: database/migrations/2017_08_25_164526_create_sitestatus_table.php ================================================ increments('id'); $table->string('day')->index(); $table->integer('register_count')->unsigned()->default(0); $table->integer('github_regitster_count')->unsigned()->default(0); $table->integer('wechat_registered_count')->unsigned()->default(0); $table->tinyInteger('article_count')->unsigned()->default(0); $table->tinyInteger('question_count')->unsigned()->default(0); $table->integer('comment_count')->unsigned()->default(0); $table->integer('reply_count')->unsigned()->default(0); $table->integer('image_count')->unsigned()->default(0); $table->timestamps(); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::dropIfExists('site_status'); } } ================================================ FILE: database/seeds/ArticleCategoriesTableSeeder.php ================================================ insert(array( 0 => array( 'id' => 1, 'parent_id' => 0, 'name' => 'php', 'slug' => 'php', 'weight' => '50', 'article_count' => '20', 'description' => 'php 从入门到放弃的坑坑记录,解析为什么 php 是世界上最好的语言。', 'image_url' => '/images/article-cat.png', 'style' => 'violet', 'created_at' => Carbon::now(), ), 1 => array( 'id' => 2, 'parent_id' => 0, 'name' => 'python', 'slug' => 'python', 'weight' => '50', 'article_count' => '20', 'description' => 'python 从入门到放弃的坑坑记录,目录很流行的弱类型语言,能干好多事情。', 'image_url' => '/images/article-cat.png', 'style' => 'teal', 'created_at' => Carbon::now(), ), 2 => array( 'id' => 3, 'parent_id' => 0, 'name' => 'linux', 'slug' => 'linux', 'weight' => '50', 'article_count' => '20', 'description' => 'linux Os ,很强大的一个操作系统,web 开发者必备技能。', 'image_url' => '/images/article-cat.png', 'style' => 'green', 'created_at' => Carbon::now(), ), 3 => array( 'id' => 4, 'parent_id' => 0, 'name' => '开发者工具', 'slug' => 'tools', 'weight' => '50', 'article_count' => '40', 'description' => '开发中经常用到的各种工具,如 Ide、svn、git 等等。', 'image_url' => '/images/article-cat.png', 'style' => 'red', 'created_at' => Carbon::now(), ) )); } } ================================================ FILE: database/seeds/ArticlesTableSeeder.php ================================================ times(100)->make()->each(function ($article, $i) { $user_id = 1; if ($i < 20) { $category = 1; } elseif ($i < 40) { $category = 2; } elseif ($i < 60) { $category = 3; } else { $user_id = 2; $category = 4; } $article->user_id = $user_id; $article->category_id = $category; $article->is_excellent = rand(0, 1) ? 'yes' : 'no'; $article->is_hot = rand(0, 1) ? 'yes' : 'no'; }); DB::table('articles')->insert($articles->toArray()); } } ================================================ FILE: database/seeds/DatabaseSeeder.php ================================================ call(UsersTableSeeder::class); $this->call(ArticleCategoriesTableSeeder::class); $this->call(TagsTableSeeder::class); $this->call(ArticlesTableSeeder::class); $this->call(QuestionCategoriesTableSeeder::class); $this->call(QuestionsTableSeeder::class); $this->call(TaggablesTableSeeder::class); $this->call(PermissionsTableSeeder::class); } } ================================================ FILE: database/seeds/PermissionsTableSeeder.php ================================================ insert(array( 0 => array( 'name' => 'edit_article', 'display_name' => '编辑文章', 'description' => '编辑文章-CU' ), 1 => array( 'name' => 'edit_question', 'display_name' => '编辑问题', 'description' => '编辑问题-CU' ), 2 => array( 'name' => 'handle_abouts', 'display_name' => '关于我们作者', 'description' => '可编辑关于我们' ), )); } } ================================================ FILE: database/seeds/QuestionCategoriesTableSeeder.php ================================================ insert(array( 0 => array( 'id' => 1, 'parent_id' => 0, 'name' => '编程问题', 'slug' => 'code-problem', 'weight' => '50', 'question_count' => '20', 'description' => 'php 从入门到放弃的坑坑记录,解析为什么 php 是世界上最好的语言。', 'image_url' => '/images/article-cat.png', 'style' => 'violet', 'created_at' => Carbon::now(), ), 1 => array( 'id' => 2, 'parent_id' => 0, 'name' => '生活问题', 'slug' => 'life-problem', 'weight' => '50', 'question_count' => '20', 'description' => 'python 从入门到放弃的坑坑记录,目录很流行的弱类型语言,能干好多事情。', 'image_url' => '/images/article-cat.png', 'style' => 'teal', 'created_at' => Carbon::now(), ), 2 => array( 'id' => 3, 'parent_id' => 0, 'name' => '情感问题', 'slug' => 'emotion-problem', 'weight' => '50', 'question_count' => '20', 'description' => 'linux Os ,很强大的一个操作系统,web 开发者必备技能。', 'image_url' => '/images/article-cat.png', 'style' => 'green', 'created_at' => Carbon::now(), ), 3 => array( 'id' => 4, 'parent_id' => 0, 'name' => '游戏问题', 'slug' => 'game-problem', 'weight' => '50', 'question_count' => '40', 'description' => '开发中经常用到的各种工具,如 Ide、svn、git 等等。', 'image_url' => '/images/article-cat.png', 'style' => 'red', 'created_at' => Carbon::now(), ) )); } } ================================================ FILE: database/seeds/QuestionsTableSeeder.php ================================================ times(100)->make()->each(function ($question, $i) { $user_id = 1; if ($i < 20) { $category = 1; } elseif ($i < 40) { $category = 2; } elseif ($i < 60) { $category = 3; } else { $user_id = 2; $category = 4; } $question->user_id = $user_id; $question->category_id = $category; $question->is_excellent = rand(0, 1) ? 'yes' : 'no'; $question->is_hot = rand(0, 1) ? 'yes' : 'no'; }); DB::table('questions')->insert($questions->toArray()); } } ================================================ FILE: database/seeds/RolesTableSeeder.php ================================================ insert(array( 0 => array( 'name' => 'supper_admin', 'display_name' => '超级管理员', 'description' => '拥有最高管理权限' ), 1 => array( 'name' => 'article_manager', 'display_name' => '文章管理员', 'description' => '拥有文章的管理权限' ), 2 => array( 'name' => 'question_manager', 'display_name' => '问题管理员', 'description' => '拥有问题管理权限' ), )); } } ================================================ FILE: database/seeds/TaggablesTableSeeder.php ================================================ toArray(); $question_ids = Question::pluck('id')->toArray(); foreach ($article_ids as $article_id) { Article::findOrFail($article_id)->tags()->sync([rand(1,2),rand(3,4)]); } foreach ($question_ids as $question_id) { Question::findOrFail($question_id)->tags()->sync([rand(1,2),rand(3,4)]); } } } ================================================ FILE: database/seeds/TagsTableSeeder.php ================================================ insert(array( 0 => array( 'id' => 1, 'tag' => 'jquery', 'slug' => 'jquery', 'description' => 'jquery,web 开发者必备技能。', 'style' => 'green', 'created_at' => Carbon::now(), ), 1 => array( 'id' => 2, 'tag' => 'nginx', 'slug' => 'nginx', 'description' => 'nginx,比 Apache 强大百倍的超强 web 服务器。', 'style' => 'red', 'created_at' => Carbon::now(), ), 2 => array( 'id' => 3, 'tag' => 'es6', 'slug' => 'es6', 'description' => '学习 vue.js 的前置技能', 'style' => 'violet', 'created_at' => Carbon::now(), ), 3 => array( 'id' => 4, 'tag' => 'vue', 'slug' => 'vue', 'description' => '现在最热门的 js 框架', 'style' => 'teal', 'created_at' => Carbon::now(), ), ) ); } } ================================================ FILE: database/seeds/UsersTableSeeder.php ================================================ times(49)->make()->each(function ($user, $i) { if ($i == 0) { $user->user_name = 'Ucers'; $user->is_admin = 'yes'; $user->email = 'ucer@codehaohsi.com'; $user->password = bcrypt('111111'); $user->article_count = 60; $user->question_count = 60; } if ($i == 1) { $user->user_name = 'Hello'; $user->is_admin = 'yes'; $user->email = 'hello@codehaohsi.com'; $user->password = bcrypt('111111'); $user->article_count = 40; $user->question_count = 40; } $user->github_id = $i + 1; }); DB::table('users')->insert($users->toArray()); $supper_admin = (new RoleRepository(new Role))->store(['name' => 'supper_admin', 'display_name' => '超级管理员', 'description' => '拥有最高管理权限']); User::findOrFail(1)->attachRole($supper_admin); } } ================================================ FILE: package.json ================================================ { "private": true, "scripts": { "dev": "npm run development", "development": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js", "watch": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --watch --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js", "watch-poll": "npm run watch -- --watch-poll", "hot": "cross-env NODE_ENV=development node_modules/webpack-dev-server/bin/webpack-dev-server.js --inline --hot --config=node_modules/laravel-mix/setup/webpack.config.js", "prod": "npm run production", "production": "cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js" }, "devDependencies": { "axios": "^0.15.3", "bootstrap-sass": "^3.3.7", "cross-env": "^5.0.1", "jquery": "2.1.1", "laravel-mix": "^1.0", "less": "^2.7.2", "less-loader": "^4.0.5", "lodash": "^4.17.4", "vue": "^2.1.10" }, "dependencies": { "emojione": "^3.1.2", "fine-uploader": "^5.15.0", "jquery-pjax": "^2.0.1", "marked": "^0.3.6", "semantic-ui": "^2.2.11", "simplemde": "^1.11.2", "social-share.js": "^1.0.16", "sweetalert": "^1.1.3", "toastr": "^2.1.2", "v-textcomplete": "^0.2.2", "vue-image-crop-upload": "^2.0.1" } } ================================================ FILE: phpunit.xml ================================================ ./tests/Feature ./tests/Unit ./app ================================================ FILE: public/.htaccess ================================================ Options -MultiViews RewriteEngine On # Redirect Trailing Slashes If Not A Folder... RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)/$ /$1 [L,R=301] # Handle Front Controller... RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^ index.php [L] # Handle Authorization Header RewriteCond %{HTTP:Authorization} . RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}] ================================================ FILE: public/assets/css/components/accordion.css ================================================ /*! * # Semantic UI 2.2.11 - Accordion * http://github.com/semantic-org/semantic-ui/ * * * Released under the MIT license * http://opensource.org/licenses/MIT * */ /******************************* Accordion *******************************/ .ui.accordion, .ui.accordion .accordion { max-width: 100%; } .ui.accordion .accordion { margin: 1em 0em 0em; padding: 0em; } /* Title */ .ui.accordion .title, .ui.accordion .accordion .title { cursor: pointer; } /* Default Styling */ .ui.accordion .title:not(.ui) { padding: 0.5em 0em; font-family: 'Lato', 'Helvetica Neue', Arial, Helvetica, sans-serif; font-size: 1em; color: rgba(0, 0, 0, 0.87); } /* Content */ .ui.accordion .title ~ .content, .ui.accordion .accordion .title ~ .content { display: none; } /* Default Styling */ .ui.accordion:not(.styled) .title ~ .content:not(.ui), .ui.accordion:not(.styled) .accordion .title ~ .content:not(.ui) { margin: ''; padding: 0.5em 0em 1em; } .ui.accordion:not(.styled) .title ~ .content:not(.ui):last-child { padding-bottom: 0em; } /* Arrow */ .ui.accordion .title .dropdown.icon, .ui.accordion .accordion .title .dropdown.icon { display: inline-block; float: none; opacity: 1; width: 1.25em; height: 1em; margin: 0em 0.25rem 0em 0rem; padding: 0em; font-size: 1em; -webkit-transition: opacity 0.1s ease, -webkit-transform 0.1s ease; transition: opacity 0.1s ease, -webkit-transform 0.1s ease; transition: transform 0.1s ease, opacity 0.1s ease; transition: transform 0.1s ease, opacity 0.1s ease, -webkit-transform 0.1s ease; vertical-align: baseline; -webkit-transform: none; transform: none; } /*-------------- Coupling ---------------*/ /* Menu */ .ui.accordion.menu .item .title { display: block; padding: 0em; } .ui.accordion.menu .item .title > .dropdown.icon { float: right; margin: 0.21425em 0em 0em 1em; -webkit-transform: rotate(180deg); transform: rotate(180deg); } /* Header */ .ui.accordion .ui.header .dropdown.icon { font-size: 1em; margin: 0em 0.25rem 0em 0rem; } /******************************* States *******************************/ .ui.accordion .active.title .dropdown.icon, .ui.accordion .accordion .active.title .dropdown.icon { -webkit-transform: rotate(90deg); transform: rotate(90deg); } .ui.accordion.menu .item .active.title > .dropdown.icon { -webkit-transform: rotate(90deg); transform: rotate(90deg); } /******************************* Types *******************************/ /*-------------- Styled ---------------*/ .ui.styled.accordion { width: 600px; } .ui.styled.accordion, .ui.styled.accordion .accordion { border-radius: 0.28571429rem; background: #FFFFFF; -webkit-box-shadow: 0px 1px 2px 0 rgba(34, 36, 38, 0.15), 0px 0px 0px 1px rgba(34, 36, 38, 0.15); box-shadow: 0px 1px 2px 0 rgba(34, 36, 38, 0.15), 0px 0px 0px 1px rgba(34, 36, 38, 0.15); } .ui.styled.accordion .title, .ui.styled.accordion .accordion .title { margin: 0em; padding: 0.75em 1em; color: rgba(0, 0, 0, 0.4); font-weight: bold; border-top: 1px solid rgba(34, 36, 38, 0.15); -webkit-transition: background 0.1s ease, color 0.1s ease; transition: background 0.1s ease, color 0.1s ease; } .ui.styled.accordion > .title:first-child, .ui.styled.accordion .accordion .title:first-child { border-top: none; } /* Content */ .ui.styled.accordion .content, .ui.styled.accordion .accordion .content { margin: 0em; padding: 0.5em 1em 1.5em; } .ui.styled.accordion .accordion .content { padding: 0em; padding: 0.5em 1em 1.5em; } /* Hover */ .ui.styled.accordion .title:hover, .ui.styled.accordion .active.title, .ui.styled.accordion .accordion .title:hover, .ui.styled.accordion .accordion .active.title { background: transparent; color: rgba(0, 0, 0, 0.87); } .ui.styled.accordion .accordion .title:hover, .ui.styled.accordion .accordion .active.title { background: transparent; color: rgba(0, 0, 0, 0.87); } /* Active */ .ui.styled.accordion .active.title { background: transparent; color: rgba(0, 0, 0, 0.95); } .ui.styled.accordion .accordion .active.title { background: transparent; color: rgba(0, 0, 0, 0.95); } /******************************* States *******************************/ /*-------------- Active ---------------*/ .ui.accordion .active.content, .ui.accordion .accordion .active.content { display: block; } /******************************* Variations *******************************/ /*-------------- Fluid ---------------*/ .ui.fluid.accordion, .ui.fluid.accordion .accordion { width: 100%; } /*-------------- Inverted ---------------*/ .ui.inverted.accordion .title:not(.ui) { color: rgba(255, 255, 255, 0.9); } /******************************* Theme Overrides *******************************/ @font-face { font-family: 'Accordion'; src: url(data:application/x-font-ttf;charset=utf-8;base64,AAEAAAALAIAAAwAwT1MvMggjB5AAAAC8AAAAYGNtYXAPfOIKAAABHAAAAExnYXNwAAAAEAAAAWgAAAAIZ2x5Zryj6HgAAAFwAAAAyGhlYWT/0IhHAAACOAAAADZoaGVhApkB5wAAAnAAAAAkaG10eAJuABIAAAKUAAAAGGxvY2EAjABWAAACrAAAAA5tYXhwAAgAFgAAArwAAAAgbmFtZfC1n04AAALcAAABPHBvc3QAAwAAAAAEGAAAACAAAwIAAZAABQAAAUwBZgAAAEcBTAFmAAAA9QAZAIQAAAAAAAAAAAAAAAAAAAABEAAAAAAAAAAAAAAAAAAAAABAAADw2gHg/+D/4AHgACAAAAABAAAAAAAAAAAAAAAgAAAAAAACAAAAAwAAABQAAwABAAAAFAAEADgAAAAKAAgAAgACAAEAIPDa//3//wAAAAAAIPDZ//3//wAB/+MPKwADAAEAAAAAAAAAAAAAAAEAAf//AA8AAQAAAAAAAAAAAAIAADc5AQAAAAABAAAAAAAAAAAAAgAANzkBAAAAAAEAAAAAAAAAAAACAAA3OQEAAAAAAQASAEkAtwFuABMAADc0PwE2FzYXFh0BFAcGJwYvASY1EgaABQgHBQYGBQcIBYAG2wcGfwcBAQcECf8IBAcBAQd/BgYAAAAAAQAAAEkApQFuABMAADcRNDc2MzIfARYVFA8BBiMiJyY1AAUGBwgFgAYGgAUIBwYFWwEACAUGBoAFCAcFgAYGBQcAAAABAAAAAQAAqWYls18PPPUACwIAAAAAAM/9o+4AAAAAz/2j7gAAAAAAtwFuAAAACAACAAAAAAAAAAEAAAHg/+AAAAIAAAAAAAC3AAEAAAAAAAAAAAAAAAAAAAAGAAAAAAAAAAAAAAAAAQAAAAC3ABIAtwAAAAAAAAAKABQAHgBCAGQAAAABAAAABgAUAAEAAAAAAAIAAAAAAAAAAAAAAAAAAAAAAAAADgCuAAEAAAAAAAEADAAAAAEAAAAAAAIADgBAAAEAAAAAAAMADAAiAAEAAAAAAAQADABOAAEAAAAAAAUAFgAMAAEAAAAAAAYABgAuAAEAAAAAAAoANABaAAMAAQQJAAEADAAAAAMAAQQJAAIADgBAAAMAAQQJAAMADAAiAAMAAQQJAAQADABOAAMAAQQJAAUAFgAMAAMAAQQJAAYADAA0AAMAAQQJAAoANABaAHIAYQB0AGkAbgBnAFYAZQByAHMAaQBvAG4AIAAxAC4AMAByAGEAdABpAG4AZ3JhdGluZwByAGEAdABpAG4AZwBSAGUAZwB1AGwAYQByAHIAYQB0AGkAbgBnAEYAbwBuAHQAIABnAGUAbgBlAHIAYQB0AGUAZAAgAGIAeQAgAEkAYwBvAE0AbwBvAG4ALgADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA) format('truetype'), url(data:application/font-woff;charset=utf-8;base64,d09GRk9UVE8AAASwAAoAAAAABGgAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABDRkYgAAAA9AAAAS0AAAEtFpovuE9TLzIAAAIkAAAAYAAAAGAIIweQY21hcAAAAoQAAABMAAAATA984gpnYXNwAAAC0AAAAAgAAAAIAAAAEGhlYWQAAALYAAAANgAAADb/0IhHaGhlYQAAAxAAAAAkAAAAJAKZAedobXR4AAADNAAAABgAAAAYAm4AEm1heHAAAANMAAAABgAAAAYABlAAbmFtZQAAA1QAAAE8AAABPPC1n05wb3N0AAAEkAAAACAAAAAgAAMAAAEABAQAAQEBB3JhdGluZwABAgABADr4HAL4GwP4GAQeCgAZU/+Lix4KABlT/4uLDAeLa/iU+HQFHQAAAHkPHQAAAH4RHQAAAAkdAAABJBIABwEBBw0PERQZHnJhdGluZ3JhdGluZ3UwdTF1MjB1RjBEOXVGMERBAAACAYkABAAGAQEEBwoNVp38lA78lA78lA77lA773Z33bxWLkI2Qj44I9xT3FAWOj5CNkIuQi4+JjoePiI2Gi4YIi/uUBYuGiYeHiIiHh4mGi4aLho2Ijwj7FPcUBYeOiY+LkAgO+92L5hWL95QFi5CNkI6Oj4+PjZCLkIuQiY6HCPcU+xQFj4iNhouGi4aJh4eICPsU+xQFiIeGiYaLhouHjYePiI6Jj4uQCA74lBT4lBWLDAoAAAAAAwIAAZAABQAAAUwBZgAAAEcBTAFmAAAA9QAZAIQAAAAAAAAAAAAAAAAAAAABEAAAAAAAAAAAAAAAAAAAAABAAADw2gHg/+D/4AHgACAAAAABAAAAAAAAAAAAAAAgAAAAAAACAAAAAwAAABQAAwABAAAAFAAEADgAAAAKAAgAAgACAAEAIPDa//3//wAAAAAAIPDZ//3//wAB/+MPKwADAAEAAAAAAAAAAAAAAAEAAf//AA8AAQAAAAEAADfYOJZfDzz1AAsCAAAAAADP/aPuAAAAAM/9o+4AAAAAALcBbgAAAAgAAgAAAAAAAAABAAAB4P/gAAACAAAAAAAAtwABAAAAAAAAAAAAAAAAAAAABgAAAAAAAAAAAAAAAAEAAAAAtwASALcAAAAAUAAABgAAAAAADgCuAAEAAAAAAAEADAAAAAEAAAAAAAIADgBAAAEAAAAAAAMADAAiAAEAAAAAAAQADABOAAEAAAAAAAUAFgAMAAEAAAAAAAYABgAuAAEAAAAAAAoANABaAAMAAQQJAAEADAAAAAMAAQQJAAIADgBAAAMAAQQJAAMADAAiAAMAAQQJAAQADABOAAMAAQQJAAUAFgAMAAMAAQQJAAYADAA0AAMAAQQJAAoANABaAHIAYQB0AGkAbgBnAFYAZQByAHMAaQBvAG4AIAAxAC4AMAByAGEAdABpAG4AZ3JhdGluZwByAGEAdABpAG4AZwBSAGUAZwB1AGwAYQByAHIAYQB0AGkAbgBnAEYAbwBuAHQAIABnAGUAbgBlAHIAYQB0AGUAZAAgAGIAeQAgAEkAYwBvAE0AbwBvAG4ALgADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA) format('woff'); font-weight: normal; font-style: normal; } /* Dropdown Icon */ .ui.accordion .title .dropdown.icon, .ui.accordion .accordion .title .dropdown.icon { font-family: Accordion; line-height: 1; -webkit-backface-visibility: hidden; backface-visibility: hidden; font-weight: normal; font-style: normal; text-align: center; } .ui.accordion .title .dropdown.icon:before, .ui.accordion .accordion .title .dropdown.icon:before { content: '\f0da' /*rtl:'\f0d9'*/; } /******************************* User Overrides *******************************/ ================================================ FILE: public/assets/css/components/accordion.js ================================================ /*! * # Semantic UI 2.2.11 - Accordion * http://github.com/semantic-org/semantic-ui/ * * * Released under the MIT license * http://opensource.org/licenses/MIT * */ ;(function ($, window, document, undefined) { "use strict"; window = (typeof window != 'undefined' && window.Math == Math) ? window : (typeof self != 'undefined' && self.Math == Math) ? self : Function('return this')() ; $.fn.accordion = function(parameters) { var $allModules = $(this), time = new Date().getTime(), performance = [], query = arguments[0], methodInvoked = (typeof query == 'string'), queryArguments = [].slice.call(arguments, 1), requestAnimationFrame = window.requestAnimationFrame || window.mozRequestAnimationFrame || window.webkitRequestAnimationFrame || window.msRequestAnimationFrame || function(callback) { setTimeout(callback, 0); }, returnedValue ; $allModules .each(function() { var settings = ( $.isPlainObject(parameters) ) ? $.extend(true, {}, $.fn.accordion.settings, parameters) : $.extend({}, $.fn.accordion.settings), className = settings.className, namespace = settings.namespace, selector = settings.selector, error = settings.error, eventNamespace = '.' + namespace, moduleNamespace = 'module-' + namespace, moduleSelector = $allModules.selector || '', $module = $(this), $title = $module.find(selector.title), $content = $module.find(selector.content), element = this, instance = $module.data(moduleNamespace), observer, module ; module = { initialize: function() { module.debug('Initializing', $module); module.bind.events(); if(settings.observeChanges) { module.observeChanges(); } module.instantiate(); }, instantiate: function() { instance = module; $module .data(moduleNamespace, module) ; }, destroy: function() { module.debug('Destroying previous instance', $module); $module .off(eventNamespace) .removeData(moduleNamespace) ; }, refresh: function() { $title = $module.find(selector.title); $content = $module.find(selector.content); }, observeChanges: function() { if('MutationObserver' in window) { observer = new MutationObserver(function(mutations) { module.debug('DOM tree modified, updating selector cache'); module.refresh(); }); observer.observe(element, { childList : true, subtree : true }); module.debug('Setting up mutation observer', observer); } }, bind: { events: function() { module.debug('Binding delegated events'); $module .on(settings.on + eventNamespace, selector.trigger, module.event.click) ; } }, event: { click: function() { module.toggle.call(this); } }, toggle: function(query) { var $activeTitle = (query !== undefined) ? (typeof query === 'number') ? $title.eq(query) : $(query).closest(selector.title) : $(this).closest(selector.title), $activeContent = $activeTitle.next($content), isAnimating = $activeContent.hasClass(className.animating), isActive = $activeContent.hasClass(className.active), isOpen = (isActive && !isAnimating), isOpening = (!isActive && isAnimating) ; module.debug('Toggling visibility of content', $activeTitle); if(isOpen || isOpening) { if(settings.collapsible) { module.close.call($activeTitle); } else { module.debug('Cannot close accordion content collapsing is disabled'); } } else { module.open.call($activeTitle); } }, open: function(query) { var $activeTitle = (query !== undefined) ? (typeof query === 'number') ? $title.eq(query) : $(query).closest(selector.title) : $(this).closest(selector.title), $activeContent = $activeTitle.next($content), isAnimating = $activeContent.hasClass(className.animating), isActive = $activeContent.hasClass(className.active), isOpen = (isActive || isAnimating) ; if(isOpen) { module.debug('Accordion already open, skipping', $activeContent); return; } module.debug('Opening accordion content', $activeTitle); settings.onOpening.call($activeContent); if(settings.exclusive) { module.closeOthers.call($activeTitle); } $activeTitle .addClass(className.active) ; $activeContent .stop(true, true) .addClass(className.animating) ; if(settings.animateChildren) { if($.fn.transition !== undefined && $module.transition('is supported')) { $activeContent .children() .transition({ animation : 'fade in', queue : false, useFailSafe : true, debug : settings.debug, verbose : settings.verbose, duration : settings.duration }) ; } else { $activeContent .children() .stop(true, true) .animate({ opacity: 1 }, settings.duration, module.resetOpacity) ; } } $activeContent .slideDown(settings.duration, settings.easing, function() { $activeContent .removeClass(className.animating) .addClass(className.active) ; module.reset.display.call(this); settings.onOpen.call(this); settings.onChange.call(this); }) ; }, close: function(query) { var $activeTitle = (query !== undefined) ? (typeof query === 'number') ? $title.eq(query) : $(query).closest(selector.title) : $(this).closest(selector.title), $activeContent = $activeTitle.next($content), isAnimating = $activeContent.hasClass(className.animating), isActive = $activeContent.hasClass(className.active), isOpening = (!isActive && isAnimating), isClosing = (isActive && isAnimating) ; if((isActive || isOpening) && !isClosing) { module.debug('Closing accordion content', $activeContent); settings.onClosing.call($activeContent); $activeTitle .removeClass(className.active) ; $activeContent .stop(true, true) .addClass(className.animating) ; if(settings.animateChildren) { if($.fn.transition !== undefined && $module.transition('is supported')) { $activeContent .children() .transition({ animation : 'fade out', queue : false, useFailSafe : true, debug : settings.debug, verbose : settings.verbose, duration : settings.duration }) ; } else { $activeContent .children() .stop(true, true) .animate({ opacity: 0 }, settings.duration, module.resetOpacity) ; } } $activeContent .slideUp(settings.duration, settings.easing, function() { $activeContent .removeClass(className.animating) .removeClass(className.active) ; module.reset.display.call(this); settings.onClose.call(this); settings.onChange.call(this); }) ; } }, closeOthers: function(index) { var $activeTitle = (index !== undefined) ? $title.eq(index) : $(this).closest(selector.title), $parentTitles = $activeTitle.parents(selector.content).prev(selector.title), $activeAccordion = $activeTitle.closest(selector.accordion), activeSelector = selector.title + '.' + className.active + ':visible', activeContent = selector.content + '.' + className.active + ':visible', $openTitles, $nestedTitles, $openContents ; if(settings.closeNested) { $openTitles = $activeAccordion.find(activeSelector).not($parentTitles); $openContents = $openTitles.next($content); } else { $openTitles = $activeAccordion.find(activeSelector).not($parentTitles); $nestedTitles = $activeAccordion.find(activeContent).find(activeSelector).not($parentTitles); $openTitles = $openTitles.not($nestedTitles); $openContents = $openTitles.next($content); } if( ($openTitles.length > 0) ) { module.debug('Exclusive enabled, closing other content', $openTitles); $openTitles .removeClass(className.active) ; $openContents .removeClass(className.animating) .stop(true, true) ; if(settings.animateChildren) { if($.fn.transition !== undefined && $module.transition('is supported')) { $openContents .children() .transition({ animation : 'fade out', useFailSafe : true, debug : settings.debug, verbose : settings.verbose, duration : settings.duration }) ; } else { $openContents .children() .stop(true, true) .animate({ opacity: 0 }, settings.duration, module.resetOpacity) ; } } $openContents .slideUp(settings.duration , settings.easing, function() { $(this).removeClass(className.active); module.reset.display.call(this); }) ; } }, reset: { display: function() { module.verbose('Removing inline display from element', this); $(this).css('display', ''); if( $(this).attr('style') === '') { $(this) .attr('style', '') .removeAttr('style') ; } }, opacity: function() { module.verbose('Removing inline opacity from element', this); $(this).css('opacity', ''); if( $(this).attr('style') === '') { $(this) .attr('style', '') .removeAttr('style') ; } }, }, setting: function(name, value) { module.debug('Changing setting', name, value); if( $.isPlainObject(name) ) { $.extend(true, settings, name); } else if(value !== undefined) { if($.isPlainObject(settings[name])) { $.extend(true, settings[name], value); } else { settings[name] = value; } } else { return settings[name]; } }, internal: function(name, value) { module.debug('Changing internal', name, value); if(value !== undefined) { if( $.isPlainObject(name) ) { $.extend(true, module, name); } else { module[name] = value; } } else { return module[name]; } }, debug: function() { if(!settings.silent && settings.debug) { if(settings.performance) { module.performance.log(arguments); } else { module.debug = Function.prototype.bind.call(console.info, console, settings.name + ':'); module.debug.apply(console, arguments); } } }, verbose: function() { if(!settings.silent && settings.verbose && settings.debug) { if(settings.performance) { module.performance.log(arguments); } else { module.verbose = Function.prototype.bind.call(console.info, console, settings.name + ':'); module.verbose.apply(console, arguments); } } }, error: function() { if(!settings.silent) { module.error = Function.prototype.bind.call(console.error, console, settings.name + ':'); module.error.apply(console, arguments); } }, performance: { log: function(message) { var currentTime, executionTime, previousTime ; if(settings.performance) { currentTime = new Date().getTime(); previousTime = time || currentTime; executionTime = currentTime - previousTime; time = currentTime; performance.push({ 'Name' : message[0], 'Arguments' : [].slice.call(message, 1) || '', 'Element' : element, 'Execution Time' : executionTime }); } clearTimeout(module.performance.timer); module.performance.timer = setTimeout(module.performance.display, 500); }, display: function() { var title = settings.name + ':', totalTime = 0 ; time = false; clearTimeout(module.performance.timer); $.each(performance, function(index, data) { totalTime += data['Execution Time']; }); title += ' ' + totalTime + 'ms'; if(moduleSelector) { title += ' \'' + moduleSelector + '\''; } if( (console.group !== undefined || console.table !== undefined) && performance.length > 0) { console.groupCollapsed(title); if(console.table) { console.table(performance); } else { $.each(performance, function(index, data) { console.log(data['Name'] + ': ' + data['Execution Time']+'ms'); }); } console.groupEnd(); } performance = []; } }, invoke: function(query, passedArguments, context) { var object = instance, maxDepth, found, response ; passedArguments = passedArguments || queryArguments; context = element || context; if(typeof query == 'string' && object !== undefined) { query = query.split(/[\. ]/); maxDepth = query.length - 1; $.each(query, function(depth, value) { var camelCaseValue = (depth != maxDepth) ? value + query[depth + 1].charAt(0).toUpperCase() + query[depth + 1].slice(1) : query ; if( $.isPlainObject( object[camelCaseValue] ) && (depth != maxDepth) ) { object = object[camelCaseValue]; } else if( object[camelCaseValue] !== undefined ) { found = object[camelCaseValue]; return false; } else if( $.isPlainObject( object[value] ) && (depth != maxDepth) ) { object = object[value]; } else if( object[value] !== undefined ) { found = object[value]; return false; } else { module.error(error.method, query); return false; } }); } if ( $.isFunction( found ) ) { response = found.apply(context, passedArguments); } else if(found !== undefined) { response = found; } if($.isArray(returnedValue)) { returnedValue.push(response); } else if(returnedValue !== undefined) { returnedValue = [returnedValue, response]; } else if(response !== undefined) { returnedValue = response; } return found; } }; if(methodInvoked) { if(instance === undefined) { module.initialize(); } module.invoke(query); } else { if(instance !== undefined) { instance.invoke('destroy'); } module.initialize(); } }) ; return (returnedValue !== undefined) ? returnedValue : this ; }; $.fn.accordion.settings = { name : 'Accordion', namespace : 'accordion', silent : false, debug : false, verbose : false, performance : true, on : 'click', // event on title that opens accordion observeChanges : true, // whether accordion should automatically refresh on DOM insertion exclusive : true, // whether a single accordion content panel should be open at once collapsible : true, // whether accordion content can be closed closeNested : false, // whether nested content should be closed when a panel is closed animateChildren : true, // whether children opacity should be animated duration : 350, // duration of animation easing : 'easeOutQuad', // easing equation for animation onOpening : function(){}, // callback before open animation onOpen : function(){}, // callback after open animation onClosing : function(){}, // callback before closing animation onClose : function(){}, // callback after closing animation onChange : function(){}, // callback after closing or opening animation error: { method : 'The method you called is not defined' }, className : { active : 'active', animating : 'animating' }, selector : { accordion : '.accordion', title : '.title', trigger : '.title', content : '.content' } }; // Adds easing $.extend( $.easing, { easeOutQuad: function (x, t, b, c, d) { return -c *(t/=d)*(t-2) + b; } }); })( jQuery, window, document ); ================================================ FILE: public/assets/css/components/ad.css ================================================ /*! * # Semantic UI 2.2.11 - Ad * http://github.com/semantic-org/semantic-ui/ * * * Copyright 2013 Contributors * Released under the MIT license * http://opensource.org/licenses/MIT * */ /******************************* Advertisement *******************************/ .ui.ad { display: block; overflow: hidden; margin: 1em 0em; } .ui.ad:first-child { margin: 0em; } .ui.ad:last-child { margin: 0em; } .ui.ad iframe { margin: 0em; padding: 0em; border: none; overflow: hidden; } /*-------------- Common ---------------*/ /* Leaderboard */ .ui.leaderboard.ad { width: 728px; height: 90px; } /* Medium Rectangle */ .ui[class*="medium rectangle"].ad { width: 300px; height: 250px; } /* Large Rectangle */ .ui[class*="large rectangle"].ad { width: 336px; height: 280px; } /* Half Page */ .ui[class*="half page"].ad { width: 300px; height: 600px; } /*-------------- Square ---------------*/ /* Square */ .ui.square.ad { width: 250px; height: 250px; } /* Small Square */ .ui[class*="small square"].ad { width: 200px; height: 200px; } /*-------------- Rectangle ---------------*/ /* Small Rectangle */ .ui[class*="small rectangle"].ad { width: 180px; height: 150px; } /* Vertical Rectangle */ .ui[class*="vertical rectangle"].ad { width: 240px; height: 400px; } /*-------------- Button ---------------*/ .ui.button.ad { width: 120px; height: 90px; } .ui[class*="square button"].ad { width: 125px; height: 125px; } .ui[class*="small button"].ad { width: 120px; height: 60px; } /*-------------- Skyscrapers ---------------*/ /* Skyscraper */ .ui.skyscraper.ad { width: 120px; height: 600px; } /* Wide Skyscraper */ .ui[class*="wide skyscraper"].ad { width: 160px; } /*-------------- Banners ---------------*/ /* Banner */ .ui.banner.ad { width: 468px; height: 60px; } /* Vertical Banner */ .ui[class*="vertical banner"].ad { width: 120px; height: 240px; } /* Top Banner */ .ui[class*="top banner"].ad { width: 930px; height: 180px; } /* Half Banner */ .ui[class*="half banner"].ad { width: 234px; height: 60px; } /*-------------- Boards ---------------*/ /* Leaderboard */ .ui[class*="large leaderboard"].ad { width: 970px; height: 90px; } /* Billboard */ .ui.billboard.ad { width: 970px; height: 250px; } /*-------------- Panorama ---------------*/ /* Panorama */ .ui.panorama.ad { width: 980px; height: 120px; } /*-------------- Netboard ---------------*/ /* Netboard */ .ui.netboard.ad { width: 580px; height: 400px; } /*-------------- Mobile ---------------*/ /* Large Mobile Banner */ .ui[class*="large mobile banner"].ad { width: 320px; height: 100px; } /* Mobile Leaderboard */ .ui[class*="mobile leaderboard"].ad { width: 320px; height: 50px; } /******************************* Types *******************************/ /* Mobile Sizes */ .ui.mobile.ad { display: none; } @media only screen and (max-width: 767px) { .ui.mobile.ad { display: block; } } /******************************* Variations *******************************/ .ui.centered.ad { margin-left: auto; margin-right: auto; } .ui.test.ad { position: relative; background: #545454; } .ui.test.ad:after { position: absolute; top: 50%; left: 50%; width: 100%; text-align: center; -webkit-transform: translateX(-50%) translateY(-50%); transform: translateX(-50%) translateY(-50%); content: 'Ad'; color: #FFFFFF; font-size: 1em; font-weight: bold; } .ui.mobile.test.ad:after { font-size: 0.85714286em; } .ui.test.ad[data-text]:after { content: attr(data-text); } /******************************* Theme Overrides *******************************/ /******************************* User Variable Overrides *******************************/ ================================================ FILE: public/assets/css/components/api.js ================================================ /*! * # Semantic UI 2.2.11 - API * http://github.com/semantic-org/semantic-ui/ * * * Released under the MIT license * http://opensource.org/licenses/MIT * */ ;(function ($, window, document, undefined) { "use strict"; var window = (typeof window != 'undefined' && window.Math == Math) ? window : (typeof self != 'undefined' && self.Math == Math) ? self : Function('return this')() ; $.api = $.fn.api = function(parameters) { var // use window context if none specified $allModules = $.isFunction(this) ? $(window) : $(this), moduleSelector = $allModules.selector || '', time = new Date().getTime(), performance = [], query = arguments[0], methodInvoked = (typeof query == 'string'), queryArguments = [].slice.call(arguments, 1), returnedValue ; $allModules .each(function() { var settings = ( $.isPlainObject(parameters) ) ? $.extend(true, {}, $.fn.api.settings, parameters) : $.extend({}, $.fn.api.settings), // internal aliases namespace = settings.namespace, metadata = settings.metadata, selector = settings.selector, error = settings.error, className = settings.className, // define namespaces for modules eventNamespace = '.' + namespace, moduleNamespace = 'module-' + namespace, // element that creates request $module = $(this), $form = $module.closest(selector.form), // context used for state $context = (settings.stateContext) ? $(settings.stateContext) : $module, // request details ajaxSettings, requestSettings, url, data, requestStartTime, // standard module element = this, context = $context[0], instance = $module.data(moduleNamespace), module ; module = { initialize: function() { if(!methodInvoked) { module.bind.events(); } module.instantiate(); }, instantiate: function() { module.verbose('Storing instance of module', module); instance = module; $module .data(moduleNamespace, instance) ; }, destroy: function() { module.verbose('Destroying previous module for', element); $module .removeData(moduleNamespace) .off(eventNamespace) ; }, bind: { events: function() { var triggerEvent = module.get.event() ; if( triggerEvent ) { module.verbose('Attaching API events to element', triggerEvent); $module .on(triggerEvent + eventNamespace, module.event.trigger) ; } else if(settings.on == 'now') { module.debug('Querying API endpoint immediately'); module.query(); } } }, decode: { json: function(response) { if(response !== undefined && typeof response == 'string') { try { response = JSON.parse(response); } catch(e) { // isnt json string } } return response; } }, read: { cachedResponse: function(url) { var response ; if(window.Storage === undefined) { module.error(error.noStorage); return; } response = sessionStorage.getItem(url); module.debug('Using cached response', url, response); response = module.decode.json(response); return response; } }, write: { cachedResponse: function(url, response) { if(response && response === '') { module.debug('Response empty, not caching', response); return; } if(window.Storage === undefined) { module.error(error.noStorage); return; } if( $.isPlainObject(response) ) { response = JSON.stringify(response); } sessionStorage.setItem(url, response); module.verbose('Storing cached response for url', url, response); } }, query: function() { if(module.is.disabled()) { module.debug('Element is disabled API request aborted'); return; } if(module.is.loading()) { if(settings.interruptRequests) { module.debug('Interrupting previous request'); module.abort(); } else { module.debug('Cancelling request, previous request is still pending'); return; } } // pass element metadata to url (value, text) if(settings.defaultData) { $.extend(true, settings.urlData, module.get.defaultData()); } // Add form content if(settings.serializeForm) { settings.data = module.add.formData(settings.data); } // call beforesend and get any settings changes requestSettings = module.get.settings(); // check if before send cancelled request if(requestSettings === false) { module.cancelled = true; module.error(error.beforeSend); return; } else { module.cancelled = false; } // get url url = module.get.templatedURL(); if(!url && !module.is.mocked()) { module.error(error.missingURL); return; } // replace variables url = module.add.urlData( url ); // missing url parameters if( !url && !module.is.mocked()) { return; } requestSettings.url = settings.base + url; // look for jQuery ajax parameters in settings ajaxSettings = $.extend(true, {}, settings, { type : settings.method || settings.type, data : data, url : settings.base + url, beforeSend : settings.beforeXHR, success : function() {}, failure : function() {}, complete : function() {} }); module.debug('Querying URL', ajaxSettings.url); module.verbose('Using AJAX settings', ajaxSettings); if(settings.cache === 'local' && module.read.cachedResponse(url)) { module.debug('Response returned from local cache'); module.request = module.create.request(); module.request.resolveWith(context, [ module.read.cachedResponse(url) ]); return; } if( !settings.throttle ) { module.debug('Sending request', data, ajaxSettings.method); module.send.request(); } else { if(!settings.throttleFirstRequest && !module.timer) { module.debug('Sending request', data, ajaxSettings.method); module.send.request(); module.timer = setTimeout(function(){}, settings.throttle); } else { module.debug('Throttling request', settings.throttle); clearTimeout(module.timer); module.timer = setTimeout(function() { if(module.timer) { delete module.timer; } module.debug('Sending throttled request', data, ajaxSettings.method); module.send.request(); }, settings.throttle); } } }, should: { removeError: function() { return ( settings.hideError === true || (settings.hideError === 'auto' && !module.is.form()) ); } }, is: { disabled: function() { return ($module.filter(selector.disabled).length > 0); }, expectingJSON: function() { return settings.dataType === 'json' || settings.dataType === 'jsonp'; }, form: function() { return $module.is('form') || $context.is('form'); }, mocked: function() { return (settings.mockResponse || settings.mockResponseAsync || settings.response || settings.responseAsync); }, input: function() { return $module.is('input'); }, loading: function() { return (module.request) ? (module.request.state() == 'pending') : false ; }, abortedRequest: function(xhr) { if(xhr && xhr.readyState !== undefined && xhr.readyState === 0) { module.verbose('XHR request determined to be aborted'); return true; } else { module.verbose('XHR request was not aborted'); return false; } }, validResponse: function(response) { if( (!module.is.expectingJSON()) || !$.isFunction(settings.successTest) ) { module.verbose('Response is not JSON, skipping validation', settings.successTest, response); return true; } module.debug('Checking JSON returned success', settings.successTest, response); if( settings.successTest(response) ) { module.debug('Response passed success test', response); return true; } else { module.debug('Response failed success test', response); return false; } } }, was: { cancelled: function() { return (module.cancelled || false); }, succesful: function() { return (module.request && module.request.state() == 'resolved'); }, failure: function() { return (module.request && module.request.state() == 'rejected'); }, complete: function() { return (module.request && (module.request.state() == 'resolved' || module.request.state() == 'rejected') ); } }, add: { urlData: function(url, urlData) { var requiredVariables, optionalVariables ; if(url) { requiredVariables = url.match(settings.regExp.required); optionalVariables = url.match(settings.regExp.optional); urlData = urlData || settings.urlData; if(requiredVariables) { module.debug('Looking for required URL variables', requiredVariables); $.each(requiredVariables, function(index, templatedString) { var // allow legacy {$var} style variable = (templatedString.indexOf('$') !== -1) ? templatedString.substr(2, templatedString.length - 3) : templatedString.substr(1, templatedString.length - 2), value = ($.isPlainObject(urlData) && urlData[variable] !== undefined) ? urlData[variable] : ($module.data(variable) !== undefined) ? $module.data(variable) : ($context.data(variable) !== undefined) ? $context.data(variable) : urlData[variable] ; // remove value if(value === undefined) { module.error(error.requiredParameter, variable, url); url = false; return false; } else { module.verbose('Found required variable', variable, value); value = (settings.encodeParameters) ? module.get.urlEncodedValue(value) : value ; url = url.replace(templatedString, value); } }); } if(optionalVariables) { module.debug('Looking for optional URL variables', requiredVariables); $.each(optionalVariables, function(index, templatedString) { var // allow legacy {/$var} style variable = (templatedString.indexOf('$') !== -1) ? templatedString.substr(3, templatedString.length - 4) : templatedString.substr(2, templatedString.length - 3), value = ($.isPlainObject(urlData) && urlData[variable] !== undefined) ? urlData[variable] : ($module.data(variable) !== undefined) ? $module.data(variable) : ($context.data(variable) !== undefined) ? $context.data(variable) : urlData[variable] ; // optional replacement if(value !== undefined) { module.verbose('Optional variable Found', variable, value); url = url.replace(templatedString, value); } else { module.verbose('Optional variable not found', variable); // remove preceding slash if set if(url.indexOf('/' + templatedString) !== -1) { url = url.replace('/' + templatedString, ''); } else { url = url.replace(templatedString, ''); } } }); } } return url; }, formData: function(data) { var canSerialize = ($.fn.serializeObject !== undefined), formData = (canSerialize) ? $form.serializeObject() : $form.serialize(), hasOtherData ; data = data || settings.data; hasOtherData = $.isPlainObject(data); if(hasOtherData) { if(canSerialize) { module.debug('Extending existing data with form data', data, formData); data = $.extend(true, {}, data, formData); } else { module.error(error.missingSerialize); module.debug('Cant extend data. Replacing data with form data', data, formData); data = formData; } } else { module.debug('Adding form data', formData); data = formData; } return data; } }, send: { request: function() { module.set.loading(); module.request = module.create.request(); if( module.is.mocked() ) { module.mockedXHR = module.create.mockedXHR(); } else { module.xhr = module.create.xhr(); } settings.onRequest.call(context, module.request, module.xhr); } }, event: { trigger: function(event) { module.query(); if(event.type == 'submit' || event.type == 'click') { event.preventDefault(); } }, xhr: { always: function() { // nothing special }, done: function(response, textStatus, xhr) { var context = this, elapsedTime = (new Date().getTime() - requestStartTime), timeLeft = (settings.loadingDuration - elapsedTime), translatedResponse = ( $.isFunction(settings.onResponse) ) ? module.is.expectingJSON() ? settings.onResponse.call(context, $.extend(true, {}, response)) : settings.onResponse.call(context, response) : false ; timeLeft = (timeLeft > 0) ? timeLeft : 0 ; if(translatedResponse) { module.debug('Modified API response in onResponse callback', settings.onResponse, translatedResponse, response); response = translatedResponse; } if(timeLeft > 0) { module.debug('Response completed early delaying state change by', timeLeft); } setTimeout(function() { if( module.is.validResponse(response) ) { module.request.resolveWith(context, [response, xhr]); } else { module.request.rejectWith(context, [xhr, 'invalid']); } }, timeLeft); }, fail: function(xhr, status, httpMessage) { var context = this, elapsedTime = (new Date().getTime() - requestStartTime), timeLeft = (settings.loadingDuration - elapsedTime) ; timeLeft = (timeLeft > 0) ? timeLeft : 0 ; if(timeLeft > 0) { module.debug('Response completed early delaying state change by', timeLeft); } setTimeout(function() { if( module.is.abortedRequest(xhr) ) { module.request.rejectWith(context, [xhr, 'aborted', httpMessage]); } else { module.request.rejectWith(context, [xhr, 'error', status, httpMessage]); } }, timeLeft); } }, request: { done: function(response, xhr) { module.debug('Successful API Response', response); if(settings.cache === 'local' && url) { module.write.cachedResponse(url, response); module.debug('Saving server response locally', module.cache); } settings.onSuccess.call(context, response, $module, xhr); }, complete: function(firstParameter, secondParameter) { var xhr, response ; // have to guess callback parameters based on request success if( module.was.succesful() ) { response = firstParameter; xhr = secondParameter; } else { xhr = firstParameter; response = module.get.responseFromXHR(xhr); } module.remove.loading(); settings.onComplete.call(context, response, $module, xhr); }, fail: function(xhr, status, httpMessage) { var // pull response from xhr if available response = module.get.responseFromXHR(xhr), errorMessage = module.get.errorFromRequest(response, status, httpMessage) ; if(status == 'aborted') { module.debug('XHR Aborted (Most likely caused by page navigation or CORS Policy)', status, httpMessage); settings.onAbort.call(context, status, $module, xhr); return true; } else if(status == 'invalid') { module.debug('JSON did not pass success test. A server-side error has most likely occurred', response); } else if(status == 'error') { if(xhr !== undefined) { module.debug('XHR produced a server error', status, httpMessage); // make sure we have an error to display to console if( xhr.status != 200 && httpMessage !== undefined && httpMessage !== '') { module.error(error.statusMessage + httpMessage, ajaxSettings.url); } settings.onError.call(context, errorMessage, $module, xhr); } } if(settings.errorDuration && status !== 'aborted') { module.debug('Adding error state'); module.set.error(); if( module.should.removeError() ) { setTimeout(module.remove.error, settings.errorDuration); } } module.debug('API Request failed', errorMessage, xhr); settings.onFailure.call(context, response, $module, xhr); } } }, create: { request: function() { // api request promise return $.Deferred() .always(module.event.request.complete) .done(module.event.request.done) .fail(module.event.request.fail) ; }, mockedXHR: function () { var // xhr does not simulate these properties of xhr but must return them textStatus = false, status = false, httpMessage = false, responder = settings.mockResponse || settings.response, asyncResponder = settings.mockResponseAsync || settings.responseAsync, asyncCallback, response, mockedXHR ; mockedXHR = $.Deferred() .always(module.event.xhr.complete) .done(module.event.xhr.done) .fail(module.event.xhr.fail) ; if(responder) { if( $.isFunction(responder) ) { module.debug('Using specified synchronous callback', responder); response = responder.call(context, requestSettings); } else { module.debug('Using settings specified response', responder); response = responder; } // simulating response mockedXHR.resolveWith(context, [ response, textStatus, { responseText: response }]); } else if( $.isFunction(asyncResponder) ) { asyncCallback = function(response) { module.debug('Async callback returned response', response); if(response) { mockedXHR.resolveWith(context, [ response, textStatus, { responseText: response }]); } else { mockedXHR.rejectWith(context, [{ responseText: response }, status, httpMessage]); } }; module.debug('Using specified async response callback', asyncResponder); asyncResponder.call(context, requestSettings, asyncCallback); } return mockedXHR; }, xhr: function() { var xhr ; // ajax request promise xhr = $.ajax(ajaxSettings) .always(module.event.xhr.always) .done(module.event.xhr.done) .fail(module.event.xhr.fail) ; module.verbose('Created server request', xhr, ajaxSettings); return xhr; } }, set: { error: function() { module.verbose('Adding error state to element', $context); $context.addClass(className.error); }, loading: function() { module.verbose('Adding loading state to element', $context); $context.addClass(className.loading); requestStartTime = new Date().getTime(); } }, remove: { error: function() { module.verbose('Removing error state from element', $context); $context.removeClass(className.error); }, loading: function() { module.verbose('Removing loading state from element', $context); $context.removeClass(className.loading); } }, get: { responseFromXHR: function(xhr) { return $.isPlainObject(xhr) ? (module.is.expectingJSON()) ? module.decode.json(xhr.responseText) : xhr.responseText : false ; }, errorFromRequest: function(response, status, httpMessage) { return ($.isPlainObject(response) && response.error !== undefined) ? response.error // use json error message : (settings.error[status] !== undefined) // use server error message ? settings.error[status] : httpMessage ; }, request: function() { return module.request || false; }, xhr: function() { return module.xhr || false; }, settings: function() { var runSettings ; runSettings = settings.beforeSend.call(context, settings); if(runSettings) { if(runSettings.success !== undefined) { module.debug('Legacy success callback detected', runSettings); module.error(error.legacyParameters, runSettings.success); runSettings.onSuccess = runSettings.success; } if(runSettings.failure !== undefined) { module.debug('Legacy failure callback detected', runSettings); module.error(error.legacyParameters, runSettings.failure); runSettings.onFailure = runSettings.failure; } if(runSettings.complete !== undefined) { module.debug('Legacy complete callback detected', runSettings); module.error(error.legacyParameters, runSettings.complete); runSettings.onComplete = runSettings.complete; } } if(runSettings === undefined) { module.error(error.noReturnedValue); } if(runSettings === false) { return runSettings; } return (runSettings !== undefined) ? $.extend(true, {}, runSettings) : $.extend(true, {}, settings) ; }, urlEncodedValue: function(value) { var decodedValue = window.decodeURIComponent(value), encodedValue = window.encodeURIComponent(value), alreadyEncoded = (decodedValue !== value) ; if(alreadyEncoded) { module.debug('URL value is already encoded, avoiding double encoding', value); return value; } module.verbose('Encoding value using encodeURIComponent', value, encodedValue); return encodedValue; }, defaultData: function() { var data = {} ; if( !$.isWindow(element) ) { if( module.is.input() ) { data.value = $module.val(); } else if( module.is.form() ) { } else { data.text = $module.text(); } } return data; }, event: function() { if( $.isWindow(element) || settings.on == 'now' ) { module.debug('API called without element, no events attached'); return false; } else if(settings.on == 'auto') { if( $module.is('input') ) { return (element.oninput !== undefined) ? 'input' : (element.onpropertychange !== undefined) ? 'propertychange' : 'keyup' ; } else if( $module.is('form') ) { return 'submit'; } else { return 'click'; } } else { return settings.on; } }, templatedURL: function(action) { action = action || $module.data(metadata.action) || settings.action || false; url = $module.data(metadata.url) || settings.url || false; if(url) { module.debug('Using specified url', url); return url; } if(action) { module.debug('Looking up url for action', action, settings.api); if(settings.api[action] === undefined && !module.is.mocked()) { module.error(error.missingAction, settings.action, settings.api); return; } url = settings.api[action]; } else if( module.is.form() ) { url = $module.attr('action') || $context.attr('action') || false; module.debug('No url or action specified, defaulting to form action', url); } return url; } }, abort: function() { var xhr = module.get.xhr() ; if( xhr && xhr.state() !== 'resolved') { module.debug('Cancelling API request'); xhr.abort(); } }, // reset state reset: function() { module.remove.error(); module.remove.loading(); }, setting: function(name, value) { module.debug('Changing setting', name, value); if( $.isPlainObject(name) ) { $.extend(true, settings, name); } else if(value !== undefined) { if($.isPlainObject(settings[name])) { $.extend(true, settings[name], value); } else { settings[name] = value; } } else { return settings[name]; } }, internal: function(name, value) { if( $.isPlainObject(name) ) { $.extend(true, module, name); } else if(value !== undefined) { module[name] = value; } else { return module[name]; } }, debug: function() { if(!settings.silent && settings.debug) { if(settings.performance) { module.performance.log(arguments); } else { module.debug = Function.prototype.bind.call(console.info, console, settings.name + ':'); module.debug.apply(console, arguments); } } }, verbose: function() { if(!settings.silent && settings.verbose && settings.debug) { if(settings.performance) { module.performance.log(arguments); } else { module.verbose = Function.prototype.bind.call(console.info, console, settings.name + ':'); module.verbose.apply(console, arguments); } } }, error: function() { if(!settings.silent) { module.error = Function.prototype.bind.call(console.error, console, settings.name + ':'); module.error.apply(console, arguments); } }, performance: { log: function(message) { var currentTime, executionTime, previousTime ; if(settings.performance) { currentTime = new Date().getTime(); previousTime = time || currentTime; executionTime = currentTime - previousTime; time = currentTime; performance.push({ 'Name' : message[0], 'Arguments' : [].slice.call(message, 1) || '', //'Element' : element, 'Execution Time' : executionTime }); } clearTimeout(module.performance.timer); module.performance.timer = setTimeout(module.performance.display, 500); }, display: function() { var title = settings.name + ':', totalTime = 0 ; time = false; clearTimeout(module.performance.timer); $.each(performance, function(index, data) { totalTime += data['Execution Time']; }); title += ' ' + totalTime + 'ms'; if(moduleSelector) { title += ' \'' + moduleSelector + '\''; } if( (console.group !== undefined || console.table !== undefined) && performance.length > 0) { console.groupCollapsed(title); if(console.table) { console.table(performance); } else { $.each(performance, function(index, data) { console.log(data['Name'] + ': ' + data['Execution Time']+'ms'); }); } console.groupEnd(); } performance = []; } }, invoke: function(query, passedArguments, context) { var object = instance, maxDepth, found, response ; passedArguments = passedArguments || queryArguments; context = element || context; if(typeof query == 'string' && object !== undefined) { query = query.split(/[\. ]/); maxDepth = query.length - 1; $.each(query, function(depth, value) { var camelCaseValue = (depth != maxDepth) ? value + query[depth + 1].charAt(0).toUpperCase() + query[depth + 1].slice(1) : query ; if( $.isPlainObject( object[camelCaseValue] ) && (depth != maxDepth) ) { object = object[camelCaseValue]; } else if( object[camelCaseValue] !== undefined ) { found = object[camelCaseValue]; return false; } else if( $.isPlainObject( object[value] ) && (depth != maxDepth) ) { object = object[value]; } else if( object[value] !== undefined ) { found = object[value]; return false; } else { module.error(error.method, query); return false; } }); } if ( $.isFunction( found ) ) { response = found.apply(context, passedArguments); } else if(found !== undefined) { response = found; } if($.isArray(returnedValue)) { returnedValue.push(response); } else if(returnedValue !== undefined) { returnedValue = [returnedValue, response]; } else if(response !== undefined) { returnedValue = response; } return found; } }; if(methodInvoked) { if(instance === undefined) { module.initialize(); } module.invoke(query); } else { if(instance !== undefined) { instance.invoke('destroy'); } module.initialize(); } }) ; return (returnedValue !== undefined) ? returnedValue : this ; }; $.api.settings = { name : 'API', namespace : 'api', debug : false, verbose : false, performance : true, // object containing all templates endpoints api : {}, // whether to cache responses cache : true, // whether new requests should abort previous requests interruptRequests : true, // event binding on : 'auto', // context for applying state classes stateContext : false, // duration for loading state loadingDuration : 0, // whether to hide errors after a period of time hideError : 'auto', // duration for error state errorDuration : 2000, // whether parameters should be encoded with encodeURIComponent encodeParameters : true, // API action to use action : false, // templated URL to use url : false, // base URL to apply to all endpoints base : '', // data that will urlData : {}, // whether to add default data to url data defaultData : true, // whether to serialize closest form serializeForm : false, // how long to wait before request should occur throttle : 0, // whether to throttle first request or only repeated throttleFirstRequest : true, // standard ajax settings method : 'get', data : {}, dataType : 'json', // mock response mockResponse : false, mockResponseAsync : false, // aliases for mock response : false, responseAsync : false, // callbacks before request beforeSend : function(settings) { return settings; }, beforeXHR : function(xhr) {}, onRequest : function(promise, xhr) {}, // after request onResponse : false, // function(response) { }, // response was successful, if JSON passed validation onSuccess : function(response, $module) {}, // request finished without aborting onComplete : function(response, $module) {}, // failed JSON success test onFailure : function(response, $module) {}, // server error onError : function(errorMessage, $module) {}, // request aborted onAbort : function(errorMessage, $module) {}, successTest : false, // errors error : { beforeSend : 'The before send function has aborted the request', error : 'There was an error with your request', exitConditions : 'API Request Aborted. Exit conditions met', JSONParse : 'JSON could not be parsed during error handling', legacyParameters : 'You are using legacy API success callback names', method : 'The method you called is not defined', missingAction : 'API action used but no url was defined', missingSerialize : 'jquery-serialize-object is required to add form data to an existing data object', missingURL : 'No URL specified for api event', noReturnedValue : 'The beforeSend callback must return a settings object, beforeSend ignored.', noStorage : 'Caching responses locally requires session storage', parseError : 'There was an error parsing your request', requiredParameter : 'Missing a required URL parameter: ', statusMessage : 'Server gave an error: ', timeout : 'Your request timed out' }, regExp : { required : /\{\$*[A-z0-9]+\}/g, optional : /\{\/\$*[A-z0-9]+\}/g, }, className: { loading : 'loading', error : 'error' }, selector: { disabled : '.disabled', form : 'form' }, metadata: { action : 'action', url : 'url' } }; })( jQuery, window, document ); ================================================ FILE: public/assets/css/components/breadcrumb.css ================================================ /*! * # Semantic UI 2.2.11 - Breadcrumb * http://github.com/semantic-org/semantic-ui/ * * * Released under the MIT license * http://opensource.org/licenses/MIT * */ /******************************* Breadcrumb *******************************/ .ui.breadcrumb { line-height: 1; display: inline-block; margin: 0em 0em; vertical-align: middle; } .ui.breadcrumb:first-child { margin-top: 0em; } .ui.breadcrumb:last-child { margin-bottom: 0em; } /******************************* Content *******************************/ /* Divider */ .ui.breadcrumb .divider { display: inline-block; opacity: 0.7; margin: 0em 0.21428571rem 0em; font-size: 0.92857143em; color: rgba(0, 0, 0, 0.4); vertical-align: baseline; } /* Link */ .ui.breadcrumb a { color: #4183C4; } .ui.breadcrumb a:hover { color: #1e70bf; } /* Icon Divider */ .ui.breadcrumb .icon.divider { font-size: 0.85714286em; vertical-align: baseline; } /* Section */ .ui.breadcrumb a.section { cursor: pointer; } .ui.breadcrumb .section { display: inline-block; margin: 0em; padding: 0em; } /* Loose Coupling */ .ui.breadcrumb.segment { display: inline-block; padding: 0.78571429em 1em; } /******************************* States *******************************/ .ui.breadcrumb .active.section { font-weight: bold; } /******************************* Variations *******************************/ .ui.mini.breadcrumb { font-size: 0.78571429rem; } .ui.tiny.breadcrumb { font-size: 0.85714286rem; } .ui.small.breadcrumb { font-size: 0.92857143rem; } .ui.breadcrumb { font-size: 1rem; } .ui.large.breadcrumb { font-size: 1.14285714rem; } .ui.big.breadcrumb { font-size: 1.28571429rem; } .ui.huge.breadcrumb { font-size: 1.42857143rem; } .ui.massive.breadcrumb { font-size: 1.71428571rem; } /******************************* Theme Overrides *******************************/ /******************************* Site Overrides *******************************/ ================================================ FILE: public/assets/css/components/button.css ================================================ /*! * # Semantic UI 2.2.11 - Button * http://github.com/semantic-org/semantic-ui/ * * * Released under the MIT license * http://opensource.org/licenses/MIT * */ /******************************* Button *******************************/ .ui.button { cursor: pointer; display: inline-block; min-height: 1em; outline: none; border: none; vertical-align: baseline; background: #E0E1E2 none; color: rgba(0, 0, 0, 0.6); font-family: 'Lato', 'Helvetica Neue', Arial, Helvetica, sans-serif; margin: 0em 0.25em 0em 0em; padding: 0.78571429em 1.5em 0.78571429em; text-transform: none; text-shadow: none; font-weight: bold; line-height: 1em; font-style: normal; text-align: center; text-decoration: none; border-radius: 0.28571429rem; -webkit-box-shadow: 0px 0px 0px 1px transparent inset, 0px 0em 0px 0px rgba(34, 36, 38, 0.15) inset; box-shadow: 0px 0px 0px 1px transparent inset, 0px 0em 0px 0px rgba(34, 36, 38, 0.15) inset; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; -webkit-transition: opacity 0.1s ease, background-color 0.1s ease, color 0.1s ease, background 0.1s ease, -webkit-box-shadow 0.1s ease; transition: opacity 0.1s ease, background-color 0.1s ease, color 0.1s ease, background 0.1s ease, -webkit-box-shadow 0.1s ease; transition: opacity 0.1s ease, background-color 0.1s ease, color 0.1s ease, box-shadow 0.1s ease, background 0.1s ease; transition: opacity 0.1s ease, background-color 0.1s ease, color 0.1s ease, box-shadow 0.1s ease, background 0.1s ease, -webkit-box-shadow 0.1s ease; will-change: ''; -webkit-tap-highlight-color: transparent; } /******************************* States *******************************/ /*-------------- Hover ---------------*/ .ui.button:hover { background-color: #CACBCD; background-image: none; -webkit-box-shadow: 0px 0px 0px 1px transparent inset, 0px 0em 0px 0px rgba(34, 36, 38, 0.15) inset; box-shadow: 0px 0px 0px 1px transparent inset, 0px 0em 0px 0px rgba(34, 36, 38, 0.15) inset; color: rgba(0, 0, 0, 0.8); } .ui.button:hover .icon { opacity: 0.85; } /*-------------- Focus ---------------*/ .ui.button:focus { background-color: #CACBCD; color: rgba(0, 0, 0, 0.8); background-image: '' !important; -webkit-box-shadow: '' !important; box-shadow: '' !important; } .ui.button:focus .icon { opacity: 0.85; } /*-------------- Down ---------------*/ .ui.button:active, .ui.active.button:active { background-color: #BABBBC; background-image: ''; color: rgba(0, 0, 0, 0.9); -webkit-box-shadow: 0px 0px 0px 1px transparent inset, none; box-shadow: 0px 0px 0px 1px transparent inset, none; } /*-------------- Active ---------------*/ .ui.active.button { background-color: #C0C1C2; background-image: none; -webkit-box-shadow: 0px 0px 0px 1px transparent inset; box-shadow: 0px 0px 0px 1px transparent inset; color: rgba(0, 0, 0, 0.95); } .ui.active.button:hover { background-color: #C0C1C2; background-image: none; color: rgba(0, 0, 0, 0.95); } .ui.active.button:active { background-color: #C0C1C2; background-image: none; } /*-------------- Loading ---------------*/ /* Specificity hack */ .ui.loading.loading.loading.loading.loading.loading.button { position: relative; cursor: default; text-shadow: none !important; color: transparent !important; opacity: 1; pointer-events: auto; -webkit-transition: all 0s linear, opacity 0.1s ease; transition: all 0s linear, opacity 0.1s ease; } .ui.loading.button:before { position: absolute; content: ''; top: 50%; left: 50%; margin: -0.64285714em 0em 0em -0.64285714em; width: 1.28571429em; height: 1.28571429em; border-radius: 500rem; border: 0.2em solid rgba(0, 0, 0, 0.15); } .ui.loading.button:after { position: absolute; content: ''; top: 50%; left: 50%; margin: -0.64285714em 0em 0em -0.64285714em; width: 1.28571429em; height: 1.28571429em; -webkit-animation: button-spin 0.6s linear; animation: button-spin 0.6s linear; -webkit-animation-iteration-count: infinite; animation-iteration-count: infinite; border-radius: 500rem; border-color: #FFFFFF transparent transparent; border-style: solid; border-width: 0.2em; -webkit-box-shadow: 0px 0px 0px 1px transparent; box-shadow: 0px 0px 0px 1px transparent; } .ui.labeled.icon.loading.button .icon { background-color: transparent; -webkit-box-shadow: none; box-shadow: none; } @-webkit-keyframes button-spin { from { -webkit-transform: rotate(0deg); transform: rotate(0deg); } to { -webkit-transform: rotate(360deg); transform: rotate(360deg); } } @keyframes button-spin { from { -webkit-transform: rotate(0deg); transform: rotate(0deg); } to { -webkit-transform: rotate(360deg); transform: rotate(360deg); } } .ui.basic.loading.button:not(.inverted):before { border-color: rgba(0, 0, 0, 0.1); } .ui.basic.loading.button:not(.inverted):after { border-top-color: #767676; } /*------------------- Disabled --------------------*/ .ui.buttons .disabled.button, .ui.disabled.button, .ui.button:disabled, .ui.disabled.button:hover, .ui.disabled.active.button { cursor: default; opacity: 0.45 !important; background-image: none !important; -webkit-box-shadow: none !important; box-shadow: none !important; pointer-events: none !important; } /* Basic Group With Disabled */ .ui.basic.buttons .ui.disabled.button { border-color: rgba(34, 36, 38, 0.5); } /******************************* Types *******************************/ /*------------------- Animated --------------------*/ .ui.animated.button { position: relative; overflow: hidden; padding-right: 0em !important; vertical-align: middle; z-index: 1; } .ui.animated.button .content { will-change: transform, opacity; } .ui.animated.button .visible.content { position: relative; margin-right: 1.5em; } .ui.animated.button .hidden.content { position: absolute; width: 100%; } /* Horizontal */ .ui.animated.button .visible.content, .ui.animated.button .hidden.content { -webkit-transition: right 0.3s ease 0s; transition: right 0.3s ease 0s; } .ui.animated.button .visible.content { left: auto; right: 0%; } .ui.animated.button .hidden.content { top: 50%; left: auto; right: -100%; margin-top: -0.5em; } .ui.animated.button:focus .visible.content, .ui.animated.button:hover .visible.content { left: auto; right: 200%; } .ui.animated.button:focus .hidden.content, .ui.animated.button:hover .hidden.content { left: auto; right: 0%; } /* Vertical */ .ui.vertical.animated.button .visible.content, .ui.vertical.animated.button .hidden.content { -webkit-transition: top 0.3s ease, -webkit-transform 0.3s ease; transition: top 0.3s ease, -webkit-transform 0.3s ease; transition: top 0.3s ease, transform 0.3s ease; transition: top 0.3s ease, transform 0.3s ease, -webkit-transform 0.3s ease; } .ui.vertical.animated.button .visible.content { -webkit-transform: translateY(0%); transform: translateY(0%); right: auto; } .ui.vertical.animated.button .hidden.content { top: -50%; left: 0%; right: auto; } .ui.vertical.animated.button:focus .visible.content, .ui.vertical.animated.button:hover .visible.content { -webkit-transform: translateY(200%); transform: translateY(200%); right: auto; } .ui.vertical.animated.button:focus .hidden.content, .ui.vertical.animated.button:hover .hidden.content { top: 50%; right: auto; } /* Fade */ .ui.fade.animated.button .visible.content, .ui.fade.animated.button .hidden.content { -webkit-transition: opacity 0.3s ease, -webkit-transform 0.3s ease; transition: opacity 0.3s ease, -webkit-transform 0.3s ease; transition: opacity 0.3s ease, transform 0.3s ease; transition: opacity 0.3s ease, transform 0.3s ease, -webkit-transform 0.3s ease; } .ui.fade.animated.button .visible.content { left: auto; right: auto; opacity: 1; -webkit-transform: scale(1); transform: scale(1); } .ui.fade.animated.button .hidden.content { opacity: 0; left: 0%; right: auto; -webkit-transform: scale(1.5); transform: scale(1.5); } .ui.fade.animated.button:focus .visible.content, .ui.fade.animated.button:hover .visible.content { left: auto; right: auto; opacity: 0; -webkit-transform: scale(0.75); transform: scale(0.75); } .ui.fade.animated.button:focus .hidden.content, .ui.fade.animated.button:hover .hidden.content { left: 0%; right: auto; opacity: 1; -webkit-transform: scale(1); transform: scale(1); } /*------------------- Inverted --------------------*/ .ui.inverted.button { -webkit-box-shadow: 0px 0px 0px 2px #FFFFFF inset !important; box-shadow: 0px 0px 0px 2px #FFFFFF inset !important; background: transparent none; color: #FFFFFF; text-shadow: none !important; } /* Group */ .ui.inverted.buttons .button { margin: 0px 0px 0px -2px; } .ui.inverted.buttons .button:first-child { margin-left: 0em; } .ui.inverted.vertical.buttons .button { margin: 0px 0px -2px 0px; } .ui.inverted.vertical.buttons .button:first-child { margin-top: 0em; } /* States */ /* Hover */ .ui.inverted.button:hover { background: #FFFFFF; -webkit-box-shadow: 0px 0px 0px 2px #FFFFFF inset !important; box-shadow: 0px 0px 0px 2px #FFFFFF inset !important; color: rgba(0, 0, 0, 0.8); } /* Active / Focus */ .ui.inverted.button:focus, .ui.inverted.button.active { background: #FFFFFF; -webkit-box-shadow: 0px 0px 0px 2px #FFFFFF inset !important; box-shadow: 0px 0px 0px 2px #FFFFFF inset !important; color: rgba(0, 0, 0, 0.8); } /* Active Focus */ .ui.inverted.button.active:focus { background: #DCDDDE; -webkit-box-shadow: 0px 0px 0px 2px #DCDDDE inset !important; box-shadow: 0px 0px 0px 2px #DCDDDE inset !important; color: rgba(0, 0, 0, 0.8); } /*------------------- Labeled Button --------------------*/ .ui.labeled.button:not(.icon) { display: -webkit-inline-box; display: -ms-inline-flexbox; display: inline-flex; -webkit-box-orient: horizontal; -webkit-box-direction: normal; -ms-flex-direction: row; flex-direction: row; background: none !important; padding: 0px !important; border: none !important; -webkit-box-shadow: none !important; box-shadow: none !important; } .ui.labeled.button > .button { margin: 0px; } .ui.labeled.button > .label { display: -webkit-box; display: -ms-flexbox; display: flex; -webkit-box-align: center; -ms-flex-align: center; align-items: center; margin: 0px 0px 0px -1px !important; padding: ''; font-size: 1em; border-color: rgba(34, 36, 38, 0.15); } /* Tag */ .ui.labeled.button > .tag.label:before { width: 1.85em; height: 1.85em; } /* Right */ .ui.labeled.button:not([class*="left labeled"]) > .button { border-top-right-radius: 0px; border-bottom-right-radius: 0px; } .ui.labeled.button:not([class*="left labeled"]) > .label { border-top-left-radius: 0px; border-bottom-left-radius: 0px; } /* Left Side */ .ui[class*="left labeled"].button > .button { border-top-left-radius: 0px; border-bottom-left-radius: 0px; } .ui[class*="left labeled"].button > .label { border-top-right-radius: 0px; border-bottom-right-radius: 0px; } /*------------------- Social --------------------*/ /* Facebook */ .ui.facebook.button { background-color: #3B5998; color: #FFFFFF; text-shadow: none; background-image: none; -webkit-box-shadow: 0px 0em 0px 0px rgba(34, 36, 38, 0.15) inset; box-shadow: 0px 0em 0px 0px rgba(34, 36, 38, 0.15) inset; } .ui.facebook.button:hover { background-color: #304d8a; color: #FFFFFF; text-shadow: none; } .ui.facebook.button:active { background-color: #2d4373; color: #FFFFFF; text-shadow: none; } /* Twitter */ .ui.twitter.button { background-color: #55ACEE; color: #FFFFFF; text-shadow: none; background-image: none; -webkit-box-shadow: 0px 0em 0px 0px rgba(34, 36, 38, 0.15) inset; box-shadow: 0px 0em 0px 0px rgba(34, 36, 38, 0.15) inset; } .ui.twitter.button:hover { background-color: #35a2f4; color: #FFFFFF; text-shadow: none; } .ui.twitter.button:active { background-color: #2795e9; color: #FFFFFF; text-shadow: none; } /* Google Plus */ .ui.google.plus.button { background-color: #DD4B39; color: #FFFFFF; text-shadow: none; background-image: none; -webkit-box-shadow: 0px 0em 0px 0px rgba(34, 36, 38, 0.15) inset; box-shadow: 0px 0em 0px 0px rgba(34, 36, 38, 0.15) inset; } .ui.google.plus.button:hover { background-color: #e0321c; color: #FFFFFF; text-shadow: none; } .ui.google.plus.button:active { background-color: #c23321; color: #FFFFFF; text-shadow: none; } /* Linked In */ .ui.linkedin.button { background-color: #1F88BE; color: #FFFFFF; text-shadow: none; } .ui.linkedin.button:hover { background-color: #147baf; color: #FFFFFF; text-shadow: none; } .ui.linkedin.button:active { background-color: #186992; color: #FFFFFF; text-shadow: none; } /* YouTube */ .ui.youtube.button { background-color: #CC181E; color: #FFFFFF; text-shadow: none; background-image: none; -webkit-box-shadow: 0px 0em 0px 0px rgba(34, 36, 38, 0.15) inset; box-shadow: 0px 0em 0px 0px rgba(34, 36, 38, 0.15) inset; } .ui.youtube.button:hover { background-color: #bd0d13; color: #FFFFFF; text-shadow: none; } .ui.youtube.button:active { background-color: #9e1317; color: #FFFFFF; text-shadow: none; } /* Instagram */ .ui.instagram.button { background-color: #49769C; color: #FFFFFF; text-shadow: none; background-image: none; -webkit-box-shadow: 0px 0em 0px 0px rgba(34, 36, 38, 0.15) inset; box-shadow: 0px 0em 0px 0px rgba(34, 36, 38, 0.15) inset; } .ui.instagram.button:hover { background-color: #3d698e; color: #FFFFFF; text-shadow: none; } .ui.instagram.button:active { background-color: #395c79; color: #FFFFFF; text-shadow: none; } /* Pinterest */ .ui.pinterest.button { background-color: #BD081C; color: #FFFFFF; text-shadow: none; background-image: none; -webkit-box-shadow: 0px 0em 0px 0px rgba(34, 36, 38, 0.15) inset; box-shadow: 0px 0em 0px 0px rgba(34, 36, 38, 0.15) inset; } .ui.pinterest.button:hover { background-color: #ac0013; color: #FFFFFF; text-shadow: none; } .ui.pinterest.button:active { background-color: #8c0615; color: #FFFFFF; text-shadow: none; } /* VK */ .ui.vk.button { background-color: #4D7198; color: #FFFFFF; background-image: none; -webkit-box-shadow: 0px 0em 0px 0px rgba(34, 36, 38, 0.15) inset; box-shadow: 0px 0em 0px 0px rgba(34, 36, 38, 0.15) inset; } .ui.vk.button:hover { background-color: #41648a; color: #FFFFFF; } .ui.vk.button:active { background-color: #3c5876; color: #FFFFFF; } /*-------------- Icon ---------------*/ .ui.button > .icon:not(.button) { height: 0.85714286em; opacity: 0.8; margin: 0em 0.42857143em 0em -0.21428571em; -webkit-transition: opacity 0.1s ease; transition: opacity 0.1s ease; vertical-align: ''; color: ''; } .ui.button:not(.icon) > .icon:not(.button):not(.dropdown) { margin: 0em 0.42857143em 0em -0.21428571em; } .ui.button:not(.icon) > .right.icon:not(.button):not(.dropdown) { margin: 0em -0.21428571em 0em 0.42857143em; } /******************************* Variations *******************************/ /*------------------- Floated --------------------*/ .ui[class*="left floated"].buttons, .ui[class*="left floated"].button { float: left; margin-left: 0em; margin-right: 0.25em; } .ui[class*="right floated"].buttons, .ui[class*="right floated"].button { float: right; margin-right: 0em; margin-left: 0.25em; } /*------------------- Compact --------------------*/ .ui.compact.buttons .button, .ui.compact.button { padding: 0.58928571em 1.125em 0.58928571em; } .ui.compact.icon.buttons .button, .ui.compact.icon.button { padding: 0.58928571em 0.58928571em 0.58928571em; } .ui.compact.labeled.icon.buttons .button, .ui.compact.labeled.icon.button { padding: 0.58928571em 3.69642857em 0.58928571em; } /*------------------- Sizes --------------------*/ .ui.mini.buttons .button, .ui.mini.buttons .or, .ui.mini.button { font-size: 0.78571429rem; } .ui.tiny.buttons .button, .ui.tiny.buttons .or, .ui.tiny.button { font-size: 0.85714286rem; } .ui.small.buttons .button, .ui.small.buttons .or, .ui.small.button { font-size: 0.92857143rem; } .ui.buttons .button, .ui.buttons .or, .ui.button { font-size: 1rem; } .ui.large.buttons .button, .ui.large.buttons .or, .ui.large.button { font-size: 1.14285714rem; } .ui.big.buttons .button, .ui.big.buttons .or, .ui.big.button { font-size: 1.28571429rem; } .ui.huge.buttons .button, .ui.huge.buttons .or, .ui.huge.button { font-size: 1.42857143rem; } .ui.massive.buttons .button, .ui.massive.buttons .or, .ui.massive.button { font-size: 1.71428571rem; } /*-------------- Icon Only ---------------*/ .ui.icon.buttons .button, .ui.icon.button { padding: 0.78571429em 0.78571429em 0.78571429em; } .ui.icon.buttons .button > .icon, .ui.icon.button > .icon { opacity: 0.9; margin: 0em !important; vertical-align: top; } /*------------------- Basic --------------------*/ .ui.basic.buttons .button, .ui.basic.button { background: transparent none !important; color: rgba(0, 0, 0, 0.6) !important; font-weight: normal; border-radius: 0.28571429rem; text-transform: none; text-shadow: none !important; -webkit-box-shadow: 0px 0px 0px 1px rgba(34, 36, 38, 0.15) inset; box-shadow: 0px 0px 0px 1px rgba(34, 36, 38, 0.15) inset; } .ui.basic.buttons { -webkit-box-shadow: none; box-shadow: none; border: 1px solid rgba(34, 36, 38, 0.15); border-radius: 0.28571429rem; } .ui.basic.buttons .button { border-radius: 0em; } .ui.basic.buttons .button:hover, .ui.basic.button:hover { background: #FFFFFF !important; color: rgba(0, 0, 0, 0.8) !important; -webkit-box-shadow: 0px 0px 0px 1px rgba(34, 36, 38, 0.35) inset, 0px 0px 0px 0px rgba(34, 36, 38, 0.15) inset; box-shadow: 0px 0px 0px 1px rgba(34, 36, 38, 0.35) inset, 0px 0px 0px 0px rgba(34, 36, 38, 0.15) inset; } .ui.basic.buttons .button:focus, .ui.basic.button:focus { background: #FFFFFF !important; color: rgba(0, 0, 0, 0.8) !important; -webkit-box-shadow: 0px 0px 0px 1px rgba(34, 36, 38, 0.35) inset, 0px 0px 0px 0px rgba(34, 36, 38, 0.15) inset; box-shadow: 0px 0px 0px 1px rgba(34, 36, 38, 0.35) inset, 0px 0px 0px 0px rgba(34, 36, 38, 0.15) inset; } .ui.basic.buttons .button:active, .ui.basic.button:active { background: #F8F8F8 !important; color: rgba(0, 0, 0, 0.9) !important; -webkit-box-shadow: 0px 0px 0px 1px rgba(0, 0, 0, 0.15) inset, 0px 1px 4px 0px rgba(34, 36, 38, 0.15) inset; box-shadow: 0px 0px 0px 1px rgba(0, 0, 0, 0.15) inset, 0px 1px 4px 0px rgba(34, 36, 38, 0.15) inset; } .ui.basic.buttons .active.button, .ui.basic.active.button { background: rgba(0, 0, 0, 0.05) !important; -webkit-box-shadow: '' !important; box-shadow: '' !important; color: rgba(0, 0, 0, 0.95); } .ui.basic.buttons .active.button:hover, .ui.basic.active.button:hover { background-color: rgba(0, 0, 0, 0.05); } /* Vertical */ .ui.basic.buttons .button:hover { -webkit-box-shadow: 0px 0px 0px 1px rgba(34, 36, 38, 0.35) inset, 0px 0px 0px 0px rgba(34, 36, 38, 0.15) inset inset; box-shadow: 0px 0px 0px 1px rgba(34, 36, 38, 0.35) inset, 0px 0px 0px 0px rgba(34, 36, 38, 0.15) inset inset; } .ui.basic.buttons .button:active { -webkit-box-shadow: 0px 0px 0px 1px rgba(0, 0, 0, 0.15) inset, 0px 1px 4px 0px rgba(34, 36, 38, 0.15) inset inset; box-shadow: 0px 0px 0px 1px rgba(0, 0, 0, 0.15) inset, 0px 1px 4px 0px rgba(34, 36, 38, 0.15) inset inset; } .ui.basic.buttons .active.button { -webkit-box-shadow: '' !important; box-shadow: '' !important; } /* Standard Basic Inverted */ .ui.basic.inverted.buttons .button, .ui.basic.inverted.button { background-color: transparent !important; color: #F9FAFB !important; -webkit-box-shadow: 0px 0px 0px 2px rgba(255, 255, 255, 0.5) inset !important; box-shadow: 0px 0px 0px 2px rgba(255, 255, 255, 0.5) inset !important; } .ui.basic.inverted.buttons .button:hover, .ui.basic.inverted.button:hover { color: #FFFFFF !important; -webkit-box-shadow: 0px 0px 0px 2px #ffffff inset !important; box-shadow: 0px 0px 0px 2px #ffffff inset !important; } .ui.basic.inverted.buttons .button:focus, .ui.basic.inverted.button:focus { color: #FFFFFF !important; -webkit-box-shadow: 0px 0px 0px 2px #ffffff inset !important; box-shadow: 0px 0px 0px 2px #ffffff inset !important; } .ui.basic.inverted.buttons .button:active, .ui.basic.inverted.button:active { background-color: rgba(255, 255, 255, 0.08) !important; color: #FFFFFF !important; -webkit-box-shadow: 0px 0px 0px 2px rgba(255, 255, 255, 0.9) inset !important; box-shadow: 0px 0px 0px 2px rgba(255, 255, 255, 0.9) inset !important; } .ui.basic.inverted.buttons .active.button, .ui.basic.inverted.active.button { background-color: rgba(255, 255, 255, 0.08); color: #FFFFFF; text-shadow: none; -webkit-box-shadow: 0px 0px 0px 2px rgba(255, 255, 255, 0.7) inset; box-shadow: 0px 0px 0px 2px rgba(255, 255, 255, 0.7) inset; } .ui.basic.inverted.buttons .active.button:hover, .ui.basic.inverted.active.button:hover { background-color: rgba(255, 255, 255, 0.15); -webkit-box-shadow: 0px 0px 0px 2px #ffffff inset !important; box-shadow: 0px 0px 0px 2px #ffffff inset !important; } /* Basic Group */ .ui.basic.buttons .button { border-left: 1px solid rgba(34, 36, 38, 0.15); -webkit-box-shadow: none; box-shadow: none; } .ui.basic.vertical.buttons .button { border-left: none; } .ui.basic.vertical.buttons .button { border-left-width: 0px; border-top: 1px solid rgba(34, 36, 38, 0.15); } .ui.basic.vertical.buttons .button:first-child { border-top-width: 0px; } /*-------------- Labeled Icon ---------------*/ .ui.labeled.icon.buttons .button, .ui.labeled.icon.button { position: relative; padding-left: 4.07142857em !important; padding-right: 1.5em !important; } /* Left Labeled */ .ui.labeled.icon.buttons > .button > .icon, .ui.labeled.icon.button > .icon { position: absolute; height: 100%; line-height: 1; border-radius: 0px; border-top-left-radius: inherit; border-bottom-left-radius: inherit; text-align: center; margin: 0em; width: 2.57142857em; background-color: rgba(0, 0, 0, 0.05); color: ''; -webkit-box-shadow: -1px 0px 0px 0px transparent inset; box-shadow: -1px 0px 0px 0px transparent inset; } /* Left Labeled */ .ui.labeled.icon.buttons > .button > .icon, .ui.labeled.icon.button > .icon { top: 0em; left: 0em; } /* Right Labeled */ .ui[class*="right labeled"].icon.button { padding-right: 4.07142857em !important; padding-left: 1.5em !important; } .ui[class*="right labeled"].icon.button > .icon { left: auto; right: 0em; border-radius: 0px; border-top-right-radius: inherit; border-bottom-right-radius: inherit; -webkit-box-shadow: 1px 0px 0px 0px transparent inset; box-shadow: 1px 0px 0px 0px transparent inset; } .ui.labeled.icon.buttons > .button > .icon:before, .ui.labeled.icon.button > .icon:before, .ui.labeled.icon.buttons > .button > .icon:after, .ui.labeled.icon.button > .icon:after { display: block; position: absolute; width: 100%; top: 50%; text-align: center; -webkit-transform: translateY(-50%); transform: translateY(-50%); } .ui.labeled.icon.buttons .button > .icon { border-radius: 0em; } .ui.labeled.icon.buttons .button:first-child > .icon { border-top-left-radius: 0.28571429rem; border-bottom-left-radius: 0.28571429rem; } .ui.labeled.icon.buttons .button:last-child > .icon { border-top-right-radius: 0.28571429rem; border-bottom-right-radius: 0.28571429rem; } .ui.vertical.labeled.icon.buttons .button:first-child > .icon { border-radius: 0em; border-top-left-radius: 0.28571429rem; } .ui.vertical.labeled.icon.buttons .button:last-child > .icon { border-radius: 0em; border-bottom-left-radius: 0.28571429rem; } /* Fluid Labeled */ .ui.fluid[class*="left labeled"].icon.button, .ui.fluid[class*="right labeled"].icon.button { padding-left: 1.5em !important; padding-right: 1.5em !important; } /*-------------- Toggle ---------------*/ /* Toggle (Modifies active state to give affordances) */ .ui.toggle.buttons .active.button, .ui.buttons .button.toggle.active, .ui.button.toggle.active { background-color: #21BA45 !important; -webkit-box-shadow: none !important; box-shadow: none !important; text-shadow: none; color: #FFFFFF !important; } .ui.button.toggle.active:hover { background-color: #16ab39 !important; text-shadow: none; color: #FFFFFF !important; } /*-------------- Circular ---------------*/ .ui.circular.button { border-radius: 10em; } .ui.circular.button > .icon { width: 1em; vertical-align: baseline; } /*------------------- Or Buttons --------------------*/ .ui.buttons .or { position: relative; width: 0.3em; height: 2.57142857em; z-index: 3; } .ui.buttons .or:before { position: absolute; text-align: center; border-radius: 500rem; content: 'or'; top: 50%; left: 50%; background-color: #FFFFFF; text-shadow: none; margin-top: -0.89285714em; margin-left: -0.89285714em; width: 1.78571429em; height: 1.78571429em; line-height: 1.78571429em; color: rgba(0, 0, 0, 0.4); font-style: normal; font-weight: bold; -webkit-box-shadow: 0px 0px 0px 1px transparent inset; box-shadow: 0px 0px 0px 1px transparent inset; } .ui.buttons .or[data-text]:before { content: attr(data-text); } /* Fluid Or */ .ui.fluid.buttons .or { width: 0em !important; } .ui.fluid.buttons .or:after { display: none; } /*------------------- Attached --------------------*/ /* Singular */ .ui.attached.button { position: relative; display: block; margin: 0em; border-radius: 0em; -webkit-box-shadow: 0px 0px 0px 1px rgba(34, 36, 38, 0.15) !important; box-shadow: 0px 0px 0px 1px rgba(34, 36, 38, 0.15) !important; } /* Top / Bottom */ .ui.attached.top.button { border-radius: 0.28571429rem 0.28571429rem 0em 0em; } .ui.attached.bottom.button { border-radius: 0em 0em 0.28571429rem 0.28571429rem; } /* Left / Right */ .ui.left.attached.button { display: inline-block; border-left: none; text-align: right; padding-right: 0.75em; border-radius: 0.28571429rem 0em 0em 0.28571429rem; } .ui.right.attached.button { display: inline-block; text-align: left; padding-left: 0.75em; border-radius: 0em 0.28571429rem 0.28571429rem 0em; } /* Plural */ .ui.attached.buttons { position: relative; display: -webkit-box; display: -ms-flexbox; display: flex; border-radius: 0em; width: auto !important; z-index: 2; margin-left: -1px; margin-right: -1px; } .ui.attached.buttons .button { margin: 0em; } .ui.attached.buttons .button:first-child { border-radius: 0em; } .ui.attached.buttons .button:last-child { border-radius: 0em; } /* Top / Bottom */ .ui[class*="top attached"].buttons { margin-bottom: -1px; border-radius: 0.28571429rem 0.28571429rem 0em 0em; } .ui[class*="top attached"].buttons .button:first-child { border-radius: 0.28571429rem 0em 0em 0em; } .ui[class*="top attached"].buttons .button:last-child { border-radius: 0em 0.28571429rem 0em 0em; } .ui[class*="bottom attached"].buttons { margin-top: -1px; border-radius: 0em 0em 0.28571429rem 0.28571429rem; } .ui[class*="bottom attached"].buttons .button:first-child { border-radius: 0em 0em 0em 0.28571429rem; } .ui[class*="bottom attached"].buttons .button:last-child { border-radius: 0em 0em 0.28571429rem 0em; } /* Left / Right */ .ui[class*="left attached"].buttons { display: -webkit-inline-box; display: -ms-inline-flexbox; display: inline-flex; margin-right: 0em; margin-left: -1px; border-radius: 0em 0.28571429rem 0.28571429rem 0em; } .ui[class*="left attached"].buttons .button:first-child { margin-left: -1px; border-radius: 0em 0.28571429rem 0em 0em; } .ui[class*="left attached"].buttons .button:last-child { margin-left: -1px; border-radius: 0em 0em 0.28571429rem 0em; } .ui[class*="right attached"].buttons { display: -webkit-inline-box; display: -ms-inline-flexbox; display: inline-flex; margin-left: 0em; margin-right: -1px; border-radius: 0.28571429rem 0em 0em 0.28571429rem; } .ui[class*="right attached"].buttons .button:first-child { margin-left: -1px; border-radius: 0.28571429rem 0em 0em 0em; } .ui[class*="right attached"].buttons .button:last-child { margin-left: -1px; border-radius: 0em 0em 0em 0.28571429rem; } /*------------------- Fluid --------------------*/ .ui.fluid.buttons, .ui.fluid.button { width: 100%; } .ui.fluid.button { display: block; } .ui.two.buttons { width: 100%; } .ui.two.buttons > .button { width: 50%; } .ui.three.buttons { width: 100%; } .ui.three.buttons > .button { width: 33.333%; } .ui.four.buttons { width: 100%; } .ui.four.buttons > .button { width: 25%; } .ui.five.buttons { width: 100%; } .ui.five.buttons > .button { width: 20%; } .ui.six.buttons { width: 100%; } .ui.six.buttons > .button { width: 16.666%; } .ui.seven.buttons { width: 100%; } .ui.seven.buttons > .button { width: 14.285%; } .ui.eight.buttons { width: 100%; } .ui.eight.buttons > .button { width: 12.500%; } .ui.nine.buttons { width: 100%; } .ui.nine.buttons > .button { width: 11.11%; } .ui.ten.buttons { width: 100%; } .ui.ten.buttons > .button { width: 10%; } .ui.eleven.buttons { width: 100%; } .ui.eleven.buttons > .button { width: 9.09%; } .ui.twelve.buttons { width: 100%; } .ui.twelve.buttons > .button { width: 8.3333%; } /* Fluid Vertical Buttons */ .ui.fluid.vertical.buttons, .ui.fluid.vertical.buttons > .button { display: -webkit-box; display: -ms-flexbox; display: flex; width: auto; } .ui.two.vertical.buttons > .button { height: 50%; } .ui.three.vertical.buttons > .button { height: 33.333%; } .ui.four.vertical.buttons > .button { height: 25%; } .ui.five.vertical.buttons > .button { height: 20%; } .ui.six.vertical.buttons > .button { height: 16.666%; } .ui.seven.vertical.buttons > .button { height: 14.285%; } .ui.eight.vertical.buttons > .button { height: 12.500%; } .ui.nine.vertical.buttons > .button { height: 11.11%; } .ui.ten.vertical.buttons > .button { height: 10%; } .ui.eleven.vertical.buttons > .button { height: 9.09%; } .ui.twelve.vertical.buttons > .button { height: 8.3333%; } /*------------------- Colors --------------------*/ /*--- Black ---*/ .ui.black.buttons .button, .ui.black.button { background-color: #1B1C1D; color: #FFFFFF; text-shadow: none; background-image: none; } .ui.black.button { -webkit-box-shadow: 0px 0em 0px 0px rgba(34, 36, 38, 0.15) inset; box-shadow: 0px 0em 0px 0px rgba(34, 36, 38, 0.15) inset; } .ui.black.buttons .button:hover, .ui.black.button:hover { background-color: #27292a; color: #FFFFFF; text-shadow: none; } .ui.black.buttons .button:focus, .ui.black.button:focus { background-color: #2f3032; color: #FFFFFF; text-shadow: none; } .ui.black.buttons .button:active, .ui.black.button:active { background-color: #343637; color: #FFFFFF; text-shadow: none; } .ui.black.buttons .active.button, .ui.black.buttons .active.button:active, .ui.black.active.button, .ui.black.button .active.button:active { background-color: #0f0f10; color: #FFFFFF; text-shadow: none; } /* Basic */ .ui.basic.black.buttons .button, .ui.basic.black.button { -webkit-box-shadow: 0px 0px 0px 1px #1B1C1D inset !important; box-shadow: 0px 0px 0px 1px #1B1C1D inset !important; color: #1B1C1D !important; } .ui.basic.black.buttons .button:hover, .ui.basic.black.button:hover { background: transparent !important; -webkit-box-shadow: 0px 0px 0px 1px #27292a inset !important; box-shadow: 0px 0px 0px 1px #27292a inset !important; color: #27292a !important; } .ui.basic.black.buttons .button:focus, .ui.basic.black.button:focus { background: transparent !important; -webkit-box-shadow: 0px 0px 0px 1px #2f3032 inset !important; box-shadow: 0px 0px 0px 1px #2f3032 inset !important; color: #27292a !important; } .ui.basic.black.buttons .active.button, .ui.basic.black.active.button { background: transparent !important; -webkit-box-shadow: 0px 0px 0px 1px #0f0f10 inset !important; box-shadow: 0px 0px 0px 1px #0f0f10 inset !important; color: #343637 !important; } .ui.basic.black.buttons .button:active, .ui.basic.black.button:active { -webkit-box-shadow: 0px 0px 0px 1px #343637 inset !important; box-shadow: 0px 0px 0px 1px #343637 inset !important; color: #343637 !important; } .ui.buttons:not(.vertical) > .basic.black.button:not(:first-child) { margin-left: -1px; } /* Inverted */ .ui.inverted.black.buttons .button, .ui.inverted.black.button { background-color: transparent; -webkit-box-shadow: 0px 0px 0px 2px #D4D4D5 inset !important; box-shadow: 0px 0px 0px 2px #D4D4D5 inset !important; color: #FFFFFF; } .ui.inverted.black.buttons .button:hover, .ui.inverted.black.button:hover, .ui.inverted.black.buttons .button:focus, .ui.inverted.black.button:focus, .ui.inverted.black.buttons .button.active, .ui.inverted.black.button.active, .ui.inverted.black.buttons .button:active, .ui.inverted.black.button:active { -webkit-box-shadow: none !important; box-shadow: none !important; color: #FFFFFF; } .ui.inverted.black.buttons .button:hover, .ui.inverted.black.button:hover { background-color: #000000; } .ui.inverted.black.buttons .button:focus, .ui.inverted.black.button:focus { background-color: #000000; } .ui.inverted.black.buttons .active.button, .ui.inverted.black.active.button { background-color: #000000; } .ui.inverted.black.buttons .button:active, .ui.inverted.black.button:active { background-color: #000000; } /* Inverted Basic */ .ui.inverted.black.basic.buttons .button, .ui.inverted.black.buttons .basic.button, .ui.inverted.black.basic.button { background-color: transparent; -webkit-box-shadow: 0px 0px 0px 2px rgba(255, 255, 255, 0.5) inset !important; box-shadow: 0px 0px 0px 2px rgba(255, 255, 255, 0.5) inset !important; color: #FFFFFF !important; } .ui.inverted.black.basic.buttons .button:hover, .ui.inverted.black.buttons .basic.button:hover, .ui.inverted.black.basic.button:hover { -webkit-box-shadow: 0px 0px 0px 2px #000000 inset !important; box-shadow: 0px 0px 0px 2px #000000 inset !important; color: #FFFFFF !important; } .ui.inverted.black.basic.buttons .button:focus, .ui.inverted.black.basic.buttons .button:focus, .ui.inverted.black.basic.button:focus { -webkit-box-shadow: 0px 0px 0px 2px #000000 inset !important; box-shadow: 0px 0px 0px 2px #000000 inset !important; color: #545454 !important; } .ui.inverted.black.basic.buttons .active.button, .ui.inverted.black.buttons .basic.active.button, .ui.inverted.black.basic.active.button { -webkit-box-shadow: 0px 0px 0px 2px #000000 inset !important; box-shadow: 0px 0px 0px 2px #000000 inset !important; color: #FFFFFF !important; } .ui.inverted.black.basic.buttons .button:active, .ui.inverted.black.buttons .basic.button:active, .ui.inverted.black.basic.button:active { -webkit-box-shadow: 0px 0px 0px 2px #000000 inset !important; box-shadow: 0px 0px 0px 2px #000000 inset !important; color: #FFFFFF !important; } /*--- Grey ---*/ .ui.grey.buttons .button, .ui.grey.button { background-color: #767676; color: #FFFFFF; text-shadow: none; background-image: none; } .ui.grey.button { -webkit-box-shadow: 0px 0em 0px 0px rgba(34, 36, 38, 0.15) inset; box-shadow: 0px 0em 0px 0px rgba(34, 36, 38, 0.15) inset; } .ui.grey.buttons .button:hover, .ui.grey.button:hover { background-color: #838383; color: #FFFFFF; text-shadow: none; } .ui.grey.buttons .button:focus, .ui.grey.button:focus { background-color: #8a8a8a; color: #FFFFFF; text-shadow: none; } .ui.grey.buttons .button:active, .ui.grey.button:active { background-color: #909090; color: #FFFFFF; text-shadow: none; } .ui.grey.buttons .active.button, .ui.grey.buttons .active.button:active, .ui.grey.active.button, .ui.grey.button .active.button:active { background-color: #696969; color: #FFFFFF; text-shadow: none; } /* Basic */ .ui.basic.grey.buttons .button, .ui.basic.grey.button { -webkit-box-shadow: 0px 0px 0px 1px #767676 inset !important; box-shadow: 0px 0px 0px 1px #767676 inset !important; color: #767676 !important; } .ui.basic.grey.buttons .button:hover, .ui.basic.grey.button:hover { background: transparent !important; -webkit-box-shadow: 0px 0px 0px 1px #838383 inset !important; box-shadow: 0px 0px 0px 1px #838383 inset !important; color: #838383 !important; } .ui.basic.grey.buttons .button:focus, .ui.basic.grey.button:focus { background: transparent !important; -webkit-box-shadow: 0px 0px 0px 1px #8a8a8a inset !important; box-shadow: 0px 0px 0px 1px #8a8a8a inset !important; color: #838383 !important; } .ui.basic.grey.buttons .active.button, .ui.basic.grey.active.button { background: transparent !important; -webkit-box-shadow: 0px 0px 0px 1px #696969 inset !important; box-shadow: 0px 0px 0px 1px #696969 inset !important; color: #909090 !important; } .ui.basic.grey.buttons .button:active, .ui.basic.grey.button:active { -webkit-box-shadow: 0px 0px 0px 1px #909090 inset !important; box-shadow: 0px 0px 0px 1px #909090 inset !important; color: #909090 !important; } .ui.buttons:not(.vertical) > .basic.grey.button:not(:first-child) { margin-left: -1px; } /* Inverted */ .ui.inverted.grey.buttons .button, .ui.inverted.grey.button { background-color: transparent; -webkit-box-shadow: 0px 0px 0px 2px #D4D4D5 inset !important; box-shadow: 0px 0px 0px 2px #D4D4D5 inset !important; color: #FFFFFF; } .ui.inverted.grey.buttons .button:hover, .ui.inverted.grey.button:hover, .ui.inverted.grey.buttons .button:focus, .ui.inverted.grey.button:focus, .ui.inverted.grey.buttons .button.active, .ui.inverted.grey.button.active, .ui.inverted.grey.buttons .button:active, .ui.inverted.grey.button:active { -webkit-box-shadow: none !important; box-shadow: none !important; color: rgba(0, 0, 0, 0.6); } .ui.inverted.grey.buttons .button:hover, .ui.inverted.grey.button:hover { background-color: #cfd0d2; } .ui.inverted.grey.buttons .button:focus, .ui.inverted.grey.button:focus { background-color: #c7c9cb; } .ui.inverted.grey.buttons .active.button, .ui.inverted.grey.active.button { background-color: #cfd0d2; } .ui.inverted.grey.buttons .button:active, .ui.inverted.grey.button:active { background-color: #c2c4c5; } /* Inverted Basic */ .ui.inverted.grey.basic.buttons .button, .ui.inverted.grey.buttons .basic.button, .ui.inverted.grey.basic.button { background-color: transparent; -webkit-box-shadow: 0px 0px 0px 2px rgba(255, 255, 255, 0.5) inset !important; box-shadow: 0px 0px 0px 2px rgba(255, 255, 255, 0.5) inset !important; color: #FFFFFF !important; } .ui.inverted.grey.basic.buttons .button:hover, .ui.inverted.grey.buttons .basic.button:hover, .ui.inverted.grey.basic.button:hover { -webkit-box-shadow: 0px 0px 0px 2px #cfd0d2 inset !important; box-shadow: 0px 0px 0px 2px #cfd0d2 inset !important; color: #FFFFFF !important; } .ui.inverted.grey.basic.buttons .button:focus, .ui.inverted.grey.basic.buttons .button:focus, .ui.inverted.grey.basic.button:focus { -webkit-box-shadow: 0px 0px 0px 2px #c7c9cb inset !important; box-shadow: 0px 0px 0px 2px #c7c9cb inset !important; color: #DCDDDE !important; } .ui.inverted.grey.basic.buttons .active.button, .ui.inverted.grey.buttons .basic.active.button, .ui.inverted.grey.basic.active.button { -webkit-box-shadow: 0px 0px 0px 2px #cfd0d2 inset !important; box-shadow: 0px 0px 0px 2px #cfd0d2 inset !important; color: #FFFFFF !important; } .ui.inverted.grey.basic.buttons .button:active, .ui.inverted.grey.buttons .basic.button:active, .ui.inverted.grey.basic.button:active { -webkit-box-shadow: 0px 0px 0px 2px #c2c4c5 inset !important; box-shadow: 0px 0px 0px 2px #c2c4c5 inset !important; color: #FFFFFF !important; } /*--- Brown ---*/ .ui.brown.buttons .button, .ui.brown.button { background-color: #A5673F; color: #FFFFFF; text-shadow: none; background-image: none; } .ui.brown.button { -webkit-box-shadow: 0px 0em 0px 0px rgba(34, 36, 38, 0.15) inset; box-shadow: 0px 0em 0px 0px rgba(34, 36, 38, 0.15) inset; } .ui.brown.buttons .button:hover, .ui.brown.button:hover { background-color: #975b33; color: #FFFFFF; text-shadow: none; } .ui.brown.buttons .button:focus, .ui.brown.button:focus { background-color: #90532b; color: #FFFFFF; text-shadow: none; } .ui.brown.buttons .button:active, .ui.brown.button:active { background-color: #805031; color: #FFFFFF; text-shadow: none; } .ui.brown.buttons .active.button, .ui.brown.buttons .active.button:active, .ui.brown.active.button, .ui.brown.button .active.button:active { background-color: #995a31; color: #FFFFFF; text-shadow: none; } /* Basic */ .ui.basic.brown.buttons .button, .ui.basic.brown.button { -webkit-box-shadow: 0px 0px 0px 1px #A5673F inset !important; box-shadow: 0px 0px 0px 1px #A5673F inset !important; color: #A5673F !important; } .ui.basic.brown.buttons .button:hover, .ui.basic.brown.button:hover { background: transparent !important; -webkit-box-shadow: 0px 0px 0px 1px #975b33 inset !important; box-shadow: 0px 0px 0px 1px #975b33 inset !important; color: #975b33 !important; } .ui.basic.brown.buttons .button:focus, .ui.basic.brown.button:focus { background: transparent !important; -webkit-box-shadow: 0px 0px 0px 1px #90532b inset !important; box-shadow: 0px 0px 0px 1px #90532b inset !important; color: #975b33 !important; } .ui.basic.brown.buttons .active.button, .ui.basic.brown.active.button { background: transparent !important; -webkit-box-shadow: 0px 0px 0px 1px #995a31 inset !important; box-shadow: 0px 0px 0px 1px #995a31 inset !important; color: #805031 !important; } .ui.basic.brown.buttons .button:active, .ui.basic.brown.button:active { -webkit-box-shadow: 0px 0px 0px 1px #805031 inset !important; box-shadow: 0px 0px 0px 1px #805031 inset !important; color: #805031 !important; } .ui.buttons:not(.vertical) > .basic.brown.button:not(:first-child) { margin-left: -1px; } /* Inverted */ .ui.inverted.brown.buttons .button, .ui.inverted.brown.button { background-color: transparent; -webkit-box-shadow: 0px 0px 0px 2px #D67C1C inset !important; box-shadow: 0px 0px 0px 2px #D67C1C inset !important; color: #D67C1C; } .ui.inverted.brown.buttons .button:hover, .ui.inverted.brown.button:hover, .ui.inverted.brown.buttons .button:focus, .ui.inverted.brown.button:focus, .ui.inverted.brown.buttons .button.active, .ui.inverted.brown.button.active, .ui.inverted.brown.buttons .button:active, .ui.inverted.brown.button:active { -webkit-box-shadow: none !important; box-shadow: none !important; color: #FFFFFF; } .ui.inverted.brown.buttons .button:hover, .ui.inverted.brown.button:hover { background-color: #c86f11; } .ui.inverted.brown.buttons .button:focus, .ui.inverted.brown.button:focus { background-color: #c16808; } .ui.inverted.brown.buttons .active.button, .ui.inverted.brown.active.button { background-color: #cc6f0d; } .ui.inverted.brown.buttons .button:active, .ui.inverted.brown.button:active { background-color: #a96216; } /* Inverted Basic */ .ui.inverted.brown.basic.buttons .button, .ui.inverted.brown.buttons .basic.button, .ui.inverted.brown.basic.button { background-color: transparent; -webkit-box-shadow: 0px 0px 0px 2px rgba(255, 255, 255, 0.5) inset !important; box-shadow: 0px 0px 0px 2px rgba(255, 255, 255, 0.5) inset !important; color: #FFFFFF !important; } .ui.inverted.brown.basic.buttons .button:hover, .ui.inverted.brown.buttons .basic.button:hover, .ui.inverted.brown.basic.button:hover { -webkit-box-shadow: 0px 0px 0px 2px #c86f11 inset !important; box-shadow: 0px 0px 0px 2px #c86f11 inset !important; color: #D67C1C !important; } .ui.inverted.brown.basic.buttons .button:focus, .ui.inverted.brown.basic.buttons .button:focus, .ui.inverted.brown.basic.button:focus { -webkit-box-shadow: 0px 0px 0px 2px #c16808 inset !important; box-shadow: 0px 0px 0px 2px #c16808 inset !important; color: #D67C1C !important; } .ui.inverted.brown.basic.buttons .active.button, .ui.inverted.brown.buttons .basic.active.button, .ui.inverted.brown.basic.active.button { -webkit-box-shadow: 0px 0px 0px 2px #cc6f0d inset !important; box-shadow: 0px 0px 0px 2px #cc6f0d inset !important; color: #D67C1C !important; } .ui.inverted.brown.basic.buttons .button:active, .ui.inverted.brown.buttons .basic.button:active, .ui.inverted.brown.basic.button:active { -webkit-box-shadow: 0px 0px 0px 2px #a96216 inset !important; box-shadow: 0px 0px 0px 2px #a96216 inset !important; color: #D67C1C !important; } /*--- Blue ---*/ .ui.blue.buttons .button, .ui.blue.button { background-color: #2185D0; color: #FFFFFF; text-shadow: none; background-image: none; } .ui.blue.button { -webkit-box-shadow: 0px 0em 0px 0px rgba(34, 36, 38, 0.15) inset; box-shadow: 0px 0em 0px 0px rgba(34, 36, 38, 0.15) inset; } .ui.blue.buttons .button:hover, .ui.blue.button:hover { background-color: #1678c2; color: #FFFFFF; text-shadow: none; } .ui.blue.buttons .button:focus, .ui.blue.button:focus { background-color: #0d71bb; color: #FFFFFF; text-shadow: none; } .ui.blue.buttons .button:active, .ui.blue.button:active { background-color: #1a69a4; color: #FFFFFF; text-shadow: none; } .ui.blue.buttons .active.button, .ui.blue.buttons .active.button:active, .ui.blue.active.button, .ui.blue.button .active.button:active { background-color: #1279c6; color: #FFFFFF; text-shadow: none; } /* Basic */ .ui.basic.blue.buttons .button, .ui.basic.blue.button { -webkit-box-shadow: 0px 0px 0px 1px #2185D0 inset !important; box-shadow: 0px 0px 0px 1px #2185D0 inset !important; color: #2185D0 !important; } .ui.basic.blue.buttons .button:hover, .ui.basic.blue.button:hover { background: transparent !important; -webkit-box-shadow: 0px 0px 0px 1px #1678c2 inset !important; box-shadow: 0px 0px 0px 1px #1678c2 inset !important; color: #1678c2 !important; } .ui.basic.blue.buttons .button:focus, .ui.basic.blue.button:focus { background: transparent !important; -webkit-box-shadow: 0px 0px 0px 1px #0d71bb inset !important; box-shadow: 0px 0px 0px 1px #0d71bb inset !important; color: #1678c2 !important; } .ui.basic.blue.buttons .active.button, .ui.basic.blue.active.button { background: transparent !important; -webkit-box-shadow: 0px 0px 0px 1px #1279c6 inset !important; box-shadow: 0px 0px 0px 1px #1279c6 inset !important; color: #1a69a4 !important; } .ui.basic.blue.buttons .button:active, .ui.basic.blue.button:active { -webkit-box-shadow: 0px 0px 0px 1px #1a69a4 inset !important; box-shadow: 0px 0px 0px 1px #1a69a4 inset !important; color: #1a69a4 !important; } .ui.buttons:not(.vertical) > .basic.blue.button:not(:first-child) { margin-left: -1px; } /* Inverted */ .ui.inverted.blue.buttons .button, .ui.inverted.blue.button { background-color: transparent; -webkit-box-shadow: 0px 0px 0px 2px #54C8FF inset !important; box-shadow: 0px 0px 0px 2px #54C8FF inset !important; color: #54C8FF; } .ui.inverted.blue.buttons .button:hover, .ui.inverted.blue.button:hover, .ui.inverted.blue.buttons .button:focus, .ui.inverted.blue.button:focus, .ui.inverted.blue.buttons .button.active, .ui.inverted.blue.button.active, .ui.inverted.blue.buttons .button:active, .ui.inverted.blue.button:active { -webkit-box-shadow: none !important; box-shadow: none !important; color: #FFFFFF; } .ui.inverted.blue.buttons .button:hover, .ui.inverted.blue.button:hover { background-color: #3ac0ff; } .ui.inverted.blue.buttons .button:focus, .ui.inverted.blue.button:focus { background-color: #2bbbff; } .ui.inverted.blue.buttons .active.button, .ui.inverted.blue.active.button { background-color: #3ac0ff; } .ui.inverted.blue.buttons .button:active, .ui.inverted.blue.button:active { background-color: #21b8ff; } /* Inverted Basic */ .ui.inverted.blue.basic.buttons .button, .ui.inverted.blue.buttons .basic.button, .ui.inverted.blue.basic.button { background-color: transparent; -webkit-box-shadow: 0px 0px 0px 2px rgba(255, 255, 255, 0.5) inset !important; box-shadow: 0px 0px 0px 2px rgba(255, 255, 255, 0.5) inset !important; color: #FFFFFF !important; } .ui.inverted.blue.basic.buttons .button:hover, .ui.inverted.blue.buttons .basic.button:hover, .ui.inverted.blue.basic.button:hover { -webkit-box-shadow: 0px 0px 0px 2px #3ac0ff inset !important; box-shadow: 0px 0px 0px 2px #3ac0ff inset !important; color: #54C8FF !important; } .ui.inverted.blue.basic.buttons .button:focus, .ui.inverted.blue.basic.buttons .button:focus, .ui.inverted.blue.basic.button:focus { -webkit-box-shadow: 0px 0px 0px 2px #2bbbff inset !important; box-shadow: 0px 0px 0px 2px #2bbbff inset !important; color: #54C8FF !important; } .ui.inverted.blue.basic.buttons .active.button, .ui.inverted.blue.buttons .basic.active.button, .ui.inverted.blue.basic.active.button { -webkit-box-shadow: 0px 0px 0px 2px #3ac0ff inset !important; box-shadow: 0px 0px 0px 2px #3ac0ff inset !important; color: #54C8FF !important; } .ui.inverted.blue.basic.buttons .button:active, .ui.inverted.blue.buttons .basic.button:active, .ui.inverted.blue.basic.button:active { -webkit-box-shadow: 0px 0px 0px 2px #21b8ff inset !important; box-shadow: 0px 0px 0px 2px #21b8ff inset !important; color: #54C8FF !important; } /*--- Green ---*/ .ui.green.buttons .button, .ui.green.button { background-color: #21BA45; color: #FFFFFF; text-shadow: none; background-image: none; } .ui.green.button { -webkit-box-shadow: 0px 0em 0px 0px rgba(34, 36, 38, 0.15) inset; box-shadow: 0px 0em 0px 0px rgba(34, 36, 38, 0.15) inset; } .ui.green.buttons .button:hover, .ui.green.button:hover { background-color: #16ab39; color: #FFFFFF; text-shadow: none; } .ui.green.buttons .button:focus, .ui.green.button:focus { background-color: #0ea432; color: #FFFFFF; text-shadow: none; } .ui.green.buttons .button:active, .ui.green.button:active { background-color: #198f35; color: #FFFFFF; text-shadow: none; } .ui.green.buttons .active.button, .ui.green.buttons .active.button:active, .ui.green.active.button, .ui.green.button .active.button:active { background-color: #13ae38; color: #FFFFFF; text-shadow: none; } /* Basic */ .ui.basic.green.buttons .button, .ui.basic.green.button { -webkit-box-shadow: 0px 0px 0px 1px #21BA45 inset !important; box-shadow: 0px 0px 0px 1px #21BA45 inset !important; color: #21BA45 !important; } .ui.basic.green.buttons .button:hover, .ui.basic.green.button:hover { background: transparent !important; -webkit-box-shadow: 0px 0px 0px 1px #16ab39 inset !important; box-shadow: 0px 0px 0px 1px #16ab39 inset !important; color: #16ab39 !important; } .ui.basic.green.buttons .button:focus, .ui.basic.green.button:focus { background: transparent !important; -webkit-box-shadow: 0px 0px 0px 1px #0ea432 inset !important; box-shadow: 0px 0px 0px 1px #0ea432 inset !important; color: #16ab39 !important; } .ui.basic.green.buttons .active.button, .ui.basic.green.active.button { background: transparent !important; -webkit-box-shadow: 0px 0px 0px 1px #13ae38 inset !important; box-shadow: 0px 0px 0px 1px #13ae38 inset !important; color: #198f35 !important; } .ui.basic.green.buttons .button:active, .ui.basic.green.button:active { -webkit-box-shadow: 0px 0px 0px 1px #198f35 inset !important; box-shadow: 0px 0px 0px 1px #198f35 inset !important; color: #198f35 !important; } .ui.buttons:not(.vertical) > .basic.green.button:not(:first-child) { margin-left: -1px; } /* Inverted */ .ui.inverted.green.buttons .button, .ui.inverted.green.button { background-color: transparent; -webkit-box-shadow: 0px 0px 0px 2px #2ECC40 inset !important; box-shadow: 0px 0px 0px 2px #2ECC40 inset !important; color: #2ECC40; } .ui.inverted.green.buttons .button:hover, .ui.inverted.green.button:hover, .ui.inverted.green.buttons .button:focus, .ui.inverted.green.button:focus, .ui.inverted.green.buttons .button.active, .ui.inverted.green.button.active, .ui.inverted.green.buttons .button:active, .ui.inverted.green.button:active { -webkit-box-shadow: none !important; box-shadow: none !important; color: #FFFFFF; } .ui.inverted.green.buttons .button:hover, .ui.inverted.green.button:hover { background-color: #22be34; } .ui.inverted.green.buttons .button:focus, .ui.inverted.green.button:focus { background-color: #19b82b; } .ui.inverted.green.buttons .active.button, .ui.inverted.green.active.button { background-color: #1fc231; } .ui.inverted.green.buttons .button:active, .ui.inverted.green.button:active { background-color: #25a233; } /* Inverted Basic */ .ui.inverted.green.basic.buttons .button, .ui.inverted.green.buttons .basic.button, .ui.inverted.green.basic.button { background-color: transparent; -webkit-box-shadow: 0px 0px 0px 2px rgba(255, 255, 255, 0.5) inset !important; box-shadow: 0px 0px 0px 2px rgba(255, 255, 255, 0.5) inset !important; color: #FFFFFF !important; } .ui.inverted.green.basic.buttons .button:hover, .ui.inverted.green.buttons .basic.button:hover, .ui.inverted.green.basic.button:hover { -webkit-box-shadow: 0px 0px 0px 2px #22be34 inset !important; box-shadow: 0px 0px 0px 2px #22be34 inset !important; color: #2ECC40 !important; } .ui.inverted.green.basic.buttons .button:focus, .ui.inverted.green.basic.buttons .button:focus, .ui.inverted.green.basic.button:focus { -webkit-box-shadow: 0px 0px 0px 2px #19b82b inset !important; box-shadow: 0px 0px 0px 2px #19b82b inset !important; color: #2ECC40 !important; } .ui.inverted.green.basic.buttons .active.button, .ui.inverted.green.buttons .basic.active.button, .ui.inverted.green.basic.active.button { -webkit-box-shadow: 0px 0px 0px 2px #1fc231 inset !important; box-shadow: 0px 0px 0px 2px #1fc231 inset !important; color: #2ECC40 !important; } .ui.inverted.green.basic.buttons .button:active, .ui.inverted.green.buttons .basic.button:active, .ui.inverted.green.basic.button:active { -webkit-box-shadow: 0px 0px 0px 2px #25a233 inset !important; box-shadow: 0px 0px 0px 2px #25a233 inset !important; color: #2ECC40 !important; } /*--- Orange ---*/ .ui.orange.buttons .button, .ui.orange.button { background-color: #F2711C; color: #FFFFFF; text-shadow: none; background-image: none; } .ui.orange.button { -webkit-box-shadow: 0px 0em 0px 0px rgba(34, 36, 38, 0.15) inset; box-shadow: 0px 0em 0px 0px rgba(34, 36, 38, 0.15) inset; } .ui.orange.buttons .button:hover, .ui.orange.button:hover { background-color: #f26202; color: #FFFFFF; text-shadow: none; } .ui.orange.buttons .button:focus, .ui.orange.button:focus { background-color: #e55b00; color: #FFFFFF; text-shadow: none; } .ui.orange.buttons .button:active, .ui.orange.button:active { background-color: #cf590c; color: #FFFFFF; text-shadow: none; } .ui.orange.buttons .active.button, .ui.orange.buttons .active.button:active, .ui.orange.active.button, .ui.orange.button .active.button:active { background-color: #f56100; color: #FFFFFF; text-shadow: none; } /* Basic */ .ui.basic.orange.buttons .button, .ui.basic.orange.button { -webkit-box-shadow: 0px 0px 0px 1px #F2711C inset !important; box-shadow: 0px 0px 0px 1px #F2711C inset !important; color: #F2711C !important; } .ui.basic.orange.buttons .button:hover, .ui.basic.orange.button:hover { background: transparent !important; -webkit-box-shadow: 0px 0px 0px 1px #f26202 inset !important; box-shadow: 0px 0px 0px 1px #f26202 inset !important; color: #f26202 !important; } .ui.basic.orange.buttons .button:focus, .ui.basic.orange.button:focus { background: transparent !important; -webkit-box-shadow: 0px 0px 0px 1px #e55b00 inset !important; box-shadow: 0px 0px 0px 1px #e55b00 inset !important; color: #f26202 !important; } .ui.basic.orange.buttons .active.button, .ui.basic.orange.active.button { background: transparent !important; -webkit-box-shadow: 0px 0px 0px 1px #f56100 inset !important; box-shadow: 0px 0px 0px 1px #f56100 inset !important; color: #cf590c !important; } .ui.basic.orange.buttons .button:active, .ui.basic.orange.button:active { -webkit-box-shadow: 0px 0px 0px 1px #cf590c inset !important; box-shadow: 0px 0px 0px 1px #cf590c inset !important; color: #cf590c !important; } .ui.buttons:not(.vertical) > .basic.orange.button:not(:first-child) { margin-left: -1px; } /* Inverted */ .ui.inverted.orange.buttons .button, .ui.inverted.orange.button { background-color: transparent; -webkit-box-shadow: 0px 0px 0px 2px #FF851B inset !important; box-shadow: 0px 0px 0px 2px #FF851B inset !important; color: #FF851B; } .ui.inverted.orange.buttons .button:hover, .ui.inverted.orange.button:hover, .ui.inverted.orange.buttons .button:focus, .ui.inverted.orange.button:focus, .ui.inverted.orange.buttons .button.active, .ui.inverted.orange.button.active, .ui.inverted.orange.buttons .button:active, .ui.inverted.orange.button:active { -webkit-box-shadow: none !important; box-shadow: none !important; color: #FFFFFF; } .ui.inverted.orange.buttons .button:hover, .ui.inverted.orange.button:hover { background-color: #ff7701; } .ui.inverted.orange.buttons .button:focus, .ui.inverted.orange.button:focus { background-color: #f17000; } .ui.inverted.orange.buttons .active.button, .ui.inverted.orange.active.button { background-color: #ff7701; } .ui.inverted.orange.buttons .button:active, .ui.inverted.orange.button:active { background-color: #e76b00; } /* Inverted Basic */ .ui.inverted.orange.basic.buttons .button, .ui.inverted.orange.buttons .basic.button, .ui.inverted.orange.basic.button { background-color: transparent; -webkit-box-shadow: 0px 0px 0px 2px rgba(255, 255, 255, 0.5) inset !important; box-shadow: 0px 0px 0px 2px rgba(255, 255, 255, 0.5) inset !important; color: #FFFFFF !important; } .ui.inverted.orange.basic.buttons .button:hover, .ui.inverted.orange.buttons .basic.button:hover, .ui.inverted.orange.basic.button:hover { -webkit-box-shadow: 0px 0px 0px 2px #ff7701 inset !important; box-shadow: 0px 0px 0px 2px #ff7701 inset !important; color: #FF851B !important; } .ui.inverted.orange.basic.buttons .button:focus, .ui.inverted.orange.basic.buttons .button:focus, .ui.inverted.orange.basic.button:focus { -webkit-box-shadow: 0px 0px 0px 2px #f17000 inset !important; box-shadow: 0px 0px 0px 2px #f17000 inset !important; color: #FF851B !important; } .ui.inverted.orange.basic.buttons .active.button, .ui.inverted.orange.buttons .basic.active.button, .ui.inverted.orange.basic.active.button { -webkit-box-shadow: 0px 0px 0px 2px #ff7701 inset !important; box-shadow: 0px 0px 0px 2px #ff7701 inset !important; color: #FF851B !important; } .ui.inverted.orange.basic.buttons .button:active, .ui.inverted.orange.buttons .basic.button:active, .ui.inverted.orange.basic.button:active { -webkit-box-shadow: 0px 0px 0px 2px #e76b00 inset !important; box-shadow: 0px 0px 0px 2px #e76b00 inset !important; color: #FF851B !important; } /*--- Pink ---*/ .ui.pink.buttons .button, .ui.pink.button { background-color: #E03997; color: #FFFFFF; text-shadow: none; background-image: none; } .ui.pink.button { -webkit-box-shadow: 0px 0em 0px 0px rgba(34, 36, 38, 0.15) inset; box-shadow: 0px 0em 0px 0px rgba(34, 36, 38, 0.15) inset; } .ui.pink.buttons .button:hover, .ui.pink.button:hover { background-color: #e61a8d; color: #FFFFFF; text-shadow: none; } .ui.pink.buttons .button:focus, .ui.pink.button:focus { background-color: #e10f85; color: #FFFFFF; text-shadow: none; } .ui.pink.buttons .button:active, .ui.pink.button:active { background-color: #c71f7e; color: #FFFFFF; text-shadow: none; } .ui.pink.buttons .active.button, .ui.pink.buttons .active.button:active, .ui.pink.active.button, .ui.pink.button .active.button:active { background-color: #ea158d; color: #FFFFFF; text-shadow: none; } /* Basic */ .ui.basic.pink.buttons .button, .ui.basic.pink.button { -webkit-box-shadow: 0px 0px 0px 1px #E03997 inset !important; box-shadow: 0px 0px 0px 1px #E03997 inset !important; color: #E03997 !important; } .ui.basic.pink.buttons .button:hover, .ui.basic.pink.button:hover { background: transparent !important; -webkit-box-shadow: 0px 0px 0px 1px #e61a8d inset !important; box-shadow: 0px 0px 0px 1px #e61a8d inset !important; color: #e61a8d !important; } .ui.basic.pink.buttons .button:focus, .ui.basic.pink.button:focus { background: transparent !important; -webkit-box-shadow: 0px 0px 0px 1px #e10f85 inset !important; box-shadow: 0px 0px 0px 1px #e10f85 inset !important; color: #e61a8d !important; } .ui.basic.pink.buttons .active.button, .ui.basic.pink.active.button { background: transparent !important; -webkit-box-shadow: 0px 0px 0px 1px #ea158d inset !important; box-shadow: 0px 0px 0px 1px #ea158d inset !important; color: #c71f7e !important; } .ui.basic.pink.buttons .button:active, .ui.basic.pink.button:active { -webkit-box-shadow: 0px 0px 0px 1px #c71f7e inset !important; box-shadow: 0px 0px 0px 1px #c71f7e inset !important; color: #c71f7e !important; } .ui.buttons:not(.vertical) > .basic.pink.button:not(:first-child) { margin-left: -1px; } /* Inverted */ .ui.inverted.pink.buttons .button, .ui.inverted.pink.button { background-color: transparent; -webkit-box-shadow: 0px 0px 0px 2px #FF8EDF inset !important; box-shadow: 0px 0px 0px 2px #FF8EDF inset !important; color: #FF8EDF; } .ui.inverted.pink.buttons .button:hover, .ui.inverted.pink.button:hover, .ui.inverted.pink.buttons .button:focus, .ui.inverted.pink.button:focus, .ui.inverted.pink.buttons .button.active, .ui.inverted.pink.button.active, .ui.inverted.pink.buttons .button:active, .ui.inverted.pink.button:active { -webkit-box-shadow: none !important; box-shadow: none !important; color: #FFFFFF; } .ui.inverted.pink.buttons .button:hover, .ui.inverted.pink.button:hover { background-color: #ff74d8; } .ui.inverted.pink.buttons .button:focus, .ui.inverted.pink.button:focus { background-color: #ff65d3; } .ui.inverted.pink.buttons .active.button, .ui.inverted.pink.active.button { background-color: #ff74d8; } .ui.inverted.pink.buttons .button:active, .ui.inverted.pink.button:active { background-color: #ff5bd1; } /* Inverted Basic */ .ui.inverted.pink.basic.buttons .button, .ui.inverted.pink.buttons .basic.button, .ui.inverted.pink.basic.button { background-color: transparent; -webkit-box-shadow: 0px 0px 0px 2px rgba(255, 255, 255, 0.5) inset !important; box-shadow: 0px 0px 0px 2px rgba(255, 255, 255, 0.5) inset !important; color: #FFFFFF !important; } .ui.inverted.pink.basic.buttons .button:hover, .ui.inverted.pink.buttons .basic.button:hover, .ui.inverted.pink.basic.button:hover { -webkit-box-shadow: 0px 0px 0px 2px #ff74d8 inset !important; box-shadow: 0px 0px 0px 2px #ff74d8 inset !important; color: #FF8EDF !important; } .ui.inverted.pink.basic.buttons .button:focus, .ui.inverted.pink.basic.buttons .button:focus, .ui.inverted.pink.basic.button:focus { -webkit-box-shadow: 0px 0px 0px 2px #ff65d3 inset !important; box-shadow: 0px 0px 0px 2px #ff65d3 inset !important; color: #FF8EDF !important; } .ui.inverted.pink.basic.buttons .active.button, .ui.inverted.pink.buttons .basic.active.button, .ui.inverted.pink.basic.active.button { -webkit-box-shadow: 0px 0px 0px 2px #ff74d8 inset !important; box-shadow: 0px 0px 0px 2px #ff74d8 inset !important; color: #FF8EDF !important; } .ui.inverted.pink.basic.buttons .button:active, .ui.inverted.pink.buttons .basic.button:active, .ui.inverted.pink.basic.button:active { -webkit-box-shadow: 0px 0px 0px 2px #ff5bd1 inset !important; box-shadow: 0px 0px 0px 2px #ff5bd1 inset !important; color: #FF8EDF !important; } /*--- Violet ---*/ .ui.violet.buttons .button, .ui.violet.button { background-color: #6435C9; color: #FFFFFF; text-shadow: none; background-image: none; } .ui.violet.button { -webkit-box-shadow: 0px 0em 0px 0px rgba(34, 36, 38, 0.15) inset; box-shadow: 0px 0em 0px 0px rgba(34, 36, 38, 0.15) inset; } .ui.violet.buttons .button:hover, .ui.violet.button:hover { background-color: #5829bb; color: #FFFFFF; text-shadow: none; } .ui.violet.buttons .button:focus, .ui.violet.button:focus { background-color: #4f20b5; color: #FFFFFF; text-shadow: none; } .ui.violet.buttons .button:active, .ui.violet.button:active { background-color: #502aa1; color: #FFFFFF; text-shadow: none; } .ui.violet.buttons .active.button, .ui.violet.buttons .active.button:active, .ui.violet.active.button, .ui.violet.button .active.button:active { background-color: #5626bf; color: #FFFFFF; text-shadow: none; } /* Basic */ .ui.basic.violet.buttons .button, .ui.basic.violet.button { -webkit-box-shadow: 0px 0px 0px 1px #6435C9 inset !important; box-shadow: 0px 0px 0px 1px #6435C9 inset !important; color: #6435C9 !important; } .ui.basic.violet.buttons .button:hover, .ui.basic.violet.button:hover { background: transparent !important; -webkit-box-shadow: 0px 0px 0px 1px #5829bb inset !important; box-shadow: 0px 0px 0px 1px #5829bb inset !important; color: #5829bb !important; } .ui.basic.violet.buttons .button:focus, .ui.basic.violet.button:focus { background: transparent !important; -webkit-box-shadow: 0px 0px 0px 1px #4f20b5 inset !important; box-shadow: 0px 0px 0px 1px #4f20b5 inset !important; color: #5829bb !important; } .ui.basic.violet.buttons .active.button, .ui.basic.violet.active.button { background: transparent !important; -webkit-box-shadow: 0px 0px 0px 1px #5626bf inset !important; box-shadow: 0px 0px 0px 1px #5626bf inset !important; color: #502aa1 !important; } .ui.basic.violet.buttons .button:active, .ui.basic.violet.button:active { -webkit-box-shadow: 0px 0px 0px 1px #502aa1 inset !important; box-shadow: 0px 0px 0px 1px #502aa1 inset !important; color: #502aa1 !important; } .ui.buttons:not(.vertical) > .basic.violet.button:not(:first-child) { margin-left: -1px; } /* Inverted */ .ui.inverted.violet.buttons .button, .ui.inverted.violet.button { background-color: transparent; -webkit-box-shadow: 0px 0px 0px 2px #A291FB inset !important; box-shadow: 0px 0px 0px 2px #A291FB inset !important; color: #A291FB; } .ui.inverted.violet.buttons .button:hover, .ui.inverted.violet.button:hover, .ui.inverted.violet.buttons .button:focus, .ui.inverted.violet.button:focus, .ui.inverted.violet.buttons .button.active, .ui.inverted.violet.button.active, .ui.inverted.violet.buttons .button:active, .ui.inverted.violet.button:active { -webkit-box-shadow: none !important; box-shadow: none !important; color: #FFFFFF; } .ui.inverted.violet.buttons .button:hover, .ui.inverted.violet.button:hover { background-color: #8a73ff; } .ui.inverted.violet.buttons .button:focus, .ui.inverted.violet.button:focus { background-color: #7d64ff; } .ui.inverted.violet.buttons .active.button, .ui.inverted.violet.active.button { background-color: #8a73ff; } .ui.inverted.violet.buttons .button:active, .ui.inverted.violet.button:active { background-color: #7860f9; } /* Inverted Basic */ .ui.inverted.violet.basic.buttons .button, .ui.inverted.violet.buttons .basic.button, .ui.inverted.violet.basic.button { background-color: transparent; -webkit-box-shadow: 0px 0px 0px 2px rgba(255, 255, 255, 0.5) inset !important; box-shadow: 0px 0px 0px 2px rgba(255, 255, 255, 0.5) inset !important; color: #FFFFFF !important; } .ui.inverted.violet.basic.buttons .button:hover, .ui.inverted.violet.buttons .basic.button:hover, .ui.inverted.violet.basic.button:hover { -webkit-box-shadow: 0px 0px 0px 2px #8a73ff inset !important; box-shadow: 0px 0px 0px 2px #8a73ff inset !important; color: #A291FB !important; } .ui.inverted.violet.basic.buttons .button:focus, .ui.inverted.violet.basic.buttons .button:focus, .ui.inverted.violet.basic.button:focus { -webkit-box-shadow: 0px 0px 0px 2px #7d64ff inset !important; box-shadow: 0px 0px 0px 2px #7d64ff inset !important; color: #A291FB !important; } .ui.inverted.violet.basic.buttons .active.button, .ui.inverted.violet.buttons .basic.active.button, .ui.inverted.violet.basic.active.button { -webkit-box-shadow: 0px 0px 0px 2px #8a73ff inset !important; box-shadow: 0px 0px 0px 2px #8a73ff inset !important; color: #A291FB !important; } .ui.inverted.violet.basic.buttons .button:active, .ui.inverted.violet.buttons .basic.button:active, .ui.inverted.violet.basic.button:active { -webkit-box-shadow: 0px 0px 0px 2px #7860f9 inset !important; box-shadow: 0px 0px 0px 2px #7860f9 inset !important; color: #A291FB !important; } /*--- Purple ---*/ .ui.purple.buttons .button, .ui.purple.button { background-color: #A333C8; color: #FFFFFF; text-shadow: none; background-image: none; } .ui.purple.button { -webkit-box-shadow: 0px 0em 0px 0px rgba(34, 36, 38, 0.15) inset; box-shadow: 0px 0em 0px 0px rgba(34, 36, 38, 0.15) inset; } .ui.purple.buttons .button:hover, .ui.purple.button:hover { background-color: #9627ba; color: #FFFFFF; text-shadow: none; } .ui.purple.buttons .button:focus, .ui.purple.button:focus { background-color: #8f1eb4; color: #FFFFFF; text-shadow: none; } .ui.purple.buttons .button:active, .ui.purple.button:active { background-color: #82299f; color: #FFFFFF; text-shadow: none; } .ui.purple.buttons .active.button, .ui.purple.buttons .active.button:active, .ui.purple.active.button, .ui.purple.button .active.button:active { background-color: #9724be; color: #FFFFFF; text-shadow: none; } /* Basic */ .ui.basic.purple.buttons .button, .ui.basic.purple.button { -webkit-box-shadow: 0px 0px 0px 1px #A333C8 inset !important; box-shadow: 0px 0px 0px 1px #A333C8 inset !important; color: #A333C8 !important; } .ui.basic.purple.buttons .button:hover, .ui.basic.purple.button:hover { background: transparent !important; -webkit-box-shadow: 0px 0px 0px 1px #9627ba inset !important; box-shadow: 0px 0px 0px 1px #9627ba inset !important; color: #9627ba !important; } .ui.basic.purple.buttons .button:focus, .ui.basic.purple.button:focus { background: transparent !important; -webkit-box-shadow: 0px 0px 0px 1px #8f1eb4 inset !important; box-shadow: 0px 0px 0px 1px #8f1eb4 inset !important; color: #9627ba !important; } .ui.basic.purple.buttons .active.button, .ui.basic.purple.active.button { background: transparent !important; -webkit-box-shadow: 0px 0px 0px 1px #9724be inset !important; box-shadow: 0px 0px 0px 1px #9724be inset !important; color: #82299f !important; } .ui.basic.purple.buttons .button:active, .ui.basic.purple.button:active { -webkit-box-shadow: 0px 0px 0px 1px #82299f inset !important; box-shadow: 0px 0px 0px 1px #82299f inset !important; color: #82299f !important; } .ui.buttons:not(.vertical) > .basic.purple.button:not(:first-child) { margin-left: -1px; } /* Inverted */ .ui.inverted.purple.buttons .button, .ui.inverted.purple.button { background-color: transparent; -webkit-box-shadow: 0px 0px 0px 2px #DC73FF inset !important; box-shadow: 0px 0px 0px 2px #DC73FF inset !important; color: #DC73FF; } .ui.inverted.purple.buttons .button:hover, .ui.inverted.purple.button:hover, .ui.inverted.purple.buttons .button:focus, .ui.inverted.purple.button:focus, .ui.inverted.purple.buttons .button.active, .ui.inverted.purple.button.active, .ui.inverted.purple.buttons .button:active, .ui.inverted.purple.button:active { -webkit-box-shadow: none !important; box-shadow: none !important; color: #FFFFFF; } .ui.inverted.purple.buttons .button:hover, .ui.inverted.purple.button:hover { background-color: #d65aff; } .ui.inverted.purple.buttons .button:focus, .ui.inverted.purple.button:focus { background-color: #d24aff; } .ui.inverted.purple.buttons .active.button, .ui.inverted.purple.active.button { background-color: #d65aff; } .ui.inverted.purple.buttons .button:active, .ui.inverted.purple.button:active { background-color: #cf40ff; } /* Inverted Basic */ .ui.inverted.purple.basic.buttons .button, .ui.inverted.purple.buttons .basic.button, .ui.inverted.purple.basic.button { background-color: transparent; -webkit-box-shadow: 0px 0px 0px 2px rgba(255, 255, 255, 0.5) inset !important; box-shadow: 0px 0px 0px 2px rgba(255, 255, 255, 0.5) inset !important; color: #FFFFFF !important; } .ui.inverted.purple.basic.buttons .button:hover, .ui.inverted.purple.buttons .basic.button:hover, .ui.inverted.purple.basic.button:hover { -webkit-box-shadow: 0px 0px 0px 2px #d65aff inset !important; box-shadow: 0px 0px 0px 2px #d65aff inset !important; color: #DC73FF !important; } .ui.inverted.purple.basic.buttons .button:focus, .ui.inverted.purple.basic.buttons .button:focus, .ui.inverted.purple.basic.button:focus { -webkit-box-shadow: 0px 0px 0px 2px #d24aff inset !important; box-shadow: 0px 0px 0px 2px #d24aff inset !important; color: #DC73FF !important; } .ui.inverted.purple.basic.buttons .active.button, .ui.inverted.purple.buttons .basic.active.button, .ui.inverted.purple.basic.active.button { -webkit-box-shadow: 0px 0px 0px 2px #d65aff inset !important; box-shadow: 0px 0px 0px 2px #d65aff inset !important; color: #DC73FF !important; } .ui.inverted.purple.basic.buttons .button:active, .ui.inverted.purple.buttons .basic.button:active, .ui.inverted.purple.basic.button:active { -webkit-box-shadow: 0px 0px 0px 2px #cf40ff inset !important; box-shadow: 0px 0px 0px 2px #cf40ff inset !important; color: #DC73FF !important; } /*--- Red ---*/ .ui.red.buttons .button, .ui.red.button { background-color: #DB2828; color: #FFFFFF; text-shadow: none; background-image: none; } .ui.red.button { -webkit-box-shadow: 0px 0em 0px 0px rgba(34, 36, 38, 0.15) inset; box-shadow: 0px 0em 0px 0px rgba(34, 36, 38, 0.15) inset; } .ui.red.buttons .button:hover, .ui.red.button:hover { background-color: #d01919; color: #FFFFFF; text-shadow: none; } .ui.red.buttons .button:focus, .ui.red.button:focus { background-color: #ca1010; color: #FFFFFF; text-shadow: none; } .ui.red.buttons .button:active, .ui.red.button:active { background-color: #b21e1e; color: #FFFFFF; text-shadow: none; } .ui.red.buttons .active.button, .ui.red.buttons .active.button:active, .ui.red.active.button, .ui.red.button .active.button:active { background-color: #d41515; color: #FFFFFF; text-shadow: none; } /* Basic */ .ui.basic.red.buttons .button, .ui.basic.red.button { -webkit-box-shadow: 0px 0px 0px 1px #DB2828 inset !important; box-shadow: 0px 0px 0px 1px #DB2828 inset !important; color: #DB2828 !important; } .ui.basic.red.buttons .button:hover, .ui.basic.red.button:hover { background: transparent !important; -webkit-box-shadow: 0px 0px 0px 1px #d01919 inset !important; box-shadow: 0px 0px 0px 1px #d01919 inset !important; color: #d01919 !important; } .ui.basic.red.buttons .button:focus, .ui.basic.red.button:focus { background: transparent !important; -webkit-box-shadow: 0px 0px 0px 1px #ca1010 inset !important; box-shadow: 0px 0px 0px 1px #ca1010 inset !important; color: #d01919 !important; } .ui.basic.red.buttons .active.button, .ui.basic.red.active.button { background: transparent !important; -webkit-box-shadow: 0px 0px 0px 1px #d41515 inset !important; box-shadow: 0px 0px 0px 1px #d41515 inset !important; color: #b21e1e !important; } .ui.basic.red.buttons .button:active, .ui.basic.red.button:active { -webkit-box-shadow: 0px 0px 0px 1px #b21e1e inset !important; box-shadow: 0px 0px 0px 1px #b21e1e inset !important; color: #b21e1e !important; } .ui.buttons:not(.vertical) > .basic.red.button:not(:first-child) { margin-left: -1px; } /* Inverted */ .ui.inverted.red.buttons .button, .ui.inverted.red.button { background-color: transparent; -webkit-box-shadow: 0px 0px 0px 2px #FF695E inset !important; box-shadow: 0px 0px 0px 2px #FF695E inset !important; color: #FF695E; } .ui.inverted.red.buttons .button:hover, .ui.inverted.red.button:hover, .ui.inverted.red.buttons .button:focus, .ui.inverted.red.button:focus, .ui.inverted.red.buttons .button.active, .ui.inverted.red.button.active, .ui.inverted.red.buttons .button:active, .ui.inverted.red.button:active { -webkit-box-shadow: none !important; box-shadow: none !important; color: #FFFFFF; } .ui.inverted.red.buttons .button:hover, .ui.inverted.red.button:hover { background-color: #ff5144; } .ui.inverted.red.buttons .button:focus, .ui.inverted.red.button:focus { background-color: #ff4335; } .ui.inverted.red.buttons .active.button, .ui.inverted.red.active.button { background-color: #ff5144; } .ui.inverted.red.buttons .button:active, .ui.inverted.red.button:active { background-color: #ff392b; } /* Inverted Basic */ .ui.inverted.red.basic.buttons .button, .ui.inverted.red.buttons .basic.button, .ui.inverted.red.basic.button { background-color: transparent; -webkit-box-shadow: 0px 0px 0px 2px rgba(255, 255, 255, 0.5) inset !important; box-shadow: 0px 0px 0px 2px rgba(255, 255, 255, 0.5) inset !important; color: #FFFFFF !important; } .ui.inverted.red.basic.buttons .button:hover, .ui.inverted.red.buttons .basic.button:hover, .ui.inverted.red.basic.button:hover { -webkit-box-shadow: 0px 0px 0px 2px #ff5144 inset !important; box-shadow: 0px 0px 0px 2px #ff5144 inset !important; color: #FF695E !important; } .ui.inverted.red.basic.buttons .button:focus, .ui.inverted.red.basic.buttons .button:focus, .ui.inverted.red.basic.button:focus { -webkit-box-shadow: 0px 0px 0px 2px #ff4335 inset !important; box-shadow: 0px 0px 0px 2px #ff4335 inset !important; color: #FF695E !important; } .ui.inverted.red.basic.buttons .active.button, .ui.inverted.red.buttons .basic.active.button, .ui.inverted.red.basic.active.button { -webkit-box-shadow: 0px 0px 0px 2px #ff5144 inset !important; box-shadow: 0px 0px 0px 2px #ff5144 inset !important; color: #FF695E !important; } .ui.inverted.red.basic.buttons .button:active, .ui.inverted.red.buttons .basic.button:active, .ui.inverted.red.basic.button:active { -webkit-box-shadow: 0px 0px 0px 2px #ff392b inset !important; box-shadow: 0px 0px 0px 2px #ff392b inset !important; color: #FF695E !important; } /*--- Teal ---*/ .ui.teal.buttons .button, .ui.teal.button { background-color: #00B5AD; color: #FFFFFF; text-shadow: none; background-image: none; } .ui.teal.button { -webkit-box-shadow: 0px 0em 0px 0px rgba(34, 36, 38, 0.15) inset; box-shadow: 0px 0em 0px 0px rgba(34, 36, 38, 0.15) inset; } .ui.teal.buttons .button:hover, .ui.teal.button:hover { background-color: #009c95; color: #FFFFFF; text-shadow: none; } .ui.teal.buttons .button:focus, .ui.teal.button:focus { background-color: #008c86; color: #FFFFFF; text-shadow: none; } .ui.teal.buttons .button:active, .ui.teal.button:active { background-color: #00827c; color: #FFFFFF; text-shadow: none; } .ui.teal.buttons .active.button, .ui.teal.buttons .active.button:active, .ui.teal.active.button, .ui.teal.button .active.button:active { background-color: #009c95; color: #FFFFFF; text-shadow: none; } /* Basic */ .ui.basic.teal.buttons .button, .ui.basic.teal.button { -webkit-box-shadow: 0px 0px 0px 1px #00B5AD inset !important; box-shadow: 0px 0px 0px 1px #00B5AD inset !important; color: #00B5AD !important; } .ui.basic.teal.buttons .button:hover, .ui.basic.teal.button:hover { background: transparent !important; -webkit-box-shadow: 0px 0px 0px 1px #009c95 inset !important; box-shadow: 0px 0px 0px 1px #009c95 inset !important; color: #009c95 !important; } .ui.basic.teal.buttons .button:focus, .ui.basic.teal.button:focus { background: transparent !important; -webkit-box-shadow: 0px 0px 0px 1px #008c86 inset !important; box-shadow: 0px 0px 0px 1px #008c86 inset !important; color: #009c95 !important; } .ui.basic.teal.buttons .active.button, .ui.basic.teal.active.button { background: transparent !important; -webkit-box-shadow: 0px 0px 0px 1px #009c95 inset !important; box-shadow: 0px 0px 0px 1px #009c95 inset !important; color: #00827c !important; } .ui.basic.teal.buttons .button:active, .ui.basic.teal.button:active { -webkit-box-shadow: 0px 0px 0px 1px #00827c inset !important; box-shadow: 0px 0px 0px 1px #00827c inset !important; color: #00827c !important; } .ui.buttons:not(.vertical) > .basic.teal.button:not(:first-child) { margin-left: -1px; } /* Inverted */ .ui.inverted.teal.buttons .button, .ui.inverted.teal.button { background-color: transparent; -webkit-box-shadow: 0px 0px 0px 2px #6DFFFF inset !important; box-shadow: 0px 0px 0px 2px #6DFFFF inset !important; color: #6DFFFF; } .ui.inverted.teal.buttons .button:hover, .ui.inverted.teal.button:hover, .ui.inverted.teal.buttons .button:focus, .ui.inverted.teal.button:focus, .ui.inverted.teal.buttons .button.active, .ui.inverted.teal.button.active, .ui.inverted.teal.buttons .button:active, .ui.inverted.teal.button:active { -webkit-box-shadow: none !important; box-shadow: none !important; color: rgba(0, 0, 0, 0.6); } .ui.inverted.teal.buttons .button:hover, .ui.inverted.teal.button:hover { background-color: #54ffff; } .ui.inverted.teal.buttons .button:focus, .ui.inverted.teal.button:focus { background-color: #44ffff; } .ui.inverted.teal.buttons .active.button, .ui.inverted.teal.active.button { background-color: #54ffff; } .ui.inverted.teal.buttons .button:active, .ui.inverted.teal.button:active { background-color: #3affff; } /* Inverted Basic */ .ui.inverted.teal.basic.buttons .button, .ui.inverted.teal.buttons .basic.button, .ui.inverted.teal.basic.button { background-color: transparent; -webkit-box-shadow: 0px 0px 0px 2px rgba(255, 255, 255, 0.5) inset !important; box-shadow: 0px 0px 0px 2px rgba(255, 255, 255, 0.5) inset !important; color: #FFFFFF !important; } .ui.inverted.teal.basic.buttons .button:hover, .ui.inverted.teal.buttons .basic.button:hover, .ui.inverted.teal.basic.button:hover { -webkit-box-shadow: 0px 0px 0px 2px #54ffff inset !important; box-shadow: 0px 0px 0px 2px #54ffff inset !important; color: #6DFFFF !important; } .ui.inverted.teal.basic.buttons .button:focus, .ui.inverted.teal.basic.buttons .button:focus, .ui.inverted.teal.basic.button:focus { -webkit-box-shadow: 0px 0px 0px 2px #44ffff inset !important; box-shadow: 0px 0px 0px 2px #44ffff inset !important; color: #6DFFFF !important; } .ui.inverted.teal.basic.buttons .active.button, .ui.inverted.teal.buttons .basic.active.button, .ui.inverted.teal.basic.active.button { -webkit-box-shadow: 0px 0px 0px 2px #54ffff inset !important; box-shadow: 0px 0px 0px 2px #54ffff inset !important; color: #6DFFFF !important; } .ui.inverted.teal.basic.buttons .button:active, .ui.inverted.teal.buttons .basic.button:active, .ui.inverted.teal.basic.button:active { -webkit-box-shadow: 0px 0px 0px 2px #3affff inset !important; box-shadow: 0px 0px 0px 2px #3affff inset !important; color: #6DFFFF !important; } /*--- Olive ---*/ .ui.olive.buttons .button, .ui.olive.button { background-color: #B5CC18; color: #FFFFFF; text-shadow: none; background-image: none; } .ui.olive.button { -webkit-box-shadow: 0px 0em 0px 0px rgba(34, 36, 38, 0.15) inset; box-shadow: 0px 0em 0px 0px rgba(34, 36, 38, 0.15) inset; } .ui.olive.buttons .button:hover, .ui.olive.button:hover { background-color: #a7bd0d; color: #FFFFFF; text-shadow: none; } .ui.olive.buttons .button:focus, .ui.olive.button:focus { background-color: #a0b605; color: #FFFFFF; text-shadow: none; } .ui.olive.buttons .button:active, .ui.olive.button:active { background-color: #8d9e13; color: #FFFFFF; text-shadow: none; } .ui.olive.buttons .active.button, .ui.olive.buttons .active.button:active, .ui.olive.active.button, .ui.olive.button .active.button:active { background-color: #aac109; color: #FFFFFF; text-shadow: none; } /* Basic */ .ui.basic.olive.buttons .button, .ui.basic.olive.button { -webkit-box-shadow: 0px 0px 0px 1px #B5CC18 inset !important; box-shadow: 0px 0px 0px 1px #B5CC18 inset !important; color: #B5CC18 !important; } .ui.basic.olive.buttons .button:hover, .ui.basic.olive.button:hover { background: transparent !important; -webkit-box-shadow: 0px 0px 0px 1px #a7bd0d inset !important; box-shadow: 0px 0px 0px 1px #a7bd0d inset !important; color: #a7bd0d !important; } .ui.basic.olive.buttons .button:focus, .ui.basic.olive.button:focus { background: transparent !important; -webkit-box-shadow: 0px 0px 0px 1px #a0b605 inset !important; box-shadow: 0px 0px 0px 1px #a0b605 inset !important; color: #a7bd0d !important; } .ui.basic.olive.buttons .active.button, .ui.basic.olive.active.button { background: transparent !important; -webkit-box-shadow: 0px 0px 0px 1px #aac109 inset !important; box-shadow: 0px 0px 0px 1px #aac109 inset !important; color: #8d9e13 !important; } .ui.basic.olive.buttons .button:active, .ui.basic.olive.button:active { -webkit-box-shadow: 0px 0px 0px 1px #8d9e13 inset !important; box-shadow: 0px 0px 0px 1px #8d9e13 inset !important; color: #8d9e13 !important; } .ui.buttons:not(.vertical) > .basic.olive.button:not(:first-child) { margin-left: -1px; } /* Inverted */ .ui.inverted.olive.buttons .button, .ui.inverted.olive.button { background-color: transparent; -webkit-box-shadow: 0px 0px 0px 2px #D9E778 inset !important; box-shadow: 0px 0px 0px 2px #D9E778 inset !important; color: #D9E778; } .ui.inverted.olive.buttons .button:hover, .ui.inverted.olive.button:hover, .ui.inverted.olive.buttons .button:focus, .ui.inverted.olive.button:focus, .ui.inverted.olive.buttons .button.active, .ui.inverted.olive.button.active, .ui.inverted.olive.buttons .button:active, .ui.inverted.olive.button:active { -webkit-box-shadow: none !important; box-shadow: none !important; color: rgba(0, 0, 0, 0.6); } .ui.inverted.olive.buttons .button:hover, .ui.inverted.olive.button:hover { background-color: #d8ea5c; } .ui.inverted.olive.buttons .button:focus, .ui.inverted.olive.button:focus { background-color: #daef47; } .ui.inverted.olive.buttons .active.button, .ui.inverted.olive.active.button { background-color: #daed59; } .ui.inverted.olive.buttons .button:active, .ui.inverted.olive.button:active { background-color: #cddf4d; } /* Inverted Basic */ .ui.inverted.olive.basic.buttons .button, .ui.inverted.olive.buttons .basic.button, .ui.inverted.olive.basic.button { background-color: transparent; -webkit-box-shadow: 0px 0px 0px 2px rgba(255, 255, 255, 0.5) inset !important; box-shadow: 0px 0px 0px 2px rgba(255, 255, 255, 0.5) inset !important; color: #FFFFFF !important; } .ui.inverted.olive.basic.buttons .button:hover, .ui.inverted.olive.buttons .basic.button:hover, .ui.inverted.olive.basic.button:hover { -webkit-box-shadow: 0px 0px 0px 2px #d8ea5c inset !important; box-shadow: 0px 0px 0px 2px #d8ea5c inset !important; color: #D9E778 !important; } .ui.inverted.olive.basic.buttons .button:focus, .ui.inverted.olive.basic.buttons .button:focus, .ui.inverted.olive.basic.button:focus { -webkit-box-shadow: 0px 0px 0px 2px #daef47 inset !important; box-shadow: 0px 0px 0px 2px #daef47 inset !important; color: #D9E778 !important; } .ui.inverted.olive.basic.buttons .active.button, .ui.inverted.olive.buttons .basic.active.button, .ui.inverted.olive.basic.active.button { -webkit-box-shadow: 0px 0px 0px 2px #daed59 inset !important; box-shadow: 0px 0px 0px 2px #daed59 inset !important; color: #D9E778 !important; } .ui.inverted.olive.basic.buttons .button:active, .ui.inverted.olive.buttons .basic.button:active, .ui.inverted.olive.basic.button:active { -webkit-box-shadow: 0px 0px 0px 2px #cddf4d inset !important; box-shadow: 0px 0px 0px 2px #cddf4d inset !important; color: #D9E778 !important; } /*--- Yellow ---*/ .ui.yellow.buttons .button, .ui.yellow.button { background-color: #FBBD08; color: #FFFFFF; text-shadow: none; background-image: none; } .ui.yellow.button { -webkit-box-shadow: 0px 0em 0px 0px rgba(34, 36, 38, 0.15) inset; box-shadow: 0px 0em 0px 0px rgba(34, 36, 38, 0.15) inset; } .ui.yellow.buttons .button:hover, .ui.yellow.button:hover { background-color: #eaae00; color: #FFFFFF; text-shadow: none; } .ui.yellow.buttons .button:focus, .ui.yellow.button:focus { background-color: #daa300; color: #FFFFFF; text-shadow: none; } .ui.yellow.buttons .button:active, .ui.yellow.button:active { background-color: #cd9903; color: #FFFFFF; text-shadow: none; } .ui.yellow.buttons .active.button, .ui.yellow.buttons .active.button:active, .ui.yellow.active.button, .ui.yellow.button .active.button:active { background-color: #eaae00; color: #FFFFFF; text-shadow: none; } /* Basic */ .ui.basic.yellow.buttons .button, .ui.basic.yellow.button { -webkit-box-shadow: 0px 0px 0px 1px #FBBD08 inset !important; box-shadow: 0px 0px 0px 1px #FBBD08 inset !important; color: #FBBD08 !important; } .ui.basic.yellow.buttons .button:hover, .ui.basic.yellow.button:hover { background: transparent !important; -webkit-box-shadow: 0px 0px 0px 1px #eaae00 inset !important; box-shadow: 0px 0px 0px 1px #eaae00 inset !important; color: #eaae00 !important; } .ui.basic.yellow.buttons .button:focus, .ui.basic.yellow.button:focus { background: transparent !important; -webkit-box-shadow: 0px 0px 0px 1px #daa300 inset !important; box-shadow: 0px 0px 0px 1px #daa300 inset !important; color: #eaae00 !important; } .ui.basic.yellow.buttons .active.button, .ui.basic.yellow.active.button { background: transparent !important; -webkit-box-shadow: 0px 0px 0px 1px #eaae00 inset !important; box-shadow: 0px 0px 0px 1px #eaae00 inset !important; color: #cd9903 !important; } .ui.basic.yellow.buttons .button:active, .ui.basic.yellow.button:active { -webkit-box-shadow: 0px 0px 0px 1px #cd9903 inset !important; box-shadow: 0px 0px 0px 1px #cd9903 inset !important; color: #cd9903 !important; } .ui.buttons:not(.vertical) > .basic.yellow.button:not(:first-child) { margin-left: -1px; } /* Inverted */ .ui.inverted.yellow.buttons .button, .ui.inverted.yellow.button { background-color: transparent; -webkit-box-shadow: 0px 0px 0px 2px #FFE21F inset !important; box-shadow: 0px 0px 0px 2px #FFE21F inset !important; color: #FFE21F; } .ui.inverted.yellow.buttons .button:hover, .ui.inverted.yellow.button:hover, .ui.inverted.yellow.buttons .button:focus, .ui.inverted.yellow.button:focus, .ui.inverted.yellow.buttons .button.active, .ui.inverted.yellow.button.active, .ui.inverted.yellow.buttons .button:active, .ui.inverted.yellow.button:active { -webkit-box-shadow: none !important; box-shadow: none !important; color: rgba(0, 0, 0, 0.6); } .ui.inverted.yellow.buttons .button:hover, .ui.inverted.yellow.button:hover { background-color: #ffdf05; } .ui.inverted.yellow.buttons .button:focus, .ui.inverted.yellow.button:focus { background-color: #f5d500; } .ui.inverted.yellow.buttons .active.button, .ui.inverted.yellow.active.button { background-color: #ffdf05; } .ui.inverted.yellow.buttons .button:active, .ui.inverted.yellow.button:active { background-color: #ebcd00; } /* Inverted Basic */ .ui.inverted.yellow.basic.buttons .button, .ui.inverted.yellow.buttons .basic.button, .ui.inverted.yellow.basic.button { background-color: transparent; -webkit-box-shadow: 0px 0px 0px 2px rgba(255, 255, 255, 0.5) inset !important; box-shadow: 0px 0px 0px 2px rgba(255, 255, 255, 0.5) inset !important; color: #FFFFFF !important; } .ui.inverted.yellow.basic.buttons .button:hover, .ui.inverted.yellow.buttons .basic.button:hover, .ui.inverted.yellow.basic.button:hover { -webkit-box-shadow: 0px 0px 0px 2px #ffdf05 inset !important; box-shadow: 0px 0px 0px 2px #ffdf05 inset !important; color: #FFE21F !important; } .ui.inverted.yellow.basic.buttons .button:focus, .ui.inverted.yellow.basic.buttons .button:focus, .ui.inverted.yellow.basic.button:focus { -webkit-box-shadow: 0px 0px 0px 2px #f5d500 inset !important; box-shadow: 0px 0px 0px 2px #f5d500 inset !important; color: #FFE21F !important; } .ui.inverted.yellow.basic.buttons .active.button, .ui.inverted.yellow.buttons .basic.active.button, .ui.inverted.yellow.basic.active.button { -webkit-box-shadow: 0px 0px 0px 2px #ffdf05 inset !important; box-shadow: 0px 0px 0px 2px #ffdf05 inset !important; color: #FFE21F !important; } .ui.inverted.yellow.basic.buttons .button:active, .ui.inverted.yellow.buttons .basic.button:active, .ui.inverted.yellow.basic.button:active { -webkit-box-shadow: 0px 0px 0px 2px #ebcd00 inset !important; box-shadow: 0px 0px 0px 2px #ebcd00 inset !important; color: #FFE21F !important; } /*------------------- Primary --------------------*/ /*--- Standard ---*/ .ui.primary.buttons .button, .ui.primary.button { background-color: #2185D0; color: #FFFFFF; text-shadow: none; background-image: none; } .ui.primary.button { -webkit-box-shadow: 0px 0em 0px 0px rgba(34, 36, 38, 0.15) inset; box-shadow: 0px 0em 0px 0px rgba(34, 36, 38, 0.15) inset; } .ui.primary.buttons .button:hover, .ui.primary.button:hover { background-color: #1678c2; color: #FFFFFF; text-shadow: none; } .ui.primary.buttons .button:focus, .ui.primary.button:focus { background-color: #0d71bb; color: #FFFFFF; text-shadow: none; } .ui.primary.buttons .button:active, .ui.primary.button:active { background-color: #1a69a4; color: #FFFFFF; text-shadow: none; } .ui.primary.buttons .active.button, .ui.primary.buttons .active.button:active, .ui.primary.active.button, .ui.primary.button .active.button:active { background-color: #1279c6; color: #FFFFFF; text-shadow: none; } /* Basic */ .ui.basic.primary.buttons .button, .ui.basic.primary.button { -webkit-box-shadow: 0px 0px 0px 1px #2185D0 inset !important; box-shadow: 0px 0px 0px 1px #2185D0 inset !important; color: #2185D0 !important; } .ui.basic.primary.buttons .button:hover, .ui.basic.primary.button:hover { background: transparent !important; -webkit-box-shadow: 0px 0px 0px 1px #1678c2 inset !important; box-shadow: 0px 0px 0px 1px #1678c2 inset !important; color: #1678c2 !important; } .ui.basic.primary.buttons .button:focus, .ui.basic.primary.button:focus { background: transparent !important; -webkit-box-shadow: 0px 0px 0px 1px #0d71bb inset !important; box-shadow: 0px 0px 0px 1px #0d71bb inset !important; color: #1678c2 !important; } .ui.basic.primary.buttons .active.button, .ui.basic.primary.active.button { background: transparent !important; -webkit-box-shadow: 0px 0px 0px 1px #1279c6 inset !important; box-shadow: 0px 0px 0px 1px #1279c6 inset !important; color: #1a69a4 !important; } .ui.basic.primary.buttons .button:active, .ui.basic.primary.button:active { -webkit-box-shadow: 0px 0px 0px 1px #1a69a4 inset !important; box-shadow: 0px 0px 0px 1px #1a69a4 inset !important; color: #1a69a4 !important; } .ui.buttons:not(.vertical) > .basic.primary.button:not(:first-child) { margin-left: -1px; } /*------------------- Secondary --------------------*/ /* Standard */ .ui.secondary.buttons .button, .ui.secondary.button { background-color: #1B1C1D; color: #FFFFFF; text-shadow: none; background-image: none; } .ui.secondary.button { -webkit-box-shadow: 0px 0em 0px 0px rgba(34, 36, 38, 0.15) inset; box-shadow: 0px 0em 0px 0px rgba(34, 36, 38, 0.15) inset; } .ui.secondary.buttons .button:hover, .ui.secondary.button:hover { background-color: #27292a; color: #FFFFFF; text-shadow: none; } .ui.secondary.buttons .button:focus, .ui.secondary.button:focus { background-color: #2e3032; color: #FFFFFF; text-shadow: none; } .ui.secondary.buttons .button:active, .ui.secondary.button:active { background-color: #343637; color: #FFFFFF; text-shadow: none; } .ui.secondary.buttons .active.button, .ui.secondary.buttons .active.button:active, .ui.secondary.active.button, .ui.secondary.button .active.button:active { background-color: #27292a; color: #FFFFFF; text-shadow: none; } /* Basic */ .ui.basic.secondary.buttons .button, .ui.basic.secondary.button { -webkit-box-shadow: 0px 0px 0px 1px #1B1C1D inset !important; box-shadow: 0px 0px 0px 1px #1B1C1D inset !important; color: #1B1C1D !important; } .ui.basic.secondary.buttons .button:hover, .ui.basic.secondary.button:hover { background: transparent !important; -webkit-box-shadow: 0px 0px 0px 1px #27292a inset !important; box-shadow: 0px 0px 0px 1px #27292a inset !important; color: #27292a !important; } .ui.basic.secondary.buttons .button:focus, .ui.basic.secondary.button:focus { background: transparent !important; -webkit-box-shadow: 0px 0px 0px 1px #2e3032 inset !important; box-shadow: 0px 0px 0px 1px #2e3032 inset !important; color: #27292a !important; } .ui.basic.secondary.buttons .active.button, .ui.basic.secondary.active.button { background: transparent !important; -webkit-box-shadow: 0px 0px 0px 1px #27292a inset !important; box-shadow: 0px 0px 0px 1px #27292a inset !important; color: #343637 !important; } .ui.basic.secondary.buttons .button:active, .ui.basic.secondary.button:active { -webkit-box-shadow: 0px 0px 0px 1px #343637 inset !important; box-shadow: 0px 0px 0px 1px #343637 inset !important; color: #343637 !important; } .ui.buttons:not(.vertical) > .basic.primary.button:not(:first-child) { margin-left: -1px; } /*--------------- Positive ----------------*/ /* Standard */ .ui.positive.buttons .button, .ui.positive.button { background-color: #21BA45; color: #FFFFFF; text-shadow: none; background-image: none; } .ui.positive.button { -webkit-box-shadow: 0px 0em 0px 0px rgba(34, 36, 38, 0.15) inset; box-shadow: 0px 0em 0px 0px rgba(34, 36, 38, 0.15) inset; } .ui.positive.buttons .button:hover, .ui.positive.button:hover { background-color: #16ab39; color: #FFFFFF; text-shadow: none; } .ui.positive.buttons .button:focus, .ui.positive.button:focus { background-color: #0ea432; color: #FFFFFF; text-shadow: none; } .ui.positive.buttons .button:active, .ui.positive.button:active { background-color: #198f35; color: #FFFFFF; text-shadow: none; } .ui.positive.buttons .active.button, .ui.positive.buttons .active.button:active, .ui.positive.active.button, .ui.positive.button .active.button:active { background-color: #13ae38; color: #FFFFFF; text-shadow: none; } /* Basic */ .ui.basic.positive.buttons .button, .ui.basic.positive.button { -webkit-box-shadow: 0px 0px 0px 1px #21BA45 inset !important; box-shadow: 0px 0px 0px 1px #21BA45 inset !important; color: #21BA45 !important; } .ui.basic.positive.buttons .button:hover, .ui.basic.positive.button:hover { background: transparent !important; -webkit-box-shadow: 0px 0px 0px 1px #16ab39 inset !important; box-shadow: 0px 0px 0px 1px #16ab39 inset !important; color: #16ab39 !important; } .ui.basic.positive.buttons .button:focus, .ui.basic.positive.button:focus { background: transparent !important; -webkit-box-shadow: 0px 0px 0px 1px #0ea432 inset !important; box-shadow: 0px 0px 0px 1px #0ea432 inset !important; color: #16ab39 !important; } .ui.basic.positive.buttons .active.button, .ui.basic.positive.active.button { background: transparent !important; -webkit-box-shadow: 0px 0px 0px 1px #13ae38 inset !important; box-shadow: 0px 0px 0px 1px #13ae38 inset !important; color: #198f35 !important; } .ui.basic.positive.buttons .button:active, .ui.basic.positive.button:active { -webkit-box-shadow: 0px 0px 0px 1px #198f35 inset !important; box-shadow: 0px 0px 0px 1px #198f35 inset !important; color: #198f35 !important; } .ui.buttons:not(.vertical) > .basic.primary.button:not(:first-child) { margin-left: -1px; } /*--------------- Negative ----------------*/ /* Standard */ .ui.negative.buttons .button, .ui.negative.button { background-color: #DB2828; color: #FFFFFF; text-shadow: none; background-image: none; } .ui.negative.button { -webkit-box-shadow: 0px 0em 0px 0px rgba(34, 36, 38, 0.15) inset; box-shadow: 0px 0em 0px 0px rgba(34, 36, 38, 0.15) inset; } .ui.negative.buttons .button:hover, .ui.negative.button:hover { background-color: #d01919; color: #FFFFFF; text-shadow: none; } .ui.negative.buttons .button:focus, .ui.negative.button:focus { background-color: #ca1010; color: #FFFFFF; text-shadow: none; } .ui.negative.buttons .button:active, .ui.negative.button:active { background-color: #b21e1e; color: #FFFFFF; text-shadow: none; } .ui.negative.buttons .active.button, .ui.negative.buttons .active.button:active, .ui.negative.active.button, .ui.negative.button .active.button:active { background-color: #d41515; color: #FFFFFF; text-shadow: none; } /* Basic */ .ui.basic.negative.buttons .button, .ui.basic.negative.button { -webkit-box-shadow: 0px 0px 0px 1px #DB2828 inset !important; box-shadow: 0px 0px 0px 1px #DB2828 inset !important; color: #DB2828 !important; } .ui.basic.negative.buttons .button:hover, .ui.basic.negative.button:hover { background: transparent !important; -webkit-box-shadow: 0px 0px 0px 1px #d01919 inset !important; box-shadow: 0px 0px 0px 1px #d01919 inset !important; color: #d01919 !important; } .ui.basic.negative.buttons .button:focus, .ui.basic.negative.button:focus { background: transparent !important; -webkit-box-shadow: 0px 0px 0px 1px #ca1010 inset !important; box-shadow: 0px 0px 0px 1px #ca1010 inset !important; color: #d01919 !important; } .ui.basic.negative.buttons .active.button, .ui.basic.negative.active.button { background: transparent !important; -webkit-box-shadow: 0px 0px 0px 1px #d41515 inset !important; box-shadow: 0px 0px 0px 1px #d41515 inset !important; color: #b21e1e !important; } .ui.basic.negative.buttons .button:active, .ui.basic.negative.button:active { -webkit-box-shadow: 0px 0px 0px 1px #b21e1e inset !important; box-shadow: 0px 0px 0px 1px #b21e1e inset !important; color: #b21e1e !important; } .ui.buttons:not(.vertical) > .basic.primary.button:not(:first-child) { margin-left: -1px; } /******************************* Groups *******************************/ .ui.buttons { display: -webkit-inline-box; display: -ms-inline-flexbox; display: inline-flex; -webkit-box-orient: horizontal; -webkit-box-direction: normal; -ms-flex-direction: row; flex-direction: row; font-size: 0em; vertical-align: baseline; margin: 0em 0.25em 0em 0em; } .ui.buttons:not(.basic):not(.inverted) { -webkit-box-shadow: none; box-shadow: none; } /* Clearfix */ .ui.buttons:after { content: "."; display: block; height: 0; clear: both; visibility: hidden; } /* Standard Group */ .ui.buttons .button { -webkit-box-flex: 1; -ms-flex: 1 0 auto; flex: 1 0 auto; margin: 0em; border-radius: 0em; margin: 0px 0px 0px 0px; } .ui.buttons > .ui.button:not(.basic):not(.inverted), .ui.buttons:not(.basic):not(.inverted) > .button { -webkit-box-shadow: 0px 0px 0px 1px transparent inset, 0px 0em 0px 0px rgba(34, 36, 38, 0.15) inset; box-shadow: 0px 0px 0px 1px transparent inset, 0px 0em 0px 0px rgba(34, 36, 38, 0.15) inset; } .ui.buttons .button:first-child { border-left: none; margin-left: 0em; border-top-left-radius: 0.28571429rem; border-bottom-left-radius: 0.28571429rem; } .ui.buttons .button:last-child { border-top-right-radius: 0.28571429rem; border-bottom-right-radius: 0.28571429rem; } /* Vertical Style */ .ui.vertical.buttons { display: -webkit-inline-box; display: -ms-inline-flexbox; display: inline-flex; -webkit-box-orient: vertical; -webkit-box-direction: normal; -ms-flex-direction: column; flex-direction: column; } .ui.vertical.buttons .button { display: block; float: none; width: 100%; margin: 0px 0px 0px 0px; -webkit-box-shadow: none; box-shadow: none; border-radius: 0em; } .ui.vertical.buttons .button:first-child { border-top-left-radius: 0.28571429rem; border-top-right-radius: 0.28571429rem; } .ui.vertical.buttons .button:last-child { margin-bottom: 0px; border-bottom-left-radius: 0.28571429rem; border-bottom-right-radius: 0.28571429rem; } .ui.vertical.buttons .button:only-child { border-radius: 0.28571429rem; } /******************************* Theme Overrides *******************************/ /******************************* Site Overrides *******************************/ ================================================ FILE: public/assets/css/components/card.css ================================================ /*! * # Semantic UI 2.2.11 - Item * http://github.com/semantic-org/semantic-ui/ * * * Released under the MIT license * http://opensource.org/licenses/MIT * */ /******************************* Standard *******************************/ /*-------------- Card ---------------*/ .ui.cards > .card, .ui.card { max-width: 100%; position: relative; display: -webkit-box; display: -ms-flexbox; display: flex; -webkit-box-orient: vertical; -webkit-box-direction: normal; -ms-flex-direction: column; flex-direction: column; width: 290px; min-height: 0px; background: #FFFFFF; padding: 0em; border: none; border-radius: 0.28571429rem; -webkit-box-shadow: 0px 1px 3px 0px #D4D4D5, 0px 0px 0px 1px #D4D4D5; box-shadow: 0px 1px 3px 0px #D4D4D5, 0px 0px 0px 1px #D4D4D5; -webkit-transition: -webkit-box-shadow 0.1s ease, -webkit-transform 0.1s ease; transition: -webkit-box-shadow 0.1s ease, -webkit-transform 0.1s ease; transition: box-shadow 0.1s ease, transform 0.1s ease; transition: box-shadow 0.1s ease, transform 0.1s ease, -webkit-box-shadow 0.1s ease, -webkit-transform 0.1s ease; z-index: ''; } .ui.card { margin: 1em 0em; } .ui.cards > .card a, .ui.card a { cursor: pointer; } .ui.card:first-child { margin-top: 0em; } .ui.card:last-child { margin-bottom: 0em; } /*-------------- Cards ---------------*/ .ui.cards { display: -webkit-box; display: -ms-flexbox; display: flex; margin: -0.875em -0.5em; -ms-flex-wrap: wrap; flex-wrap: wrap; } .ui.cards > .card { display: -webkit-box; display: -ms-flexbox; display: flex; margin: 0.875em 0.5em; float: none; } /* Clearing */ .ui.cards:after, .ui.card:after { display: block; content: ' '; height: 0px; clear: both; overflow: hidden; visibility: hidden; } /* Consecutive Card Groups Preserve Row Spacing */ .ui.cards ~ .ui.cards { margin-top: 0.875em; } /*-------------- Rounded Edges ---------------*/ .ui.cards > .card > :first-child, .ui.card > :first-child { border-radius: 0.28571429rem 0.28571429rem 0em 0em !important; border-top: none !important; } .ui.cards > .card > :last-child, .ui.card > :last-child { border-radius: 0em 0em 0.28571429rem 0.28571429rem !important; } .ui.cards > .card > :only-child, .ui.card > :only-child { border-radius: 0.28571429rem !important; } /*-------------- Images ---------------*/ .ui.cards > .card > .image, .ui.card > .image { position: relative; display: block; -webkit-box-flex: 0; -ms-flex: 0 0 auto; flex: 0 0 auto; padding: 0em; background: rgba(0, 0, 0, 0.05); } .ui.cards > .card > .image > img, .ui.card > .image > img { display: block; width: 100%; height: auto; border-radius: inherit; } .ui.cards > .card > .image:not(.ui) > img, .ui.card > .image:not(.ui) > img { border: none; } /*-------------- Content ---------------*/ .ui.cards > .card > .content, .ui.card > .content { -webkit-box-flex: 1; -ms-flex-positive: 1; flex-grow: 1; border: none; border-top: 1px solid rgba(34, 36, 38, 0.1); background: none; margin: 0em; padding: 1em 1em; -webkit-box-shadow: none; box-shadow: none; font-size: 1em; border-radius: 0em; } .ui.cards > .card > .content:after, .ui.card > .content:after { display: block; content: ' '; height: 0px; clear: both; overflow: hidden; visibility: hidden; } .ui.cards > .card > .content > .header, .ui.card > .content > .header { display: block; margin: ''; font-family: 'Lato', 'Helvetica Neue', Arial, Helvetica, sans-serif; color: rgba(0, 0, 0, 0.85); } /* Default Header Size */ .ui.cards > .card > .content > .header:not(.ui), .ui.card > .content > .header:not(.ui) { font-weight: bold; font-size: 1.28571429em; margin-top: -0.21425em; line-height: 1.28571429em; } .ui.cards > .card > .content > .meta + .description, .ui.cards > .card > .content > .header + .description, .ui.card > .content > .meta + .description, .ui.card > .content > .header + .description { margin-top: 0.5em; } /*---------------- Floated Content -----------------*/ .ui.cards > .card [class*="left floated"], .ui.card [class*="left floated"] { float: left; } .ui.cards > .card [class*="right floated"], .ui.card [class*="right floated"] { float: right; } /*-------------- Aligned ---------------*/ .ui.cards > .card [class*="left aligned"], .ui.card [class*="left aligned"] { text-align: left; } .ui.cards > .card [class*="center aligned"], .ui.card [class*="center aligned"] { text-align: center; } .ui.cards > .card [class*="right aligned"], .ui.card [class*="right aligned"] { text-align: right; } /*-------------- Content Image ---------------*/ .ui.cards > .card .content img, .ui.card .content img { display: inline-block; vertical-align: middle; width: ''; } .ui.cards > .card img.avatar, .ui.cards > .card .avatar img, .ui.card img.avatar, .ui.card .avatar img { width: 2em; height: 2em; border-radius: 500rem; } /*-------------- Description ---------------*/ .ui.cards > .card > .content > .description, .ui.card > .content > .description { clear: both; color: rgba(0, 0, 0, 0.68); } /*-------------- Paragraph ---------------*/ .ui.cards > .card > .content p, .ui.card > .content p { margin: 0em 0em 0.5em; } .ui.cards > .card > .content p:last-child, .ui.card > .content p:last-child { margin-bottom: 0em; } /*-------------- Meta ---------------*/ .ui.cards > .card .meta, .ui.card .meta { font-size: 1em; color: rgba(0, 0, 0, 0.4); } .ui.cards > .card .meta *, .ui.card .meta * { margin-right: 0.3em; } .ui.cards > .card .meta :last-child, .ui.card .meta :last-child { margin-right: 0em; } .ui.cards > .card .meta [class*="right floated"], .ui.card .meta [class*="right floated"] { margin-right: 0em; margin-left: 0.3em; } /*-------------- Links ---------------*/ /* Generic */ .ui.cards > .card > .content a:not(.ui), .ui.card > .content a:not(.ui) { color: ''; -webkit-transition: color 0.1s ease; transition: color 0.1s ease; } .ui.cards > .card > .content a:not(.ui):hover, .ui.card > .content a:not(.ui):hover { color: ''; } /* Header */ .ui.cards > .card > .content > a.header, .ui.card > .content > a.header { color: rgba(0, 0, 0, 0.85); } .ui.cards > .card > .content > a.header:hover, .ui.card > .content > a.header:hover { color: #1e70bf; } /* Meta */ .ui.cards > .card .meta > a:not(.ui), .ui.card .meta > a:not(.ui) { color: rgba(0, 0, 0, 0.4); } .ui.cards > .card .meta > a:not(.ui):hover, .ui.card .meta > a:not(.ui):hover { color: rgba(0, 0, 0, 0.87); } /*-------------- Buttons ---------------*/ .ui.cards > .card > .buttons, .ui.card > .buttons, .ui.cards > .card > .button, .ui.card > .button { margin: 0px -1px; width: calc(100% + 2px ); } /*-------------- Dimmer ---------------*/ .ui.cards > .card .dimmer, .ui.card .dimmer { background-color: ''; z-index: 10; } /*-------------- Labels ---------------*/ /*-----Star----- */ /* Icon */ .ui.cards > .card > .content .star.icon, .ui.card > .content .star.icon { cursor: pointer; opacity: 0.75; -webkit-transition: color 0.1s ease; transition: color 0.1s ease; } .ui.cards > .card > .content .star.icon:hover, .ui.card > .content .star.icon:hover { opacity: 1; color: #FFB70A; } .ui.cards > .card > .content .active.star.icon, .ui.card > .content .active.star.icon { color: #FFE623; } /*-----Like----- */ /* Icon */ .ui.cards > .card > .content .like.icon, .ui.card > .content .like.icon { cursor: pointer; opacity: 0.75; -webkit-transition: color 0.1s ease; transition: color 0.1s ease; } .ui.cards > .card > .content .like.icon:hover, .ui.card > .content .like.icon:hover { opacity: 1; color: #FF2733; } .ui.cards > .card > .content .active.like.icon, .ui.card > .content .active.like.icon { color: #FF2733; } /*---------------- Extra Content -----------------*/ .ui.cards > .card > .extra, .ui.card > .extra { max-width: 100%; min-height: 0em !important; -webkit-box-flex: 0; -ms-flex-positive: 0; flex-grow: 0; border-top: 1px solid rgba(0, 0, 0, 0.05) !important; position: static; background: none; width: auto; margin: 0em 0em; padding: 0.75em 1em; top: 0em; left: 0em; color: rgba(0, 0, 0, 0.4); -webkit-box-shadow: none; box-shadow: none; -webkit-transition: color 0.1s ease; transition: color 0.1s ease; } .ui.cards > .card > .extra a:not(.ui), .ui.card > .extra a:not(.ui) { color: rgba(0, 0, 0, 0.4); } .ui.cards > .card > .extra a:not(.ui):hover, .ui.card > .extra a:not(.ui):hover { color: #1e70bf; } /******************************* Variations *******************************/ /*------------------- Raised --------------------*/ .ui.raised.cards > .card, .ui.raised.card { -webkit-box-shadow: 0px 0px 0px 1px #D4D4D5, 0px 2px 4px 0px rgba(34, 36, 38, 0.12), 0px 2px 10px 0px rgba(34, 36, 38, 0.15); box-shadow: 0px 0px 0px 1px #D4D4D5, 0px 2px 4px 0px rgba(34, 36, 38, 0.12), 0px 2px 10px 0px rgba(34, 36, 38, 0.15); } .ui.raised.cards a.card:hover, .ui.link.cards .raised.card:hover, a.ui.raised.card:hover, .ui.link.raised.card:hover { -webkit-box-shadow: 0px 0px 0px 1px #D4D4D5, 0px 2px 4px 0px rgba(34, 36, 38, 0.15), 0px 2px 10px 0px rgba(34, 36, 38, 0.25); box-shadow: 0px 0px 0px 1px #D4D4D5, 0px 2px 4px 0px rgba(34, 36, 38, 0.15), 0px 2px 10px 0px rgba(34, 36, 38, 0.25); } .ui.raised.cards > .card, .ui.raised.card { -webkit-box-shadow: 0px 0px 0px 1px #D4D4D5, 0px 2px 4px 0px rgba(34, 36, 38, 0.12), 0px 2px 10px 0px rgba(34, 36, 38, 0.15); box-shadow: 0px 0px 0px 1px #D4D4D5, 0px 2px 4px 0px rgba(34, 36, 38, 0.12), 0px 2px 10px 0px rgba(34, 36, 38, 0.15); } /*------------------- Centered --------------------*/ .ui.centered.cards { -webkit-box-pack: center; -ms-flex-pack: center; justify-content: center; } .ui.centered.card { margin-left: auto; margin-right: auto; } /*------------------- Fluid --------------------*/ .ui.fluid.card { width: 100%; max-width: 9999px; } /*------------------- Link --------------------*/ .ui.cards a.card, .ui.link.cards .card, a.ui.card, .ui.link.card { -webkit-transform: none; transform: none; } .ui.cards a.card:hover, .ui.link.cards .card:hover, a.ui.card:hover, .ui.link.card:hover { cursor: pointer; z-index: 5; background: #FFFFFF; border: none; -webkit-box-shadow: 0px 1px 3px 0px #BCBDBD, 0px 0px 0px 1px #D4D4D5; box-shadow: 0px 1px 3px 0px #BCBDBD, 0px 0px 0px 1px #D4D4D5; -webkit-transform: translateY(-3px); transform: translateY(-3px); } /*------------------- Colors --------------------*/ /* Red */ .ui.red.cards > .card, .ui.cards > .red.card, .ui.red.card { -webkit-box-shadow: 0px 0px 0px 1px #D4D4D5, 0px 2px 0px 0px #DB2828, 0px 1px 3px 0px #D4D4D5; box-shadow: 0px 0px 0px 1px #D4D4D5, 0px 2px 0px 0px #DB2828, 0px 1px 3px 0px #D4D4D5; } .ui.red.cards > .card:hover, .ui.cards > .red.card:hover, .ui.red.card:hover { -webkit-box-shadow: 0px 0px 0px 1px #D4D4D5, 0px 2px 0px 0px #d01919, 0px 1px 3px 0px #BCBDBD; box-shadow: 0px 0px 0px 1px #D4D4D5, 0px 2px 0px 0px #d01919, 0px 1px 3px 0px #BCBDBD; } /* Orange */ .ui.orange.cards > .card, .ui.cards > .orange.card, .ui.orange.card { -webkit-box-shadow: 0px 0px 0px 1px #D4D4D5, 0px 2px 0px 0px #F2711C, 0px 1px 3px 0px #D4D4D5; box-shadow: 0px 0px 0px 1px #D4D4D5, 0px 2px 0px 0px #F2711C, 0px 1px 3px 0px #D4D4D5; } .ui.orange.cards > .card:hover, .ui.cards > .orange.card:hover, .ui.orange.card:hover { -webkit-box-shadow: 0px 0px 0px 1px #D4D4D5, 0px 2px 0px 0px #f26202, 0px 1px 3px 0px #BCBDBD; box-shadow: 0px 0px 0px 1px #D4D4D5, 0px 2px 0px 0px #f26202, 0px 1px 3px 0px #BCBDBD; } /* Yellow */ .ui.yellow.cards > .card, .ui.cards > .yellow.card, .ui.yellow.card { -webkit-box-shadow: 0px 0px 0px 1px #D4D4D5, 0px 2px 0px 0px #FBBD08, 0px 1px 3px 0px #D4D4D5; box-shadow: 0px 0px 0px 1px #D4D4D5, 0px 2px 0px 0px #FBBD08, 0px 1px 3px 0px #D4D4D5; } .ui.yellow.cards > .card:hover, .ui.cards > .yellow.card:hover, .ui.yellow.card:hover { -webkit-box-shadow: 0px 0px 0px 1px #D4D4D5, 0px 2px 0px 0px #eaae00, 0px 1px 3px 0px #BCBDBD; box-shadow: 0px 0px 0px 1px #D4D4D5, 0px 2px 0px 0px #eaae00, 0px 1px 3px 0px #BCBDBD; } /* Olive */ .ui.olive.cards > .card, .ui.cards > .olive.card, .ui.olive.card { -webkit-box-shadow: 0px 0px 0px 1px #D4D4D5, 0px 2px 0px 0px #B5CC18, 0px 1px 3px 0px #D4D4D5; box-shadow: 0px 0px 0px 1px #D4D4D5, 0px 2px 0px 0px #B5CC18, 0px 1px 3px 0px #D4D4D5; } .ui.olive.cards > .card:hover, .ui.cards > .olive.card:hover, .ui.olive.card:hover { -webkit-box-shadow: 0px 0px 0px 1px #D4D4D5, 0px 2px 0px 0px #a7bd0d, 0px 1px 3px 0px #BCBDBD; box-shadow: 0px 0px 0px 1px #D4D4D5, 0px 2px 0px 0px #a7bd0d, 0px 1px 3px 0px #BCBDBD; } /* Green */ .ui.green.cards > .card, .ui.cards > .green.card, .ui.green.card { -webkit-box-shadow: 0px 0px 0px 1px #D4D4D5, 0px 2px 0px 0px #21BA45, 0px 1px 3px 0px #D4D4D5; box-shadow: 0px 0px 0px 1px #D4D4D5, 0px 2px 0px 0px #21BA45, 0px 1px 3px 0px #D4D4D5; } .ui.green.cards > .card:hover, .ui.cards > .green.card:hover, .ui.green.card:hover { -webkit-box-shadow: 0px 0px 0px 1px #D4D4D5, 0px 2px 0px 0px #16ab39, 0px 1px 3px 0px #BCBDBD; box-shadow: 0px 0px 0px 1px #D4D4D5, 0px 2px 0px 0px #16ab39, 0px 1px 3px 0px #BCBDBD; } /* Teal */ .ui.teal.cards > .card, .ui.cards > .teal.card, .ui.teal.card { -webkit-box-shadow: 0px 0px 0px 1px #D4D4D5, 0px 2px 0px 0px #00B5AD, 0px 1px 3px 0px #D4D4D5; box-shadow: 0px 0px 0px 1px #D4D4D5, 0px 2px 0px 0px #00B5AD, 0px 1px 3px 0px #D4D4D5; } .ui.teal.cards > .card:hover, .ui.cards > .teal.card:hover, .ui.teal.card:hover { -webkit-box-shadow: 0px 0px 0px 1px #D4D4D5, 0px 2px 0px 0px #009c95, 0px 1px 3px 0px #BCBDBD; box-shadow: 0px 0px 0px 1px #D4D4D5, 0px 2px 0px 0px #009c95, 0px 1px 3px 0px #BCBDBD; } /* Blue */ .ui.blue.cards > .card, .ui.cards > .blue.card, .ui.blue.card { -webkit-box-shadow: 0px 0px 0px 1px #D4D4D5, 0px 2px 0px 0px #2185D0, 0px 1px 3px 0px #D4D4D5; box-shadow: 0px 0px 0px 1px #D4D4D5, 0px 2px 0px 0px #2185D0, 0px 1px 3px 0px #D4D4D5; } .ui.blue.cards > .card:hover, .ui.cards > .blue.card:hover, .ui.blue.card:hover { -webkit-box-shadow: 0px 0px 0px 1px #D4D4D5, 0px 2px 0px 0px #1678c2, 0px 1px 3px 0px #BCBDBD; box-shadow: 0px 0px 0px 1px #D4D4D5, 0px 2px 0px 0px #1678c2, 0px 1px 3px 0px #BCBDBD; } /* Violet */ .ui.violet.cards > .card, .ui.cards > .violet.card, .ui.violet.card { -webkit-box-shadow: 0px 0px 0px 1px #D4D4D5, 0px 2px 0px 0px #6435C9, 0px 1px 3px 0px #D4D4D5; box-shadow: 0px 0px 0px 1px #D4D4D5, 0px 2px 0px 0px #6435C9, 0px 1px 3px 0px #D4D4D5; } .ui.violet.cards > .card:hover, .ui.cards > .violet.card:hover, .ui.violet.card:hover { -webkit-box-shadow: 0px 0px 0px 1px #D4D4D5, 0px 2px 0px 0px #5829bb, 0px 1px 3px 0px #BCBDBD; box-shadow: 0px 0px 0px 1px #D4D4D5, 0px 2px 0px 0px #5829bb, 0px 1px 3px 0px #BCBDBD; } /* Purple */ .ui.purple.cards > .card, .ui.cards > .purple.card, .ui.purple.card { -webkit-box-shadow: 0px 0px 0px 1px #D4D4D5, 0px 2px 0px 0px #A333C8, 0px 1px 3px 0px #D4D4D5; box-shadow: 0px 0px 0px 1px #D4D4D5, 0px 2px 0px 0px #A333C8, 0px 1px 3px 0px #D4D4D5; } .ui.purple.cards > .card:hover, .ui.cards > .purple.card:hover, .ui.purple.card:hover { -webkit-box-shadow: 0px 0px 0px 1px #D4D4D5, 0px 2px 0px 0px #9627ba, 0px 1px 3px 0px #BCBDBD; box-shadow: 0px 0px 0px 1px #D4D4D5, 0px 2px 0px 0px #9627ba, 0px 1px 3px 0px #BCBDBD; } /* Pink */ .ui.pink.cards > .card, .ui.cards > .pink.card, .ui.pink.card { -webkit-box-shadow: 0px 0px 0px 1px #D4D4D5, 0px 2px 0px 0px #E03997, 0px 1px 3px 0px #D4D4D5; box-shadow: 0px 0px 0px 1px #D4D4D5, 0px 2px 0px 0px #E03997, 0px 1px 3px 0px #D4D4D5; } .ui.pink.cards > .card:hover, .ui.cards > .pink.card:hover, .ui.pink.card:hover { -webkit-box-shadow: 0px 0px 0px 1px #D4D4D5, 0px 2px 0px 0px #e61a8d, 0px 1px 3px 0px #BCBDBD; box-shadow: 0px 0px 0px 1px #D4D4D5, 0px 2px 0px 0px #e61a8d, 0px 1px 3px 0px #BCBDBD; } /* Brown */ .ui.brown.cards > .card, .ui.cards > .brown.card, .ui.brown.card { -webkit-box-shadow: 0px 0px 0px 1px #D4D4D5, 0px 2px 0px 0px #A5673F, 0px 1px 3px 0px #D4D4D5; box-shadow: 0px 0px 0px 1px #D4D4D5, 0px 2px 0px 0px #A5673F, 0px 1px 3px 0px #D4D4D5; } .ui.brown.cards > .card:hover, .ui.cards > .brown.card:hover, .ui.brown.card:hover { -webkit-box-shadow: 0px 0px 0px 1px #D4D4D5, 0px 2px 0px 0px #975b33, 0px 1px 3px 0px #BCBDBD; box-shadow: 0px 0px 0px 1px #D4D4D5, 0px 2px 0px 0px #975b33, 0px 1px 3px 0px #BCBDBD; } /* Grey */ .ui.grey.cards > .card, .ui.cards > .grey.card, .ui.grey.card { -webkit-box-shadow: 0px 0px 0px 1px #D4D4D5, 0px 2px 0px 0px #767676, 0px 1px 3px 0px #D4D4D5; box-shadow: 0px 0px 0px 1px #D4D4D5, 0px 2px 0px 0px #767676, 0px 1px 3px 0px #D4D4D5; } .ui.grey.cards > .card:hover, .ui.cards > .grey.card:hover, .ui.grey.card:hover { -webkit-box-shadow: 0px 0px 0px 1px #D4D4D5, 0px 2px 0px 0px #838383, 0px 1px 3px 0px #BCBDBD; box-shadow: 0px 0px 0px 1px #D4D4D5, 0px 2px 0px 0px #838383, 0px 1px 3px 0px #BCBDBD; } /* Black */ .ui.black.cards > .card, .ui.cards > .black.card, .ui.black.card { -webkit-box-shadow: 0px 0px 0px 1px #D4D4D5, 0px 2px 0px 0px #1B1C1D, 0px 1px 3px 0px #D4D4D5; box-shadow: 0px 0px 0px 1px #D4D4D5, 0px 2px 0px 0px #1B1C1D, 0px 1px 3px 0px #D4D4D5; } .ui.black.cards > .card:hover, .ui.cards > .black.card:hover, .ui.black.card:hover { -webkit-box-shadow: 0px 0px 0px 1px #D4D4D5, 0px 2px 0px 0px #27292a, 0px 1px 3px 0px #BCBDBD; box-shadow: 0px 0px 0px 1px #D4D4D5, 0px 2px 0px 0px #27292a, 0px 1px 3px 0px #BCBDBD; } /*-------------- Card Count ---------------*/ .ui.one.cards { margin-left: 0em; margin-right: 0em; } .ui.one.cards > .card { width: 100%; } .ui.two.cards { margin-left: -1em; margin-right: -1em; } .ui.two.cards > .card { width: calc( 50% - 2em ); margin-left: 1em; margin-right: 1em; } .ui.three.cards { margin-left: -1em; margin-right: -1em; } .ui.three.cards > .card { width: calc( 33.33333333% - 2em ); margin-left: 1em; margin-right: 1em; } .ui.four.cards { margin-left: -0.75em; margin-right: -0.75em; } .ui.four.cards > .card { width: calc( 25% - 1.5em ); margin-left: 0.75em; margin-right: 0.75em; } .ui.five.cards { margin-left: -0.75em; margin-right: -0.75em; } .ui.five.cards > .card { width: calc( 20% - 1.5em ); margin-left: 0.75em; margin-right: 0.75em; } .ui.six.cards { margin-left: -0.75em; margin-right: -0.75em; } .ui.six.cards > .card { width: calc( 16.66666667% - 1.5em ); margin-left: 0.75em; margin-right: 0.75em; } .ui.seven.cards { margin-left: -0.5em; margin-right: -0.5em; } .ui.seven.cards > .card { width: calc( 14.28571429% - 1em ); margin-left: 0.5em; margin-right: 0.5em; } .ui.eight.cards { margin-left: -0.5em; margin-right: -0.5em; } .ui.eight.cards > .card { width: calc( 12.5% - 1em ); margin-left: 0.5em; margin-right: 0.5em; font-size: 11px; } .ui.nine.cards { margin-left: -0.5em; margin-right: -0.5em; } .ui.nine.cards > .card { width: calc( 11.11111111% - 1em ); margin-left: 0.5em; margin-right: 0.5em; font-size: 10px; } .ui.ten.cards { margin-left: -0.5em; margin-right: -0.5em; } .ui.ten.cards > .card { width: calc( 10% - 1em ); margin-left: 0.5em; margin-right: 0.5em; } /*------------------- Doubling --------------------*/ /* Mobile Only */ @media only screen and (max-width: 767px) { .ui.two.doubling.cards { margin-left: 0em; margin-right: 0em; } .ui.two.doubling.cards > .card { width: 100%; margin-left: 0em; margin-right: 0em; } .ui.three.doubling.cards { margin-left: -1em; margin-right: -1em; } .ui.three.doubling.cards > .card { width: calc( 50% - 2em ); margin-left: 1em; margin-right: 1em; } .ui.four.doubling.cards { margin-left: -1em; margin-right: -1em; } .ui.four.doubling.cards > .card { width: calc( 50% - 2em ); margin-left: 1em; margin-right: 1em; } .ui.five.doubling.cards { margin-left: -1em; margin-right: -1em; } .ui.five.doubling.cards > .card { width: calc( 50% - 2em ); margin-left: 1em; margin-right: 1em; } .ui.six.doubling.cards { margin-left: -1em; margin-right: -1em; } .ui.six.doubling.cards > .card { width: calc( 50% - 2em ); margin-left: 1em; margin-right: 1em; } .ui.seven.doubling.cards { margin-left: -1em; margin-right: -1em; } .ui.seven.doubling.cards > .card { width: calc( 33.33333333% - 2em ); margin-left: 1em; margin-right: 1em; } .ui.eight.doubling.cards { margin-left: -1em; margin-right: -1em; } .ui.eight.doubling.cards > .card { width: calc( 33.33333333% - 2em ); margin-left: 1em; margin-right: 1em; } .ui.nine.doubling.cards { margin-left: -1em; margin-right: -1em; } .ui.nine.doubling.cards > .card { width: calc( 33.33333333% - 2em ); margin-left: 1em; margin-right: 1em; } .ui.ten.doubling.cards { margin-left: -1em; margin-right: -1em; } .ui.ten.doubling.cards > .card { width: calc( 33.33333333% - 2em ); margin-left: 1em; margin-right: 1em; } } /* Tablet Only */ @media only screen and (min-width: 768px) and (max-width: 991px) { .ui.two.doubling.cards { margin-left: 0em; margin-right: 0em; } .ui.two.doubling.cards > .card { width: 100%; margin-left: 0em; margin-right: 0em; } .ui.three.doubling.cards { margin-left: -1em; margin-right: -1em; } .ui.three.doubling.cards > .card { width: calc( 50% - 2em ); margin-left: 1em; margin-right: 1em; } .ui.four.doubling.cards { margin-left: -1em; margin-right: -1em; } .ui.four.doubling.cards > .card { width: calc( 50% - 2em ); margin-left: 1em; margin-right: 1em; } .ui.five.doubling.cards { margin-left: -1em; margin-right: -1em; } .ui.five.doubling.cards > .card { width: calc( 33.33333333% - 2em ); margin-left: 1em; margin-right: 1em; } .ui.six.doubling.cards { margin-left: -1em; margin-right: -1em; } .ui.six.doubling.cards > .card { width: calc( 33.33333333% - 2em ); margin-left: 1em; margin-right: 1em; } .ui.eight.doubling.cards { margin-left: -1em; margin-right: -1em; } .ui.eight.doubling.cards > .card { width: calc( 33.33333333% - 2em ); margin-left: 1em; margin-right: 1em; } .ui.eight.doubling.cards { margin-left: -0.75em; margin-right: -0.75em; } .ui.eight.doubling.cards > .card { width: calc( 25% - 1.5em ); margin-left: 0.75em; margin-right: 0.75em; } .ui.nine.doubling.cards { margin-left: -0.75em; margin-right: -0.75em; } .ui.nine.doubling.cards > .card { width: calc( 25% - 1.5em ); margin-left: 0.75em; margin-right: 0.75em; } .ui.ten.doubling.cards { margin-left: -0.75em; margin-right: -0.75em; } .ui.ten.doubling.cards > .card { width: calc( 20% - 1.5em ); margin-left: 0.75em; margin-right: 0.75em; } } /*------------------- Stackable --------------------*/ @media only screen and (max-width: 767px) { .ui.stackable.cards { display: block !important; } .ui.stackable.cards .card:first-child { margin-top: 0em !important; } .ui.stackable.cards > .card { display: block !important; height: auto !important; margin: 1em 1em; padding: 0 !important; width: calc( 100% - 2em ) !important; } } /*-------------- Size ---------------*/ .ui.cards > .card { font-size: 1em; } /******************************* Theme Overrides *******************************/ /******************************* User Variable Overrides *******************************/ ================================================ FILE: public/assets/css/components/checkbox.css ================================================ /*! * # Semantic UI 2.2.11 - Checkbox * http://github.com/semantic-org/semantic-ui/ * * * Released under the MIT license * http://opensource.org/licenses/MIT * */ /******************************* Checkbox *******************************/ /*-------------- Content ---------------*/ .ui.checkbox { position: relative; display: inline-block; -webkit-backface-visibility: hidden; backface-visibility: hidden; outline: none; vertical-align: baseline; font-style: normal; min-height: 17px; font-size: 1rem; line-height: 17px; min-width: 17px; } /* HTML Checkbox */ .ui.checkbox input[type="checkbox"], .ui.checkbox input[type="radio"] { cursor: pointer; position: absolute; top: 0px; left: 0px; opacity: 0 !important; outline: none; z-index: 3; width: 17px; height: 17px; } /*-------------- Box ---------------*/ .ui.checkbox .box, .ui.checkbox label { cursor: auto; position: relative; display: block; padding-left: 1.85714em; outline: none; font-size: 1em; } .ui.checkbox .box:before, .ui.checkbox label:before { position: absolute; top: 0px; left: 0px; width: 17px; height: 17px; content: ''; background: #FFFFFF; border-radius: 0.21428571rem; -webkit-transition: border 0.1s ease, opacity 0.1s ease, -webkit-transform 0.1s ease, -webkit-box-shadow 0.1s ease; transition: border 0.1s ease, opacity 0.1s ease, -webkit-transform 0.1s ease, -webkit-box-shadow 0.1s ease; transition: border 0.1s ease, opacity 0.1s ease, transform 0.1s ease, box-shadow 0.1s ease; transition: border 0.1s ease, opacity 0.1s ease, transform 0.1s ease, box-shadow 0.1s ease, -webkit-transform 0.1s ease, -webkit-box-shadow 0.1s ease; border: 1px solid #D4D4D5; } /*-------------- Checkmark ---------------*/ .ui.checkbox .box:after, .ui.checkbox label:after { position: absolute; font-size: 14px; top: 0px; left: 0px; width: 17px; height: 17px; text-align: center; opacity: 0; color: rgba(0, 0, 0, 0.87); -webkit-transition: border 0.1s ease, opacity 0.1s ease, -webkit-transform 0.1s ease, -webkit-box-shadow 0.1s ease; transition: border 0.1s ease, opacity 0.1s ease, -webkit-transform 0.1s ease, -webkit-box-shadow 0.1s ease; transition: border 0.1s ease, opacity 0.1s ease, transform 0.1s ease, box-shadow 0.1s ease; transition: border 0.1s ease, opacity 0.1s ease, transform 0.1s ease, box-shadow 0.1s ease, -webkit-transform 0.1s ease, -webkit-box-shadow 0.1s ease; } /*-------------- Label ---------------*/ /* Inside */ .ui.checkbox label, .ui.checkbox + label { color: rgba(0, 0, 0, 0.87); -webkit-transition: color 0.1s ease; transition: color 0.1s ease; } /* Outside */ .ui.checkbox + label { vertical-align: middle; } /******************************* States *******************************/ /*-------------- Hover ---------------*/ .ui.checkbox .box:hover::before, .ui.checkbox label:hover::before { background: #FFFFFF; border-color: rgba(34, 36, 38, 0.35); } .ui.checkbox label:hover, .ui.checkbox + label:hover { color: rgba(0, 0, 0, 0.8); } /*-------------- Down ---------------*/ .ui.checkbox .box:active::before, .ui.checkbox label:active::before { background: #F9FAFB; border-color: rgba(34, 36, 38, 0.35); } .ui.checkbox .box:active::after, .ui.checkbox label:active::after { color: rgba(0, 0, 0, 0.95); } .ui.checkbox input:active ~ label { color: rgba(0, 0, 0, 0.95); } /*-------------- Focus ---------------*/ .ui.checkbox input:focus ~ .box:before, .ui.checkbox input:focus ~ label:before { background: #FFFFFF; border-color: #96C8DA; } .ui.checkbox input:focus ~ .box:after, .ui.checkbox input:focus ~ label:after { color: rgba(0, 0, 0, 0.95); } .ui.checkbox input:focus ~ label { color: rgba(0, 0, 0, 0.95); } /*-------------- Active ---------------*/ .ui.checkbox input:checked ~ .box:before, .ui.checkbox input:checked ~ label:before { background: #FFFFFF; border-color: rgba(34, 36, 38, 0.35); } .ui.checkbox input:checked ~ .box:after, .ui.checkbox input:checked ~ label:after { opacity: 1; color: rgba(0, 0, 0, 0.95); } /*-------------- Indeterminate ---------------*/ .ui.checkbox input:not([type=radio]):indeterminate ~ .box:before, .ui.checkbox input:not([type=radio]):indeterminate ~ label:before { background: #FFFFFF; border-color: rgba(34, 36, 38, 0.35); } .ui.checkbox input:not([type=radio]):indeterminate ~ .box:after, .ui.checkbox input:not([type=radio]):indeterminate ~ label:after { opacity: 1; color: rgba(0, 0, 0, 0.95); } /*-------------- Active Focus ---------------*/ .ui.checkbox input:not([type=radio]):indeterminate:focus ~ .box:before, .ui.checkbox input:not([type=radio]):indeterminate:focus ~ label:before, .ui.checkbox input:checked:focus ~ .box:before, .ui.checkbox input:checked:focus ~ label:before { background: #FFFFFF; border-color: #96C8DA; } .ui.checkbox input:not([type=radio]):indeterminate:focus ~ .box:after, .ui.checkbox input:not([type=radio]):indeterminate:focus ~ label:after, .ui.checkbox input:checked:focus ~ .box:after, .ui.checkbox input:checked:focus ~ label:after { color: rgba(0, 0, 0, 0.95); } /*-------------- Read-Only ---------------*/ .ui.read-only.checkbox, .ui.read-only.checkbox label { cursor: default; } /*-------------- Disabled ---------------*/ .ui.disabled.checkbox .box:after, .ui.disabled.checkbox label, .ui.checkbox input[disabled] ~ .box:after, .ui.checkbox input[disabled] ~ label { cursor: default !important; opacity: 0.5; color: #000000; } /*-------------- Hidden ---------------*/ /* Initialized checkbox moves input below element to prevent manually triggering */ .ui.checkbox input.hidden { z-index: -1; } /* Selectable Label */ .ui.checkbox input.hidden + label { cursor: pointer; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; } /******************************* Types *******************************/ /*-------------- Radio ---------------*/ .ui.radio.checkbox { min-height: 15px; } .ui.radio.checkbox .box, .ui.radio.checkbox label { padding-left: 1.85714em; } /* Box */ .ui.radio.checkbox .box:before, .ui.radio.checkbox label:before { content: ''; -webkit-transform: none; transform: none; width: 15px; height: 15px; border-radius: 500rem; top: 1px; left: 0px; } /* Bullet */ .ui.radio.checkbox .box:after, .ui.radio.checkbox label:after { border: none; content: '' !important; width: 15px; height: 15px; line-height: 15px; } /* Radio Checkbox */ .ui.radio.checkbox .box:after, .ui.radio.checkbox label:after { top: 1px; left: 0px; width: 15px; height: 15px; border-radius: 500rem; -webkit-transform: scale(0.46666667); transform: scale(0.46666667); background-color: rgba(0, 0, 0, 0.87); } /* Focus */ .ui.radio.checkbox input:focus ~ .box:before, .ui.radio.checkbox input:focus ~ label:before { background-color: #FFFFFF; } .ui.radio.checkbox input:focus ~ .box:after, .ui.radio.checkbox input:focus ~ label:after { background-color: rgba(0, 0, 0, 0.95); } /* Indeterminate */ .ui.radio.checkbox input:indeterminate ~ .box:after, .ui.radio.checkbox input:indeterminate ~ label:after { opacity: 0; } /* Active */ .ui.radio.checkbox input:checked ~ .box:before, .ui.radio.checkbox input:checked ~ label:before { background-color: #FFFFFF; } .ui.radio.checkbox input:checked ~ .box:after, .ui.radio.checkbox input:checked ~ label:after { background-color: rgba(0, 0, 0, 0.95); } /* Active Focus */ .ui.radio.checkbox input:focus:checked ~ .box:before, .ui.radio.checkbox input:focus:checked ~ label:before { background-color: #FFFFFF; } .ui.radio.checkbox input:focus:checked ~ .box:after, .ui.radio.checkbox input:focus:checked ~ label:after { background-color: rgba(0, 0, 0, 0.95); } /*-------------- Slider ---------------*/ .ui.slider.checkbox { min-height: 1.25rem; } /* Input */ .ui.slider.checkbox input { width: 3.5rem; height: 1.25rem; } /* Label */ .ui.slider.checkbox .box, .ui.slider.checkbox label { padding-left: 4.5rem; line-height: 1rem; color: rgba(0, 0, 0, 0.4); } /* Line */ .ui.slider.checkbox .box:before, .ui.slider.checkbox label:before { display: block; position: absolute; content: ''; border: none !important; left: 0em; z-index: 1; top: 0.4rem; background-color: rgba(0, 0, 0, 0.05); width: 3.5rem; height: 0.21428571rem; -webkit-transform: none; transform: none; border-radius: 500rem; -webkit-transition: background 0.3s ease; transition: background 0.3s ease; } /* Handle */ .ui.slider.checkbox .box:after, .ui.slider.checkbox label:after { background: #FFFFFF -webkit-gradient(linear, left top, left bottom, from(transparent), to(rgba(0, 0, 0, 0.05))); background: #FFFFFF -webkit-linear-gradient(transparent, rgba(0, 0, 0, 0.05)); background: #FFFFFF linear-gradient(transparent, rgba(0, 0, 0, 0.05)); position: absolute; content: '' !important; opacity: 1; z-index: 2; border: none; -webkit-box-shadow: 0px 1px 2px 0 rgba(34, 36, 38, 0.15), 0px 0px 0px 1px rgba(34, 36, 38, 0.15) inset; box-shadow: 0px 1px 2px 0 rgba(34, 36, 38, 0.15), 0px 0px 0px 1px rgba(34, 36, 38, 0.15) inset; width: 1.5rem; height: 1.5rem; top: -0.25rem; left: 0em; -webkit-transform: none; transform: none; border-radius: 500rem; -webkit-transition: left 0.3s ease; transition: left 0.3s ease; } /* Focus */ .ui.slider.checkbox input:focus ~ .box:before, .ui.slider.checkbox input:focus ~ label:before { background-color: rgba(0, 0, 0, 0.15); border: none; } /* Hover */ .ui.slider.checkbox .box:hover, .ui.slider.checkbox label:hover { color: rgba(0, 0, 0, 0.8); } .ui.slider.checkbox .box:hover::before, .ui.slider.checkbox label:hover::before { background: rgba(0, 0, 0, 0.15); } /* Active */ .ui.slider.checkbox input:checked ~ .box, .ui.slider.checkbox input:checked ~ label { color: rgba(0, 0, 0, 0.95) !important; } .ui.slider.checkbox input:checked ~ .box:before, .ui.slider.checkbox input:checked ~ label:before { background-color: #545454 !important; } .ui.slider.checkbox input:checked ~ .box:after, .ui.slider.checkbox input:checked ~ label:after { left: 2rem; } /* Active Focus */ .ui.slider.checkbox input:focus:checked ~ .box, .ui.slider.checkbox input:focus:checked ~ label { color: rgba(0, 0, 0, 0.95) !important; } .ui.slider.checkbox input:focus:checked ~ .box:before, .ui.slider.checkbox input:focus:checked ~ label:before { background-color: #000000 !important; } /*-------------- Toggle ---------------*/ .ui.toggle.checkbox { min-height: 1.5rem; } /* Input */ .ui.toggle.checkbox input { width: 3.5rem; height: 1.5rem; } /* Label */ .ui.toggle.checkbox .box, .ui.toggle.checkbox label { min-height: 1.5rem; padding-left: 4.5rem; color: rgba(0, 0, 0, 0.87); } .ui.toggle.checkbox label { padding-top: 0.15em; } /* Switch */ .ui.toggle.checkbox .box:before, .ui.toggle.checkbox label:before { display: block; position: absolute; content: ''; z-index: 1; -webkit-transform: none; transform: none; border: none; top: 0rem; background: rgba(0, 0, 0, 0.05); -webkit-box-shadow: none; box-shadow: none; width: 3.5rem; height: 1.5rem; border-radius: 500rem; } /* Handle */ .ui.toggle.checkbox .box:after, .ui.toggle.checkbox label:after { background: #FFFFFF -webkit-gradient(linear, left top, left bottom, from(transparent), to(rgba(0, 0, 0, 0.05))); background: #FFFFFF -webkit-linear-gradient(transparent, rgba(0, 0, 0, 0.05)); background: #FFFFFF linear-gradient(transparent, rgba(0, 0, 0, 0.05)); position: absolute; content: '' !important; opacity: 1; z-index: 2; border: none; -webkit-box-shadow: 0px 1px 2px 0 rgba(34, 36, 38, 0.15), 0px 0px 0px 1px rgba(34, 36, 38, 0.15) inset; box-shadow: 0px 1px 2px 0 rgba(34, 36, 38, 0.15), 0px 0px 0px 1px rgba(34, 36, 38, 0.15) inset; width: 1.5rem; height: 1.5rem; top: 0rem; left: 0em; border-radius: 500rem; -webkit-transition: background 0.3s ease, left 0.3s ease; transition: background 0.3s ease, left 0.3s ease; } .ui.toggle.checkbox input ~ .box:after, .ui.toggle.checkbox input ~ label:after { left: -0.05rem; -webkit-box-shadow: none; box-shadow: none; } /* Focus */ .ui.toggle.checkbox input:focus ~ .box:before, .ui.toggle.checkbox input:focus ~ label:before { background-color: rgba(0, 0, 0, 0.15); border: none; } /* Hover */ .ui.toggle.checkbox .box:hover::before, .ui.toggle.checkbox label:hover::before { background-color: rgba(0, 0, 0, 0.15); border: none; } /* Active */ .ui.toggle.checkbox input:checked ~ .box, .ui.toggle.checkbox input:checked ~ label { color: rgba(0, 0, 0, 0.95) !important; } .ui.toggle.checkbox input:checked ~ .box:before, .ui.toggle.checkbox input:checked ~ label:before { background-color: #2185D0 !important; } .ui.toggle.checkbox input:checked ~ .box:after, .ui.toggle.checkbox input:checked ~ label:after { left: 2.15rem; -webkit-box-shadow: none; box-shadow: none; } /* Active Focus */ .ui.toggle.checkbox input:focus:checked ~ .box, .ui.toggle.checkbox input:focus:checked ~ label { color: rgba(0, 0, 0, 0.95) !important; } .ui.toggle.checkbox input:focus:checked ~ .box:before, .ui.toggle.checkbox input:focus:checked ~ label:before { background-color: #0d71bb !important; } /******************************* Variations *******************************/ /*-------------- Fitted ---------------*/ .ui.fitted.checkbox .box, .ui.fitted.checkbox label { padding-left: 0em !important; } .ui.fitted.toggle.checkbox, .ui.fitted.toggle.checkbox { width: 3.5rem; } .ui.fitted.slider.checkbox, .ui.fitted.slider.checkbox { width: 3.5rem; } /******************************* Theme Overrides *******************************/ @font-face { font-family: 'Checkbox'; src: url(data:application/x-font-ttf;charset=utf-8;base64,AAEAAAALAIAAAwAwT1MvMg8SBD8AAAC8AAAAYGNtYXAYVtCJAAABHAAAAFRnYXNwAAAAEAAAAXAAAAAIZ2x5Zn4huwUAAAF4AAABYGhlYWQGPe1ZAAAC2AAAADZoaGVhB30DyAAAAxAAAAAkaG10eBBKAEUAAAM0AAAAHGxvY2EAmgESAAADUAAAABBtYXhwAAkALwAAA2AAAAAgbmFtZSC8IugAAAOAAAABknBvc3QAAwAAAAAFFAAAACAAAwMTAZAABQAAApkCzAAAAI8CmQLMAAAB6wAzAQkAAAAAAAAAAAAAAAAAAAABEAAAAAAAAAAAAAAAAAAAAABAAADoAgPA/8AAQAPAAEAAAAABAAAAAAAAAAAAAAAgAAAAAAADAAAAAwAAABwAAQADAAAAHAADAAEAAAAcAAQAOAAAAAoACAACAAIAAQAg6AL//f//AAAAAAAg6AD//f//AAH/4xgEAAMAAQAAAAAAAAAAAAAAAQAB//8ADwABAAAAAAAAAAAAAgAANzkBAAAAAAEAAAAAAAAAAAACAAA3OQEAAAAAAQAAAAAAAAAAAAIAADc5AQAAAAABAEUAUQO7AvgAGgAAARQHAQYjIicBJjU0PwE2MzIfAQE2MzIfARYVA7sQ/hQQFhcQ/uMQEE4QFxcQqAF2EBcXEE4QAnMWEP4UEBABHRAXFhBOEBCoAXcQEE4QFwAAAAABAAABbgMlAkkAFAAAARUUBwYjISInJj0BNDc2MyEyFxYVAyUQEBf9SRcQEBAQFwK3FxAQAhJtFxAQEBAXbRcQEBAQFwAAAAABAAAASQMlA24ALAAAARUUBwYrARUUBwYrASInJj0BIyInJj0BNDc2OwE1NDc2OwEyFxYdATMyFxYVAyUQEBfuEBAXbhYQEO4XEBAQEBfuEBAWbhcQEO4XEBACEm0XEBDuFxAQEBAX7hAQF20XEBDuFxAQEBAX7hAQFwAAAQAAAAIAAHRSzT9fDzz1AAsEAAAAAADRsdR3AAAAANGx1HcAAAAAA7sDbgAAAAgAAgAAAAAAAAABAAADwP/AAAAEAAAAAAADuwABAAAAAAAAAAAAAAAAAAAABwQAAAAAAAAAAAAAAAIAAAAEAABFAyUAAAMlAAAAAAAAAAoAFAAeAE4AcgCwAAEAAAAHAC0AAQAAAAAAAgAAAAAAAAAAAAAAAAAAAAAAAAAOAK4AAQAAAAAAAQAIAAAAAQAAAAAAAgAHAGkAAQAAAAAAAwAIADkAAQAAAAAABAAIAH4AAQAAAAAABQALABgAAQAAAAAABgAIAFEAAQAAAAAACgAaAJYAAwABBAkAAQAQAAgAAwABBAkAAgAOAHAAAwABBAkAAwAQAEEAAwABBAkABAAQAIYAAwABBAkABQAWACMAAwABBAkABgAQAFkAAwABBAkACgA0ALBDaGVja2JveABDAGgAZQBjAGsAYgBvAHhWZXJzaW9uIDIuMABWAGUAcgBzAGkAbwBuACAAMgAuADBDaGVja2JveABDAGgAZQBjAGsAYgBvAHhDaGVja2JveABDAGgAZQBjAGsAYgBvAHhSZWd1bGFyAFIAZQBnAHUAbABhAHJDaGVja2JveABDAGgAZQBjAGsAYgBvAHhGb250IGdlbmVyYXRlZCBieSBJY29Nb29uLgBGAG8AbgB0ACAAZwBlAG4AZQByAGEAdABlAGQAIABiAHkAIABJAGMAbwBNAG8AbwBuAC4AAAADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA) format('truetype'); } /* Checkmark */ .ui.checkbox label:after, .ui.checkbox .box:after { font-family: 'Checkbox'; } /* Checked */ .ui.checkbox input:checked ~ .box:after, .ui.checkbox input:checked ~ label:after { content: '\e800'; } /* Indeterminate */ .ui.checkbox input:indeterminate ~ .box:after, .ui.checkbox input:indeterminate ~ label:after { font-size: 12px; content: '\e801'; } /* UTF Reference .check:before { content: '\e800'; } .dash:before { content: '\e801'; } .plus:before { content: '\e802'; } */ /******************************* Site Overrides *******************************/ ================================================ FILE: public/assets/css/components/checkbox.js ================================================ /*! * # Semantic UI 2.2.11 - Checkbox * http://github.com/semantic-org/semantic-ui/ * * * Released under the MIT license * http://opensource.org/licenses/MIT * */ ;(function ($, window, document, undefined) { "use strict"; window = (typeof window != 'undefined' && window.Math == Math) ? window : (typeof self != 'undefined' && self.Math == Math) ? self : Function('return this')() ; $.fn.checkbox = function(parameters) { var $allModules = $(this), moduleSelector = $allModules.selector || '', time = new Date().getTime(), performance = [], query = arguments[0], methodInvoked = (typeof query == 'string'), queryArguments = [].slice.call(arguments, 1), returnedValue ; $allModules .each(function() { var settings = $.extend(true, {}, $.fn.checkbox.settings, parameters), className = settings.className, namespace = settings.namespace, selector = settings.selector, error = settings.error, eventNamespace = '.' + namespace, moduleNamespace = 'module-' + namespace, $module = $(this), $label = $(this).children(selector.label), $input = $(this).children(selector.input), input = $input[0], initialLoad = false, shortcutPressed = false, instance = $module.data(moduleNamespace), observer, element = this, module ; module = { initialize: function() { module.verbose('Initializing checkbox', settings); module.create.label(); module.bind.events(); module.set.tabbable(); module.hide.input(); module.observeChanges(); module.instantiate(); module.setup(); }, instantiate: function() { module.verbose('Storing instance of module', module); instance = module; $module .data(moduleNamespace, module) ; }, destroy: function() { module.verbose('Destroying module'); module.unbind.events(); module.show.input(); $module.removeData(moduleNamespace); }, fix: { reference: function() { if( $module.is(selector.input) ) { module.debug('Behavior called on adjusting invoked element'); $module = $module.closest(selector.checkbox); module.refresh(); } } }, setup: function() { module.set.initialLoad(); if( module.is.indeterminate() ) { module.debug('Initial value is indeterminate'); module.indeterminate(); } else if( module.is.checked() ) { module.debug('Initial value is checked'); module.check(); } else { module.debug('Initial value is unchecked'); module.uncheck(); } module.remove.initialLoad(); }, refresh: function() { $label = $module.children(selector.label); $input = $module.children(selector.input); input = $input[0]; }, hide: { input: function() { module.verbose('Modifying z-index to be unselectable'); $input.addClass(className.hidden); } }, show: { input: function() { module.verbose('Modifying z-index to be selectable'); $input.removeClass(className.hidden); } }, observeChanges: function() { if('MutationObserver' in window) { observer = new MutationObserver(function(mutations) { module.debug('DOM tree modified, updating selector cache'); module.refresh(); }); observer.observe(element, { childList : true, subtree : true }); module.debug('Setting up mutation observer', observer); } }, attachEvents: function(selector, event) { var $element = $(selector) ; event = $.isFunction(module[event]) ? module[event] : module.toggle ; if($element.length > 0) { module.debug('Attaching checkbox events to element', selector, event); $element .on('click' + eventNamespace, event) ; } else { module.error(error.notFound); } }, event: { click: function(event) { var $target = $(event.target) ; if( $target.is(selector.input) ) { module.verbose('Using default check action on initialized checkbox'); return; } if( $target.is(selector.link) ) { module.debug('Clicking link inside checkbox, skipping toggle'); return; } module.toggle(); $input.focus(); event.preventDefault(); }, keydown: function(event) { var key = event.which, keyCode = { enter : 13, space : 32, escape : 27 } ; if(key == keyCode.escape) { module.verbose('Escape key pressed blurring field'); $input.blur(); shortcutPressed = true; } else if(!event.ctrlKey && ( key == keyCode.space || key == keyCode.enter) ) { module.verbose('Enter/space key pressed, toggling checkbox'); module.toggle(); shortcutPressed = true; } else { shortcutPressed = false; } }, keyup: function(event) { if(shortcutPressed) { event.preventDefault(); } } }, check: function() { if( !module.should.allowCheck() ) { return; } module.debug('Checking checkbox', $input); module.set.checked(); if( !module.should.ignoreCallbacks() ) { settings.onChecked.call(input); settings.onChange.call(input); } }, uncheck: function() { if( !module.should.allowUncheck() ) { return; } module.debug('Unchecking checkbox'); module.set.unchecked(); if( !module.should.ignoreCallbacks() ) { settings.onUnchecked.call(input); settings.onChange.call(input); } }, indeterminate: function() { if( module.should.allowIndeterminate() ) { module.debug('Checkbox is already indeterminate'); return; } module.debug('Making checkbox indeterminate'); module.set.indeterminate(); if( !module.should.ignoreCallbacks() ) { settings.onIndeterminate.call(input); settings.onChange.call(input); } }, determinate: function() { if( module.should.allowDeterminate() ) { module.debug('Checkbox is already determinate'); return; } module.debug('Making checkbox determinate'); module.set.determinate(); if( !module.should.ignoreCallbacks() ) { settings.onDeterminate.call(input); settings.onChange.call(input); } }, enable: function() { if( module.is.enabled() ) { module.debug('Checkbox is already enabled'); return; } module.debug('Enabling checkbox'); module.set.enabled(); settings.onEnable.call(input); // preserve legacy callbacks settings.onEnabled.call(input); }, disable: function() { if( module.is.disabled() ) { module.debug('Checkbox is already disabled'); return; } module.debug('Disabling checkbox'); module.set.disabled(); settings.onDisable.call(input); // preserve legacy callbacks settings.onDisabled.call(input); }, get: { radios: function() { var name = module.get.name() ; return $('input[name="' + name + '"]').closest(selector.checkbox); }, otherRadios: function() { return module.get.radios().not($module); }, name: function() { return $input.attr('name'); } }, is: { initialLoad: function() { return initialLoad; }, radio: function() { return ($input.hasClass(className.radio) || $input.attr('type') == 'radio'); }, indeterminate: function() { return $input.prop('indeterminate') !== undefined && $input.prop('indeterminate'); }, checked: function() { return $input.prop('checked') !== undefined && $input.prop('checked'); }, disabled: function() { return $input.prop('disabled') !== undefined && $input.prop('disabled'); }, enabled: function() { return !module.is.disabled(); }, determinate: function() { return !module.is.indeterminate(); }, unchecked: function() { return !module.is.checked(); } }, should: { allowCheck: function() { if(module.is.determinate() && module.is.checked() && !module.should.forceCallbacks() ) { module.debug('Should not allow check, checkbox is already checked'); return false; } if(settings.beforeChecked.apply(input) === false) { module.debug('Should not allow check, beforeChecked cancelled'); return false; } return true; }, allowUncheck: function() { if(module.is.determinate() && module.is.unchecked() && !module.should.forceCallbacks() ) { module.debug('Should not allow uncheck, checkbox is already unchecked'); return false; } if(settings.beforeUnchecked.apply(input) === false) { module.debug('Should not allow uncheck, beforeUnchecked cancelled'); return false; } return true; }, allowIndeterminate: function() { if(module.is.indeterminate() && !module.should.forceCallbacks() ) { module.debug('Should not allow indeterminate, checkbox is already indeterminate'); return false; } if(settings.beforeIndeterminate.apply(input) === false) { module.debug('Should not allow indeterminate, beforeIndeterminate cancelled'); return false; } return true; }, allowDeterminate: function() { if(module.is.determinate() && !module.should.forceCallbacks() ) { module.debug('Should not allow determinate, checkbox is already determinate'); return false; } if(settings.beforeDeterminate.apply(input) === false) { module.debug('Should not allow determinate, beforeDeterminate cancelled'); return false; } return true; }, forceCallbacks: function() { return (module.is.initialLoad() && settings.fireOnInit); }, ignoreCallbacks: function() { return (initialLoad && !settings.fireOnInit); } }, can: { change: function() { return !( $module.hasClass(className.disabled) || $module.hasClass(className.readOnly) || $input.prop('disabled') || $input.prop('readonly') ); }, uncheck: function() { return (typeof settings.uncheckable === 'boolean') ? settings.uncheckable : !module.is.radio() ; } }, set: { initialLoad: function() { initialLoad = true; }, checked: function() { module.verbose('Setting class to checked'); $module .removeClass(className.indeterminate) .addClass(className.checked) ; if( module.is.radio() ) { module.uncheckOthers(); } if(!module.is.indeterminate() && module.is.checked()) { module.debug('Input is already checked, skipping input property change'); return; } module.verbose('Setting state to checked', input); $input .prop('indeterminate', false) .prop('checked', true) ; module.trigger.change(); }, unchecked: function() { module.verbose('Removing checked class'); $module .removeClass(className.indeterminate) .removeClass(className.checked) ; if(!module.is.indeterminate() && module.is.unchecked() ) { module.debug('Input is already unchecked'); return; } module.debug('Setting state to unchecked'); $input .prop('indeterminate', false) .prop('checked', false) ; module.trigger.change(); }, indeterminate: function() { module.verbose('Setting class to indeterminate'); $module .addClass(className.indeterminate) ; if( module.is.indeterminate() ) { module.debug('Input is already indeterminate, skipping input property change'); return; } module.debug('Setting state to indeterminate'); $input .prop('indeterminate', true) ; module.trigger.change(); }, determinate: function() { module.verbose('Removing indeterminate class'); $module .removeClass(className.indeterminate) ; if( module.is.determinate() ) { module.debug('Input is already determinate, skipping input property change'); return; } module.debug('Setting state to determinate'); $input .prop('indeterminate', false) ; }, disabled: function() { module.verbose('Setting class to disabled'); $module .addClass(className.disabled) ; if( module.is.disabled() ) { module.debug('Input is already disabled, skipping input property change'); return; } module.debug('Setting state to disabled'); $input .prop('disabled', 'disabled') ; module.trigger.change(); }, enabled: function() { module.verbose('Removing disabled class'); $module.removeClass(className.disabled); if( module.is.enabled() ) { module.debug('Input is already enabled, skipping input property change'); return; } module.debug('Setting state to enabled'); $input .prop('disabled', false) ; module.trigger.change(); }, tabbable: function() { module.verbose('Adding tabindex to checkbox'); if( $input.attr('tabindex') === undefined) { $input.attr('tabindex', 0); } } }, remove: { initialLoad: function() { initialLoad = false; } }, trigger: { change: function() { var events = document.createEvent('HTMLEvents'), inputElement = $input[0] ; if(inputElement) { module.verbose('Triggering native change event'); events.initEvent('change', true, false); inputElement.dispatchEvent(events); } } }, create: { label: function() { if($input.prevAll(selector.label).length > 0) { $input.prev(selector.label).detach().insertAfter($input); module.debug('Moving existing label', $label); } else if( !module.has.label() ) { $label = $('