In the previous section, We understood how sub-theme is created along with inheritance of various properties.
在上一节中,我们了解了如何创建子主题以及各种属性的继承。
The list below summarizes the inheritance properties:
下面的列表 总结继承属性:
In the previous section, We understood how sub-theme is created along with inheritance of various properties.
在上一节中,我们了解了如何创建子主题以及各种属性的继承。
The list below summarizes the inheritance properties:
下面的列表 总结继承属性:
Creating sub-themes
Sub-themes are just like any other theme, with one difference: they inherit the parent theme's resources. There are no limits on the chaining capabilities connecting sub-themes to their parents. A sub-theme can be a child of another sub-theme, and it can be branched and organized however you see fit. This is what gives sub-themes great potential.
子主题 与任何其他主题一样,有一个区别:它们继承父主题的资源。将子主题连接到其父主题的链接功能没有限制。子主题可以是另一个子主题的子主题,并且可以按您认为合适的方式进行分支和组织。这正是子主题的巨大潜力所在。
Theming guide for Drupal. You can browse contributed themes or build a custom theme for your site.
Drupal主题指南。你可以 浏览贡献的主题 或者为您的站点构建自定义主题
使用.info.yml文件定义主题
Drupal主题文件夹结构
新建主题文件夹 新建info文件 添加js和css 添加regions 开启debug模式
新建templates文件夹(模板文件夹)
Bootstrap的cards提供了一个灵活的、可扩展的内容容器,其中包含多种变体和选项。
卡片是一种灵活且可扩展的内容容器。它包括页眉和页脚选项、各种内容、上下文背景颜色和强大的显示选项。如果您熟悉bootstrap3,那么卡片将取代我们的旧面板、孔和缩略图(old panels, wells, and thumbnails)。类似于这些组件的功能可以作为卡片的修改器类使用。
卡片是用尽可能少的标记和样式构建的,但是仍然能够提供大量的控制和定制。与flexbox建立,他们提供了容易的调整和混合以及与其他引导组件。默认情况下,它们没有边距,因此根据需要使用间距工具。
下面是一个混合内容和固定宽度的基本卡片示例。卡片没有固定的宽度来开始,所以它们自然会填满其父元素的整个宽度。这是很容易定制与我们的各种尺寸选择。
构思:
在网站中页面是如何布局的,内容是怎样渲染的?
一般来说,页面可以划分为若干个区域,通过在区域里放置相应的区块,来展示我们想要展示的内容
我们先来对自定义主题的页面进行分析。