{"id":23861632,"url":"https://github.com/umd-lib/umd-design-system-theme","last_synced_at":"2025-07-19T06:32:42.961Z","repository":{"id":270745233,"uuid":"906386153","full_name":"umd-lib/umd-design-system-theme","owner":"umd-lib","description":"Drupal 11+ base theme developed for the UMD Design System. This is a community project.","archived":false,"fork":false,"pushed_at":"2025-05-09T10:40:53.000Z","size":5074,"stargazers_count":3,"open_issues_count":5,"forks_count":2,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-06-09T00:31:49.569Z","etag":null,"topics":["drupal","rnd"],"latest_commit_sha":null,"homepage":"","language":"Twig","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/umd-lib.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-12-20T19:35:38.000Z","updated_at":"2025-05-22T17:25:50.000Z","dependencies_parsed_at":"2025-01-02T20:23:17.425Z","dependency_job_id":"5d5a2489-ded6-45e7-a68c-4c971ae9d8c8","html_url":"https://github.com/umd-lib/umd-design-system-theme","commit_stats":null,"previous_names":["umd-lib/umd-design-system-theme"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/umd-lib%2Fumd-design-system-theme","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/umd-lib%2Fumd-design-system-theme/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/umd-lib%2Fumd-design-system-theme/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/umd-lib%2Fumd-design-system-theme/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/umd-lib","download_url":"https://codeload.github.com/umd-lib/umd-design-system-theme/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/umd-lib%2Fumd-design-system-theme/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259048338,"owners_count":22797712,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["drupal","rnd"],"created_at":"2025-01-03T06:56:25.460Z","updated_at":"2025-06-10T09:33:26.688Z","avatar_url":"https://github.com/umd-lib.png","language":"Twig","funding_links":[],"categories":[],"sub_categories":[],"readme":"# (Base) UMD Libraries Design System Drupal Theme\n\nBase theme implementing the UMD Design System[^1] using Drupal's\nSingle Directory Components (SDC)[^2].\n\nFind currently created SDCs under /components.\n\n[^1]: \u003chttps://designsystem.umd.edu/\u003e\n[^2]: \u003chttps://www.drupal.org/docs/develop/theming-drupal/using-single-directory-components/quickstart\u003e\n\n## Current Status\n\nMost (but not all) components are implemented and ready to use, but development\ncontinues. Not every component is tested, so if you encounter issues\nconsider fixing it and submitting a fix as a pull request or in an Issue comment\nso that everyone can benefit from the fix.\n\nWe hope that this will become a widely used base theme around the UMD campus\nwith different organizations extending it as needed.\n\n## Installation\n\nTo install, you can either:\n\n* Clone this repository (main branch) into your themes directory (preferred method if you intend to develop or submit pull requests)\n* Install using composer (preferred if you plan to subtheme off this theme)\n\n```bash\ncomposer require umd-lib/umd-design-system-theme\n```\n\nSee: https://packagist.org/packages/umd-lib/umd-design-system-theme\n\n## Usage\n\nThis theme can be used as a base theme or in UI configuration.\n\nTo create a new subtheme based on this theme, first create a new theme folder\nand set umdds as the *base theme*.\n\nE.g.,\n\n```YAML\nname: New Terp Theme\ntype: theme\ndescription: Sub-theme of UMDDS\ncore_version_requirement: ^11\nbase theme: umdds\n```\n\nSub-theme templates can then employ SDCs when displaying content[^3]\n\nFor example, to hardcode a hero component, use the {{ include() }} or {% embed %} tag:\n\n```twig\n{{ include('umdds:umd-element-hero', {\n    variant: 'minimal',\n    theme: 'light',\n    hero_image: 'https://www.lib.umd.edu/sites/default/files/styles/optimized/public/2022-02/McKeldin%20Library%201920x550.jpg',\n    hero_image_alt: 'McKeldin Library',\n    eyebrow: 'Sports News',\n    hero_title: 'Maryland Wins'\n    }, with_context = false)\n}}\n```\n\nOr with field content, such as in a node.html.twig:\n\n```twig\n{{ include('umdds:umd-element-hero', {\n    variant: 'minimal',\n    theme: 'light',\n    hero_image: {{ file_url(content.field_hero_image[0]['#media'].field_media_image.entity.uri.value | image_style('optimized')) }},\n    hero_image_alt: {{ content.field_hero_image[0]['#media'].field_media_image.alt }},\n    eyebrow: {{ content.field_eyebrow|field_value }},\n    hero_title: {{ node.title.value }}\n    }, with_context = false)\n}}\n```\n\nNote that if overriding individual SDCs, you will want to sub-theme even if only\nusing UI Patterns or similar. In this case, you can override individual SDCs\nusing the _replaces_ syntax[^5]:\n\n```YAML\nreplaces: 'sdc_theme_test:my-card'\n```\n\nHowever the intention is that these components be used to site build in the UI\nusing the UI Patterns[^4] module alongside Layout Builder or field configuration.\n\nSee the [libraries/main](https://github.com/umd-lib/umd-design-system-theme/tree/libraries/main)\nbranch for examples of how to override SDCs.\n\n## Upgrading Theme to Latest Design System\n\nBecause the theme comes with JS and precompiled CSS, this procedure should only be\nnecessary when upgrading the theme for a Design System upgrade.\n\n### Design System / Tailwind CSS\n\nTo pull the node modules, run the following:\n\n```bash\nnpm install\n```\n\nTo recompile the UMDDS CSS, run the following command:\n\n```bash\nnpx tailwindcss --input css/base/ui.css --output css/design-system/compiled.css\n```\n\nWhich will evaluate src/index.css configuration and pipe the complied file\nto css/design-system/compiled.css.\n\nAlso copy node_modules/@universityofmaryland/web-components-library/dist/index.js\nto js/design-system/index.js\n\n[^3]: \u003chttps://www.drupal.org/docs/develop/theming-drupal/using-single-directory-components/using-your-new-single-directory-component#s-using-your-component-in-twig-template\u003e\n[^4]: \u003chttps://www.drupal.org/project/ui_patterns\u003e\n[^5]: \u003chttps://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\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fumd-lib%2Fumd-design-system-theme","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fumd-lib%2Fumd-design-system-theme","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fumd-lib%2Fumd-design-system-theme/lists"}