Included
* Standardised all six theme.json files to manifest version 2:
* admin
* common
* corporate
* saasland
* swiss
* welcome
* Every manifest now uses the same fields and structure.
* Separate active frontend and backend themes.
* One-click theme activation.
* Theme preview in a new browser tab without activating it.
* Theme cards showing:
* Preview
* Name
* Version
* Author
* Description
* Theme type
* Active status
* Dynamic theme-specific settings.
* Support for:
* Text
* URL
* Colour
* Textarea
* Checkbox fields
* Variants
* Appearance
* Accent palettes
* Theme ZIP installation.
* Theme ZIP export.
* Asset optimisation.
* Accessibility validation.
* Safe ZIP path validation.
* Theme inheritance.
* Active themes cannot be uninstalled.
* Parent themes cannot be uninstalled while child themes depend on them.
* Stylist administration routes now require an authenticated, verified user.
* Manifest validation now restricts theme types to:
* frontend
* backend
* common
* Added activation tests for independent frontend and backend theme selection.
The supplied corporate theme was incomplete, so I added the required backend entry view and placeholder asset files while preserving its supplied layout.
18 lines
1.1 KiB
PHP
18 lines
1.1 KiB
PHP
<?php
|
|
|
|
use Illuminate\Support\Facades\Route;
|
|
use Modules\Stylist\Http\Controllers\StylistController;
|
|
use Modules\Stylist\Http\Controllers\ThemeManagementController;
|
|
|
|
Route::middleware(['auth', 'verified'])->group(function (): void {
|
|
Route::get('/', StylistController::class)->name('index');
|
|
Route::post('/install', [ThemeManagementController::class, 'install'])->name('install');
|
|
Route::put('/{theme}/settings', [ThemeManagementController::class, 'settings'])->name('settings');
|
|
Route::post('/{theme}/activate', [ThemeManagementController::class, 'activate'])->name('activate');
|
|
Route::get('/{theme}/preview', [ThemeManagementController::class, 'preview'])->name('preview');
|
|
Route::delete('/{theme}', [ThemeManagementController::class, 'uninstall'])->name('uninstall');
|
|
Route::get('/{theme}/export', [ThemeManagementController::class, 'export'])->name('export');
|
|
Route::post('/{theme}/optimize', [ThemeManagementController::class, 'optimize'])->name('optimize');
|
|
Route::get('/{theme}/accessibility', [ThemeManagementController::class, 'validateTheme'])->name('accessibility');
|
|
});
|