Skip to content

Commit

Permalink
Updated docs
Browse files Browse the repository at this point in the history
  • Loading branch information
fabioassuncao committed May 16, 2023
1 parent 643c59a commit 275f6d9
Show file tree
Hide file tree
Showing 9 changed files with 26 additions and 26 deletions.
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ This Code of Conduct applies both within project spaces and in public spaces whe

### Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at `gaetan@hexadog.com`. All
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at `fabio23gt@gmail.com`. All
complaints will be reviewed and investigated and will result in a response that is deemed necessary and appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident.
Further details of specific enforcement policies may be posted separately.

Expand Down
4 changes: 2 additions & 2 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions docs/how-it-works.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,15 @@ Best way to create a new Theme is to use `theme:make` artisan command. See [here
Note that `composer.json` file is **required** and must contains following data (here is an example for a theme named __maestro__):
```json
{
"name": "prismalms/maestro",
"description": "Hexadog default theme",
"name": "codions/astra",
"description": "Codions default theme",
"type": "laravel-theme",
"version": "1.0",
"minimum-stability": "stable",
"authors": [
{
"name": "Gaetan",
"email": "gaetan@hexadog.com"
"name": "Fábio Assunção",
"email": "fabio23gt@gmail.com"
}
],
"extra": {
Expand Down
8 changes: 4 additions & 4 deletions docs/usage/artisan.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,21 +55,21 @@ php artisan theme:list
+-----------+---------+---------+------------------------+-----------+---------+--------+
| Name | Vendor | Version | Description | Extends | Default | Active |
+-----------+---------+---------+------------------------+-----------+---------+--------+
| theme-one | hexadog | 1.0 | Default frontend theme | | X | Yes |
| theme-two | hexadog | 1.0 | New frontend theme | theme-one | | Yes |
| theme-one | codions | 1.0 | Default frontend theme | | X | Yes |
| theme-two | codions | 1.0 | New frontend theme | theme-one | | Yes |
+-----------+---------+---------+------------------------+-----------+---------+--------+
```

## Activate Theme
Only active themes can be used at runtime.
```shell
php artisan theme:activate prismalms/default
php artisan theme:activate codions/default
```

## Deactivate Theme
Deactivated theme to make it unavailable for usage.
```shell
php artisan theme:deactivate prismalms/default
php artisan theme:deactivate codions/default
```

## Clear cache
Expand Down
8 changes: 4 additions & 4 deletions docs/usage/assets.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Ask the **Themes Manager** to generate an asset URL:

This call will return the url of requested asset:
```
http://localhost/themes/prismalms/default/css/app.min.css
http://localhost/themes/codions/default/css/app.min.css
```

## Theme Style
Expand All @@ -29,7 +29,7 @@ Ask the **Themes Manager** to generate the stylesheet HTML tag:

This call will generate the following code:
```html
<link href="http://localhost/themes/prismalms/default/css/app.min.css">
<link href="http://localhost/themes/codions/default/css/app.min.css">
```

## Theme Script
Expand All @@ -43,7 +43,7 @@ Ask the **Themes Manager** to generate the script HTML tag:

This call will generate the following code:
```html
<script src="http://localhost/themes/prismalms/default/js/app.min.js"></script>
<script src="http://localhost/themes/codions/default/js/app.min.js"></script>
```

## Theme Image
Expand All @@ -56,7 +56,7 @@ Ask the **Themes Manager** to generate the image HTML tag:
```
This call will generate the following code:
```html
<img src="http://localhost/themes/prismalms/default/img/logo.png" alt="My Theme logo" />
<img src="http://localhost/themes/codions/default/img/logo.png" alt="My Theme logo" />
```

:::tip Customize public theme assets path
Expand Down
2 changes: 1 addition & 1 deletion docs/usage/basic.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class MyController extends Controller

// Specify theme name with vendor
// in case multiple themes with same name are provided by multiple vendor
ThemesManager::set('prismalms/my-theme');
ThemesManager::set('codions/my-theme');
}
}
```
12 changes: 6 additions & 6 deletions docs/usage/components.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,26 +17,26 @@ Clean up you theme layouts with our integrated Blade Components.

## Theme Asset
```html
<x-theme-asset source="css/app.css"/> <!-- http://laravel.test/themes/prismalms/default/css/app.css -->
<x-theme-asset source="css/app.css"/> <!-- http://laravel.test/themes/codions/default/css/app.css -->
```

## Theme Image
```html
<x-theme-image source="img/logo.png"/> <!-- <img src="http://laravel.test/themes/prismalms/default/img/logo.png" /> -->
<x-theme-image source="img/logo.png"/> <!-- <img src="http://laravel.test/themes/codions/default/img/logo.png" /> -->

<!-- Add any HTML attribute -->
<x-theme-image source="img/logo.png" class="image" alt="Logo" /> <!-- <img src="themes/prismalms/default/img/logo.png" class="image" alt="logo" /> -->
<x-theme-image source="img/logo.png" class="image" alt="Logo" /> <!-- <img src="themes/codions/default/img/logo.png" class="image" alt="logo" /> -->
```

## Theme Script
```html
<x-theme-script source="css/app.css"/> <!-- http://laravel.test/themes/prismalms/default/css/app.css -->
<x-theme-script source="css/app.css"/> <!-- http://laravel.test/themes/codions/default/css/app.css -->
```

## Theme Style
```html
<x-theme-style source="css/app.css"/> <!-- <link src="http://laravel.test/themes/prismalms/default/css/app.css" rel="stylehseet"> -->
<x-theme-style source="css/app.css"/> <!-- <link src="http://laravel.test/themes/codions/default/css/app.css" rel="stylehseet"> -->

<!-- Media -->
<x-theme-style source="css/app.css" media="print"/> <!-- <link src="themes/prismalms/default/css/app.css" rel="stylehseet" media="print"> -->
<x-theme-style source="css/app.css" media="print"/> <!-- <link src="themes/codions/default/css/app.css" rel="stylehseet" media="print"> -->
```
6 changes: 3 additions & 3 deletions docs/usage/middleware.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,16 @@ Here is an example of middleware which set a theme based on the request url. It
namespace App\Http\Middleware;

use Closure;
use Codions\ThemesManager\Http\Middleware\ThemeLoader as HexadogThemeLoader;
use Codions\ThemesManager\Http\Middleware\ThemeLoader as CodionsThemeLoader;

class ThemeLoader extends HexadogThemeLoader
class ThemeLoader extends CodionsThemeLoader
{
public function handle($request, Closure $next, $theme = null)
{
// Check if request url starts with admin prefix
if ($request-segment(1) === 'admin') {
// Set a specific theme for matching urls
$theme = 'prismalms/admin';
$theme = 'codions/admin';
}

// Call parent Middleware handle method
Expand Down
2 changes: 1 addition & 1 deletion src/ThemesManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ public function url(string $asset, bool $absolute = true): ?string

/**
* Find a theme by given name and vendor (optional)
* name can include vendor prefix (ie: prismalms/default)
* name can include vendor prefix (ie: codions/default)
* If no vendor provided and name not prefixed by vendor
* the first theme with given name is returned.
*/
Expand Down

0 comments on commit 275f6d9

Please sign in to comment.