Giter Site home page Giter Site logo

laravel-theme-installer's Introduction

Laravel Theme Installer

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

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).

Creating a theme

WIP:

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.

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.

We have defined some common ones below and welcome further community discussion on this via the issue board.

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

Child Themes

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

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

yourtheme/master.blade.php

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

laravel-theme-installer's People

Contributors

paladindev avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.