【发布时间】:2021-08-06 12:52:14
【问题描述】:
我正在学习 Web 开发,我正在尝试在现有 Symfony 5.3 项目中使用 COREui 4.0.1 Bootstrap 管理模板,而不是标准的 Bootstrap 5 组件和实用程序。我试图让页面看起来像https://coreui.io/demo/free/3.4.0/。
项目是使用symfony new my_project_name --full 创建的。我在我的 base.html.twig 中添加了带有 https://getbootstrap.com/docs/5.0/getting-started/introduction/#css 的 Bootstrap CSS 和带有 https://getbootstrap.com/docs/5.0/getting-started/introduction/#bundle 的 JS。
我采取的步骤:
- 创建新控制器
- 使用树枝模板创建关联视图
- 在我的 base.html.twig 中将 Bootstrap JS 替换为 https://coreui.io/docs/4.0/getting-started/introduction/#bundle,并将 CSS 替换为 https://coreui.io/docs/4.0/getting-started/introduction/#css
我所期待的:
- 访问控制器/视图时,我会看到https://coreui.io/demo/free/3.4.0/
实际结果:
- 较小的样式更改(来自 COREui,而不是原始 Bootstrap),但没有布局更改
【问题讨论】:
标签: css symfony templates bootstrap-5