From 3d0d06590cf1c55b1bb591a79202a05d2cfaee03 Mon Sep 17 00:00:00 2001 From: Fredrik Unger Date: Fri, 7 Mar 2014 12:36:18 +0100 Subject: [PATCH] style: switching to xhtml5 and sass Switching the template to be a xhtml5 template and start using sass in the css composition. With separate template it will also be possible to do pdf print pages. --- treecutter/page.py | 2 +- treecutter/sitemap.py | 2 +- treecutter/trie.py | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/treecutter/page.py b/treecutter/page.py index ae05652..53eeb0d 100644 --- a/treecutter/page.py +++ b/treecutter/page.py @@ -127,7 +127,7 @@ class Page(): tfi.write(etree.tostring(self._doc,encoding='UTF-8',pretty_print=False)) tfi.close() # cmd = ["saxon-xslt-xinclude","-o",outfile,infile,style_xslt] - cmd = ["xsltproc","--xinclude","--output",outfile,style+"docbook.xsl",infile] + cmd = ["xsltproc","--xinclude","--output",outfile,style+"docbook.xhtml5.xsl",infile] retcode = subprocess.call(cmd) if retcode: print 'Error: '+' '.join(cmd)+' Returncode ['+str(retcode)+']' diff --git a/treecutter/sitemap.py b/treecutter/sitemap.py index 0ecefe4..7ad9446 100644 --- a/treecutter/sitemap.py +++ b/treecutter/sitemap.py @@ -127,7 +127,7 @@ class Sitemap(): def publish(self): ssh_cmd(self._output,"mkdir -p") publish(self._tmptarget, self._output) - for res in ["css","images","js","fonts","favicon.ico"]: + for res in ["stylesheets","images","js","fonts","favicon.ico"]: if (os.path.exists(self._style+res)): publish(self._style+res, self._output) ssh_cmd(self._output,"chmod a+rx") diff --git a/treecutter/trie.py b/treecutter/trie.py index 766333d..3d3ae2a 100644 --- a/treecutter/trie.py +++ b/treecutter/trie.py @@ -68,13 +68,14 @@ class Trie(): if p == page: sel = ' class="selected"' if p != None: - html += '%s\n' \ + html += '%s\n' \ % (sel,subdir,l.value().link(),p.menu()) else: html += '%s*\n' \ % (sel,subdir,l.value().link(), l.value().page('en').menu()) if l.children(): html += self._menu(l.children(), lang, page, "", subdir) + html += "\n" html += "\n" return html -- 2.30.2