Skip to content

Commit 380da3e

Browse files
committed
Alpha version
0 parents  commit 380da3e

24 files changed

+6682
-0
lines changed

.idea/.gitignore

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/codeStyles/codeStyleConfig.xml

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/laravel-theme-system.iml

Lines changed: 13 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/modules.xml

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/php.xml

Lines changed: 9 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/vcs.xml

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Changelog
2+
3+
All notable changes to `laravel-theme-system` will be documented in this file.
4+
5+
## 1.0.0 - 202X-XX-XX
6+
7+
- initial release

LICENSE.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
The MIT License (MIT)
2+
3+
Copyright (c) Webdevhayes <[email protected]>
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in
13+
all copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21+
THE SOFTWARE.

README.md

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
# Adds a theme system to your laravel project
2+
3+
This package allows you build your own theme system inside any laravel project.
4+
5+
**THIS IS ALPHA VERSION AND IS STILL ONGOING DEVELOPMENT**
6+
7+
## Installation
8+
9+
You can install the package via composer:
10+
11+
```bash
12+
composer require webdevhayes/laravel-theme-system
13+
```
14+
15+
You can publish and run the migrations with:
16+
17+
```bash
18+
php artisan vendor:publish --provider="Webdevhayes\LaravelThemeSystem\LaravelThemeSystemServiceProvider" --tag="migrations"
19+
php artisan migrate
20+
```
21+
22+
You can publish the views with:
23+
24+
```bash
25+
php artisan vendor:publish --provider="Webdevhayes\LaravelThemeSystem\LaravelThemeSystemServiceProvider" --tag="views"
26+
```
27+
28+
## Usage
29+
30+
Instantiate the class
31+
32+
```php
33+
$themeSystem = new LaravelThemeSystem();
34+
```
35+
36+
Get all themes
37+
38+
```php
39+
$themes = $themeSystem->getThemes();
40+
```
41+
42+
Activate a theme
43+
44+
```php
45+
$themes = $themeSystem->activateTheme('themeNameHere');
46+
```
47+
48+
49+
## Theme folder structure needs to be as follows in order to add custom themes
50+
51+
```bash
52+
resources -> views -> vendor -> laravel-theme-system -> themes -> theme name
53+
```
54+
55+
## Theme is identified by a theme.php file
56+
57+
```php
58+
/*
59+
Theme Name: My Theme Name
60+
Theme URI: https://google.com
61+
Author: the WordPress team
62+
Author URI: https://google.com
63+
Description: This is my theme
64+
Version: 1.3
65+
License: GNU General Public License v2 or later
66+
License URI: http://www.gnu.org/licenses/gpl-2.0.html
67+
*/
68+
```
69+
70+
## Theme image
71+
72+
Add a preview.png or preview.jpg to the theme folder.
73+
74+
## TODO/POSSIBLE FEATURES
75+
* Add tests
76+
* Allow custom theme path ability
77+
* Complete theme info functionality
78+
* Add exception handlers
79+
* Add theme upload/delete views
80+
* Add more usable default theme
81+
82+
## Changelog
83+
84+
Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.
85+
86+
## License
87+
88+
The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

composer.json

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
{
2+
"name": "webdevhayes/laravel-theme-system",
3+
"description": "Adds a theme system to your laravel project",
4+
"keywords": [
5+
"webdevhayes",
6+
"laravel-theme-system"
7+
],
8+
"homepage": "https://github.com/webdevhayes/laravel-theme-system",
9+
"license": "MIT",
10+
"authors": [
11+
{
12+
"name": "James",
13+
"email": "[email protected]",
14+
"homepage": "https://wptechgroup.com",
15+
"role": "Developer"
16+
}
17+
],
18+
"require": {
19+
"php": "^7.4|^8.0",
20+
"illuminate/contracts": "^8.0"
21+
},
22+
"require-dev": {
23+
"orchestra/testbench": "^6.0",
24+
"phpunit/phpunit": "^9.3"
25+
},
26+
"autoload": {
27+
"psr-4": {
28+
"Webdevhayes\\LaravelThemeSystem\\": "src",
29+
"Webdevhayes\\LaravelThemeSystem\\Database\\Factories\\": "database/factories"
30+
},
31+
"files": [
32+
"src/helpers.php"
33+
]
34+
},
35+
"autoload-dev": {
36+
"psr-4": {
37+
"Webdevhayes\\LaravelThemeSystem\\Tests\\": "tests"
38+
}
39+
},
40+
"scripts": {
41+
"psalm": "vendor/bin/psalm",
42+
"test": "vendor/bin/phpunit --colors=always",
43+
"test-coverage": "vendor/bin/phpunit --coverage-html coverage"
44+
},
45+
"config": {
46+
"sort-packages": true
47+
},
48+
"extra": {
49+
"laravel": {
50+
"providers": [
51+
"Webdevhayes\\LaravelThemeSystem\\LaravelThemeSystemServiceProvider"
52+
],
53+
"aliases": {
54+
"LaravelThemeSystem": "Webdevhayes\\LaravelThemeSystem\\LaravelThemeSystemFacade"
55+
}
56+
}
57+
},
58+
"minimum-stability": "dev",
59+
"prefer-stable": true
60+
}

0 commit comments

Comments
 (0)