diff options
author | René 'Necoro' Neumann <necoro@necoro.net> | 2010-04-07 22:11:54 +0200 |
---|---|---|
committer | René 'Necoro' Neumann <necoro@necoro.net> | 2010-04-07 22:11:54 +0200 |
commit | 30f0c5929254571b6fd2cd36ead67ce90ecf17ed (patch) | |
tree | 0220a75b3e70bd6a86026a12169bd3c8bc49b299 /templates | |
parent | 63ae50fc433d3bf1e8335a443751512dfbb03508 (diff) | |
download | web-30f0c5929254571b6fd2cd36ead67ce90ecf17ed.tar.gz web-30f0c5929254571b6fd2cd36ead67ce90ecf17ed.tar.bz2 web-30f0c5929254571b6fd2cd36ead67ce90ecf17ed.zip |
Removed the javascript toc and replaced it by a mako-solution
Diffstat (limited to 'templates')
-rw-r--r-- | templates/page.mako | 36 | ||||
-rw-r--r-- | templates/pages/development.mako | 10 | ||||
-rw-r--r-- | templates/pages/translating.mako | 10 |
3 files changed, 26 insertions, 30 deletions
diff --git a/templates/page.mako b/templates/page.mako index 4670764..625a05c 100644 --- a/templates/page.mako +++ b/templates/page.mako @@ -2,25 +2,23 @@ title = "" uses_toc = False %> +<% + page_text = capture(next.body) +%> <%inherit file="/root.mako" /> -<h1 class="title">${self.attr.title}</h1> -${next.body()} +## content +<h1 class="title">${self.attr.title}</h1> % if self.attr.uses_toc: - <script type="text/javascript"> - createToc(${h.toJS(self.attr.tlist)}) - </script> + ${self.preface()} + ${self.toc()} % endif +${page_text} -<%def name="style()"> - ${parent.style()} - % if self.attr.uses_toc: - <script src=${"/static/js/toc.js" | url} type="text/javascript"></script> - % endif -</%def> +## functions <%def name="h2()"> <% @@ -38,13 +36,11 @@ ${next.body()} </%def> <%def name="toc()"> - <div id="toc"> - <noscript class="box"> - Enable JavaScript for a table of contents. - </noscript> - </div> - <noscript> - <!-- dummy paragraph to get the correct layout in noscript mode --> - <p></p> - </noscript> + <ul id="toc"> + % for url, name in self.attr.tlist: + <li><a class="tocLink" href="#${url}">${name}</a></li> + % endfor + </ul> </%def> + +<%def name="preface()"></%def> diff --git a/templates/pages/development.mako b/templates/pages/development.mako index dfc6200..7e42326 100644 --- a/templates/pages/development.mako +++ b/templates/pages/development.mako @@ -3,11 +3,11 @@ uses_toc = True %> <%inherit file="/page.mako" /> -<p> - If you want to have a look at the sourcecode, or even support the development with patches or similar, you are now on the correct page :). -</p> - -${self.toc()} +<%def name="preface()"> + <p> + If you want to have a look at the sourcecode, or even support the development with patches or similar, you are now on the correct page :). + </p> +</%def> <%self:h2>Getting the source</%self:h2> <p> diff --git a/templates/pages/translating.mako b/templates/pages/translating.mako index 811ff41..8abe9a5 100644 --- a/templates/pages/translating.mako +++ b/templates/pages/translating.mako @@ -4,11 +4,11 @@ %> <%inherit file="/page.mako" /> -<p> - Portato supports native languages. Nevertheless the translations into these languages have to be created. This page shows how to add a new translation or how to extend an existing translation. -</p> - -${self.toc()} +<%def name="preface()"> + <p> + Portato supports native languages. Nevertheless the translations into these languages have to be created. This page shows how to add a new translation or how to extend an existing translation. + </p> +</%def> <%self:h2>Short introduction about NLS in Linux</%self:h2> <p> |