Artifact
93d007e70ba0d22ea8b58b080f28da806b72a001 :
File
parts/sanfrancisco/header.txt
— part of check-in
[fd1ca021d9]
at
2015-02-12 07:33:46
on branch trunk
— Fix .submenu a:hover border wobbling.
(user:
mario
size: 2437)
0000: 3c 68 74 6d 6c 3e 0a 20 20 3c 68 65 61 64 3e 0a <html>. <head>.
0010: 20 20 20 20 3c 62 61 73 65 20 68 72 65 66 3d 22 <base href="
0020: 24 62 61 73 65 75 72 6c 2f 24 63 75 72 72 65 6e $baseurl/$curren
0030: 74 5f 70 61 67 65 22 20 2f 3e 0a 20 20 20 20 3c t_page" />. <
0040: 74 69 74 6c 65 3e 24 3c 70 72 6f 6a 65 63 74 5f title>$<project_
0050: 6e 61 6d 65 3e 3a 20 24 3c 74 69 74 6c 65 3e 3c name>: $<title><
0060: 2f 74 69 74 6c 65 3e 0a 20 20 20 20 20 20 3c 6c /title>. <l
0070: 69 6e 6b 20 72 65 6c 3d 22 61 6c 74 65 72 6e 61 ink rel="alterna
0080: 74 65 22 20 74 79 70 65 3d 22 61 70 70 6c 69 63 te" type="applic
0090: 61 74 69 6f 6e 2f 72 73 73 2b 78 6d 6c 22 20 74 ation/rss+xml" t
00a0: 69 74 6c 65 3d 22 52 53 53 20 46 65 65 64 22 0a itle="RSS Feed".
00b0: 20 20 20 20 20 20 20 20 20 20 20 20 68 72 65 66 href
00c0: 3d 22 24 68 6f 6d 65 2f 74 69 6d 65 6c 69 6e 65 ="$home/timeline
00d0: 2e 72 73 73 22 20 2f 3e 0a 20 20 20 20 20 20 3c .rss" />. <
00e0: 6c 69 6e 6b 20 72 65 6c 3d 22 73 74 79 6c 65 73 link rel="styles
00f0: 68 65 65 74 22 20 68 72 65 66 3d 22 24 68 6f 6d heet" href="$hom
0100: 65 2f 73 74 79 6c 65 2e 63 73 73 3f 64 65 66 61 e/style.css?defa
0110: 75 6c 74 22 20 74 79 70 65 3d 22 74 65 78 74 2f ult" type="text/
0120: 63 73 73 22 0a 20 20 20 20 20 20 20 20 20 20 20 css".
0130: 20 6d 65 64 69 61 3d 22 73 63 72 65 65 6e 22 20 media="screen"
0140: 2f 3e 0a 20 20 3c 2f 68 65 61 64 3e 0a 0a 20 20 />. </head>..
0150: 3c 62 6f 64 79 3e 0a 20 20 20 20 3c 64 69 76 20 <body>. <div
0160: 63 6c 61 73 73 3d 22 68 65 61 64 65 72 22 3e 0a class="header">.
0170: 20 20 20 20 20 20 3c 64 69 76 20 63 6c 61 73 73 <div class
0180: 3d 22 74 69 74 6c 65 22 3e 3c 68 31 3e 24 3c 70 ="title"><h1>$<p
0190: 72 6f 6a 65 63 74 5f 6e 61 6d 65 3e 3c 2f 68 31 roject_name></h1
01a0: 3e 24 3c 74 69 74 6c 65 3e 3c 2f 64 69 76 3e 0a >$<title></div>.
01b0: 20 20 20 20 20 20 20 20 3c 64 69 76 20 63 6c 61 <div cla
01c0: 73 73 3d 22 73 74 61 74 75 73 22 3e 3c 74 68 31 ss="status"><th1
01d0: 3e 0a 20 20 20 20 20 69 66 20 7b 5b 69 6e 66 6f >. if {[info
01e0: 20 65 78 69 73 74 73 20 6c 6f 67 69 6e 5d 7d 20 exists login]}
01f0: 7b 0a 20 20 20 20 20 20 20 68 74 6d 6c 20 22 24 {. html "$
0200: 6c 6f 67 69 6e 20 e2 80 94 20 3c 61 20 68 72 65 login — <a hre
0210: 66 3d 27 24 68 6f 6d 65 2f 6c 6f 67 69 6e 27 3e f='$home/login'>
0220: 4c 6f 67 6f 75 74 3c 2f 61 3e 5c 6e 22 0a 20 20 Logout</a>\n".
0230: 20 20 20 7d 20 65 6c 73 65 20 7b 0a 20 20 20 20 } else {.
0240: 20 20 20 68 74 6d 6c 20 22 3c 61 20 68 72 65 66 html "<a href
0250: 3d 27 24 68 6f 6d 65 2f 6c 6f 67 69 6e 27 3e 4c ='$home/login'>L
0260: 6f 67 69 6e 3c 2f 61 3e 5c 6e 22 0a 20 20 20 20 ogin</a>\n".
0270: 20 7d 0a 20 20 20 20 20 20 20 20 3c 2f 74 68 31 }. </th1
0280: 3e 3c 2f 64 69 76 3e 0a 20 20 20 20 3c 2f 64 69 ></div>. </di
0290: 76 3e 0a 0a 20 20 20 20 3c 64 69 76 20 63 6c 61 v>.. <div cla
02a0: 73 73 3d 22 6d 61 69 6e 6d 65 6e 75 22 3e 0a 20 ss="mainmenu">.
02b0: 20 20 20 20 20 3c 74 68 31 3e 0a 70 72 6f 63 20 <th1>.proc
02c0: 69 73 69 6e 20 7b 76 61 6c 20 6c 73 74 7d 20 7b isin {val lst} {
02d0: 0a 20 20 20 20 73 65 74 20 74 6f 74 20 5b 6c 6c . set tot [ll
02e0: 65 6e 67 74 68 20 24 6c 73 74 5d 0a 20 20 20 20 ength $lst].
02f0: 66 6f 72 20 7b 73 65 74 20 69 20 30 7d 20 7b 24 for {set i 0} {$
0300: 69 20 3c 20 24 74 6f 74 7d 20 7b 73 65 74 20 69 i < $tot} {set i
0310: 20 5b 65 78 70 72 20 7b 24 69 20 2b 20 31 7d 5d [expr {$i + 1}]
0320: 7d 20 7b 0a 20 20 20 20 20 20 20 20 73 65 74 20 } {. set
0330: 63 75 72 20 5b 6c 69 6e 64 65 78 20 24 6c 73 74 cur [lindex $lst
0340: 20 24 69 5d 0a 20 20 20 20 20 20 20 20 69 66 20 $i]. if
0350: 7b 24 76 61 6c 20 65 71 20 24 63 75 72 7d 20 7b {$val eq $cur} {
0360: 0a 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 . ret
0370: 75 72 6e 20 30 0a 20 20 20 20 20 20 20 20 7d 0a urn 0. }.
0380: 20 20 20 20 7d 0a 20 20 20 20 72 65 74 75 72 6e }. return
0390: 20 31 0a 7d 0a 0a 70 72 6f 63 20 6d 65 6e 75 6c 1.}..proc menul
03a0: 69 6e 6b 20 7b 70 61 67 65 6e 61 6d 65 20 75 72 ink {pagename ur
03b0: 6c 20 6e 61 6d 65 7d 20 7b 0a 20 20 20 20 75 70 l name} {. up
03c0: 76 61 72 20 63 75 72 72 65 6e 74 5f 70 61 67 65 var current_page
03d0: 20 63 75 72 72 65 6e 74 0a 20 20 20 20 75 70 76 current. upv
03e0: 61 72 20 68 6f 6d 65 20 68 6f 6d 65 0a 0a 20 20 ar home home..
03f0: 20 20 73 65 74 20 63 6f 6d 70 73 65 74 75 70 20 set compsetup
0400: 5b 73 74 72 69 6e 67 20 63 6f 6d 70 61 72 65 20 [string compare
0410: 5b 73 74 72 69 6e 67 20 72 61 6e 67 65 20 24 63 [string range $c
0420: 75 72 72 65 6e 74 20 30 20 34 5d 20 73 65 74 75 urrent 0 4] setu
0430: 70 5d 0a 20 20 20 20 73 65 74 20 63 6f 6d 70 68 p]. set comph
0440: 6f 6d 65 20 5b 73 74 72 69 6e 67 20 63 6f 6d 70 ome [string comp
0450: 61 72 65 20 5b 73 74 72 69 6e 67 20 72 61 6e 67 are [string rang
0460: 65 20 24 63 75 72 72 65 6e 74 20 30 20 33 5d 20 e $current 0 3]
0470: 68 6f 6d 65 5d 0a 20 20 20 20 73 65 74 20 63 6f home]. set co
0480: 6d 70 74 61 67 20 5b 73 74 72 69 6e 67 20 63 6f mptag [string co
0490: 6d 70 61 72 65 20 24 63 75 72 72 65 6e 74 20 74 mpare $current t
04a0: 61 67 74 69 6d 65 6c 69 6e 65 5d 0a 20 20 20 20 agtimeline].
04b0: 73 65 74 20 63 6f 6d 70 62 72 20 5b 73 74 72 69 set compbr [stri
04c0: 6e 67 20 63 6f 6d 70 61 72 65 20 24 63 75 72 72 ng compare $curr
04d0: 65 6e 74 20 62 72 74 69 6d 65 6c 69 6e 65 5d 0a ent brtimeline].
04e0: 20 20 20 20 73 65 74 20 63 6f 6d 70 64 69 72 20 set compdir
04f0: 5b 69 73 69 6e 20 24 63 75 72 72 65 6e 74 20 22 [isin $current "
0500: 61 72 74 69 66 61 63 74 20 63 69 20 66 69 6e 66 artifact ci finf
0510: 6f 20 68 65 78 64 75 6d 70 22 5d 0a 20 20 20 20 o hexdump"].
0520: 73 65 74 20 63 6f 6d 70 74 6c 20 5b 73 74 72 69 set comptl [stri
0530: 6e 67 20 63 6f 6d 70 61 72 65 20 24 63 75 72 72 ng compare $curr
0540: 65 6e 74 20 69 6e 66 6f 5d 0a 20 20 20 20 73 65 ent info]. se
0550: 74 20 63 6f 6d 70 74 6b 74 20 5b 69 73 69 6e 20 t comptkt [isin
0560: 24 63 75 72 72 65 6e 74 20 22 6d 6f 64 72 65 71 $current "modreq
0570: 20 72 70 74 65 64 69 74 20 74 6b 74 6e 65 77 20 rptedit tktnew
0580: 72 70 74 73 71 6c 20 72 70 74 76 69 65 77 22 5d rptsql rptview"]
0590: 0a 0a 20 20 20 20 68 74 6d 6c 20 22 3c 61 20 68 .. html "<a h
05a0: 72 65 66 3d 27 24 68 6f 6d 65 24 75 72 6c 27 22 ref='$home$url'"
05b0: 0a 0a 20 20 20 20 69 66 20 7b 24 70 61 67 65 6e .. if {$pagen
05c0: 61 6d 65 20 65 71 20 24 63 75 72 72 65 6e 74 0a ame eq $current.
05d0: 20 20 20 20 20 20 20 20 7c 7c 20 28 24 70 61 67 || ($pag
05e0: 65 6e 61 6d 65 20 65 71 20 22 68 6f 6d 65 22 20 ename eq "home"
05f0: 26 26 20 24 63 6f 6d 70 68 6f 6d 65 20 3d 3d 20 && $comphome ==
0600: 30 29 0a 20 20 20 20 20 20 20 20 7c 7c 20 28 24 0). || ($
0610: 70 61 67 65 6e 61 6d 65 20 65 71 20 22 73 65 74 pagename eq "set
0620: 75 70 22 20 26 26 20 24 63 6f 6d 70 73 65 74 75 up" && $compsetu
0630: 70 20 3d 3d 20 30 29 0a 20 20 20 20 20 20 20 20 p == 0).
0640: 7c 7c 20 28 24 70 61 67 65 6e 61 6d 65 20 65 71 || ($pagename eq
0650: 20 22 74 61 67 6c 69 73 74 22 20 26 26 20 24 63 "taglist" && $c
0660: 6f 6d 70 74 61 67 20 3d 3d 20 30 29 0a 20 20 20 omptag == 0).
0670: 20 20 20 20 20 7c 7c 20 28 24 70 61 67 65 6e 61 || ($pagena
0680: 6d 65 20 65 71 20 22 64 69 72 22 20 26 26 20 24 me eq "dir" && $
0690: 63 6f 6d 70 64 69 72 20 3d 3d 20 30 29 0a 20 20 compdir == 0).
06a0: 20 20 20 20 20 20 7c 7c 20 28 24 70 61 67 65 6e || ($pagen
06b0: 61 6d 65 20 65 71 20 22 74 69 6d 65 6c 69 6e 65 ame eq "timeline
06c0: 22 20 26 26 20 24 63 6f 6d 70 74 6c 20 3d 3d 20 " && $comptl ==
06d0: 30 29 0a 20 20 20 20 20 20 20 20 7c 7c 20 28 24 0). || ($
06e0: 70 61 67 65 6e 61 6d 65 20 65 71 20 22 74 69 63 pagename eq "tic
06f0: 6b 65 74 22 20 26 26 20 24 63 6f 6d 70 74 6b 74 ket" && $comptkt
0700: 20 3d 3d 20 30 29 0a 20 20 20 20 20 20 20 20 7c == 0). |
0710: 7c 20 28 24 70 61 67 65 6e 61 6d 65 20 65 71 20 | ($pagename eq
0720: 22 62 72 6c 69 73 74 22 20 26 26 20 24 63 6f 6d "brlist" && $com
0730: 70 62 72 20 3d 3d 20 30 29 0a 20 20 20 20 7d 20 pbr == 0). }
0740: 7b 0a 20 20 20 20 20 20 20 20 68 74 6d 6c 20 22 {. html "
0750: 20 63 6c 61 73 73 3d 27 61 63 74 69 76 65 27 20 class='active'
0760: 22 0a 20 20 20 20 7d 0a 0a 20 20 20 20 68 74 6d ". }.. htm
0770: 6c 20 22 3e 24 6e 61 6d 65 3c 2f 61 3e 22 0a 7d l ">$name</a>".}
0780: 0a 0a 6d 65 6e 75 6c 69 6e 6b 20 22 68 6f 6d 65 ..menulink "home
0790: 22 20 24 69 6e 64 65 78 5f 70 61 67 65 20 48 6f " $index_page Ho
07a0: 6d 65 0a 0a 69 66 20 7b 5b 61 6e 79 63 61 70 20 me..if {[anycap
07b0: 6a 6f 72 5d 7d 20 7b 0a 20 20 20 20 6d 65 6e 75 jor]} {. menu
07c0: 6c 69 6e 6b 20 22 74 69 6d 65 6c 69 6e 65 22 20 link "timeline"
07d0: 22 2f 74 69 6d 65 6c 69 6e 65 22 20 54 69 6d 65 "/timeline" Time
07e0: 6c 69 6e 65 0a 7d 0a 69 66 20 7b 5b 68 61 73 63 line.}.if {[hasc
07f0: 61 70 20 6f 68 5d 7d 20 7b 0a 20 20 20 20 6d 65 ap oh]} {. me
0800: 6e 75 6c 69 6e 6b 20 22 64 69 72 22 20 22 2f 64 nulink "dir" "/d
0810: 69 72 3f 63 69 3d 74 69 70 22 20 46 69 6c 65 73 ir?ci=tip" Files
0820: 0a 7d 0a 69 66 20 7b 5b 68 61 73 63 61 70 20 6f .}.if {[hascap o
0830: 5d 7d 20 7b 0a 20 20 20 20 6d 65 6e 75 6c 69 6e ]} {. menulin
0840: 6b 20 22 62 72 6c 69 73 74 22 20 22 2f 62 72 6c k "brlist" "/brl
0850: 69 73 74 22 20 42 72 61 6e 63 68 65 73 0a 20 20 ist" Branches.
0860: 20 20 6d 65 6e 75 6c 69 6e 6b 20 22 74 61 67 6c menulink "tagl
0870: 69 73 74 22 20 22 2f 74 61 67 6c 69 73 74 22 20 ist" "/taglist"
0880: 54 61 67 73 0a 7d 0a 69 66 20 7b 5b 68 61 73 63 Tags.}.if {[hasc
0890: 61 70 20 72 5d 7d 20 7b 0a 20 20 20 20 6d 65 6e ap r]} {. men
08a0: 75 6c 69 6e 6b 20 22 74 69 63 6b 65 74 22 20 22 ulink "ticket" "
08b0: 2f 74 69 63 6b 65 74 22 20 54 69 63 6b 65 74 73 /ticket" Tickets
08c0: 0a 7d 0a 69 66 20 7b 5b 68 61 73 63 61 70 20 6a .}.if {[hascap j
08d0: 5d 7d 20 7b 0a 20 20 20 20 6d 65 6e 75 6c 69 6e ]} {. menulin
08e0: 6b 20 22 77 69 6b 69 22 20 22 2f 77 69 6b 69 22 k "wiki" "/wiki"
08f0: 20 57 69 6b 69 0a 7d 0a 69 66 20 7b 5b 68 61 73 Wiki.}.if {[has
0900: 63 61 70 20 73 5d 7d 20 7b 0a 20 20 20 20 6d 65 cap s]} {. me
0910: 6e 75 6c 69 6e 6b 20 22 73 65 74 75 70 22 20 22 nulink "setup" "
0920: 2f 73 65 74 75 70 22 20 41 64 6d 69 6e 0a 7d 20 /setup" Admin.}
0930: 65 6c 73 65 69 66 20 7b 5b 68 61 73 63 61 70 20 elseif {[hascap
0940: 61 5d 7d 20 7b 0a 20 20 20 20 6d 65 6e 75 6c 69 a]} {. menuli
0950: 6e 6b 20 22 73 65 74 75 70 5f 75 6c 69 73 74 22 nk "setup_ulist"
0960: 20 22 2f 73 65 74 75 70 5f 75 6c 69 73 74 22 20 "/setup_ulist"
0970: 55 73 65 72 73 0a 7d 0a 3c 2f 74 68 31 3e 3c 2f Users.}.</th1></
0980: 64 69 76 3e 0a div>.