Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Theme management #418

Merged
merged 17 commits into from
Oct 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
151 changes: 75 additions & 76 deletions composer.lock

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,11 @@ protected function populateAdminPages(): void
['name' => 'List activity logs', 'uri' => 'admin/activity-log', 'key' => 'admin.activity-log.index', 'resource' => 'Nova\\Dashboards\\Controllers\\ActivityLogController@index', 'layout' => 'admin', 'content_can_be_edited' => true, 'heading' => 'Activity log', 'subheading' => 'Track all user activity in Nova'],
['name' => 'View activity log', 'uri' => 'admin/activity-log/{activity}/show', 'key' => 'admin.activity-log.show', 'resource' => 'Nova\\Dashboards\\Controllers\\ActivityLogController@show', 'layout' => 'admin', 'content_can_be_edited' => true, 'heading' => 'Activity log detail'],

['name' => 'List themes', 'uri' => 'admin/themes', 'key' => 'admin.themes.index', 'resource' => 'Nova\\Themes\\Controllers\\ThemeController@index', 'layout' => 'admin'],
['name' => 'List themes', 'uri' => 'admin/themes', 'key' => 'admin.themes.index', 'resource' => 'Nova\\Themes\\Controllers\\ThemeController@index', 'layout' => 'admin', 'content_can_be_edited' => true, 'heading' => 'Themes', 'subheading' => 'Personalize your public-facing site with a custom theme'],
['name' => 'View theme', 'uri' => 'admin/themes/{theme}/show', 'key' => 'admin.themes.show', 'resource' => 'Nova\\Themes\\Controllers\\ThemeController@show', 'layout' => 'admin'],
['name' => 'Create theme', 'uri' => 'admin/themes/create', 'key' => 'admin.themes.create', 'resource' => 'Nova\\Themes\\Controllers\\ThemeController@create', 'layout' => 'admin'],
['name' => 'Create theme', 'uri' => 'admin/themes/create', 'key' => 'admin.themes.create', 'resource' => 'Nova\\Themes\\Controllers\\ThemeController@create', 'layout' => 'admin', 'content_can_be_edited' => true, 'heading' => 'Add a new theme'],
['name' => 'Store theme', 'uri' => 'admin/themes', 'key' => 'admin.themes.store', 'verb' => PageVerb::post, 'resource' => 'Nova\\Themes\\Controllers\\ThemeController@store', 'layout' => 'admin'],
['name' => 'Edit theme', 'uri' => 'admin/themes/{theme}/edit', 'key' => 'admin.themes.edit', 'resource' => 'Nova\\Themes\\Controllers\\ThemeController@edit', 'layout' => 'admin'],
['name' => 'Edit theme', 'uri' => 'admin/themes/{theme}/edit', 'key' => 'admin.themes.edit', 'resource' => 'Nova\\Themes\\Controllers\\ThemeController@edit', 'layout' => 'admin', 'content_can_be_edited' => true, 'heading' => 'Edit theme'],
['name' => 'Update theme', 'uri' => 'admin/themes/{theme}', 'key' => 'admin.themes.update', 'verb' => PageVerb::put, 'resource' => 'Nova\\Themes\\Controllers\\ThemeController@update', 'layout' => 'admin'],

['name' => 'List roles', 'uri' => 'admin/roles', 'key' => 'admin.roles.index', 'resource' => 'Nova\\Roles\\Controllers\\RoleController@index', 'layout' => 'admin', 'content_can_be_edited' => true, 'heading' => 'Roles', 'subheading' => 'Control what users can do throughout Nova'],
Expand Down
8 changes: 4 additions & 4 deletions nova/resources/views/components/button/index.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,10 @@
'border-transparent text-gray-950 [--btn-icon:theme(colors.gray.500)] hover:bg-gray-950/5 hover:[--btn-icon:theme(colors.gray.700)] active:bg-gray-950/5 active:bg-gray-950/5 active:[--btn-icon:theme(colors.gray.700)] active:[--btn-icon:theme(colors.gray.700)] dark:text-white dark:[--btn-icon:theme(colors.gray.500)] dark:hover:bg-white/10 dark:hover:[--btn-icon:theme(colors.gray.400)] dark:active:bg-white/10 dark:active:bg-white/10 dark:active:[--btn-icon:theme(colors.gray.400)] dark:active:[--btn-icon:theme(colors.gray.400)]',

