fix(themes): update themes stylesheet route and remove css extension

removing the css extension prevents having the file hijacked by the web server config
This commit is contained in:
Yassine Doghri 2022-01-20 11:26:18 +00:00
parent 3ae6232585
commit e4e7e0005e
12 changed files with 13 additions and 13 deletions

View File

@ -51,8 +51,8 @@ $routes->addPlaceholder(
$routes->get('manifest.webmanifest', 'WebmanifestController', [
'as' => 'webmanifest',
]);
$routes->get('styles/themes.css', 'ColorsController', [
'as' => 'color-themes-css',
$routes->get('themes/colors', 'ColorsController', [
'as' => 'themes-colors-css',
]);
// We get a performance increase by specifying the default

View File

@ -5,7 +5,7 @@
<head>
<meta charset="utf-8">
<title>404 Page Not Found</title>
<link rel='stylesheet' type='text/css' href='<?= route_to('color-themes-css') ?>' />
<link rel='stylesheet' type='text/css' href='<?= route_to('themes-colors-css') ?>' />
<?= service('vite')->asset('styles/index.css', 'css') ?>
</head>

View File

@ -7,7 +7,7 @@
<meta name="robots" content="noindex">
<title>Whoops!</title>
<link rel='stylesheet' type='text/css' href='<?= route_to('color-themes-css') ?>' />
<link rel='stylesheet' type='text/css' href='<?= route_to('themes-colors-css') ?>' />
<?= service('vite')->asset('styles/index.css', 'css') ?>
</head>

View File

@ -14,7 +14,7 @@
<link rel="apple-touch-icon" href="<?= service('settings')->get('App.siteIcon')['180'] ?>">
<link rel="manifest" href="<?= route_to('webmanifest') ?>">
<link rel='stylesheet' type='text/css' href='<?= route_to('color-themes-css') ?>' />
<link rel='stylesheet' type='text/css' href='<?= route_to('themes-colors-css') ?>' />
<?= service('vite')
->asset('styles/index.css', 'css') ?>
<?= service('vite')

View File

@ -12,7 +12,7 @@
<link rel="icon" type="image/x-icon" href="<?= service('settings')
->get('App.siteIcon')['ico'] ?>" />
<link rel="apple-touch-icon" href="<?= service('settings')->get('App.siteIcon')['180'] ?>">
<link rel='stylesheet' type='text/css' href='<?= route_to('color-themes-css') ?>' />
<link rel='stylesheet' type='text/css' href='<?= route_to('themes-colors-css') ?>' />
<?= service('vite')
->asset('styles/index.css', 'css') ?>
<?= service('vite')

View File

@ -24,7 +24,7 @@
<?= $metatags ?>
<link rel='stylesheet' type='text/css' href='<?= route_to('color-themes-css') ?>' />
<link rel='stylesheet' type='text/css' href='<?= route_to('themes-colors-css') ?>' />
<?= service('vite')
->asset('styles/index.css', 'css') ?>
<?= service('vite')

View File

@ -27,7 +27,7 @@
<?= $metatags ?>
<link rel='stylesheet' type='text/css' href='<?= route_to('color-themes-css') ?>' />
<link rel='stylesheet' type='text/css' href='<?= route_to('themes-colors-css') ?>' />
<?= service('vite')
->asset('styles/index.css', 'css') ?>
<?= service('vite')

View File

@ -23,7 +23,7 @@
<?= $metatags ?>
<link rel='stylesheet' type='text/css' href='<?= route_to('color-themes-css') ?>' />
<link rel='stylesheet' type='text/css' href='<?= route_to('themes-colors-css') ?>' />
<?= service('vite')
->asset('styles/index.css', 'css') ?>
<?= service('vite')

View File

@ -26,7 +26,7 @@
}
</script>
<link rel='stylesheet' type='text/css' href='<?= route_to('color-themes-css') ?>' />
<link rel='stylesheet' type='text/css' href='<?= route_to('themes-colors-css') ?>' />
<?= service('vite')
->asset('styles/index.css', 'css') ?>
<?= service('vite')

View File

@ -24,7 +24,7 @@
<?= $metatags ?>
<link rel='stylesheet' type='text/css' href='<?= route_to('color-themes-css') ?>' />
<link rel='stylesheet' type='text/css' href='<?= route_to('themes-colors-css') ?>' />
<?= service('vite')
->asset('styles/index.css', 'css') ?>
<?= service('vite')

View File

@ -24,7 +24,7 @@
<?= $metatags ?>
<link rel='stylesheet' type='text/css' href='<?= route_to('color-themes-css') ?>' />
<link rel='stylesheet' type='text/css' href='<?= route_to('themes-colors-css') ?>' />
<?= service('vite')
->asset('styles/index.css', 'css') ?>
<?= service('vite')

View File

@ -22,7 +22,7 @@
<?= $metatags ?>
<link rel='stylesheet' type='text/css' href='<?= route_to('color-themes-css') ?>' />
<link rel='stylesheet' type='text/css' href='<?= route_to('themes-colors-css') ?>' />
<?= service('vite')
->asset('styles/index.css', 'css') ?>
<?= service('vite')