summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Chris Xiong <chirs241097@gmail.com> 2024-08-09 21:29:42 -0400
committerGravatar Chris Xiong <chirs241097@gmail.com> 2024-08-09 21:29:42 -0400
commit0c9d727aefeee5efd16684b7beabdf30112f924d (patch)
treec00d6966c9b3b436eab6bd0dd988fa0f4f726752
parent3f0eec9bb4afcb2215f91ee5161d02428cee3e80 (diff)
downloadweb-0c9d727aefeee5efd16684b7beabdf30112f924d.tar.xz
Use a slightly less dumb way to display the toggle indicator.
-rw-r--r--index.shtml2
-rw-r--r--libs/music/player2
-rw-r--r--panel.css2
-rw-r--r--panel.js3
4 files changed, 4 insertions, 5 deletions
diff --git a/index.shtml b/index.shtml
index 4d13cc6..65b9e8d 100644
--- a/index.shtml
+++ b/index.shtml
@@ -101,7 +101,7 @@ document.addEventListener("DOMContentLoaded", swonload);
<li><a id="aboutlk" href="#about" onclick="contsw('about');">About</a></li>
<li><a id="linkslk" href="#links" onclick="contsw('links');">Links</a></li>
<li><a href="javascript:showthemesw()">Themes</a></li>
- <li><a href="javascript:togglepanel()" id="paneltoggle" style="display:none;">«</a></li>
+ <li><a href="javascript:togglepanel()" id="paneltoggle" style="display:none;"></a></li>
</ul>
</div>
<div id="content" class="TText">
diff --git a/libs/music/player b/libs/music/player
index 43e1d91..13b3ade 100644
--- a/libs/music/player
+++ b/libs/music/player
@@ -130,7 +130,7 @@ All tracks on this site are available for download. You can simply right click t
<li><a href="//filestorage.chrisoft.org/music/" target="_blank">Downloads</a></li>
<li><a href="javascript:NSUI.showHelp()">Help</a></li>
<li><a href="https://cgit.chrisoft.org/web.git/tree/libs/music">TSOP 2.7.1</a></li>
- <li><a href="javascript:togglepanel()" id="paneltoggle">«</a></li>
+ <li><a href="javascript:togglepanel()" id="paneltoggle"></a></li>
</ul>
</div>
<div id="content">
diff --git a/panel.css b/panel.css
index 36ddcfa..21f9a0a 100644
--- a/panel.css
+++ b/panel.css
@@ -60,6 +60,8 @@ margin-left: 1em;
#panel.collapsed {
left:-15em;
}
+#panel li a#paneltoggle::after {content:'«';}
+#panel.collapsed li a#paneltoggle::after {content:'»';}
#content p{text-indent:2em;}
#content .block h2{font-weight:normal;}
#content .block h3{font-weight:normal;}
diff --git a/panel.js b/panel.js
index 13444af..4136170 100644
--- a/panel.js
+++ b/panel.js
@@ -51,13 +51,10 @@ function unsetevents()
p.onmouseenter=undefined;
p.onmouseleave=undefined;
p.style.left=null;
- if (!p.classList.contains("collapsed"))
- document.getElementById("paneltoggle").innerHTML="«";
}
function togglepanel()
{
let c = document.getElementById("panel").classList.toggle("collapsed");
if (c) document.getElementById("content").classList.add("expanded");
else document.getElementById("content").classList.remove("expanded");
- document.getElementById("paneltoggle").innerHTML=c?"»":"«";
}