On May 3, 7:20 pm, Wei-Wei Guo <[email protected]> wrote: > Dear all, > > I'm writing a Sphinx extension. I want to implement text folding in HTML like: > > <span id="fold1" class="closed-fold"> > <a class="toggle-open" > href="javascript:toggleFold('fold1')">OpenedHead</a> > <a class="toggle-closed" > href="javascript:toggleFold('fold1')">ClosedHead</a> > <span class="Folded">MainText</span> > </span> > > It needs javascript and css support, so I need to add some js and css code > into > the head of the built HTML page. I defined those code as a string variable. > How > could I insert the content of the variable?
What comes to defining own css-stylesheet, just modify html_style config-variable: http://sphinx.pocoo.org/config.html#confval- html_style And default layout.html -template checks script_files -variable for additional js-scripts. Or, see http://sphinx.pocoo.org/templating.html#blocks for overridable blocks of default templates. -- Tuomas --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "sphinx-dev" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/sphinx-dev?hl=en -~----------~----~----~----~------~----~------~--~---
