nhsuk / nhsuk-prototype-kit

Rapidly create HTML prototypes of NHS.UK services
https://prototype-kit.service-manual.nhs.uk
MIT License
55 stars 40 forks source link

How to guide: Adding custom images and JavaScript - Enhancement #70

Closed chrimesdev closed 5 years ago

chrimesdev commented 5 years ago

Images

Users can add custom image assets by putting image files in the app/assets/images folder, then referencing them in HTML with /images/filename.jpg. However, the images folder does not exist in assets and there is no guidance or examples for doing this.

JavaScript - Advanced guide?

Users can add custom JavaScript or ES6 modules by writing JavaScript (or using third party libraries) in the app/assets/javascript folder then referencing them in HTML in app/views/includes/scripts.html. There currently isn't any guidance or examples for doing this.

WIll users be wanting to add custom JavaScript?

joelanman commented 5 years ago

In case you didn't know - we recently added guidance to the GOV.UK Prototype Kit:

https://govuk-prototype-kit.herokuapp.com/docs/adding-css-javascript-and-images

GrilloPress commented 5 years ago

Would the easiest thing be to have an example in the code as well?

Having helped a few people get set up recently. The places they struggled were when there wasn't an obvious example they could cut and paste in the code itself.

davidhunter08 commented 5 years ago

@GrilloPress - yeah an example is a good idea and has been added. You can see the work done so far in the commits above your message.

chrimesdev commented 5 years ago

Released yesterday in version 1.0.2.