GithubHelp home page GithubHelp logo

dxw / govuk-theme Goto Github PK

View Code? Open in Web Editor NEW
16.0 16.0 6.0 1.3 MB

A WordPress theme implementing the GOV.UK design system

License: MIT License

PHP 76.44% JavaScript 4.91% CSS 0.36% Hack 2.33% SCSS 15.96%
govpress wordpress-theme gov

govuk-theme's Introduction

GOV.UK Design System WordPress theme

A WordPress theme built by dxw that implements the GOV.UK Design System, via GOV.UK Frontend.

Currently, the theme applies v3 of GOV.UK Frontend.

Developing the theme

Install the dependencies:

npm install
composer install

Compile the assets:

npm run build

Run the tests:

vendor/bin/kahlan spec

Run the linter:

vendor/bin/php-cs-fixer fix

Extending the theme

This is intended to be used as a parent theme, which is then extended/re-skinned via a child theme.

You can use the govuk_theme_class filter to help with this. It is applied to all govuk- prefixed classes, so you can use this to either append a custom class to specific instances where those classes are applied, append a custom class to all instances, or replace those classes completely.

You can also replace any of the individual template components, up to and including the overall layout template, in the child theme as required.

Note that the GDS Transport theme is only licensed for use on gov.uk domains, so if you're developing a theme for use elsewhere, you'll need to replace it with a suitable alternative.

govuk-theme's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

govuk-theme's Issues

Fix pagination

We're currently using an old approach to pagination, which could be simplified. We should probably remove the dependency on dxw/pagination, which is old and basically unsupported.

Complete README

Things it might include:

  • Advice on where the GDS Transport font is licensed for used
  • What version of GOVUK Frontend this currently runs
  • How to develop the theme
  • How to add things like class overrides (see #7)

Extend with child theme

Hi, I am currently trying to extend this theme with a child one, and although I am following all the requirements to create and extend a parent theme, this does not work with this theme.

My child style.css looks like:

/*
 * Theme Name: GovukTheme Child
 * Author: Someone
 * Version: 0.0.1
 * License: MIT
 * Template: govuk-theme-main
 * Text domain: govuk-theme-child
 */

This is my folder structure:

image

and what I get in the WP dashboard (themes section) is:

image

I've tried extending other parent themes, and that works just fine.

I wonder if it is mainly due to the fact that this theme structure is a bit different from other WP themes, in fact, the style.css file in the govuk-theme is in the templates folder, not in the root.

Upgrade to govuk frontend v4

v4 if govuk frontend has been available since December 2021.

To ensure forward compatibility, we should upgrade (latest version currently 4.0.1). Details of how to upgrade are in the frontend changelog.

Style tables

Currently, the default table HTML has no styling applied.

Instructions on how to add as a theme in wordpress

Hi, is there any instructions ( or a working example ) on how to add this theme to wordpress please, once I have downloaded the zip file. I am new to Wordpress so would appreciate a "step-by-step" guide so i can view the look and feel - would be really useful for me. Thanks in advance.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.