Re: [dev] [werc] horizontal menu using <ul> and <li>

From: Anselm R Garbe <garbeam_AT_gmail.com>
Date: Sun, 9 May 2010 12:01:43 +0100

I agree. Will fix that during next week.

Cheers,
Anselm

On 9 May 2010 10:54, Yoshi Rokuko <yoshi_AT_rokuko.net> wrote:
> I think horizontal menus should not use <ul> and <li> tags. They should be done like the topbar in werc, it is simpler, does not depend on css and is therefore more compatible. Check http://yokuts.org with lynx, links, dillo and surf for what I mean. It uses:
>
> fn nav_tree {
>    level=''
>    for (d in $req_paths_list) {
>    echo '<div class="headerMenu'$level'">'
>    level=$level^_
>    ls -F $sitedir/./$d >[2]/dev/null \
>       | {
>            sed $dirfilter'/\/[^_.\/][^\/]*(\.(md|txt|html)|\/)$/!d; s!^'$sitedir'!!; '$dirclean
>            if(! ~ $#synth_paths 0) echo $synth_paths | tr ' ' $NEW_LINE
>       } | sort -u | awk -F/ '
>    {
>        d = ""
>        if(match($0, "/$"))
>            d = "/"
>        sub("/$", "") # Strip trailing / for dirs so NF is consistent
>
>        bname = $NF d
>        path = $0 d
>        gsub(/[\-_]/, " ", bname)
>
>        # To avoid false matches add trailing / even for plain files to act as delimiter
>        pa = path
>        gsub(/[^\/]$/, "&/", pa)
>
>        if(index(ENVIRON["req_path"] "/", pa) == 1)
>            print "<a href=\"" path "\" class=\"thisPage\">" bname "</a>"
>        else
>            print "<a href=\"" path "\">" bname "</a>"
>    }
>    END { print "</div>" }'
>    }
> }
>
> What do you think, do you agree?
>
> Best regards, Yoshi
>
>
Received on Sun May 09 2010 - 11:01:43 UTC

This archive was generated by hypermail 2.2.0 : Sun May 09 2010 - 11:12:02 UTC