Fossil

Check-in [76916757]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Corrected the is-active marking for the current page's main menu entry in skins which do such marking. It was mismatching other entries when the current page's path was a prefix of an inactive menu entry's path, as reported in forum post c3d646ab0ad1a4c0.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 769167578b47fcb2ae62720bff7ee3574edf29cdd57785d8b98e1a79864f5deb
User & Date: stephan 2021-06-15 14:57:12
References
2021-06-15
17:11
An improved matcher algo for [76916757] and a slight padding adjustment of (.mainmenu a) elements in the default skin to work around a Firefox-specific quirk where the active link underlining did not appear. ... (check-in: 6d9ac907 user: stephan tags: trunk)
Context
2021-06-15
17:11
An improved matcher algo for [76916757] and a slight padding adjustment of (.mainmenu a) elements in the default skin to work around a Firefox-specific quirk where the active link underlining did not appear. ... (check-in: 6d9ac907 user: stephan tags: trunk)
14:57
Corrected the is-active marking for the current page's main menu entry in skins which do such marking. It was mismatching other entries when the current page's path was a prefix of an inactive menu entry's path, as reported in forum post c3d646ab0ad1a4c0. ... (check-in: 76916757 user: stephan tags: trunk)
14:25
Cherrypicked [2ee87308], which was intended for the trunk. ... (check-in: 6456fab6 user: stephan tags: trunk)
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to skins/ardoise/header.txt.

24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
      <ul>
        <th1>
