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

From: Bjartur Thorlacius <svartman95_AT_gmail.com>
Date: Sun, 9 May 2010 21:37:01 +0000

Wouldn't it suck less to use <link>s? If only they were supported...
but that's why CSS exists.

On 5/9/10, Anselm R Garbe <garbeam_AT_gmail.com> wrote:
> 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
>>
>>
>
>

-- 
kv,
  - Bjartur
Received on Sun May 09 2010 - 21:37:01 UTC

This archive was generated by hypermail 2.2.0 : Sun May 09 2010 - 21:48:02 UTC