Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: make logo on manual into link to root #253

Merged
merged 1 commit into from
Dec 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion src/verso-manual/VersoManual/Html.lean
Original file line number Diff line number Diff line change
Expand Up @@ -467,6 +467,7 @@ def page
(showNavButtons : Bool := true)
(base : Option String := none)
(logo : Option String := none)
(logoLink : Option String := none)
(repoLink : Option String := none)
(issueLink : Option String := none)
(extraStylesheets : List String := [])
Expand Down Expand Up @@ -500,7 +501,13 @@ def page
<nav id="toc">
<input type="checkbox" id="toggle-toc" checked="checked"/>
<div class="first">
{{if let some url := logo then {{<img src={{url}} id="logo"/>}} else .empty }}
{{if let some url := logo then
let logoHtml := {{<img src={{url}}/>}}
let logoDest :=
if let some root := logoLink then root
else relativeRoot
{{<a href={{logoDest}} id="logo">{{logoHtml}}</a>}}
else .empty }}
{{if showNavButtons then toc.navButtons path else .empty}}
{{toc.localHtml path}}
</div>
Expand Down
8 changes: 8 additions & 0 deletions src/verso-manual/VersoManual/Html/Style.lean
Original file line number Diff line number Diff line change
Expand Up @@ -374,6 +374,14 @@ pre, code {
transition: height var(--verso-toc-transition-time) ease-in-out;
}
#logo img {
object-fit: contain;
max-width: 100%;
max-height: 4rem;
margin-left: auto;
display: block;
}
/******** Headerline ********/
#toggle-toc-click {
Expand Down
Loading