Revise pdf links to mirror directories.
parent
631d2f48f2
commit
dc6bd76b60
|
@ -14,8 +14,13 @@ open Lean
|
|||
open scoped DocGen4.Jsx
|
||||
|
||||
def moduleListFile (file : NameExt) : BaseHtmlM Html := do
|
||||
let contents :=
|
||||
if file.ext == .pdf then
|
||||
<span>{s!"🗎 {file.getString!} (<a class=\"pdf\" href={← moduleNameExtToLink file}>pdf</a>)"}</span>
|
||||
else
|
||||
<a href={← moduleNameExtToLink file}>{file.getString!}</a>
|
||||
return <div class={if (← getCurrentName) == file.name then "nav_link visible" else "nav_link"}>
|
||||
<a class={if file.ext == .pdf then "pdf" else ""} href={← moduleNameExtToLink file}>{file.getString!}</a>
|
||||
{contents}
|
||||
</div>
|
||||
|
||||
/--
|
||||
|
|
|
@ -42,8 +42,7 @@ def cmp (n₁ n₂ : NameExt) : Ordering :=
|
|||
| ord => ord
|
||||
|
||||
def getString! : NameExt → String
|
||||
| ⟨str _ s, .html⟩ => s
|
||||
| ⟨str _ s, .pdf⟩ => s ++ ".pdf"
|
||||
| ⟨str _ s, _⟩ => s
|
||||
| _ => unreachable!
|
||||
|
||||
end NameExt
|
||||
|
|
|
@ -751,7 +751,6 @@ a:link, a:visited, a:active {
|
|||
|
||||
a.pdf:link, a.pdf:visited, a.pdf:active {
|
||||
color:var(--link-pdf-color);
|
||||
text-decoration: none
|
||||
}
|
||||
|
||||
/** Show it on hover though. **/
|
||||
|
|
Loading…
Reference in New Issue