GOV.UK static files and resources
JavaScript CSS Ruby HTML Shell
Latest commit b4a15d6 Jan 19, 2017 @alecgibson alecgibson committed on GitHub Merge pull request #875 from alphagov/nav-288-track-related-item-clicks
Track Related Item clicks
Permalink
Failed to load latest commit information.
app Merge pull request #875 from alphagov/nav-288-track-related-item-clicks Jan 19, 2017
bin Add Rails binstubs Sep 11, 2015
config Revert "Upgrade jQuery to 1.12.4" Jan 5, 2017
db convert static to a rails app in order to use asset pipeline and helpers Dec 4, 2011
doc Add note to survey readme about taxonomy detection Dec 1, 2016
lib Delete deprecated format field for content items Dec 16, 2016
log added asset helper to all the css files Dec 4, 2011
public Remove robots.txt Feb 1, 2016
script Fix locale copying script for 'from' metadata Oct 7, 2016
spec/javascripts Track clicks with an event and an options object Jan 18, 2017
test Track clicks with an event and an options object Jan 18, 2017
tmp Add tmp/.gitkeep. Jan 4, 2012
vendor/assets/stylesheets Remove unused vendor/plugins folder Sep 11, 2015
.dockerignore Add Dockerfile and .dockerignore Nov 22, 2016
.gitignore Cookie based tokens for entry/success + test protection Oct 9, 2012
.ruby-version Upgrade ruby to 2.2.3 Sep 9, 2015
:all Fix hash syntax Jan 5, 2017
CONTRIBUTING.md Updates README and CONTRIBUTING ref image optimisation Oct 30, 2014
Dockerfile Add Dockerfile and .dockerignore Nov 22, 2016
Gemfile Track clicks with an event and an options object Jan 18, 2017
Gemfile.lock Track clicks with an event and an options object Jan 18, 2017
LICENCE Update LICENCE Mar 6, 2015
README.md Update README.md with proper Jasmine test cmd. Mar 16, 2016
Rakefile convert static to a rails app in order to use asset pipeline and helpers Dec 4, 2011
config.ru convert static to a rails app in order to use asset pipeline and helpers Dec 4, 2011
jenkins.sh Change default govuk-content-schemas branch Nov 22, 2016
jenkins_branches.sh Configure branch builds Jun 2, 2014
jenkins_schema.sh Toggle execute for this shell script Jan 15, 2016
startup.sh Startup script for static app Jan 31, 2012

README.md

Static

This application defines global templates for GOV.UK pages.

Screenshots

screenshot

Nomenclature

  • slimmer - Rack middleware for wrapping Rack applications in shared templated layouts

Technical documentation

There are docs for:

Running the application

./startup.sh

This will start the server running on http://0.0.0.0:3013

Running Locally

If you'd like to run static locally, and keep all its asset links pointing to the same local instance, you'll need to set PLEK_SERVICE_STATIC_URI, which is the host used for static assets (even on static).

Otherwise it defaults to static.dev.gov.uk, which won't exist if you're just running this repo locally, without the rest of the GOV.UK stack.

To run this app locally, and have it point at its own assets, run it like this:

PLEK_SERVICE_STATIC_URI=0.0.0.0:3013 ./startup.sh

Running the test suite

bundle exec rake runs the test suite.

Javascript unit tests

Tests can run in browser at /specs

Or in terminal to run only the jasmine tests you can use RAILS_ENV=test bundle exec rake spec:javascript