I'll try that tomorrow, thanks.

-----Original Message-----
From: sphinx-dev@googlegroups.com on behalf of Max Battcher
Sent: Wed 15/09/2010 19:03
To: sphinx-dev@googlegroups.com
Subject: Re: [sphinx-dev] Re: secondary windows or hidden sections in html 
output
 
On 09/15/2010 08:42 AM, Alastair Dent wrote:
> Hmm.
>
> I've tried using .. raw: html to escape and put some extra javascript in one 
> of the standard js files.
>
> That worked - sortof. Except that the html builder doesn't copy over any 
> images that aren't referenced in rst.
>
> I guess I'll have to look at making my own extension for this. Blast.

You might not need an extension for this. I would use the rst-class 
directive myself to apply arbitrary CSS classes to the content I wanted 
to hide. Example:

   .. rst-class:: html-start-hidden

   This is the following reST paragraph that the class applies to.

Then you just tell your JS library of choice to act upon items of that 
class (rst-class gets added to HTML CSS class list), for instance with 
the right plugin for jQuery you might have something like:

$('.html-start-hidden').expandCollapse({'start-hidden': true});

No .. raw:: html needed (just add the JS to the static templates), and 
the reST content shows up in your PDF and other builds as well.

-- 
--Max Battcher--
http://worldmaker.net

-- 
You received this message because you are subscribed to the Google Groups 
"sphinx-dev" group.
To post to this group, send email to sphinx-...@googlegroups.com.
To unsubscribe from this group, send email to 
sphinx-dev+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sphinx-dev?hl=en.


-- 
You received this message because you are subscribed to the Google Groups 
"sphinx-dev" group.
To post to this group, send email to sphinx-...@googlegroups.com.
To unsubscribe from this group, send email to 
sphinx-dev+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sphinx-dev?hl=en.

<<winmail.dat>>

Reply via email to