html "<li><a id='hbbtn' href='$home/sitemap' aria-label='Site Map'>&#9776;</a></li>\n"
builtin_request_js hbmenu.js
set once 1
foreach {name url expr class} $mainmenu {
  if {![capexpr $expr]} continue
  if {$once && [string match /$current_page* $url]} {
    lappend class active
    set once 0
  }
  html "<li class='$class'>"
  if {[string match /* $url]} {set url $home$url}
  html "<a href='$url'>$name</a></li>\n"
}
</th1></ul>







|
|







24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
      <ul>
        <th1>
html "<li><a id='hbbtn' href='$home/sitemap' aria-label='Site Map'>&#9776;</a></li>\n"
builtin_request_js hbmenu.js
set once 1
foreach {name url expr class} $mainmenu {
  if {![capexpr $expr]} continue
  if {$once && [string match /$current_page/* $url/]} {
    set class "$class active"
    set once 0
  }
  html "<li class='$class'>"
  if {[string match /* $url]} {set url $home$url}
  html "<a href='$url'>$name</a></li>\n"
}
</th1></ul>

Changes to skins/blitz/header.txt.

25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
    <div class="mainmenu">
      <ul><th1>
html "<li><a id='hbbtn' href='$home/sitemap' aria-label='Site Map'>&#9776;</a></li>\n"
builtin_request_js hbmenu.js
set once 1
foreach {name url expr class} $mainmenu {
  if {![capexpr $expr]} continue
  if {$once && [string match /$current_page* $url]} {
    lappend class active
    set once 0
  }
  html "<li class='$class'>"
  if {[string match /* $url]} {set url $home$url}
  html "<a href='$url'>$name</a></li>\n"
}
</th1></ul>
        </div> <!-- end div mainmenu -->
        <div id="hbdrop"></div>
      </div> <!-- end div container -->
    </div> <!-- end div header -->
    <div class="middle max-full-width">
      <div class="container">







|
|













25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
    <div class="mainmenu">
      <ul><th1>
html "<li><a id='hbbtn' href='$home/sitemap' aria-label='Site Map'>&#9776;</a></li>\n"
builtin_request_js hbmenu.js
set once 1
foreach {name url expr class} $mainmenu {
  if {![capexpr $expr]} continue
  if {$once && [string match /$current_page/* $url/]} {
    set class "active $class"
    set once 0
  }
  html "<li class='$class'>"
  if {[string match /* $url]} {set url $home$url}
  html "<a href='$url'>$name</a></li>\n"
}
</th1></ul>
        </div> <!-- end div mainmenu -->
        <div id="hbdrop"></div>
      </div> <!-- end div container -->
    </div> <!-- end div header -->
    <div class="middle max-full-width">
      <div class="container">

Changes to skins/bootstrap/header.txt.

43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
              <th1>
set once 1
set sitemap 0
set is_index [expr [string compare [string range $current_page 0 4] "index"]==0]
set is_home [expr [string compare [string range $current_page 0 [expr [string length $index_page]-1] ] $index_page]==0]
foreach {name url expr class} $mainmenu {
  if {![capexpr $expr]} continue
  if {$once && [string match /$current_page* $url]} {
    lappend class active
    set once 0
  }
  html "<li class='$class'>"
  if {[string match /* $url]} {set url $home$url}
  if {[string match *sitemap* $url]} {set sitemap 1}
  html "<a href='$url'>$name</a></li>\n"
}







|
|







43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
              <th1>
set once 1
set sitemap 0
set is_index [expr [string compare [string range $current_page 0 4] "index"]==0]
set is_home [expr [string compare [string range $current_page 0 [expr [string length $index_page]-1] ] $index_page]==0]
foreach {name url expr class} $mainmenu {
  if {![capexpr $expr]} continue
  if {$once && [string match /$current_page/* $url/]} {
    set class "active $class"
    set once 0
  }
  html "<li class='$class'>"
  if {[string match /* $url]} {set url $home$url}
  if {[string match *sitemap* $url]} {set sitemap 1}
  html "<a href='$url'>$name</a></li>\n"
}

Changes to skins/darkmode/css.txt.

83
84
85
86
87
88
89
90


91
92
93
94
95
96
97
}
a:visited {opacity: 0.8}
div.mainmenu a, div.submenu a,
div.sectionmenu>a.button, div.submenu label,
div.footer a {
  padding: 0.15em 0.5em;
}
/* div.mainmenu a.active, FIXME: setting of .active is broken for some URIs */


a:hover,
a:visited:hover {
  background-color: #FF4500f0;
  color: rgba(24,24,24,0.8);
  border-radius: 0.1em;
}
.fileage tr:hover,







|
>
>







83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
}
a:visited {opacity: 0.8}
div.mainmenu a, div.submenu a,
div.sectionmenu>a.button, div.submenu label,
div.footer a {
  padding: 0.15em 0.5em;
}
div.mainmenu a.active {
  border-bottom: 1px solid #FF4500f0;
}
a:hover,
a:visited:hover {
  background-color: #FF4500f0;
  color: rgba(24,24,24,0.8);
  border-radius: 0.1em;
}
.fileage tr:hover,

Changes to skins/darkmode/header.txt.

15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
<div class="mainmenu">
<th1>
html "<a id='hbbtn' href='$home/sitemap' aria-label='Site Map'>&#9776;</a>"
builtin_request_js hbmenu.js
foreach {name url expr class} $mainmenu {
  if {![capexpr $expr]} continue
  if {[string match /* $url]} {
    if {[string match /$current_page* $url]} {
      set class "active $class"
    }
    set url $home$url
  }
  html "<a href='$url' class='$class'>$name</a>\n"
}
</th1></div>
<div id='hbdrop'></div>







|








15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
<div class="mainmenu">
<th1>
html "<a id='hbbtn' href='$home/sitemap' aria-label='Site Map'>&#9776;</a>"
builtin_request_js hbmenu.js
foreach {name url expr class} $mainmenu {
  if {![capexpr $expr]} continue
  if {[string match /* $url]} {
    if {[string match /$current_page/* $url/]} {
      set class "active $class"
    }
    set url $home$url
  }
  html "<a href='$url' class='$class'>$name</a>\n"
}
</th1></div>
<div id='hbdrop'></div>

Changes to skins/default/header.txt.

11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
<div class="mainmenu">
<th1>
html "<a id='hbbtn' href='$home/sitemap' aria-label='Site Map'>&#9776;</a>"
builtin_request_js hbmenu.js
foreach {name url expr class} $mainmenu {
  if {![capexpr $expr]} continue
  if {[string match /* $url]} {
    if {[string match /$current_page* $url]} {
      set class "active $class"
    }
    set url $home$url
  }
  html "<a href='$url' class='$class'>$name</a>\n"
}
</th1></div>
<div id='hbdrop'></div>







|








11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
<div class="mainmenu">
<th1>
html "<a id='hbbtn' href='$home/sitemap' aria-label='Site Map'>&#9776;</a>"
builtin_request_js hbmenu.js
foreach {name url expr class} $mainmenu {
  if {![capexpr $expr]} continue
  if {[string match /* $url]} {
    if {[string match /$current_page/* $url/]} {
      set class "active $class"
    }
    set url $home$url
  }
  html "<a href='$url' class='$class'>$name</a>\n"
}
</th1></div>
<div id='hbdrop'></div>

Changes to skins/xekri/header.txt.

92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
updateClock();
</script>
<div class="mainmenu"><th1>
set sitemap 0
foreach {name url expr class} $mainmenu {
  if {![capexpr $expr]} continue
  if {[string match /* $url]} {
    if {[string match /$current_page* $url]} {
      lappend class active
    }
    set url $home$url
  }
  html "<a href='$url' class='$class'>$name</a>\n"
  if {[string match */sitemap $url]} {set sitemap 1}
}
if {!$sitemap} {
  html "<a href='$home/sitemap'>...</a>\n"
}
</th1></div>







|
|










92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
updateClock();
</script>
<div class="mainmenu"><th1>
set sitemap 0
foreach {name url expr class} $mainmenu {
  if {![capexpr $expr]} continue
  if {[string match /* $url]} {
    if {[string match /$current_page/* $url/]} {
      set class "active $class"
    }
    set url $home$url
  }
  html "<a href='$url' class='$class'>$name</a>\n"
  if {[string match */sitemap $url]} {set sitemap 1}
}
if {!$sitemap} {
  html "<a href='$home/sitemap'>...</a>\n"
}
</th1></div>