Add styling for pdf links.

finite-set-exercises
Joshua Potter 2023-07-17 17:04:54 -06:00
parent 0901cac92d
commit 631d2f48f2
2 changed files with 12 additions and 3 deletions

View File

@ -15,7 +15,7 @@ open scoped DocGen4.Jsx
def moduleListFile (file : NameExt) : BaseHtmlM Html := do def moduleListFile (file : NameExt) : BaseHtmlM Html := do
return <div class={if (← getCurrentName) == file.name then "nav_link visible" else "nav_link"}> return <div class={if (← getCurrentName) == file.name then "nav_link visible" else "nav_link"}>
<a class={if file.ext == .pdf then "pdf_link" else ""} href={← moduleNameExtToLink file}>{file.getString!}</a> <a class={if file.ext == .pdf then "pdf" else ""} href={← moduleNameExtToLink file}>{file.getString!}</a>
</div> </div>
/-- /--

View File

@ -14,8 +14,8 @@ a {
color: var(--link-color); color: var(--link-color);
} }
a.pdf_link { a.pdf {
color: purple; color: var(--link-pdf-color);
} }
h1, h2, h3, h4, h5, h6 { h1, h2, h3, h4, h5, h6 {
@ -35,6 +35,7 @@ nav { line-height: normal; }
--code-bg: #f3f3f3; --code-bg: #f3f3f3;
--text-color: black; --text-color: black;
--link-color: hsl(210, 100%, 30%); --link-color: hsl(210, 100%, 30%);
--link-pdf-color: hsl(272, 61%, 34%);
--implicit-arg-text-color: var(--text-color); --implicit-arg-text-color: var(--text-color);
@ -65,6 +66,7 @@ nav { line-height: normal; }
--code-bg: #363333; --code-bg: #363333;
--text-color: #eee; --text-color: #eee;
--link-color: #58a6ff; --link-color: #58a6ff;
--link-pdf-color: #9d58fd;
--implicit-arg-text-color: var(--text-color); --implicit-arg-text-color: var(--text-color);
@ -98,6 +100,7 @@ nav { line-height: normal; }
--code-bg: #f3f3f3; --code-bg: #f3f3f3;
--text-color: black; --text-color: black;
--link-color: hsl(210, 100%, 30%); --link-color: hsl(210, 100%, 30%);
--link-pdf-color: hsl(272, 61%, 34%);
--implicit-arg-text-color: var(--text-color); --implicit-arg-text-color: var(--text-color);
@ -129,6 +132,7 @@ nav { line-height: normal; }
--code-bg: #363333; --code-bg: #363333;
--text-color: #eee; --text-color: #eee;
--link-color: #58a6ff; --link-color: #58a6ff;
--link-pdf-color: #9d58fd;
--implicit-arg-text-color: var(--text-color); --implicit-arg-text-color: var(--text-color);
@ -745,6 +749,11 @@ a:link, a:visited, a:active {
text-decoration: none; text-decoration: none;
} }
a.pdf:link, a.pdf:visited, a.pdf:active {
color:var(--link-pdf-color);
text-decoration: none
}
/** Show it on hover though. **/ /** Show it on hover though. **/
a:hover { a:hover {
text-decoration: underline; text-decoration: underline;