【问题标题】:Creating a custom theme with drupal使用 drupal 创建自定义主题
【发布时间】:2020-07-30 07:22:34
【问题描述】:

我正在学习 drupal,并想为我的项目创建一个自定义主题。我按照说明创建了项目结构

iseed.info.yml

name: iSEED
type: theme
description: 'Learn to build a drupal theme'
package: Core
# version: VERSION
base theme: false

# Information added by Drupal.org packaging script on 2020-06-03
version: '1.0.0'
core_version_requirement: ^8 || ^9
project: 'drupal'
libraries:
  - iseed/app-styling
  - iseed/app-scripts

iseed.libraries.yml

app-styling:
  version: 2.x
  css:
    theme:
      css/app.css: {}
app-scripts:
  version: 2.x
  js: 
    js/app.js: {} 

css/app.css

body{
    background: red;
    margin:0 auto;
}

css/app.js

console.log("hellow owrd")

我的浏览器没有任何变化。我试图在红色和黑色之间切换背景颜色,以捕获更新的文件,但我没有看到任何变化。

【问题讨论】:

  • 你试过清除缓存吗?

标签: drupal-8


【解决方案1】:

转到路径“/admin/appearance”处的外观页面。 清除缓存后,您的自定义主题应在此处可见。选择它并将其设置为默认值。

【讨论】:

    猜你喜欢
    • 2017-12-31
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-08-30
    • 1970-01-01
    • 2023-04-01
    • 1970-01-01
    相关资源
    最近更新 更多