Skip to content
This repository was archived by the owner on Feb 28, 2021. It is now read-only.

niclasleonbock/Theme

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Konversation/Theme

simple theme support for laravel

Features

  • Automatic view resolving to override templates in themes
  • Asset management (publish assets to public or remove them, e.g. via artisan)
  • Configurable paths for base, views and public

Usage

<?php
use Konversation\Theme\ThemeProviderInterface;

class KonversationThemeProvider implements ThemeProviderInterface
{
    public function getIdentifier()
    {
        return 'niclasleonbock/konversation';
    }
    public function getName()
    {
        return 'Konversation';
    }

    public function getVersion()
    {
        return 'first one';
    }

    public function getAuthorName()
    {
        return 'niclasleonbock';
    }
    public function getAuthorEmail()
    {
        return 'me@bock.ga';
    }
    public function getAuthorWebsite()
    {
        return 'https://bock.ga/';
    }
}

Theme::register(new KonversationThemeProvider());
Theme::setTheme('niclasleonbock/konversation');

You can simply override views by placing them in app/themes/{vendor}/{name}/views (default path).

By default, assets will be copied from app/themes/{vendor}/{name}/assets/* to public/themes/{vendor}/{name} using the artisan command theme:publish-assets.

More documentation to come, so long, please refer to the source code.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages