Fossil SCM
Copied the header.txt from the "eagle" skin.
Commit
84e7316761890a3b06a0723d60487f648859efb6
Parent
388c140d5c5b6aa…
1 file changed
+127
-48
+127
-48
| --- skins/xekri/header.txt | ||
| +++ skins/xekri/header.txt | ||
| @@ -1,55 +1,134 @@ | ||
| 1 | 1 | <html> |
| 2 | 2 | <head> |
| 3 | - <base href="$baseurl/$current_page" /> | |
| 4 | - <title>$<project_name>: $<title></title> | |
| 5 | - <link rel="alternate" type="application/rss+xml" title="RSS Feed" | |
| 6 | - href="$home/timeline.rss"> | |
| 7 | - <link rel="stylesheet" href="$home/style.css?black2" type="text/css" | |
| 8 | - media="screen"> | |
| 3 | +<base href="$baseurl/$current_page" /> | |
| 4 | +<title>$<project_name>: $<title></title> | |
| 5 | +<link rel="alternate" type="application/rss+xml" title="RSS Feed" | |
| 6 | + href="$home/timeline.rss" /> | |
| 7 | +<link rel="stylesheet" href="$stylesheet_url" type="text/css" | |
| 8 | + media="screen" /> | |
| 9 | 9 | </head> |
| 10 | 10 | <body> |
| 11 | - <div class="header"> | |
| 12 | - <div class="logo"> | |
| 13 | - <img src="$home/logo" alt="logo"> | |
| 14 | - <br /><nobr>$<project_name></nobr> | |
| 15 | - </div> | |
| 16 | - <div class="title">$<title></div> | |
| 17 | - <div class="status"><nobr><th1> | |
| 18 | - if {[info exists login]} { | |
| 19 | - puts "Logged in as $login" | |
| 20 | - } else { | |
| 21 | - puts "Not logged in" | |
| 22 | - } | |
| 23 | - </th1></nobr></div> | |
| 24 | - </div> | |
| 25 | - <div class="mainmenu"> | |
| 11 | +<div class="header"> | |
| 12 | + <div class="logo"> | |
| 26 | 13 | <th1> |
| 27 | - html "<a href='$home$index_page'>Home</a>\n" | |
| 28 | - if {[anycap jor]} { | |
| 29 | - html "<a href='$home/timeline'>Timeline</a>\n" | |
| 30 | - } | |
| 31 | - if {[hascap oh]} { | |
| 32 | - html "<a href='$home/dir?ci=tip'>Files</a>\n" | |
| 33 | - } | |
| 34 | - if {[hascap o]} { | |
| 35 | - html "<a href='$home/brlist'>Branches</a>\n" | |
| 36 | - html "<a href='$home/taglist'>Tags</a>\n" | |
| 37 | - } | |
| 38 | - if {[hascap r]} { | |
| 39 | - html "<a href='$home/reportlist'>Tickets</a>\n" | |
| 40 | - } | |
| 41 | - if {[hascap j]} { | |
| 42 | - html "<a href='$home/wiki'>Wiki</a>\n" | |
| 43 | - } | |
| 44 | - if {[hascap s]} { | |
| 45 | - html "<a href='$home/setup'>Admin</a>\n" | |
| 46 | - } elseif {[hascap a]} { | |
| 47 | - html "<a href='$home/setup_ulist'>Users</a>\n" | |
| 48 | - } | |
| 49 | - if {[info exists login]} { | |
| 50 | - html "<a href='$home/login'>Logout</a>\n" | |
| 14 | + ## | |
| 15 | + ## NOTE: The purpose of this procedure is to take the base URL of the | |
| 16 | + ## Fossil project and return the root of the entire web site using | |
| 17 | + ## the same URI scheme as the base URL (e.g. http or https). | |
| 18 | + ## | |
| 19 | + proc getLogoUrl { baseurl } { | |
| 20 | + set idx(first) [string first // $baseurl] | |
| 21 | + if {$idx(first) != -1} { | |
| 22 | + ## | |
| 23 | + ## NOTE: Skip second slash. | |
| 24 | + ## | |
| 25 | + set idx(first+1) [expr {$idx(first) + 2}] | |
| 26 | + ## | |
| 27 | + ## NOTE: (part 1) The [string first] command does NOT actually | |
| 28 | + ## support the optional startIndex argument as specified | |
| 29 | + ## in the TH1 support manual; therefore, we fake it by | |
| 30 | + ## using the [string range] command and then adding the | |
| 31 | + ## necessary offset to the resulting index manually | |
| 32 | + ## (below). In Tcl, we could use the following instead: | |
| 33 | + ## | |
| 34 | + ## set idx(next) [string first / $baseurl $idx(first+1)] | |
| 35 | + ## | |
| 36 | + set idx(nextRange) [string range $baseurl $idx(first+1) end] | |
| 37 | + set idx(next) [string first / $idx(nextRange)] | |
| 38 | + if {$idx(next) != -1} { | |
| 39 | + ## | |
| 40 | + ## NOTE: (part 2) Add the necessary offset to the result of | |
| 41 | + ## the search for the next slash (i.e. the one after | |
| 42 | + ## the initial search for the two slashes). | |
| 43 | + ## | |
| 44 | + set idx(next) [expr {$idx(next) + $idx(first+1)}] | |
| 45 | + ## | |
| 46 | + ## NOTE: Back up one character from the next slash. | |
| 47 | + ## | |
| 48 | + set idx(next-1) [expr {$idx(next) - 1}] | |
| 49 | + ## | |
| 50 | + ## NOTE: Extract the URI scheme and host from the base URL. | |
| 51 | + ## | |
| 52 | + set scheme [string range $baseurl 0 $idx(first)] | |
| 53 | + set host [string range $baseurl $idx(first+1) $idx(next-1)] | |
| 54 | + ## | |
| 55 | + ## NOTE: Try to stay in SSL mode if we are there now. | |
| 56 | + ## | |
| 57 | + if {[string compare $scheme http:/] == 0} { | |
| 58 | + set scheme http:// | |
| 59 | + } else { | |
| 60 | + set scheme https:// | |
| 61 | + } | |
| 62 | + set logourl $scheme$host/ | |
| 63 | + } else { | |
| 64 | + set logourl $baseurl | |
| 65 | + } | |
| 51 | 66 | } else { |
| 52 | - html "<a href='$home/login'>Login</a>\n" | |
| 67 | + set logourl $baseurl | |
| 53 | 68 | } |
| 54 | - </th1></div> | |
| 55 | - <div id="container"> | |
| 69 | + return $logourl | |
| 70 | + } | |
| 71 | + set logourl [getLogoUrl $baseurl] | |
| 72 | + </th1> | |
| 73 | + <a href="$logourl"> | |
| 74 | + <img src="$logo_image_url" border="0" alt="$project_name"> | |
| 75 | + </a> | |
| 76 | + </div> | |
| 77 | + <div class="title">$<title></div> | |
| 78 | + <div class="status"><nobr><th1> | |
| 79 | + if {[info exists login]} { | |
| 80 | + puts "Logged in as $login" | |
| 81 | + } else { | |
| 82 | + puts "Not logged in" | |
| 83 | + } | |
| 84 | + </th1></nobr><small><div id="clock"></div></small></div> | |
| 85 | +</div> | |
| 86 | +<script> | |
| 87 | +function updateClock(){ | |
| 88 | + var e = document.getElementById("clock"); | |
| 89 | + if(e){ | |
| 90 | + var d = new Date(); | |
| 91 | + function f(n) { | |
| 92 | + return n < 10 ? '0' + n : n; | |
| 93 | + } | |
| 94 | + e.innerHTML = d.getUTCFullYear()+ '-' + | |
| 95 | + f(d.getUTCMonth() + 1) + '-' + | |
| 96 | + f(d.getUTCDate()) + ' ' + | |
| 97 | + f(d.getUTCHours()) + ':' + | |
| 98 | + f(d.getUTCMinutes()); | |
| 99 | + setTimeout("updateClock();",(60-d.getUTCSeconds())*1000); | |
| 100 | + } | |
| 101 | +} | |
| 102 | +updateClock(); | |
| 103 | +</script> | |
| 104 | +<div class="mainmenu"> | |
| 105 | +<th1> | |
| 106 | +html "<a href='$home$index_page'>Home</a>\n" | |
| 107 | +html "<a href='$home/help'>Help</a>\n" | |
| 108 | +if {[anycap jor]} { | |
| 109 | + html "<a href='$home/timeline'>Timeline</a>\n" | |
| 110 | +} | |
| 111 | +if {[anoncap oh]} { | |
| 112 | + html "<a href='$home/tree?ci=tip'>Files</a>\n" | |
| 113 | +} | |
| 114 | +if {[anoncap o]} { | |
| 115 | + html "<a href='$home/brlist'>Branches</a>\n" | |
| 116 | + html "<a href='$home/taglist'>Tags</a>\n" | |
| 117 | +} | |
| 118 | +if {[anoncap r]} { | |
| 119 | + html "<a href='$home/ticket'>Tickets</a>\n" | |
| 120 | +} | |
| 121 | +if {[anoncap j]} { | |
| 122 | + html "<a href='$home/wiki'>Wiki</a>\n" | |
| 123 | +} | |
| 124 | +if {[hascap s]} { | |
| 125 | + html "<a href='$home/setup'>Admin</a>\n" | |
| 126 | +} elseif {[hascap a]} { | |
| 127 | + html "<a href='$home/setup_ulist'>Users</a>\n" | |
| 128 | +} | |
| 129 | +if {[info exists login]} { | |
| 130 | + html "<a href='$home/login'>Logout</a>\n" | |
| 131 | +} else { | |
| 132 | + html "<a href='$home/login'>Login</a>\n" | |
| 133 | +} | |
| 134 | +</th1></div> | |
| 56 | 135 |
| --- skins/xekri/header.txt | |
| +++ skins/xekri/header.txt | |
| @@ -1,55 +1,134 @@ | |
| 1 | <html> |
| 2 | <head> |
| 3 | <base href="$baseurl/$current_page" /> |
| 4 | <title>$<project_name>: $<title></title> |
| 5 | <link rel="alternate" type="application/rss+xml" title="RSS Feed" |
| 6 | href="$home/timeline.rss"> |
| 7 | <link rel="stylesheet" href="$home/style.css?black2" type="text/css" |
| 8 | media="screen"> |
| 9 | </head> |
| 10 | <body> |
| 11 | <div class="header"> |
| 12 | <div class="logo"> |
| 13 | <img src="$home/logo" alt="logo"> |
| 14 | <br /><nobr>$<project_name></nobr> |
| 15 | </div> |
| 16 | <div class="title">$<title></div> |
| 17 | <div class="status"><nobr><th1> |
| 18 | if {[info exists login]} { |
| 19 | puts "Logged in as $login" |
| 20 | } else { |
| 21 | puts "Not logged in" |
| 22 | } |
| 23 | </th1></nobr></div> |
| 24 | </div> |
| 25 | <div class="mainmenu"> |
| 26 | <th1> |
| 27 | html "<a href='$home$index_page'>Home</a>\n" |
| 28 | if {[anycap jor]} { |
| 29 | html "<a href='$home/timeline'>Timeline</a>\n" |
| 30 | } |
| 31 | if {[hascap oh]} { |
| 32 | html "<a href='$home/dir?ci=tip'>Files</a>\n" |
| 33 | } |
| 34 | if {[hascap o]} { |
| 35 | html "<a href='$home/brlist'>Branches</a>\n" |
| 36 | html "<a href='$home/taglist'>Tags</a>\n" |
| 37 | } |
| 38 | if {[hascap r]} { |
| 39 | html "<a href='$home/reportlist'>Tickets</a>\n" |
| 40 | } |
| 41 | if {[hascap j]} { |
| 42 | html "<a href='$home/wiki'>Wiki</a>\n" |
| 43 | } |
| 44 | if {[hascap s]} { |
| 45 | html "<a href='$home/setup'>Admin</a>\n" |
| 46 | } elseif {[hascap a]} { |
| 47 | html "<a href='$home/setup_ulist'>Users</a>\n" |
| 48 | } |
| 49 | if {[info exists login]} { |
| 50 | html "<a href='$home/login'>Logout</a>\n" |
| 51 | } else { |
| 52 | html "<a href='$home/login'>Login</a>\n" |
| 53 | } |
| 54 | </th1></div> |
| 55 | <div id="container"> |
| 56 |
| --- skins/xekri/header.txt | |
| +++ skins/xekri/header.txt | |
| @@ -1,55 +1,134 @@ | |
| 1 | <html> |
| 2 | <head> |
| 3 | <base href="$baseurl/$current_page" /> |
| 4 | <title>$<project_name>: $<title></title> |
| 5 | <link rel="alternate" type="application/rss+xml" title="RSS Feed" |
| 6 | href="$home/timeline.rss" /> |
| 7 | <link rel="stylesheet" href="$stylesheet_url" type="text/css" |
| 8 | media="screen" /> |
| 9 | </head> |
| 10 | <body> |
| 11 | <div class="header"> |
| 12 | <div class="logo"> |
| 13 | <th1> |
| 14 | ## |
| 15 | ## NOTE: The purpose of this procedure is to take the base URL of the |
| 16 | ## Fossil project and return the root of the entire web site using |
| 17 | ## the same URI scheme as the base URL (e.g. http or https). |
| 18 | ## |
| 19 | proc getLogoUrl { baseurl } { |
| 20 | set idx(first) [string first // $baseurl] |
| 21 | if {$idx(first) != -1} { |
| 22 | ## |
| 23 | ## NOTE: Skip second slash. |
| 24 | ## |
| 25 | set idx(first+1) [expr {$idx(first) + 2}] |
| 26 | ## |
| 27 | ## NOTE: (part 1) The [string first] command does NOT actually |
| 28 | ## support the optional startIndex argument as specified |
| 29 | ## in the TH1 support manual; therefore, we fake it by |
| 30 | ## using the [string range] command and then adding the |
| 31 | ## necessary offset to the resulting index manually |
| 32 | ## (below). In Tcl, we could use the following instead: |
| 33 | ## |
| 34 | ## set idx(next) [string first / $baseurl $idx(first+1)] |
| 35 | ## |
| 36 | set idx(nextRange) [string range $baseurl $idx(first+1) end] |
| 37 | set idx(next) [string first / $idx(nextRange)] |
| 38 | if {$idx(next) != -1} { |
| 39 | ## |
| 40 | ## NOTE: (part 2) Add the necessary offset to the result of |
| 41 | ## the search for the next slash (i.e. the one after |
| 42 | ## the initial search for the two slashes). |
| 43 | ## |
| 44 | set idx(next) [expr {$idx(next) + $idx(first+1)}] |
| 45 | ## |
| 46 | ## NOTE: Back up one character from the next slash. |
| 47 | ## |
| 48 | set idx(next-1) [expr {$idx(next) - 1}] |
| 49 | ## |
| 50 | ## NOTE: Extract the URI scheme and host from the base URL. |
| 51 | ## |
| 52 | set scheme [string range $baseurl 0 $idx(first)] |
| 53 | set host [string range $baseurl $idx(first+1) $idx(next-1)] |
| 54 | ## |
| 55 | ## NOTE: Try to stay in SSL mode if we are there now. |
| 56 | ## |
| 57 | if {[string compare $scheme http:/] == 0} { |
| 58 | set scheme http:// |
| 59 | } else { |
| 60 | set scheme https:// |
| 61 | } |
| 62 | set logourl $scheme$host/ |
| 63 | } else { |
| 64 | set logourl $baseurl |
| 65 | } |
| 66 | } else { |
| 67 | set logourl $baseurl |
| 68 | } |
| 69 | return $logourl |
| 70 | } |
| 71 | set logourl [getLogoUrl $baseurl] |
| 72 | </th1> |
| 73 | <a href="$logourl"> |
| 74 | <img src="$logo_image_url" border="0" alt="$project_name"> |
| 75 | </a> |
| 76 | </div> |
| 77 | <div class="title">$<title></div> |
| 78 | <div class="status"><nobr><th1> |
| 79 | if {[info exists login]} { |
| 80 | puts "Logged in as $login" |
| 81 | } else { |
| 82 | puts "Not logged in" |
| 83 | } |
| 84 | </th1></nobr><small><div id="clock"></div></small></div> |
| 85 | </div> |
| 86 | <script> |
| 87 | function updateClock(){ |
| 88 | var e = document.getElementById("clock"); |
| 89 | if(e){ |
| 90 | var d = new Date(); |
| 91 | function f(n) { |
| 92 | return n < 10 ? '0' + n : n; |
| 93 | } |
| 94 | e.innerHTML = d.getUTCFullYear()+ '-' + |
| 95 | f(d.getUTCMonth() + 1) + '-' + |
| 96 | f(d.getUTCDate()) + ' ' + |
| 97 | f(d.getUTCHours()) + ':' + |
| 98 | f(d.getUTCMinutes()); |
| 99 | setTimeout("updateClock();",(60-d.getUTCSeconds())*1000); |
| 100 | } |
| 101 | } |
| 102 | updateClock(); |
| 103 | </script> |
| 104 | <div class="mainmenu"> |
| 105 | <th1> |
| 106 | html "<a href='$home$index_page'>Home</a>\n" |
| 107 | html "<a href='$home/help'>Help</a>\n" |
| 108 | if {[anycap jor]} { |
| 109 | html "<a href='$home/timeline'>Timeline</a>\n" |
| 110 | } |
| 111 | if {[anoncap oh]} { |
| 112 | html "<a href='$home/tree?ci=tip'>Files</a>\n" |
| 113 | } |
| 114 | if {[anoncap o]} { |
| 115 | html "<a href='$home/brlist'>Branches</a>\n" |
| 116 | html "<a href='$home/taglist'>Tags</a>\n" |
| 117 | } |
| 118 | if {[anoncap r]} { |
| 119 | html "<a href='$home/ticket'>Tickets</a>\n" |
| 120 | } |
| 121 | if {[anoncap j]} { |
| 122 | html "<a href='$home/wiki'>Wiki</a>\n" |
| 123 | } |
| 124 | if {[hascap s]} { |
| 125 | html "<a href='$home/setup'>Admin</a>\n" |
| 126 | } elseif {[hascap a]} { |
| 127 | html "<a href='$home/setup_ulist'>Users</a>\n" |
| 128 | } |
| 129 | if {[info exists login]} { |
| 130 | html "<a href='$home/login'>Logout</a>\n" |
| 131 | } else { |
| 132 | html "<a href='$home/login'>Login</a>\n" |
| 133 | } |
| 134 | </th1></div> |
| 135 |