Skip to content

Commit

Permalink
Small fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
fabioassuncao committed May 16, 2023
1 parent c03b96b commit a9c3ca8
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 20 deletions.
4 changes: 2 additions & 2 deletions docs/how-it-works.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ 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": "hexadog/maestro",
"name": "prismalms/maestro",
"description": "Hexadog default theme",
"type": "laravel-theme",
"version": "1.0",
Expand All @@ -59,4 +59,4 @@ Note that `composer.json` file is **required** and must contains following data
}
}
}
```
```
6 changes: 3 additions & 3 deletions docs/usage/artisan.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,13 +63,13 @@ php artisan theme:list
## Activate Theme
Only active themes can be used at runtime.
```shell
php artisan theme:activate hexadog/default
php artisan theme:activate prismalms/default
```

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

## Clear cache
Expand All @@ -82,4 +82,4 @@ php artisan theme:cache
Generate cache
```bash
php artisan theme:cache:clear
```
```
10 changes: 5 additions & 5 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/hexadog/default/css/app.min.css
http://localhost/themes/prismalms/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/hexadog/default/css/app.min.css">
<link href="http://localhost/themes/prismalms/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/hexadog/default/js/app.min.js"></script>
<script src="http://localhost/themes/prismalms/default/js/app.min.js"></script>
```

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

:::tip Customize public theme assets path
You can customize themes public assets path with `symlink_path` configuration value (See [Public assets path](/configuration/assets)).
:::
:::
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('hexadog/my-theme');
ThemesManager::set('prismalms/my-theme');
}
}
```
14 changes: 7 additions & 7 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/hexadog/default/css/app.css -->
<x-theme-asset source="css/app.css"/> <!-- http://laravel.test/themes/prismalms/default/css/app.css -->
```

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

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

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

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

<!-- Media -->
<x-theme-style source="css/app.css" media="print"/> <!-- <link src="themes/hexadog/default/css/app.css" rel="stylehseet" media="print"> -->
```
<x-theme-style source="css/app.css" media="print"/> <!-- <link src="themes/prismalms/default/css/app.css" rel="stylehseet" media="print"> -->
```
2 changes: 1 addition & 1 deletion docs/usage/middleware.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class ThemeLoader extends HexadogThemeLoader
// Check if request url starts with admin prefix
if ($request-segment(1) === 'admin') {
// Set a specific theme for matching urls
$theme = 'hexadog/admin';
$theme = 'prismalms/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: hexadog/default)
* name can include vendor prefix (ie: prismalms/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 a9c3ca8

Please sign in to comment.