datatracker/static
2015-07-26 18:12:59 +00:00
..
css Removed duplicate css statement. 2015-07-23 09:59:36 +00:00
dev Added a dev-specific robots.txt, which blocks all robots. 2013-09-18 17:44:51 +00:00
doc Put doc files under static. 2010-10-26 13:08:34 +00:00
fonts Changed the encoding of ParaType stylesheet files to UTF-8 and removed the svn:executable bit. 2015-04-14 14:33:38 +00:00
images Provided a different shortcut icon for the datatracker when run in development or test mode. Fixes issue #1667. 2015-04-15 14:43:15 +00:00
js Merged in [9855] from lars@netapp.com: 2015-07-23 08:54:46 +00:00
secretariat Fixes #1692. Drag-and-Drop slide re-ordering no longer works in secr/proceedings. Consolidate / update JQuery-UI. Commit ready for merge. 2015-04-24 21:31:00 +00:00
static/coverage Added test coverage data to the release pages if available for the release. Added saving of html pages for the code coverage to a directory in the static files area. If a code coverage report is available, a link to it will be shown on the release page of the current release. Renamed some setting variables related to test coverage to be more explicit and precise. 2015-03-14 19:08:37 +00:00
test From mcr@sandelman.ca: 2014-07-31 22:13:01 +00:00
.gitignore Merged from log:branch/2.00@2363: Current release branch head to trunk. 2010-07-21 12:48:05 +00:00
README.rst Added a static/README file to provide guidance on the new static files setup. 2015-07-26 18:12:59 +00:00
robots.txt We want to disallow all robot access to development servers, but for the production server we want indexing from search engines. Fix robots.txt accordingly. 2012-03-07 10:18:12 +00:00

Handling of External Javascript and CSS Components 
==================================================

This directory (``static/``) holds a number of subdirectories, where one is handled
differently than the rest: the ``lib/`` subdirectory holds distribution files for external
client-side components, currently (18 Apr 2015) this means ``js`` and ``css`` components.

These components each reside in their own subdirectory, which is named with the component
name:

    henrik@zinfandel $ ls -l static/lib
    total 44
    drwxr-xr-x 6 henrik henrik 4096 Jul 25 15:25 bootstrap
    drwxr-xr-x 4 henrik henrik 4096 Jul 25 15:25 bootstrap-datepicker
    drwxr-xr-x 4 henrik henrik 4096 Jul 25 15:25 font-awesome
    drwxr-xr-x 2 henrik henrik 4096 Jul 25 15:25 jquery
    drwxr-xr-x 2 henrik henrik 4096 Jul 25 15:25 jquery.cookie
    drwxr-xr-x 2 henrik henrik 4096 Jul 25 15:24 ptmono
    drwxr-xr-x 2 henrik henrik 4096 Jul 25 15:24 ptsans
    drwxr-xr-x 2 henrik henrik 4096 Jul 25 15:24 ptserif
    drwxr-xr-x 2 henrik henrik 4096 Jul 25 15:25 select2
    drwxr-xr-x 2 henrik henrik 4096 Jul 25 15:25 select2-bootstrap-css

If resources served over a CDN and/or with a high max-age don't have different URLs for
different versions, then any component upgrade which is accompanied by a change in template
functionality will be have a long transition time during which the new pages are served with
old components, with possible breakage.  We want to avoid this.

The intention is that after a release has been checked out, but before it is deployed,
the whole static directory should be copied to a location which is accessible under the
URL given by STATIC_URL -- in production mode this URL contains the datatracker release
version, which will let the CDN serve the static files which correspond to the current
release.

With the exception of the ``pt*`` fonts, all components under ``static/lib/`` are managed
through a bower_ file; ``ietf/static/bower.json``.  In order to install a new
version of a component, you should update the ``bower.json`` file, and then run the management
command::

    $ ietf/manage.py bower_install

That command will fetch the required version of each external component listed in
``bower.json`` (actually, it will do this for *all* ``bower.json`` files found in the
``static/`` directories of all ``INSTALLED_APPS``), saving them temporarily under
``.tmp/bower_components/``; it will then extract the relevant ``js`` and ``css`` files and
place them in an appropriately named directory under ``static/lib/``.  The location
used by ``bower_install`` is is controlled by ``COMPONENT_ROOT`` in ``settings.py``.

Any datatracker-specific static files which should be served by the CDN rather than
directly by the datatracker web server should be moved from under ``static/ to ``ietf/static/``,
so that they will be collected by the ``ietf/manage.py collectstatic`` command and
placed under `static/lib/`` from where they will be made available to the CDN.  Any
template files referencing the files in question will need to be updated to use the
``{% static 'foo/bar.jpg' %}`` notation to reference the files, so that the correct
static url will be emitted.

.. _bower: http://bower.io/