style: switching to xhtml5 and sass
authorFredrik Unger <fred@tree.se>
Fri, 7 Mar 2014 11:36:18 +0000 (12:36 +0100)
committerFredrik Unger <fred@tree.se>
Fri, 7 Mar 2014 11:36:18 +0000 (12:36 +0100)
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
treecutter/sitemap.py
treecutter/trie.py

index ae056523be9ed2b1cca774c37f8cc96c31c5d012..53eeb0d40baa357f18c7f76d98404b8ed1206518 100644 (file)
@@ -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)+']'
index 0ecefe4278efae22c581d702bb7c513630e43700..7ad9446f650c94e95e23925bc6fbe2077e073739 100644 (file)
@@ -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")
index 766333d85705d7a69a8acf6f202aebf67d5127a2..3d3ae2a3f4e842cf014376a387b630b2823b26ae 100644 (file)
@@ -68,13 +68,14 @@ class Trie():
             if p == page:
                 sel = ' class="selected"'
             if p != None:
-                html += '<li%s><a href="%s%s">%s</a></li>\n' \
+                html += '<li%s><a href="%s%s">%s</a>\n' \
                     % (sel,subdir,l.value().link(),p.menu())
             else:
                 html += '<li%s><a href="%s%s.en" hreflang="en">%s</a>*\n' \
                     % (sel,subdir,l.value().link(), l.value().page('en').menu())
             if l.children():
                 html += self._menu(l.children(), lang, page, "", subdir)
+            html += "</li>\n"
         html += "</ul>\n"
         return html