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

From: Uriel <lost.goblin_AT_gmail.com>
Date: Mon, 10 May 2010 02:00:59 +0200

This is probably a good idea, but for werc-related things I would
prefer if people used the werc mailing list:
http://groups.google.com/group/werc9

Thanks.

uriel

On Sun, May 9, 2010 at 11:54 AM, 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 Mon May 10 2010 - 00:00:59 UTC

This archive was generated by hypermail 2.2.0 : Mon May 10 2010 - 00:12:02 UTC