diff --git a/base.css b/base.css index 24d4369..ba5c0dc 100644 --- a/base.css +++ b/base.css @@ -7,6 +7,14 @@ Under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 Internati padding: 0; box-sizing: border-box; } +#st{ + position: absolute; + left: -1080px; + top: -1080px; + font-size: 1em; + visibility: hidden; + white-space: nowrap; +} main{ padding-top: 70px; padding-left: 6px; @@ -122,6 +130,8 @@ main{ } .menu a, .vmenu a{ display: block; +} +.menu a, .vmenu a, #st{ padding: 24px 16px; } .vmenu li{ @@ -321,9 +331,6 @@ main{ float: right; width: auto; } - .vnav{ - display: none; - } .menu li{ float: left; } diff --git a/index.go.html b/index.go.html index deb0ae8..ba943b6 100644 --- a/index.go.html +++ b/index.go.html @@ -195,5 +195,6 @@ License.

+
\ No newline at end of file diff --git a/index.js b/index.js index 6b25dbb..7968b33 100644 --- a/index.js +++ b/index.js @@ -290,4 +290,14 @@ function SortDurationD(a, b) { } else { return 1 } +} +function GetNavTextWidth(s) { + var st = document.getElementById("st"); + if (st) { + st.textContent = s + var trw = st.clientWidth; + st.textContent = "" + return trw; + } + return 8 * s.length + 32 } \ No newline at end of file