Michael Granger has produced a wonderful new RDoc template, which looks
about 1067 times better than any HTML I ever produced. What’s even
better: if you use the “inline source” option, the source is inlined
into the page, but is hidden until you click on the ‘source’ button.
You can see what this looks like at
http://rdoc.sourceforge.net/newdoc/
Click on one of the Ruby method names in the top-right pane, then click
on the [source] link to see the effect.
Now the question: this new template relies on DHTML, Javascript, and a
lot of CSS. Has the world of browsers advanced to the point where I
could make this the default style, or do we still need to support the
previous generation?
Considering I use w3m for browsing docs while coding, yes, support old
browsers.
Also, people turn JS off.
Also, for I in /usr/share/doc//.html; do lynx -dump “$I” > "$(echo $I
sed -e ‘s/.html/.txt/’)"; done
Also, good design is to make anything that uses javascript gracefully
degrade so that /all content/ is visible and navigable with no
javascript. It’s not that hard with the right thinking cap on.
Also, scripts shouldn’t be inlined whenever possible – make the
javascript an external library, referenced by a
tag. It’s even possible to add event handlers via the DOM that way, so
you can have pure HTML files, and the script is entirely orthagonal.
It’s not easy to think that way, but once you do, your script is
cacheable and your code is faster, and your HTML is smaller and also
completely backward-compatible. I would love to see all the “onclick”
events handled that way, and even the “[Source]” links added that way.
Also, I would desparately want a “show all source” option. I’m good at
reading through reams of online text to find what I want, but terrible
at grabbing the mouse while reading.
That said, I like the concept.
Ari
···
On Tue, 2003-07-22 at 22:41, Dave Thomas wrote: