-
Notifications
You must be signed in to change notification settings - Fork 4
5. Theming
Ryan Winchester edited this page Apr 8, 2016
·
4 revisions
The easiest thing to do would be to copy an existing theme, like the default clean-creative
theme. To do this, just copy resources/views/themes/clean-creative
to resources/views/themes/my-new-theme
.
Then, in the Settings menu of the admin dashboard change the theme to your new theme.
Installing a theme using the packagist name (e.g. vendor/theme
):
php artisan flashtag:install-theme vendor/theme
To make your own theme from scratch id pretty simple.
Add theme.php
<?php
return [
'name' => 'clean-creative',
'version' => '0.0.1',
'views' => __DIR__.'/views',
'assets' => __DIR__.'/assets',
];
required blade views | variables available |
---|---|
home | |
posts.index | Collection $posts |
posts.show | Post $post |
posts.category | Category $category, Collection $posts |
posts.tag | Tag $tag, Collection $posts |
posts.author | Author $author, Collection $posts |
pages.default-page | Page $page |
Fork and edit the example repo.
Make sure you edit theme.php
and composer.json
!
Make a packagist package out of it.