Extract bootstrap code + Update favicon + Cleanup aliases (#373)

Co-authored-by: Rustam Mamadaminov <rmamdaminov@gmail.com>
This commit is contained in:
Sergei Predvoditelev
2025-08-03 09:54:42 +03:00
committed by GitHub
parent 312c69e9ef
commit b408cf7a2a
9 changed files with 16 additions and 8 deletions

View File

@@ -117,7 +117,6 @@ There are multiple pre-configured application services.
'@root' => dirname(__DIR__),
'@assets' => '@root/public/assets',
'@assetsUrl' => '/assets',
'@npm' => '@root/node_modules',
'@public' => '@root/public',
'@resources' => '@root/resources',
'@runtime' => '@root/runtime',

View File

@@ -9,7 +9,6 @@ return [
'@assetsUrl' => '@baseUrl/assets',
'@assetsSource' => '@root/assets',
'@baseUrl' => '/',
'@npm' => '@root/node_modules',
'@public' => '@root/public',
'@runtime' => '@root/runtime',
'@vendor' => '@root/vendor',

View File

@@ -4,6 +4,7 @@ declare(strict_types=1);
use App\Environment;
// NOTE: After making changes in this file, run `composer yii-config-rebuild` to update the merge plan.
return [
'config-plugin' => [
'params' => 'common/params.php',

Binary file not shown.

Before

Width:  |  Height:  |  Size: 318 B

After

Width:  |  Height:  |  Size: 629 B

1
public/favicon.svg Normal file
View File

@@ -0,0 +1 @@
<svg width="800" height="800" xmlns="http://www.w3.org/2000/svg" xml:space="preserve"><path fill="#40b3d8" d="M555.98 508.535c-5.4-71.26-28.383-117.45-39.575-143.628-11.187-26.174-28.387-50.675-28.398-50.637-.033.112-15.486 83.388-43.27 143.639-4.639 10.064-10.798 22.626-17.014 32.744l.002.001c-19.183 33.866-47.013 66.265-63.604 99.105-16.449 32.546-19.5 64.78-17.97 101.427 1.543 36.85 10.054 72.992 18.227 108.816 30.81-6.647 57.628-18.023 80.825-32.563 61.05-38.274 97.94-99.492 108.423-165.444 0 0 .511-2.678.738-5.945 4.73-50.972 3.165-67.054 1.615-87.515z"/><path fill="#83c933" d="M555.98 508.535c-5.4-71.26-28.383-117.45-39.575-143.628-11.187-26.174-28.387-50.675-28.398-50.637l-.004.018.004-.023-4.106-6.105c-90.029-126.38-262.69-189.479-408.57-130.996-7.024 88.584 34.046 241.004 183.875 283.517 60.572 18.634 109.076 13.803 168.521 29.966l-.005.005s60.424 21.058 95.576 52.638c15.813 14.202 31.646 32.891 30.851 55.121 5.01-52.906 3.405-69.091 1.83-89.876z"/><path fill="#f18a2a" clip-rule="evenodd" fill-rule="evenodd" d="M490.554 240.106c-21.289-62.282-12.267-104.016 26.68-162.096C535.807 50.299 567.88 18.156 595.988 0 709.4 71.067 751.331 203.439 709.624 326.375c-30.354 89.45-58.833 126.955-130.84 218.99 8.393-98.569-26.297-166.901-60.359-242.831-8.667-19.318-20.655-41.311-27.87-62.428"/><path fill="#7fb93c" d="M554.151 598.411c.795-22.23-15.038-40.919-30.852-55.121-35.152-31.579-95.574-52.637-95.574-52.637 6.217-10.118 12.375-22.681 17.012-32.745 27.786-60.252 43.24-143.526 43.272-143.639.011-.038 17.21 24.464 28.398 50.637 11.193 26.179 34.175 72.368 39.574 143.628 1.573 20.785 3.177 36.971-1.83 89.877z"/></svg>

After

Width:  |  Height:  |  Size: 1.6 KiB

View File

@@ -12,8 +12,7 @@ use Yiisoft\Yii\Runner\Http\HttpApplicationRunner;
$root = dirname(__DIR__);
require_once $root . '/vendor/autoload.php';
Environment::prepare();
require_once $root . '/src/autoload.php';
if (Environment::appC3()) {
$c3 = $root . '/c3.php';

View File

@@ -25,12 +25,14 @@ $this->addJsStrings($assetManager->getJsStrings());
$this->addJsVars($assetManager->getJsVars());
$this->beginPage()
?><!DOCTYPE html>
?>
<!DOCTYPE html>
<html lang="<?= Html::encode($applicationParams->locale) ?>">
<head>
<meta charset="<?= Html::encode($applicationParams->charset) ?>">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" href="<?= $aliases->get('@baseUrl/favicon.svg') ?>" type="image/svg+xml">
<title><?= Html::encode($this->getTitle()) ?></title>
<?php $this->head() ?>
</head>

9
src/autoload.php Normal file
View File

@@ -0,0 +1,9 @@
<?php
declare(strict_types=1);
use App\Environment;
require_once dirname(__DIR__) . '/vendor/autoload.php';
Environment::prepare();

4
yii
View File

@@ -6,9 +6,7 @@ declare(strict_types=1);
use App\Environment;
use Yiisoft\Yii\Runner\Console\ConsoleApplicationRunner;
require_once __DIR__ . '/vendor/autoload.php';
Environment::prepare();
require_once __DIR__ . '/src/autoload.php';
// Run console application runner
$runner = new ConsoleApplicationRunner(