twigger/blade-themes

A UI framework with dynamic theme injection to dynamically change the appearance of a site

dev-develop 2021-01-15 00:58 UTC

This package is auto-updated.

Last update: 2024-04-15 08:26:18 UTC


README

A UI framework with dynamic theme injection to dynamically change the appearance of a site.

Latest Version Master branch status Develop branch status

Buy me a coffee

Contents

About

Description of the project

  • Add extra features here

Docs

First, we register all themes to a store (ThemeStore). These themes are stored in an array in the service provider.

The schemas are loaded into a schema store (SchemaStore). The config can be used to load a schema, but packages can also do it in the service provider so it doesn't have to be put into config.

We then load the requested theme (ThemeLoader). This can be set in the config, or with the useTheme method on the service provider. The loader gets the theme definition using the ThemeStore

The wanted theme definition is then loaded (ThemeStore). We get all schemas that've been registered, as all these have to be registered as components. We call Blade::component, and pass it the component name from the schema, and use the (ComponentLocator) to get the component class from the theme definition and the component name.

This tries to call the component() function on the theme definition (where component = button, tab etc). This is the theme implementation. If the theme doesn't register the function, it'll just be decided by the AbtractSchema abstract method defaultImplementation(). This will look odd/out of place with some themes, but we have to register something and schemas could be added by packages, meaning we can't ensure there's an implementation always.

We've taken care over documenting everything you'll need to get started and use Blade themes fully.

Check out the docs on our documentation site.

Contributing

Contributions are welcome! Before contributing to this project, familiarize yourself with CONTRIBUTING.md.

Roadmap

We track any requested changes through issues, so check out the issues tab to see what we're working on!

If you want to get involved in building a feature, check out the issues tab or email me!

Copyright and Licence

This package is copyright © Toby Twigger and licensed for use under the terms of the MIT License (MIT). Please see LICENCE.md for more information.

Contact

For any questions, suggestions, security vulnerabilities or help, email me directly at tobytwigger1@gmail.com