2017 © Pedro Peláez
 

library pagekit

Laravel Ui.Pages

image

shawnsandy/pagekit

Laravel Ui.Pages

  • Tuesday, September 5, 2017
  • by shawnsandy
  • Repository
  • 0 Watchers
  • 3 Stars
  • 284 Installations
  • HTML
  • 1 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 33 Versions
  • 1 % Grown

The README.md

Laravel UI.Pages (PageKit)

SensioLabsInsight Codacy Badge, (*1)

Pages (ui-pages) is a simple, easy to use drop in replacement UI for the default Laravel "Welcome Page". It provides a clean and modern set of bootstrap compatible starter pages -- Home, About, Contact and a starter admin/dashboard template. Along with a static flat file system for quickly adding and using markdown files as content. Setup, configuration and customization is quick and easy, allowing you to deploy and launch a Laravel based static marketing / promotional site in minutes so you can focus on the development., (*2)

Home Page Screen Shot

Pages Screenshot, (*3)

Admin Dashboard (Black Haze)

The dash admin will become a standalone package (deprecated), (*4)

PageKit

If you are looking for the original PageKit package you can still find it here at Pagekit Original. I have moved PageKit to and new repository and changed the name to avoid conflict with PageKit CMS. I also used the opportunity to reboot versioning to better meet semver standards. Sorry for the inconvenience, I hope you find the package useful., (*5)

Installation (traditional)

Laravel 5.5.* (later), (*6)


composer require shawnsandy/pagekit dev-master

Laravel 5.4.* (earlier), (*7)


composer require shawnsandy/pagekit

PageKitServiceProvider, (*8)

Add PageKitServiceProvider to the providers array in config/app.php, (*9)


ShawnSandy\PageKit\PageKitServiceProvider::class

Add the following (required) vendor service providers and aliases for pre-installed Laravel packages., (*10)

Vendor Service providers config/app/php, (*11)

``` php, (*12)

    Rap2hpoutre\LaravelLogViewer\LaravelLogViewerServiceProvider::class,
    JeroenG\Packager\PackagerServiceProvider::class,
    Sven\EnvProviders\EnvServiceProvider::class,
    Barryvdh\Debugbar\ServiceProvider::class,
    Brotzka\DotenvEditor\DotenvEditorServiceProvider::class,
    Laravel\Socialite\SocialiteServiceProvider::class,
    Vinkla\Shield\ShieldServiceProvider::class,

Vendor Aliases ```php 'DotenvEditor' => Brotzka\DotenvEditor\DotenvEditorFacade::class, 'Breadcrumbs' => ShawnSandy\PageKit\Facades\BreadcrumbFacade::class, 'MD' => ShawnSandy\PageKit\Facades\MarkdownFacade::class, 'Socialite' => Laravel\Socialite\Facades\Socialite::class, 'Debugbar' => Barryvdh\Debugbar\Facade::class,

If you would like to use Markdown for post, add the following to config/filesystem.php, (*13)

``` php, (*14)

    'markdown' => [
        'driver' => 'local',
        'root' => storage_path('app/public/markdown/'),
        'visibility' => 'public',
    ],

Middleware `app/Http/Kernel.php` `routeMiddlware` ```php 'shield' => \Vinkla\Shield\ShieldMiddleware::class,

__Add to your route/wep.php __, (*15)

``` php, (*16)

Route::group(["prefix" => "page"], function () { Pages::routes(); });, (*17)


__Publish the vendor files / assets__ You can publish all vendor files or simply publish the package assets (styles/js/images) **All files** ``` bash php artisan vendor:publish --provider="ShawnSandy\PageKit\PageKitServiceProvider"

Assets, (*18)

``` bash php artisan vendor:publish --tag=pagekit-assets, (*19)



__Publish tags__ You can publish individual pagekit tags using `--tags` option, *please note* that the `--pagekit-asssets` tag is required for page to display correctly. **BTW this is my preferred method of install**. ``` bash php artisan vendor:publish --provider="ShawnSandy\PageKit\PageKitServiceProvider"

or shortcut, (*20)

