Skip to content

Commit 2ba3647

Browse files
TheElectronWillromanowski
authored andcommitted
Make the logo redirect to root
1 parent f96b707 commit 2ba3647

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

scala3doc/resources/dotty_res/scripts/ux.js

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,16 @@
11
window.addEventListener("DOMContentLoaded", () => {
2-
var e = document.getElementById("leftToggler");
3-
if (e) {
4-
e.onclick = function () {
2+
var toggler = document.getElementById("leftToggler");
3+
if (toggler) {
4+
toggler.onclick = function () {
55
document.getElementById("leftColumn").classList.toggle("open");
66
};
77
}
8+
var logo = document.getElementById("logo");
9+
if (logo) {
10+
logo.onclick = function() {
11+
window.location = pathToRoot; // global variable pathToRoot is created by the html renderer
12+
};
13+
}
814
hljs.registerLanguage("scala", highlightDotty);
915
hljs.registerAliases(["dotty", "scala3"], "scala");
1016
hljs.initHighlighting();

scala3doc/resources/dotty_res/styles/scalastyle.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,7 @@ th {
132132
background-origin: content-box;
133133
padding: 8px 0 8px 16px;
134134
height: 42px;
135+
cursor: pointer;
135136
}
136137
#logo::after {
137138
color: var(--leftbar-fg);

0 commit comments

Comments
 (0)