2017 © Pedro Peláez
 

composer-plugin laravel-theme-installer

Laravel Theme Installer Plugin

image

paladindigital/laravel-theme-installer

Laravel Theme Installer Plugin

  • Monday, February 6, 2017
  • by PaladinDev
  • Repository
  • 0 Watchers
  • 0 Stars
  • 13 Installations
  • PHP
  • 4 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 8 % Grown

The README.md

Laravel Theme Installer

This packages enables themes to be installed using composer - in a consistant place seperate from an applications view directory., (*1)

Themes installed using this installer package creates a themes folder within the resources folder and thus can be used regardless of which actual laravel version is used (some laravel versions may need to add additional loading configuration for this path, eg. Laravel 4)., (*2)

Creating a theme

WIP:, (*3)

Composer.json

{
  "name": "yournamespace/laravel-{themename}",
  "type": "laravel-community-theme",
  "require": {
    "paladindigital/laravel-theme-installer": "dev-master"
    "paladindigital/laravel-theme-loader": "dev-master"
  }
}

Slots, Yields

In order to enable user switching of themes they should use a consistent set of yields, slots and if applicable components., (*4)

This idea is inspired by wordpress hooks, laravel community themes should create standardised area's to allow custom 'plugins' to also interact with the theme., (*5)

We have defined some common ones below and welcome further community discussion on this via the issue board., (*6)

Yields

  • head
  • meta
  • styles
  • navigation (The themes primary navigation area)
  • secondary_navigation (Optional: May not be used on all themes, in which case output should be along side the primary navigation).
  • content
  • footer
  • sidebar (Optional: Again, some themes may not have a sidebar as such, however they should still yield the content somewhere.)
  • widgets
  • scripts (Scripts which are usually output before the closing body tag.)

Components

TODO, (*7)

Child Themes

Since themes should be developed using Blade templates, child themes can easily be created by simply extending the master theme., (*8)

For example if you want to use the PaladinDigital Bootstrap template as a base simply create your master layout like so, (*9)

yourtheme/master.blade.php, (*10)

@extends('themes::paladindigital.laravel-bootstrap.master') 

The Versions

06/02 2017

dev-master

9999999-dev

Laravel Theme Installer Plugin

  Sources   Download

The Requires

  • composer-plugin-api ^1.0