cu-boulder / ucb2021_base
此包已废弃,不再维护。未建议替代包。
CU Boulder 2021 基础主题
dev-main
2022-08-03 21:43 UTC
This package is auto-updated.
Last update: 2024-03-01 00:21:11 UTC
README
CU Boulder 网站属性的 Drupal 9 基础主题
安装
将以下内容添加到 composer.json
的 require 部分
"cu-boulder/ucb2021_base" : "dev-main"
添加到 repositories 部分
{
"type": "git",
"url" : "https://github.com/CuBoulder/ucb2021_base.git"
}
注意:此主题与配置文件一起安装并设置为默认主题。该主题不打算在不使用配置文件或其他 cu-boulder/*
模块的情况下使用。
要安装 Nextpress 的本地版本,请按照 nextpress-project-template 中概述的步骤进行。
主题选项
在 /admin/appearance/settings/ucb2021_base
下,您可以管理各种主题设置。
- 在
ucb2021_base.settings.yml
中设置主题的默认值。 - 在 ucb2021_base.theme 中的
hook_system_theme_settings_alter
添加更多主题设置。
代码检查
我们使用 stylelint 和 eslint
npm install # install linters
npm run stylelint # lint css
npm run eslint # lint js
代码检查会在所有拉取请求上自动运行,但您也可以在本地运行代码检查。
- 在
.eslintrc.json
中配置 eslint - 在
.stylelint.json
中配置 styleint
目录结构
.github 目录
包含代码检查的 github actions 工作流程
config
包含主题设置的默认值。如果添加了新的主题设置,请更新 ucb2021_base.settings.yml 以包含默认值。您可以通过运行 lando drush config-get ucb2021_base.settings
并将输出复制到文件中获取配置。
css
- 将与自定义段落相关的样式放在 css/paragraphs 中
- 将来自样式指南的样式放在 css/styleguide 中
js
在此处放置 JavaScript 文件
templates
将 Twig 模板覆盖放在此处,包括自定义页面和段落类型的模板。针对页面和段落类型的包应仅包含配置。
ucb2021_base.info.yml
- 定义区域
- 向 ckeditor 添加样式
- 添加全局包含库
ucb2021_base.libraries.yml
定义库
ucb2021_base.theme
添加主题钩子
ucb2021_base.breakpoints.yml
此文件由 Breakpoint 和 Responsive Image 模块使用。这些模块用于使文本编辑器中插入的图片具有响应性。