【发布时间】:2019-11-29 20:07:02
【问题描述】:
我正在尝试了解如何创建 Drupal 8 自定义主题。我对此有一些疑问,我在文档或其他方面找不到真正的答案。有人可以帮帮我吗?
我用这些信息创建了一个 libraries.yml 和 theme_info.yml :
name: Cosplay Academy
type: theme
description: 'A cuddly theme that offers extra fluffiness.'
core: 8.x
libraries:
- cosplayacademy/global-styling-and-scripts
regions:
header: Header
primary_menu: 'Primary menu'
secondary_menu: 'Secondary menu'
page_top: 'Page top'
page_bottom: 'Page bottom'
highlighted: Highlighted
featured_top: 'Featured top'
breadcrumb: Breadcrumb
content: Content
sidebar_first: 'Sidebar first'
sidebar_second: 'Sidebar second'
featured_bottom_first: 'Featured bottom first'
featured_bottom_second: 'Featured bottom second'
featured_bottom_third: 'Featured bottom third'
footer_first: 'Footer first'
footer_second: 'Footer second'
footer_third: 'Footer third'
footer_fourth: 'Footer fourth'
footer_fifth: 'Footer fifth'
global-styling-and-scripts:
version: VERSION
css:
theme:
css/plugins/bootstrap.min.css: {}
css/style.css: {}
css/skin-modes.css: {}
css/icons.css: {}
css/plugins/horizontal-menu.css: {}
css/colors/color6.css: {}
我在我的 html 标记中看到我的 css 文件,但在它之前有很多 css 文件。为什么 ?我可以删除它们吗?
另外,我正在尝试将图像显示到 data-image-src 中,但它不会显示:/ 当我查看我的 html 标记并复制图像 url 时,它可以工作,我可以看到它,但我无法在我的页面中看到它...我完全迷路了:/
如下图所示,我的css文件最后加载了,我的图片没有出现……
【问题讨论】: