Skip to content

Commit a2e75d7

Browse files
committed
Style pending divisions in landing page
… use color, italicization to help readers identify which divisions are available vs. those that haven’t yet been published
1 parent adcfb38 commit a2e75d7

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

app/scss/_toc.scss

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,23 @@
2323
> ul {
2424
margin-left: 0;
2525
}
26+
li.pending {
27+
font-style: italic;
28+
29+
// Borrowed from .hsg-toc a:not(.hsg-current)
30+
a {
31+
color: $color-base;
32+
33+
&:hover {
34+
color: $color-primary-darker;
35+
}
36+
37+
&:focus {
38+
//outline-offset: 0;
39+
outline: 0.25rem solid $color-gray-light;
40+
}
41+
}
42+
}
2643
}
2744

2845
#toc,

modules/frus-toc-html.xqm

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,9 +105,12 @@ declare function toc:toc-div($model as map(*), $node as element(tei:div), $curre
105105
(: we only show certain divs :)
106106
for $node in $node[@xml:id != 'toc'][not(@type = ('document', 'document-pending'))]
107107
let $descendant-docs := $node//tei:div[@type = ('document', 'document-pending')]
108+
let $is-pending := ends-with($node/@type, "-pending")
108109
return
109110
<li>
110111
{
112+
if ($is-pending) then attribute class { 'pending' } else ()
113+
,
111114
let $href := attribute href { toc:href($node) }
112115
let $highlight := if ($node is $current) then 'highlight' else ()
113116
(: .toc-link would trigger an ajax call, so only use this if we're not showing a

0 commit comments

Comments
 (0)