diff --git a/ISSUE_TEMPLATE.md b/ISSUE_TEMPLATE.md new file mode 100644 index 0000000..8ef7b68 --- /dev/null +++ b/ISSUE_TEMPLATE.md @@ -0,0 +1,40 @@ +# Prerequisites + +Please answer the following questions for yourself before submitting an issue. + +- [ ] I am running the latest version +- [ ] I checked the documentation and found no answer +- [ ] I checked to make sure that this issue has not already been filed +- [ ] I'm reporting the issue to the correct repository (for multi-repository projects) + +# Expected Behavior + +Please describe the behavior you are expecting + +# Current Behavior + +What is the current behavior? + +# Failure Information (for bugs) + +Please help provide information about the failure if this is a bug. If it is not a bug, please remove the rest of this template. + +## Steps to Reproduce + +Please provide detailed steps for reproducing the issue. + +1. step 1 +2. step 2 +3. you get it... + +## Context + +Please provide any relevant information about your setup. This is important in case the issue is not reproducible except for under certain conditions. + +* Device: +* Operating System: +* Browser and Version: + +## Failure Logs + +Please include any relevant log snippets or files here. diff --git a/changelog.md b/changelog.md new file mode 100644 index 0000000..cfffe3c --- /dev/null +++ b/changelog.md @@ -0,0 +1,11 @@ +# Changelog + +All notable changes to `Black Dashboard` frontend preset for Laravel will be documented in this file. + +## Version 1.0.0 + +### Added +- Black Dashboard v1.0.0 frontend theme +- Laravel Auth preset +- Change user profile +- User CRUD \ No newline at end of file diff --git a/composer.json b/composer.json new file mode 100644 index 0000000..38bc4f4 --- /dev/null +++ b/composer.json @@ -0,0 +1,22 @@ +{ + "name": "laravel-frontend-presets/black-dashboard", + "description": "Laravel 5.x Front-end preset for black dashboard", + "license": "MIT", + "homepage": "https://github.com/creativetimofficial/black-dashboard-laravel", + "keywords": ["Laravel", "Preset", "Black"], + "require": { + "laravel/framework": "^5.5" + }, + "autoload": { + "psr-4": { + "LaravelFrontendPresets\\BlackPreset\\": "src/" + } + }, + "extra": { + "laravel": { + "providers": [ + "LaravelFrontendPresets\\BlackPreset\\BlackPresetServiceProvider" + ] + } + } +} diff --git a/license.md b/license.md new file mode 100644 index 0000000..73164ce --- /dev/null +++ b/license.md @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2017 Creative Tim (https://www.creative-tim.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/readme.md b/readme.md new file mode 100644 index 0000000..673d468 --- /dev/null +++ b/readme.md @@ -0,0 +1,529 @@ +# [Black Dashboard Laravel - Free Frontend Preset for Laravel](https://black-dashboard-laravel.creative-tim.com/?ref=adnp-readme) [![Tweet](https://img.shields.io/twitter/url/http/shields.io.svg?style=social&logo=twitter)](https://twitter.com/home?status=Black%20Dashboard%20Laravel%20is%20a%20Free%20Frontend%20Preset%20for%20Laravel%20%E2%9D%A4%EF%B8%8F%0Ahttps%3A//black-dashboard-laravel.creative-tim.com/%20%23%black%20%23design%20%23dashboard%20%23laravel%20%23free%20via%20%40CreativeTim) + + ![license](https://img.shields.io/badge/license-MIT-blue.svg) [![GitHub issues open](https://img.shields.io/github/issues/laravel-frontend-presets/black-dashboard.svg?maxAge=2592000)](https://github.com/laravel-frontend-presets/black-dashboard/issues?q=is%3Aopen+is%3Aissue) [![GitHub issues closed](https://img.shields.io/github/issues-closed-raw/laravel-frontend-presets/black-dashboard.svg?maxAge=2592000)](https://github.com/laravel-frontend-presets/black-dashboard/issues?q=is%3Aissue+is%3Aclosed) + +*Frontend version*: Black Dashboard v1.0.0. More info at https://www.creative-tim.com/product/black-dashboard + +![Product Image](/screens/intro-black.gif) + +Speed up your web development with the Bootstrap 4 Admin Dashboard built for Laravel Framework 5.5 and up. + +## Note + +We recommend installing this preset on a project that you are starting from scratch, otherwise your project's design might break. + +## Prerequisites + +If you don't already have an Apache local environment with PHP and MySQL, use one of the following links: + + - Windows: https://updivision.com/blog/post/beginner-s-guide-to-setting-up-your-local-development-environment-on-windows + - Linux: https://howtoubuntu.org/how-to-install-lamp-on-ubuntu + - Mac: https://wpshout.com/quick-guides/how-to-install-mamp-on-your-mac/ + +Also, you will need to install Composer: https://getcomposer.org/doc/00-intro.md +And Laravel: https://laravel.com/docs/5.8/installation + +## Installation + +After initializing a fresh instance of Laravel (and making all the necessary configurations), install the preset using one of the provided methods: + +### Via composer + +1. `Cd` to your Laravel app +2. Install this preset via `composer require laravel-frontend-presets/black-dashboard`. No need to register the service provider. Laravel 5.5 & up can auto detect the package. +3. Run `php artisan preset black` command to install the Argon preset. This will install all the necessary assets and also the custom auth views, it will also add the auth route in `routes/web.php` +(NOTE: If you run this command several times, be sure to clean up the duplicate Auth entries in routes/web.php) +4. In your terminal run `composer dump-autoload` +5. Run `php artisan migrate --seed` to create basic users table + +### By using the archive + +1. In your application's root create a **presets** folder +2. [Download an archive](https://github.com/laravel-frontend-presets/black-dashboard/archive/master.zip) of the repo and unzip it +3. Copy and paste **black-dashboard-master** folder in presets (created in step 2) and rename it to **black** +4. Open `composer.json` file +5. Add `"LaravelFrontendPresets\\BlackPreset\\": "presets/black/src"` to `autoload/psr-4` and to `autoload-dev/psr-4` +6. Add `LaravelFrontendPresets\BlackPreset\BlackPresetServiceProvider::class` to `config/app.php` file +7. In your terminal run `composer dump-autoload` +8. Run `php artisan preset black` command to install the Black Dashboard preset. This will install all the necessary assets and also the custom auth views, it will also add the auth route in `routes/web.php` +(NOTE: If you run this command several times, be sure to clean up the duplicate Auth entries in routes/web.php) +9. Run `php artisan migrate --seed` to create basic users table + + +## Usage + +Register a user or login using **admin@black.com** and **secret** and start testing the preset (make sure to run the migrations and seeders for these credentials to be available). + +Besides the dashboard and the auth pages this preset also has a user management example and an edit profile page. All the necessary files (controllers, requests, views) are installed out of the box and all the needed routes are added to `routes/web.php`. Keep in mind that all of the features can be viewed once you login using the credentials provided above or by registering your own user. + +### Dashboard + +You can access the dashboard either by using the "**Dashboard**" link in the left sidebar or by adding **/home** in the url. + +### Profile edit + +You have the option to edit the current logged in user's profile (change name, email and password). To access this page just click the "**User profile**" link in the left sidebar or by adding **/profile** in the url. + +The `App\Htttp\Controlers\ProfileController` handles the update of the user information. + +``` +public function update(ProfileRequest $request) +{ + auth()->user()->update($request->all()); + + return back()->withStatus(__('Profile successfully updated.')); +} +``` + +Also you shouldn't worry about entering wrong data in the inputs when editing the profile, validation rules were added to prevent this (see `App\Http\Requests\ProfileRequest`). If you try to change the password you will see that other validation rules were added in `App\Http\Requests\PasswordRequest`. Notice that in this file you have a custom validation rule that can be found in `App\Rules\CurrentPasswordCheckRule`. + +``` +public function rules() +{ + return [ + 'old_password' => ['required', 'min:6', new CurrentPasswordCheckRule], + 'password' => ['required', 'min:6', 'confirmed', 'different:old_password'], + 'password_confirmation' => ['required', 'min:6'], + ]; +} +``` + +### User management + +The preset comes with a user management option out of the box. To access this click the "**User Management**" link in the left sidebar or add **/user** to the url. +The first thing you will see is the listing of the existing users. You can add new ones by clicking the "**Add user**" button (above the table on the right). On the Add user page you will see the form that allows you to do this. All pages are generate using blade templates: + +``` +
`s get reset. However, we also reset the\n// bottom margin to use `rem` units instead of `em`.\np {\n margin-top: 0;\n margin-bottom: $paragraph-margin-bottom;\n}\n\n// Abbreviations\n//\n// 1. Remove the bottom border in Firefox 39-.\n// 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari.\n// 3. Add explicit cursor to indicate changed behavior.\n// 4. Duplicate behavior to the data-* attribute for our tooltip plugin\n\nabbr[title],\nabbr[data-original-title] { // 4\n text-decoration: underline; // 2\n text-decoration: underline dotted; // 2\n cursor: help; // 3\n border-bottom: 0; // 1\n}\n\naddress {\n margin-bottom: 1rem;\n font-style: normal;\n line-height: inherit;\n}\n\nol,\nul,\ndl {\n margin-top: 0;\n margin-bottom: 1rem;\n}\n\nol ol,\nul ul,\nol ul,\nul ol {\n margin-bottom: 0;\n}\n\ndt {\n font-weight: $dt-font-weight;\n}\n\ndd {\n margin-bottom: .5rem;\n margin-left: 0; // Undo browser default\n}\n\nblockquote {\n margin: 0 0 1rem;\n}\n\ndfn {\n font-style: italic; // Add the correct font style in Android 4.3-\n}\n\n// stylelint-disable font-weight-notation\nb,\nstrong {\n font-weight: bolder; // Add the correct font weight in Chrome, Edge, and Safari\n}\n// stylelint-enable font-weight-notation\n\nsmall {\n font-size: 80%; // Add the correct font size in all browsers\n}\n\n//\n// Prevent `sub` and `sup` elements from affecting the line height in\n// all browsers.\n//\n\nsub,\nsup {\n position: relative;\n font-size: 75%;\n line-height: 0;\n vertical-align: baseline;\n}\n\nsub { bottom: -.25em; }\nsup { top: -.5em; }\n\n\n//\n// Links\n//\n\na {\n color: $link-color;\n text-decoration: $link-decoration;\n background-color: transparent; // Remove the gray background on active links in IE 10.\n -webkit-text-decoration-skip: objects; // Remove gaps in links underline in iOS 8+ and Safari 8+.\n\n @include hover {\n color: $link-hover-color;\n text-decoration: $link-hover-decoration;\n }\n}\n\n// And undo these styles for placeholder links/named anchors (without href)\n// which have not been made explicitly keyboard-focusable (without tabindex).\n// It would be more straightforward to just use a[href] in previous block, but that\n// causes specificity issues in many other styles that are too complex to fix.\n// See https://github.com/twbs/bootstrap/issues/19402\n\na:not([href]):not([tabindex]) {\n color: inherit;\n text-decoration: none;\n\n @include hover-focus {\n color: inherit;\n text-decoration: none;\n }\n\n &:focus {\n outline: 0;\n }\n}\n\n\n//\n// Code\n//\n\npre,\ncode,\nkbd,\nsamp {\n font-family: $font-family-monospace;\n font-size: 1em; // Correct the odd `em` font sizing in all browsers.\n}\n\npre {\n // Remove browser default top margin\n margin-top: 0;\n // Reset browser default of `1em` to use `rem`s\n margin-bottom: 1rem;\n // Don't allow content to break outside\n overflow: auto;\n // We have @viewport set which causes scrollbars to overlap content in IE11 and Edge, so\n // we force a non-overlapping, non-auto-hiding scrollbar to counteract.\n -ms-overflow-style: scrollbar;\n}\n\n\n//\n// Figures\n//\n\nfigure {\n // Apply a consistent margin strategy (matches our type styles).\n margin: 0 0 1rem;\n}\n\n\n//\n// Images and content\n//\n\nimg {\n vertical-align: middle;\n border-style: none; // Remove the border on images inside links in IE 10-.\n}\n\nsvg {\n // Workaround for the SVG overflow bug in IE10/11 is still required.\n // See https://github.com/twbs/bootstrap/issues/26878\n overflow: hidden;\n vertical-align: middle;\n}\n\n\n//\n// Tables\n//\n\ntable {\n border-collapse: collapse; // Prevent double borders\n}\n\ncaption {\n padding-top: $table-cell-padding;\n padding-bottom: $table-cell-padding;\n color: $table-caption-color;\n text-align: left;\n caption-side: bottom;\n}\n\nth {\n // Matches default `