Browse Source

change theme structure to avoid copying html templates in the output dir

pull/9/merge
Simon 14 years ago
parent
commit
7c47107342
  1. 0
      sigal/themes/default/static/css/base.css
  2. 0
      sigal/themes/default/static/css/layout.css
  3. 0
      sigal/themes/default/static/css/skeleton.css
  4. 0
      sigal/themes/default/static/css/style.css
  5. 0
      sigal/themes/default/templates/index.html
  6. 0
      sigal/themes/galleria/static/css/style.css
  7. 0
      sigal/themes/galleria/static/js/classic-loader.gif
  8. 0
      sigal/themes/galleria/static/js/classic-map.png
  9. 0
      sigal/themes/galleria/static/js/galleria-1.2.3.js
  10. 0
      sigal/themes/galleria/static/js/galleria-1.2.3.min.js
  11. 0
      sigal/themes/galleria/static/js/galleria.classic.css
  12. 0
      sigal/themes/galleria/static/js/galleria.classic.js
  13. 0
      sigal/themes/galleria/static/js/galleria.classic.min.js
  14. 0
      sigal/themes/galleria/static/js/galleria.classic.orig.css
  15. 0
      sigal/themes/galleria/static/js/jquery.min.js
  16. 0
      sigal/themes/galleria/templates/index.html
  17. 7
      sigal/writer.py

0
sigal/themes/default/css/base.css → sigal/themes/default/static/css/base.css

0
sigal/themes/default/css/layout.css → sigal/themes/default/static/css/layout.css

0
sigal/themes/default/css/skeleton.css → sigal/themes/default/static/css/skeleton.css vendored

0
sigal/themes/default/css/style.css → sigal/themes/default/static/css/style.css

0
sigal/themes/default/index.html → sigal/themes/default/templates/index.html

0
sigal/themes/galleria/css/style.css → sigal/themes/galleria/static/css/style.css

0
sigal/themes/galleria/js/classic-loader.gif → sigal/themes/galleria/static/js/classic-loader.gif

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

0
sigal/themes/galleria/js/classic-map.png → sigal/themes/galleria/static/js/classic-map.png

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

0
sigal/themes/galleria/js/galleria-1.2.3.js → sigal/themes/galleria/static/js/galleria-1.2.3.js

0
sigal/themes/galleria/js/galleria-1.2.3.min.js → sigal/themes/galleria/static/js/galleria-1.2.3.min.js vendored

0
sigal/themes/galleria/js/galleria.classic.css → sigal/themes/galleria/static/js/galleria.classic.css

0
sigal/themes/galleria/js/galleria.classic.js → sigal/themes/galleria/static/js/galleria.classic.js

0
sigal/themes/galleria/js/galleria.classic.min.js → sigal/themes/galleria/static/js/galleria.classic.min.js vendored

0
sigal/themes/galleria/js/galleria.classic.orig.css → sigal/themes/galleria/static/js/galleria.classic.orig.css

0
sigal/themes/galleria/js/jquery.min.js → sigal/themes/galleria/static/js/jquery.min.js vendored

0
sigal/themes/galleria/index.html → sigal/themes/galleria/templates/index.html

7
sigal/writer.py

@ -64,7 +64,8 @@ class Writer():
if not os.path.exists(theme_path):
raise Exception("Impossible to find the theme %s" % self.theme)
theme_relpath = os.path.relpath(self.theme, os.path.dirname(__file__))
theme_relpath = os.path.relpath(os.path.join(self.theme, 'templates'),
os.path.dirname(__file__))
env = Environment(loader=PackageLoader('sigal', theme_relpath))
self.template = env.get_template(INDEX_PAGE)
@ -80,8 +81,8 @@ class Writer():
def copy_assets(self):
"Copy the theme files in the output dir"
self.theme_path = os.path.join(self.output_dir, 'theme')
copy_tree(self.theme, self.theme_path)
self.theme_path = os.path.join(self.output_dir, 'static')
copy_tree(os.path.join(self.theme, 'static'), self.theme_path)
def write(self, paths, relpath):
"""

Loading…
Cancel
Save