2017 © Pedro Peláez
 

laravel-community-theme laravel-bootstrap

A laravel theme with Bootstrap 3.3.7 loaded from CDN.

image

paladindigital/laravel-bootstrap

A laravel theme with Bootstrap 3.3.7 loaded from CDN.

  • Tuesday, February 7, 2017
  • by PaladinDev
  • Repository
  • 0 Watchers
  • 1 Stars
  • 12 Installations
  • HTML
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

Laravel Theme: Bootstrap

Bootstrap Version: 3.3.7, (*1)

This is a base theme which can be used as-is or extended by other themes., (*2)

Installation

Add the require in your composer.json file:, (*3)

"require": {
  ...
  "paladindigital/laravel-bootstrap": "*"
}

If you dont already have the service provider registered in your config/app.php then add it also, (*4)

'providers' => [
    ...
    PaladinDigital\LaravelThemes\ServiceProvider::class,
]

Theme Usage

Laravel Support (Task Force Dev package)

If you install the taskforcedev/laravel-support package this provides the ability to set a sitewide master layout which will be used in all views., (*5)

This saves you having to set the longform view name in all page templates. Alternatively you could create your own shared data object., (*6)

Layouts

  • master: The master layout uses container-fluid css class for full-width responsive themes.
  • fixed: This layout uses the container css class which constrains page contents to a fixed width.

Yields

  • head
  • meta
  • styles
  • navigation
  • secondary_navigation
  • content
  • sidebar
  • footer

Stacks

  • widgets
  • scripts

Page Meta

The following meta tags will be populated if provided by controllers (the easiest way to do this is to create a method on your base controller to populate a shared data object then pass this along with any extra page specific data to your views)., (*7)

  • $charset : String (optional), default: UTF-8
  • $viewport : String (optional), default: width=device-width, initial-scale=1.0
  • $keywords : Array of keywords or a comma-seperated string.
  • $description : String
  • $title : Page title

The theme includes a navbar by default in the navigation section, (this can be overridden if desired)., (*8)

To add menu items to the navbar simple create an array called $menu in the format as per the example below, (*9)

$menu = [

    // Simple Links
    [
        'title' => 'Home',
        'url' => route('home')
    ],

    // Dropdowns
    [
        'title' => 'Pages',
        'links' => [
            'title' => 'SubPage',
            'url' => route('subpage.route')
        ]
    ]
];

The navbar also yields both 'navigation' and 'secondary_navigation' sections so you can also add custom html if desired., (*10)

The default navbar also uses the navbar-brand class to display your brand, so in order for this to work you should make sure your data also includes the $brand varible (if not set the page will retrieve the value from the app.name config variable)., (*11)

The Versions

07/02 2017

dev-master

9999999-dev

A laravel theme with Bootstrap 3.3.7 loaded from CDN.

  Sources   Download

MIT

The Requires

 

laravel bootstrap laravel-community-theme