anovsiradj / yii2-theme-mazer
2.1.4
2023-10-08 10:57 UTC
Requires
- php: >=7
- yiisoft/yii2: *
- yiisoft/yii2-bootstrap5: *
- dev-dev
- 2.1.4
- 2.1.3
- 2.0.0
- 1.0.1
- 1.0.0
- dev-dependabot/npm_and_yarn/follow-redirects-1.15.4
- dev-dependabot/npm_and_yarn/sass-1.69.7
- dev-dependabot/npm_and_yarn/mazer-980f8b3
- dev-dependabot/npm_and_yarn/tinymce-6.7.3
- dev-dependabot/npm_and_yarn/browserify-sign-4.2.2
- dev-dependabot/npm_and_yarn/babel/traverse-7.23.2
- dev-dependabot/npm_and_yarn/webpack-5.89.0
This package is auto-updated.
Last update: 2024-09-11 04:14:31 UTC
README
依赖项
php: >=7
yii2: *
yii2-bootstrap5: *
用法
该主题具有2种布局选项,mainx
(水平)和mainy
(垂直)。
'layout' => 'mainy', // or 'mainx' 'components' => [ 'assetManager' => [ 'forceCopy' => !YII_ENV_PROD, 'linkAssets' => true, 'appendTimestamp' => true, ], 'view' => [ 'theme' => [ 'pathMap' => [ '@app/views' => [ '@app/views', '@vendor/anovsiradj/yii2-theme-mazer/views', ], ], ], ], ],
默认使用暗色主题,要使用浅色主题,只需这样做
'assetManager' => [ 'bundles' => [ \yii2\theme\mazer\MainAsset::class => [ 'css' => [ 'app.min.css', ], ], ], ],
要覆盖视图,将 ./vendor/anovsiradj/yii2-theme-mazer/views
下的文件复制并粘贴(copas)到 ./views/
。
例如,覆盖 main_sidebar.php
。将 ./vendor/anovsiradj/yii2-theme-mazer/views/main_sidebar.php
复制粘贴到 ./views/main_sidebar.php
。
开发
# clone this repo git clone ... # create fresh yii2-app-basic for testing composer create-project --prefer-dist yiisoft/yii2-app-basic cd yii2-theme-mazer npm install # npm update --save-dev --dev # must in this order, cause webpack-mix is broken. npm run prod npm run test # create a release git tag 1.0.0 git push origin dev git push --tags
将此添加到 ./config/web.php
[ 'controllerMap' => [ 'mazer' => \yii2\theme\mazer\TestController::class, ], ]
将此添加到 ./composer.json
"repositories": [
{
"type": "path",
"url": "../yii2-theme-mazer",
"options": {
"symlink": true
}
}
]
然后访问 localhost/yii2-app-basic/mazer/index