fatmedia/govuk-drupal-theme
Composer 安装命令:
composer require fatmedia/govuk-drupal-theme
包简介
A base Drupal theme using GovUK framework
README 文档
README
Intro
This is a custom Drupal theme which uses gov.uk framework. It's meant to be used as a base (parent) theme for custom themes based on the gov.uk framework.
This theme pulls gov.uk framework stylesheets, scripts and assets, and provides styling and templates for default elements and components (see 'Included elements and components' list below).
Prerequisites
This theme assumes that you have:
- Node >= 24 - this theme was successfully tested using version 24.14.1
- NPM (Node Package Manager) >= 11 - this theme was successfully tested using version 11.1.0
QuickStart
To work on this theme, first you'll need to install all required packages for the theme:
$ npm install
This installs all required packages for the theme, including the gov.uk framework (node_modules/govuk-frontend)
Build tasks
Compile everything:
$ npm run build
Compile CSS:
$ npm run scss
Compile JS:
$ npm run js
Updating GOV.uk framework
In order to update gov.uk framework, you need to update the govuk-frontend package (change its version in
theme's package.json file, and run npm install).
Check release notes for the new version of the gov.uk framework, to see if there are any breaking changes.
If necessary, update SCSS imports in src/scss/_base-imports.scss file.
And recompile the theme:
$ npm run build
Included elements and components
Base elements
- headings
- lists (ol, ul)
- paragraphs
- blockquotes
- links
- tables
Form elements
- text
- date
- password
- file upload
- select
- textarea
- radio
- radios
- checkbox
- checkboxes
- fieldset
- legend
- submit button
- error message / state for a field
Base components
- breadcrumbs
- pagination
- skip link
- status messages
- tabs
Govuk subtheme
Govuk Base is a parent theme of Govuk Subtheme. The Subtheme is a starting point for creating a custom Drupal theme based on a Govuk base theme. It's a scaffolding for a theme and a set of build tasks.
See Govuk Subtheme README for more information.
统计信息
- 总下载量: 855
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: proprietary
- 更新时间: 2026-03-26