sylius/bootstrap-theme

Sylius的Bootstrap主题

安装次数: 178,166

依赖者: 0

建议者: 0

安全性: 0

星标: 94

关注者: 14

分支: 56

开放问题: 3

语言:Twig

类型:sylius-plugin


README

SyliusBootstrapTheme

Sylius Bootstrap主题,基于Webpack Encore构建过程。

预览

主页

 
画廊

检出

画廊

产品

画廊

购物车

画廊

用户账户

画廊

安装

安装主题有两种方式。可以复制文件到themes/,或者将此包作为composer依赖项添加并创建子主题。以下说明针对在主题文件夹中安装。

Composer安装

作为composer依赖项安装的说明在这里

composer require sylius/bootstrap-theme:1.12

手动安装

1. 将存储库中的文件复制到./themes/BootstrapTheme

要复制的文件/文件夹

  • assets
  • templates
  • composer.json
  • webpack.config.js

2. 安装node依赖项

yarn install
yarn add bootstrap@^5.3 @fortawesome/fontawesome-free@^6.4.2 lightbox axios @popperjs/core@^2.11 glightbox

3. 在您的./webpack.config.js中导入bootstrap-theme配置

+ const bootstrapTheme = require('./themes/BootstrapTheme/webpack.config');

// ...

- module.exports = [shopConfig, adminConfig, appShopConfig, appAdminConfig];
+ module.exports = [shopConfig, adminConfig, appShopConfig, appAdminConfig, bootstrapTheme];

4. 编辑项目配置

# ./config/packages/assets.yaml

framework:
    assets:
        packages:
+            bootstrapTheme:
+                json_manifest_path: '%kernel.project_dir%/public/themes/bootstrap-theme/manifest.json'
# ./config/packages/webpack_encore.yaml

webpack_encore:
    output_path: '%kernel.project_dir%/public/build'
    builds:
+        bootstrapTheme: '%kernel.project_dir%/public/themes/bootstrap-theme'

5. 构建资源

# compile assets once
yarn dev

# recompile assets automatically when files change
yarn watch

# create a production build
yarn build

6. 在管理面板中更改主题

  1. 转到配置 > 渠道
  2. 从列表中编辑所需的渠道
  3. 转到外观 > 主题部分
  4. 将主题更改为Sylius Bootstrap主题

贡献

快速开始安装

本地主机

此命令将安装所选版本的Sylius和Bootstrap主题及其配置。您只需在管理面板中按上述方式激活主题即可。

ℹ️ 要设置插件数据库,请记住在install/Application/.env.local和/或install/Application/.env.test.local中配置数据库凭证。

$ make install -e SYLIUS_VERSION=XX SYMFONY_VERSION=YY PHP_VERSION=ZZ

默认值:XX=1.12.0,YY=6.3,ZZ=8.2

ℹ️ 要重置(删除数据库和文件)测试环境

$ make reset