dma / dma_simple_grid
Contao 扩展,支持简单多网格
2.0.0-alpha
2024-02-07 13:16 UTC
Requires
- php: ^8.1
- contao/core-bundle: ^4.13 || ^5.0
- menatwork/contao-multicolumnwizard-bundle: ^3.6
- dev-master
- 2.0.0-alpha
- v1.1.4
- v1.1.3
- v1.1.2
- v1.1.1
- v1.1.0
- v1.1.0-BETA
- v1.0.3
- 1.0.2
- 1.0.1
- 1.0.0
- 1.0.0_rc
- dev-fix/code-style
- dev-fix/contao-5-compatibility
- dev-fix/php-8-warning
- dev-fix(/more-php-8-1-adjustments
- dev-develop
- dev-release-merge
- dev-feature/structur-dependencies-revision
- dev-feature/foundation-xy-temp
This package is auto-updated.
Last update: 2024-09-07 14:29:16 UTC
README
Contao 扩展,提供简单的网格结构支持
- 行元素(用于内容元素和表单)
- 列元素(用于内容元素和表单)
- 列宽度选择器以及偏移、拉入和推出值选择器
- Bootstrap 和 Foundation 的配置数组
依赖
https://github.com/menatwork/MultiColumnWizard
安装
- 首先需要安装扩展 MultiColumnWizard。
- 然后可以安装扩展 DMA SimpleGrid。
- 在 Contao 后台中,现在在 设置 区域有新的 Simple Grid 扩展设置选项
- 选择要使用的框架或网格系统(CSS 等文件将不会安装,因为每个人的要求都不同)
- 选择要使用的选择器
- 之后,应该在各个内容元素中提供 Select 字段,以选择相应的网格设置。
其他提示
此扩展不能做什么
- CSS 等内容不会通过此扩展引入。每个人都可以根据自己的方式将其集成到 Contao 中
- 组合网格设置不会对完整行等进行验证
- 不能表示所有网格。特别是嵌套的 Div 结构(例如在 YAML 中使用)无法实现。
扩展网格设置
默认情况下,此扩展提供了对 Contao Grid、Bootstrap 3、Bootstrap 4、Foundation 6 和 unsemantic 以及我们自己的 GoldenRatio Grid 的支持。通过自己的 config.php 文件,可以支持更多网格系统(以下为例,是 Foundation-Grid 的配置)
$GLOBALS['DMA_SIMPLEGRID_CONFIG']['foundation'] = array
(
'name' => 'Foundation',
'config' => array
(
'hasRows' => true,
'hasColumns' => true,
'hasColumnOffset' => true,
'hasColumnOffsetRight' => false,
'hasColumnPush' => true,
'hasColumnPull' => true,
'hasRowClasses' => true,
'hasColumnClasses' => true,
'row-class' => 'row',
'column-class' => 'columns',
'columns-sizes' => array('1','2','3','4','5','6','7','8','9','10','11','12'),
'columns-config' => array
(
'small' => array
(
'name' => 'small',
'column-class' => 'small-%d',
'offset-class' => 'small-offset-%d',
'push-class' => 'small-push-%d',
'pull-class' => 'small-pull-%d'
),
'medium' => array
(
'name' => 'medium',
'column-class' => 'medium-%d',
'offset-class' => 'medium-offset-%d',
'push-class' => 'medium-push-%d',
'pull-class' => 'medium-pull-%d'
),
'large' => array
(
'name' => 'large',
'column-class' => 'large-%d',
'offset-class' => 'large-offset-%d',
'push-class' => 'large-push-%d',
'pull-class' => 'large-pull-%d'
)
),
'additional-classes' => array
(
'row' => array('expanded'),
'columns' => array
(
'end' => 'end',
'small-centered' => 'small-centered',
'medium-centered' => 'medium-centered',
'large-centered' => 'large-centered'
)
)
)
);