``` bash php artisan vendor:publish --tag=name, (*21)


**PageKit tags** * `--tag=pagekit-assets` publishes your pagekit public assets / files to `/public/` * `--tag=pagekit-views` publishes your views to `vendor\pagekit` * `--tag=pagekit-config` publishes configuration file `config\pagekit` to `config` You can also use the `--force` to overwrite previously published files - `--tag=pagekit-assets --force`. ### Install for custom/package development To customize or use the package to start your own. * Install [Laravel Packager](https://github.com/Jeroen-G/laravel-packager#laravel-packager) `composer require jeroen-g/laravel-packager`. Make sure to add the provider to your `config\app.php` provider array `JeroenG\Packager\PackagerServiceProvider::class,`. * Import the repository `php artisan packager:git https://github.com/shawnsandy/pagekit YourVendorName YourPackgeName`. This will create and download the package to `/packages/YourVendorName/YourPackageName`. It will also add your package to composer autoload parameter and add it to `config/app.php` provider array. * Customize and push to you repo * Enjoy ## Usage Once installed correctly you should be able to goto `http://yoursite.com/page` ### Default index page Replace the default *welcome* page with the PageKit index by modifying your `app/Http/route.php` ```php Route::get('/', function () { return view('welcome'); });

to, (*22)

  Route::get('', function(){
        return view('page::index');
    });

Enable dashboard in login

Pages comes database free by default, as a result your admin Dash(board) won't require any login. However you can enable statless login using the Laravel Shield package that is bundled with Pages., (*23)

Please insure the you have added the provider to your config\app.php (Vendor Providers)., (*24)


Vinkla\Shield\ShieldServiceProvider::class,

Add the middleware to the $routeMiddleware array in your Kernel.php file., (*25)


'shield' => \Vinkla\Shield\ShieldMiddleware::class,

Publish the vendor assets using the provider tag., (*26)


php artisan vendor:publish --provider="Vinkla\Shield\ShieldServiceProvider"

Using `php artisan vendor:publish' can have some unintended affects, DON'T DO IT!!!, (*27)

Run the php artisan command to generate your shield passwords php artisan shield:hash username password, (*28)

Add the password to your '/config/shield.php' file, (*29)


'users' => [ 'main' => ['$2y$10$wBoPEW4WJO5kTlzwkF4vw.hfGnImJV2kla4UALPNKhMLEoYUWDFL6', '$2y$10$kk9u9VdzoXAh/hL/sy6BFuUP.Prf/761rbuPMVhCBaXsYKgymS232'], ],

Visit Laravel Shield for more info., (*30)

Laravel .ENV editor, (*31)

Required for editing editing the settings of you .env file, (*32)

``` bash php artisan vendor:publish --provider="Brotzka\DotenvEditor\DotenvEditorServiceProvider", (*33)


__Components__ Contact From ``` php {{ Html::pageContactForm() }}

Page Nav, (*34)


{{ Html::pageNav() }}

Page Cover, (*35)


{{ Html::pageCover('/background/img', '500px') }} // background image, height

Custom Branding

You can custom brand pagekit by editing the values in the config/pagekit.php, (*36)

Turn branding on:, (*37)

    'branding' => true,

Customize :, (*38)


'brand' => [ 'background-color' => '#FFFFFF', 'header-background-color' => '#EEEEEE', 'header-font-size' => '72px', 'font-family' => '"Helvetica Neue", Helvetica, Arial, sans-serif', 'header-font-color' => '#eee', 'footer-background-color' => '#333333', 'footer-color' => '#FFFFFF', 'header-color' => '#EEEEEE', 'text-color' => 'FFFFFF', 'header-background-image' => "https://static.pexels.com/photos/129569/pexels-photo-129569-large.jpeg", 'logo' => false ]

Custom Header, (*39)


header-background-image' => "https://static.pexels.com/photos/129569/pexels-photo-129569-large.jpeg",

'Custom Header Background', (*40)

TODO

..., (*41)

Contributing

Fork it! Create your feature branch: git checkout -b my-new-feature Commit your changes: git commit -am 'Add some feature' Push to the branch: git push origin my-new-feature Submit a pull request :D History, (*42)

Change Log

v.1.0.1, (*43)

Renamed the package and mover the repository, (*44)

Pagekit Changelog, (*45)

License

TODO: Modify licence.md, (*46)

This project is licensed under the MIT License - see the LICENSE.md file for details, (*47)

The Versions

11/05 2017
12/04 2017