This repository contains:
- The Source for shared static assets for the DGUK web site.
- Stylesheets (Less )
- Javascript (Raw & Minified)
- Images (optimised)
To install the dependencies, you will need npm with is part of node.js
To install gruntjs and the dependencies required to compile the assets.
# Remove any old version
sudo npm uninstall -g grunt
# Install Grunt CLI tools globally.
sudo npm install -g grunt-cli
# Install local project dependancies (eg. JS minifiers etc).
npm install
To update the assets:
- Update stylesheet
assets/src/css/datagovuk.less
(written in Less, a superset of the CSS language).- Update the
concat
task in the Gruntfile to find any new files.
- Update the
- Add or remove vendor JS files from
assets/src/js/
.- Update the
concat
task in the Gruntfile to find any new files.
- Update the
When changes are made, recompile everything by just executing:
grunt
Use grunt --help
to see a list of all available tasks. For example:
grunt styles
grunt scripts
grunt imagemin
See Gruntfile.js
to understand how each compiled file is created. Some notes:
datagovuk.less
is the responsive stylesheet (work-in-progress). It is rolled up with:- Twitter Bootstrap 2.0.3
- Styles for jQueryUI 1.10.2 (customised with DGU colour flavours)
- Styles for jQuery Chosen 0.9.7
vendor.min.js
is a compressed copy of:- Not jQuery 1.9.1 (we try to use a CDN, but carry a fallback)
- Backbone 0.5.1
- Bootstrap 2.0.3 (for tooltips etc)
- Bootstrap hashchange plugin (for switching tabs in a page using document.hash)
- jQuery plugins: Chosen 0.9.7, cookies, placeholders, tmpl, dotdotdot 1.5.9, UI 1.10.9
- json2.js
- modernizr 1.7
- spin.js
- underscore 1.1.6
Copyright (C) 2015 Crown Copyright
The files in this repo (aside from exceptions mentioned below) are openly dual licensed under:
-
the Open Government Licence v3 https://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/
-
the MIT licence - see LICENCE.txt.
Exceptions:
-
departmental or public sector organisation logos, such as: dgu-header*, crown-*
-
third party imports, such as: ckan-* & glyphicons-* which remain copyright of their respective owners.