match ($color) {
'primary', 'panda' => 'text-white [--btn-bg:theme(colors.primary.500)] [--btn-border:theme(colors.primary.600/80%)] [--btn-hover-overlay:theme(colors.white/10%)] [--btn-icon:theme(colors.white/60%)] hover:[--btn-icon:theme(colors.white/80%)] active:[--btn-icon:theme(colors.white/80%)]',
'danger' => 'text-white [--btn-hover-overlay:theme(colors.white/10%)] [--btn-icon:theme(colors.white/60%)] [--btn-bg:theme(colors.danger.500)] [--btn-border:theme(colors.danger.600/80%)] hover:[--btn-icon:theme(colors.white/80%)] active:[--btn-icon:theme(colors.white/80%)]',
'warning' => 'text-white [--btn-hover-overlay:theme(colors.white/10%)] [--btn-icon:theme(colors.white/60%)] [--btn-bg:theme(colors.warning.500)] [--btn-border:theme(colors.warning.600/80%)] hover:[--btn-icon:theme(colors.white/80%)] active:[--btn-icon:theme(colors.white/80%)]',
default => 'text-gray-950 [--btn-icon:theme(colors.gray.500)] [--btn-bg:white] [--btn-border:theme(colors.gray.950/10%)] [--btn-hover-overlay:theme(colors.gray.950/2.5%)] hover:[--btn-icon:theme(colors.gray.700)] hover:[--btn-border:theme(colors.gray.950/15%)] active:[--btn-icon:theme(colors.gray.700)] active:[--btn-border:theme(colors.gray.950/15%)] dark:text-white dark:[--btn-icon:theme(colors.gray.500)] dark:[--btn-bg:theme(colors.gray.800)] dark:[--btn-hover-overlay:theme(colors.white/5%)] dark:hover:[--btn-icon:theme(colors.gray.400)] dark:active:[--btn-icon:theme(colors.gray.400)]',
'primary' => 'hover:text-primary-500',
'danger' => 'hover:text-danger-500',
'warning' => 'hover:text-warning-700 dark:hover:text-warning-400',
default => 'hover:text-danger-950',
},
]),

Expand Down
37 changes: 0 additions & 37 deletions nova/resources/views/filament/tables/themes.blade.php

This file was deleted.

26 changes: 14 additions & 12 deletions nova/resources/views/pages/post-types/create.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -150,18 +150,20 @@ class="text-left text-base font-semibold text-gray-900 dark:text-white"
<x-badge color="success" x-show="enabled">Enabled</x-badge>
<x-badge color="gray" x-show="!enabled">Disabled</x-badge>

<x-icon
name="add"
size="md"
class="text-gray-400 dark:text-gray-500"
x-show="!expanded"
></x-icon>
<x-icon
name="remove"
size="md"
class="text-gray-400 dark:text-gray-500"
x-show="expanded"
></x-icon>
<div x-show="!expanded">
<x-icon
name="add"
size="md"
class="text-gray-400 dark:text-gray-500"
></x-icon>
</div>
<div x-show="expanded">
<x-icon
name="remove"
size="md"
class="text-gray-400 dark:text-gray-500"
></x-icon>
</div>
</div>
</button>
</x-spacing>
Expand Down
26 changes: 14 additions & 12 deletions nova/resources/views/pages/post-types/edit.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -138,18 +138,20 @@ class="flex w-full appearance-none items-center justify-between"
<x-badge color="success" x-show="enabled">Enabled</x-badge>
<x-badge color="gray" x-show="!enabled">Disabled</x-badge>

<x-icon
name="add"
size="md"
class="text-gray-400 dark:text-gray-500"
x-show="!expanded"
></x-icon>
<x-icon
name="remove"
size="md"
class="text-gray-400 dark:text-gray-500"
x-show="expanded"
></x-icon>
<div x-show="!expanded">
<x-icon
name="add"
size="md"
class="text-gray-400 dark:text-gray-500"
></x-icon>
</div>
<div x-show="expanded">
<x-icon
name="remove"
size="md"
class="text-gray-400 dark:text-gray-500"
></x-icon>
</div>
</div>
</button>
</x-spacing>
Expand Down
Loading
Loading