Giter Site home page Giter Site logo

product-page-example's Introduction

Product Page Example

This repository contains a number of components that can be used to build 'product pages' for GOV.UK Products like GOV.UK Pay, GOV.UK Notify and GOV.UK Registers.

Screenshot of the example product page

It is also a middleman site for the sole purpose of providing an example of how to use the components to build a site. You do not have to use middleman to build your product page.

This shares a number of components and design considerations with the tech docs template, which may also be useful for product teams.

Components

For documentation on each component, read the comments at the top of each component's stylesheet:

Usage

For now, please copy the Sass and Javsacript for the components that you require into your own project, and use your own asset pipeline to e.g. compile the Sass files into CSS.

Because each product team have their own tech stack, making these dependencies available in a more automated way that worked for everyone was not part of the MVP, but it's something we're looking at for the future.

Frontend Dependencies

GOV.UK Frontend and GaaP Analytics are included using NPM and bundled in on build. You can include more NPM modules easily by installing them as a dependency and including paths to them. This works because within config.rb sprockets is instructed to look within node_modules/.

Getting started with Google Analytics

To get started with Google Analytics you will need an account and a tracking ID you can get these by talking to the GaaP programme team. The analytics ID is then set within config.rb.

To learn about how to get started with event tracking head over to GaaP Analytics.

Running Example Locally

If you wish to run the example in your own browser, you'll need to run the following commands from the root of this project:

  • bundle install to install middleman and its dependencies
  • npm install to install the frontend dependencies
  • bundle exec middleman server - to start middleman's built in server
  • open http://localhost:4567 - to open the example in your browser

product-page-example's People

Contributors

36degrees avatar dependabot[bot] avatar freesteph avatar gemmaleigh avatar jonheslop avatar mcmillan avatar pcraig3 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

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

product-page-example's Issues

Mobile margin / padding fixes

From @dashouse:

.breadcrumbs (< 640px) – remove margin-bottom (might still be needed when in blue header)
.sub-navigation (< 640px) – remove margin-top
.header__navigation ul (< 640px) – increase margin-bottom to 8px;

Reliance on (retired) GOV.UK Frontend Toolkit

Given GOV.UK Design System is the newer, maintained product, it would be best if this template was built on top of it, not the Frontend Toolkit.

It looks like this repo isn't under active maintenance, but I thought it worth noting - maybe something in the README would warn future users?

Notably, this repo has been a huge boon for us, and helped us get up and running quickly - I'm grateful for its existence, but would like make future users aware of this issue.

Deploy script can't see manifest.yml

Because the deploy script is in a subfolder, when you run it, it can't see any parameters set in manifest.yml. I found this out because it wasn't taking the app name from manifest.yml. Suggest putting deploy script in root folder.

Typographic inconsistencies with GOV.UK elements

Looks to me as if the font sizes are a little bit different from GOV.UK Elements

Headings (Elements): 48 / 36 / 24 / 19
Headings (Product page example computed): 48 / 38 / 28.5 / 22.23

There are also some examples in the prototype of where the .heading-medium (etc) classes from GOV.UK Elements come in useful in regards to margins. Below is (roughly) the same markup with the right using a .heading-medium class which applies the larger margins.

headings_comparison

(Low priority, just to bring in-line)

Header alignment

The GOV.UK Crown and text isn't positioned as per GOV.UK / Service Manual / Service Toolkit

product-page-header

Breadcrumb fixes

From @dashouse:

padding on .breadcrumbs is uneven on top & bottom, go for 10px on both
.breadcrumbs ol – line-height 25px (may require reduction in padding to compensate for height increase)?

Hero should have a 50%/50% breakpoint, allow image out of order

From @dashouse:

Content / Illustration should go 50% / 50% at mid size breakpoint before stacking. On the prototype I have a grid override "product-overview-intro-….” for this
"column-two-thirds product-overview-intro-text"
"column-one-third product-overview-intro-image"

Ideally I’d like this image to be inserted between the h1 and the .hero__description when it breaks to one column. Could we use (https://github.com/filamentgroup/AppendAround) ?

Do we treat the Verify logo example as an entirely separate use case?

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.