Skip to content
This repository has been archived by the owner on Feb 22, 2023. It is now read-only.

mingoland/reportmi-frontend

 
 

Repository files navigation

Report management information frontend

Frontend components for the Report management information sevice at the Crown Commercial Service.

Extends the GOVUK-Frontend components.

Goals

  • Maintain the GOVUK-Frontend module as a dependacy.
  • Styles only, markup is to show usage
  • Build to use in Rails applications

Install

Clone the repo, move in to the directory and run:

npm install

Development

Launch the Fractal UI and run watch tasks.

npm start

We follow the GOVUK css coding standards:

https://github.com/alphagov/govuk-frontend/blob/master/docs/contributing/coding-standards/css.md

Where a component is extended we keep the govuk namespace:

govuk-button

Where a new component is added, we use the ccs namespace:

ccs-pagination

Build

Run the build process to to create static site in the docs directory, this is so we can publish to Github Pages.

npm run build

In Rails

  • Add the dependacy on GOVUK-Frontend in your Rails app

    yarn add govuk-frontend

  • Copy the contents of the stylesheets directory to app/assets/stylesheets in your Rails app

  • Require reportmi.scss in the manifest

    *= require reportmi

  • config the config/initalizers/assets.rb to locate the GOVUK-Frontend assets and precompile them

    Rails.application.config.assets.paths << Rails.root.join('node_modules/govuk-frontend/assets/images')

    Rails.application.config.assets.precompile += %w( govuk-frontend/assets/images/* )

  • configure the $govuk-image-url-function to use the image-url helper function in _settings.scss

    $govuk-image-url-function: 'image-url';

About

Frontend components and patterns for the Report MI service

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • HTML 54.3%
  • CSS 35.3%
  • JavaScript 10.4%