From 6c5377eebef68a4d4706352ddabb565ea67657a6 Mon Sep 17 00:00:00 2001 From: ahocevar Date: Thu, 4 Apr 2013 15:18:15 +0200 Subject: [PATCH] Creating a resources folder for use by examples and API docs --- build.py | 19 ++++++++++-------- doc/template/tmpl/layout.tmpl | 8 ++++---- examples/animation.html | 8 ++++---- examples/bind-input.html | 8 ++++---- examples/bing-maps.html | 8 ++++---- examples/brightness-contrast.html | 8 ++++---- examples/canvas-tiles.html | 8 ++++---- examples/epsg-4326.html | 8 ++++---- examples/export-map.html | 8 ++++---- examples/geolocation.html | 10 ++++----- examples/hue-saturation.html | 8 ++++---- examples/index.html | 8 ++++---- examples/mapquest.html | 8 ++++---- examples/mouse-position.html | 8 ++++---- examples/overlay.html | 8 ++++---- examples/preload.html | 8 ++++---- examples/rotation.html | 8 ++++---- examples/scale-line.html | 8 ++++---- examples/semi-transparent-layer.html | 8 ++++---- examples/side-by-side.html | 8 ++++---- examples/simple.html | 8 ++++---- examples/stamen.html | 8 ++++---- examples/style-rules.html | 8 ++++---- examples/tilejson.html | 8 ++++---- examples/vector-layer.html | 8 ++++---- examples/wms-capabilities.html | 8 ++++---- examples/wms-custom-proj.html | 8 ++++---- examples/wms-single-image-custom-proj.html | 8 ++++---- examples/wms-single-image.html | 8 ++++---- examples/wms-tiled.html | 8 ++++---- examples/wmts-capabilities.html | 8 ++++---- examples/wmts-from-capabilities.html | 8 ++++---- examples/wmts.html | 8 ++++---- examples/zoomslider.html | 8 ++++---- .../bootstrap/css/bootstrap-responsive.css | 0 .../css/bootstrap-responsive.min.css | 0 .../bootstrap/css/bootstrap.css | 0 .../bootstrap/css/bootstrap.min.css | 0 .../img/glyphicons-halflings-white.png | Bin .../bootstrap/img/glyphicons-halflings.png | Bin .../bootstrap/js/bootstrap.js | 0 .../bootstrap/js/bootstrap.min.js | 0 .../font-awesome/README.md | 0 .../font-awesome/css/font-awesome-ie7.min.css | 0 .../font-awesome/css/font-awesome.css | 0 .../font-awesome/css/font-awesome.min.css | 0 .../font-awesome/font/FontAwesome.otf | Bin .../font-awesome/font/fontawesome-webfont.eot | Bin .../font-awesome/font/fontawesome-webfont.svg | 0 .../font-awesome/font/fontawesome-webfont.ttf | Bin .../font/fontawesome-webfont.woff | Bin examples/examples.css => resources/layout.css | 0 {examples => resources}/social-links.js | 0 53 files changed, 144 insertions(+), 141 deletions(-) rename {examples => resources}/bootstrap/css/bootstrap-responsive.css (100%) rename {examples => resources}/bootstrap/css/bootstrap-responsive.min.css (100%) rename {examples => resources}/bootstrap/css/bootstrap.css (100%) rename {examples => resources}/bootstrap/css/bootstrap.min.css (100%) rename {examples => resources}/bootstrap/img/glyphicons-halflings-white.png (100%) rename {examples => resources}/bootstrap/img/glyphicons-halflings.png (100%) rename {examples => resources}/bootstrap/js/bootstrap.js (100%) rename {examples => resources}/bootstrap/js/bootstrap.min.js (100%) rename {examples => resources}/font-awesome/README.md (100%) rename {examples => resources}/font-awesome/css/font-awesome-ie7.min.css (100%) rename {examples => resources}/font-awesome/css/font-awesome.css (100%) rename {examples => resources}/font-awesome/css/font-awesome.min.css (100%) rename {examples => resources}/font-awesome/font/FontAwesome.otf (100%) rename {examples => resources}/font-awesome/font/fontawesome-webfont.eot (100%) rename {examples => resources}/font-awesome/font/fontawesome-webfont.svg (100%) rename {examples => resources}/font-awesome/font/fontawesome-webfont.ttf (100%) rename {examples => resources}/font-awesome/font/fontawesome-webfont.woff (100%) rename examples/examples.css => resources/layout.css (100%) rename {examples => resources}/social-links.js (100%) diff --git a/build.py b/build.py index a8d8b68b45..abda8ea216 100755 --- a/build.py +++ b/build.py @@ -433,8 +433,8 @@ def gh_pages(t): virtual('doc', 'build/jsdoc-%(BRANCH)s-timestamp' % vars(variables)) -@target('build/jsdoc-%(BRANCH)s-timestamp' % vars(variables), SRC, SHADER_SRC, - ifind('doc/template')) +@target('build/jsdoc-%(BRANCH)s-timestamp' % vars(variables), 'host-resources', + SRC, SHADER_SRC, ifind('doc/template')) def jsdoc_BRANCH_timestamp(t): t.run('%(JSDOC)s', '-c', 'doc/conf.json', 'src', 'doc/index.md', '-d', 'build/gh-pages/%(BRANCH)s/apidoc') @@ -473,7 +473,13 @@ def split_example_file(example, dst_dir): target_require.close() -@target('host-examples', 'build', 'examples', phony=True) +@target('host-resources', phony=True) +def host_resources(t): + resources_dir = 'build/gh-pages/%(BRANCH)s/resources' + t.rm_rf(resources_dir); + t.cp_r('resources', resources_dir); + +@target('host-examples', 'build', 'host-resources', 'examples', phony=True) def host_examples(t): examples_dir = 'build/gh-pages/%(BRANCH)s/examples' build_dir = 'build/gh-pages/%(BRANCH)s/build' @@ -481,18 +487,15 @@ def host_examples(t): t.makedirs(examples_dir) t.rm_rf(build_dir) t.makedirs(build_dir) - t.cp(EXAMPLES, 'examples/examples.css', examples_dir) + t.cp(EXAMPLES, examples_dir) for example in [path.replace('.html', '.js') for path in EXAMPLES]: split_example_file(example, examples_dir % vars(variables)) - t.cp_r('examples/data', examples_dir + '/data') - t.cp_r('examples/bootstrap', examples_dir + '/bootstrap') - t.cp_r('examples/font-awesome', examples_dir + '/font-awesome') t.cp('bin/loader_hosted_examples.js', examples_dir + '/loader.js') t.cp('build/ol.js', 'build/ol-simple.js', 'build/ol-whitespace.js', 'build/ol.css', build_dir) t.cp('examples/index.html', 'examples/example-list.js', 'examples/example-list.xml', 'examples/Jugl.js', - 'examples/jquery.min.js', 'examples/social-links.js', examples_dir) + 'examples/jquery.min.js', examples_dir) t.rm_rf('build/gh-pages/%(BRANCH)s/closure-library') t.makedirs('build/gh-pages/%(BRANCH)s/closure-library') with t.chdir('build/gh-pages/%(BRANCH)s/closure-library'): diff --git a/doc/template/tmpl/layout.tmpl b/doc/template/tmpl/layout.tmpl index 3f5c842eab..f073122964 100644 --- a/doc/template/tmpl/layout.tmpl +++ b/doc/template/tmpl/layout.tmpl @@ -11,9 +11,9 @@ - - - + + + @@ -49,6 +49,6 @@ allowtransparency="true" frameborder="0" scrolling="0" height="20" width="90"> - + diff --git a/examples/animation.html b/examples/animation.html index d1b3b285b0..621cb47721 100644 --- a/examples/animation.html +++ b/examples/animation.html @@ -4,9 +4,9 @@ - - - + + + Animation example @@ -57,7 +57,7 @@ - + diff --git a/examples/bind-input.html b/examples/bind-input.html index 7e09555b42..5d92ad2e6f 100644 --- a/examples/bind-input.html +++ b/examples/bind-input.html @@ -4,9 +4,9 @@ - - - + + + Bind HTML input example @@ -81,7 +81,7 @@ - + diff --git a/examples/bing-maps.html b/examples/bing-maps.html index 1fd6bf8dcc..547857c290 100644 --- a/examples/bing-maps.html +++ b/examples/bing-maps.html @@ -4,9 +4,9 @@ - - - + + + Bing Maps example @@ -56,7 +56,7 @@ - + diff --git a/examples/brightness-contrast.html b/examples/brightness-contrast.html index 67542e5591..c4ac127ebf 100644 --- a/examples/brightness-contrast.html +++ b/examples/brightness-contrast.html @@ -4,9 +4,9 @@ - - - + + + Brightness/contrast example @@ -59,7 +59,7 @@ - + diff --git a/examples/canvas-tiles.html b/examples/canvas-tiles.html index a8eb159133..bd9290a6f4 100644 --- a/examples/canvas-tiles.html +++ b/examples/canvas-tiles.html @@ -4,9 +4,9 @@ - - - + + + Canvas tiles example @@ -49,7 +49,7 @@ - + diff --git a/examples/epsg-4326.html b/examples/epsg-4326.html index f50838cb1e..33be85967a 100644 --- a/examples/epsg-4326.html +++ b/examples/epsg-4326.html @@ -4,9 +4,9 @@ - - - + + + EPSG:4326 example @@ -49,7 +49,7 @@ - + diff --git a/examples/export-map.html b/examples/export-map.html index 1950b88614..759bba20b5 100644 --- a/examples/export-map.html +++ b/examples/export-map.html @@ -4,9 +4,9 @@ - - - + + + Export map example @@ -51,7 +51,7 @@ - + diff --git a/examples/geolocation.html b/examples/geolocation.html index 597b14e7ce..09e4243a16 100644 --- a/examples/geolocation.html +++ b/examples/geolocation.html @@ -4,9 +4,9 @@ - - - + + +