Maybe no I can upload?
Hi dear reader,
I have an extension that works semi okay for making popups: a directive
my <div> and script parts and decide to throw in a <p> meaning the place
where I have my :popup: role ends with a new paragraph. Ugly as...
There is a very small issue with z-index, caused by a big happening of
z-indices in accompanying sageCell example... Trivial to solve, z-index may
be 100 in my css I guess... But that is not my problem...
I have the rest working, so I am now trying to build the text in the
- directive added as usual, with app.add_directive('popup',popupDirective)
- added a popupRole with app.add_role('popup',popupRole)
- and finally app.add_node(popupNode,html=(visitPopupNode, departPopupNode))
Nothing particular there...
The central work is done in popupRole
My current thinking is:
- In the directive call I collect all of interest. Return an empty node,
actual contents to be put later.
- in the role call I want to put in the button towards the script call.
- HOWEVER: scriptcall needs to be specific (tied to a certain popup text)
and fully outside the regular text flow: presence of any script definition
forces the client to insert a <p> => my text is partitioned in several
- Ditto: the actual <div> with the text that can be made invisible yes/no
also must be outside the flow, again the client will insert a </p>,p>
otherwise, so again no definition 'inline'
So these two, script definition and <div> need to be glued at the 'end' of
the doctree, outside of the regular text flow. Current code just plugs it
smack into the textflow, giving me the paragraph effect.
But how do you do that, getting data from your earlier material, in an
extension? I was looking at the EnvironmentCollector stuff, but I have a
big hunch I am misunderstanding that stuff.... Anybody a suggestion? I am
considering pushing the text out as a separate html file, but again, how do
you do that (elegantly/robustly) within the extension environment?
The only (should be) working solution is to have yet another directive
(popupFinish) , near the end of the file, and use that as regular RST
oriented solution. I am not particularly thrilled about that, although I
use then same trick as TODO lists... But todolist:: creates a sort of
direct visual feedback on precisely the location where .. todolist:: is
For popups that is not so great I find...
Any suggestions are welcome!
You received this message because you are subscribed to the Google Groups "sphinx-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to email@example.com.
For more options, visit https://groups.google.com/d/optout.