cu-boulder/boulder_base

科罗拉多大学博尔德分校基础主题

安装数: 17,406

依赖项: 0

建议者: 0

安全: 0

星标: 3

关注者: 4

分支: 0

开放问题: 43

语言:CSS

类型:drupal-custom-theme


README

CU Boulder 网站属性用于 Drupal 10+ 的基础主题

安装

将以下内容添加到 composer.json 的 require 部分

"cu-boulder/boulder_base" : "dev-main"

将以下内容添加到 repositories 部分

{
    "type": "git",
    "url" : "https://github.com/CuBoulder/tiamat-theme.git"
}

注意:此主题在配置文件中安装并设置为默认主题。此主题不打算在不使用配置文件或其他 cu-boulder/* 模块的情况下使用。

要安装 Nextpress 的本地版本,请按照tiamat-project-template 中的步骤进行。

主题选项

/admin/appearance/settings/... 下,您可以管理各种主题设置。

  • boulder_base.settings.yml 中设置主题的默认值
  • boulder_base.themehook_system_theme_settings_alter 中添加更多主题设置。

代码风格检查

我们使用 stylelint 和 eslint 进行代码风格检查。

npm install          # install linters
npm run stylelint    # lint css
npm run eslint       # lint js

代码风格检查在所有 pull request 上自动运行,但您也可以在本地运行代码风格检查。

  • .eslintrc.json 中配置 eslint。
  • .stylelint.json 中配置 stylelint。

目录结构

.github 目录

包含代码风格检查的 github actions 工作流程。

config

包含主题设置的默认值。如果添加了新的主题设置,请使用默认值更新 boulder_base.settings.yml。您可以通过运行 lando drush config-get boulder_base.settings 并将输出复制到文件中来获取配置。

css

  • 将与自定义段落相关的样式放在 css/paragraphs 中。
  • 将来自风格指南的样式放在 css/styleguide 中。

js

将 JavaScript 文件放在这里。

templates

将 Twig 模板覆盖放在这里,包括自定义页面和段落类型。针对页面和段落类型的专用包应仅包含配置。

boulder_base.info.yml

  • 定义区域
  • 向 ckeditor 添加样式
  • 添加全局包含库

boulder_base.libraries.yml

定义库

boulder_base.theme

添加主题钩子

boulder_base.breakpoints.yml

此文件由 Breakpoint 和 Responsive Image 模块使用。这些模块用于使通过文本编辑器插入的图片具有响应性。