[Date Index][Thread Index]
[Date Prev][Date Next][Thread Prev][Thread Next]

Re: I like this navbar

Denis Barbier <barbier@imacs.polytechnique.fr> writes:
> In fact, one can write
> <define-tag lang:wildcard>

Yes, this looks good (although you have to type 14 additional
characters for every button :-)), it should probably be included in
the normal wml::std::lang, so you do not have to care about the
protection stuff if you just want to use it.

> Concerning the ``nohints'' attribute, it's a good idea. 
> wml_p8_htmlstrip to suppress JavaScript code. I prefer the latter, any
> opinion?

I might want to be able to suppress javascript hints on navbars, but
still be able to use the image replacement (see the example below,
navbar-FH actually produces different javascript code for nb_imgOver
depending on nohints), to set hints on selected <href ...>s or to
include hand-coded javascript stuff (http://www.hars.de/misz/rado.html
uses javascript to supply a functionality that can't be achieved
otherwise), this might be difficult to do with a global option to
remove javascript code.

I implemented nohints not because I hate javascript, but because I
hate pages that mess around with my status line :-).

> And i don't understand what your ``imgstyle'' attribute is for. Do you
> have an example?

It is relevant for the automatic button creation, see
http://www.hars.de/www/wml_nav_img.en.html for a description.  It is
used like (real world applications should probably use PerlMagick or
something instead of banner and netpbm):

#include "/path/to/navbar-FH.wml"

  my @cols=("white", "lightseagreen", "yellow");
  my @spc=("", "* ");
  $imgstyle{foo} = sub {
    my ($file, $txt, $type, $level, $lang, $id) = @_;
      system ("(banner '". $spc[$level] . $txt . "' |\
        asciitopgm 400 140 | pnmrotate 90 |\
        pnmscale -height 20 -width 80 |\
        pgmtoppm black-". $cols[$type]." | ppmtogif >" .
        $file . ") >/dev/null 2>&1 >/dev/null");

<navbar:define name=foobar imgstyle=foo nohints>
	<navbar:button id   = foo
		       img  = "fooicon-*.gif"
		       txt  = "foo"
		       url  = foo.html>
	<navbar:button id   = foo.bar
		       img  = "foobaricon-*.gif"
		       txt  = "foobar"
		       url  = foobar.html>
        <navbar:button id   = bletch
		       img  = "bletchicon-*.gif"
		       txt  = "bletch"
		       url  = bletch.html>

<navbar:render name=foobar select=foo>

Yours, Florian.

Website META Language (WML)                www.engelschall.com/sw/wml/
Official Support Mailing List                   sw-wml@engelschall.com
Automated List Manager                       majordomo@engelschall.com