承接 umd-lib/umd-design-system-theme 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

umd-lib/umd-design-system-theme

Composer 安装命令:

composer require umd-lib/umd-design-system-theme

包简介

Drupal base theme provided by UMD Libraries utilizing Single Directory Components for the UMD Design System.

README 文档

README

Provided by the UMD Libraries.

Important

Please see https://github.com/umd-lib/umdlib-design-system-theme for the Libraries' continued work on this concept.

Base theme implementing the UMD Design System1 using Drupal's Single Directory Components (SDC)2.

Find currently created SDCs under /components.

Current Status

Currently developed version 1.x. All work should be done against this branch.

Installation

To install, you can either:

  • Clone this repository (main branch) into your themes directory (preferred method if you intend to develop or submit pull requests)
  • Install using composer (preferred if you plan to subtheme off this theme)
composer require umd-lib/umd-design-system-theme

See: https://packagist.org/packages/umd-lib/umd-design-system-theme

Usage

This theme can be used as a base theme or in UI configuration.

To create a new subtheme based on this theme, first create a new theme folder and set umdds as the base theme.

E.g.,

name: New Terp Theme
type: theme
description: Sub-theme of UMDDS
core_version_requirement: ^11
base theme: umdds

Sub-theme templates can then employ SDCs when displaying content3

For example, to hardcode a hero component, use the {{ include() }} or {% embed %} tag:

{{ include('umdds:umd-element-hero', {
    variant: 'minimal',
    theme: 'light',
    hero_image: 'https://www.lib.umd.edu/sites/default/files/styles/optimized/public/2022-02/McKeldin%20Library%201920x550.jpg',
    hero_image_alt: 'McKeldin Library',
    eyebrow: 'Sports News',
    hero_title: 'Maryland Wins'
    }, with_context = false)
}}

Or with field content, such as in a node.html.twig:

{{ include('umdds:umd-element-hero', {
    variant: 'minimal',
    theme: 'light',
    hero_image: {{ file_url(content.field_hero_image[0]['#media'].field_media_image.entity.uri.value | image_style('optimized')) }},
    hero_image_alt: {{ content.field_hero_image[0]['#media'].field_media_image.alt }},
    eyebrow: {{ content.field_eyebrow|field_value }},
    hero_title: {{ node.title.value }}
    }, with_context = false)
}}

Note that if overriding individual SDCs, you will want to sub-theme even if only using UI Patterns or similar. In this case, you can override individual SDCs using the replaces syntax4:

replaces: 'sdc_theme_test:my-card'

However the intention is that these components be used to site build in the UI using the UI Patterns5 module alongside Layout Builder or field configuration.

See the libraries/main branch for examples of how to override SDCs.

Upgrading Theme to Latest Design System

Because the theme comes with JS and precompiled CSS, this procedure should only be necessary when upgrading the theme for a Design System upgrade.

Design System / Tailwind CSS

To pull the node modules, run the following:

npm install

To recompile the UMDDS CSS, run the following command:

npx tailwindcss --input css/base/ui.css --output css/design-system/compiled.css

Which will evaluate src/index.css configuration and pipe the complied file to css/design-system/compiled.css.

Also copy node_modules/@universityofmaryland/web-components-library/dist/index.js to js/design-system/index.js

Footnotes

  1. https://designsystem.umd.edu/

  2. https://www.drupal.org/docs/develop/theming-drupal/using-single-directory-components/quickstart

  3. https://www.drupal.org/docs/develop/theming-drupal/using-single-directory-components/using-your-new-single-directory-component#s-using-your-component-in-twig-template

  4. https://www.drupal.org/docs/develop/theming-drupal/using-single-directory-components/creating-a-single-directory-component#s-overriding-components-provided-by-other-modules-or-themes

  5. https://www.drupal.org/project/ui_patterns

umd-lib/umd-design-system-theme 适用场景与选型建议

umd-lib/umd-design-system-theme 是一款 基于 Twig 开发的 Composer 扩展包,目前已累计 48 次下载、GitHub Stars 达 3, 最近一次更新时间为 2025 年 05 月 07 日, 在 PHP 生态内属于活跃度较高的组件。

我们在过去多个企业项目中使用过 umd-lib/umd-design-system-theme 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 umd-lib/umd-design-system-theme 我们能提供哪些服务?
定制开发 / 二次开发

基于 umd-lib/umd-design-system-theme 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 48
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 3
  • 点击次数: 22
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 3
  • Watchers: 6
  • Forks: 6
  • 开发语言: Twig

其他信息

  • 授权协议: Apache-2.0
  • 更新时间: 2025-05-07