diff --git a/doc/src/hexdoc/_templates/components/welcome.html.jinja b/doc/src/hexdoc/_templates/components/welcome.html.jinja index fa712e1d..d9ada8e3 100644 --- a/doc/src/hexdoc/_templates/components/welcome.html.jinja +++ b/doc/src/hexdoc/_templates/components/welcome.html.jinja @@ -17,8 +17,10 @@ progression. Alternatively, click here to get a version with all spoilers showing.

- {% if not is_bleeding_edge %} -
- {% endif %} + {# conditionally revealed using js #} + \ No newline at end of file diff --git a/doc/src/hexdoc/_templates/main.css b/doc/src/hexdoc/_templates/main.css index 83d81506..46118e93 100644 --- a/doc/src/hexdoc/_templates/main.css +++ b/doc/src/hexdoc/_templates/main.css @@ -109,6 +109,11 @@ canvas.spell-viz { white-space: nowrap; } +.hidden { + display: none; + visibility: hidden; +} + @media (min-width: 40rem) { .book-body { width: 70%; diff --git a/doc/src/hexdoc/_templates/main.js.jinja b/doc/src/hexdoc/_templates/main.js.jinja index ee7d334a..7a041f45 100644 --- a/doc/src/hexdoc/_templates/main.js.jinja +++ b/doc/src/hexdoc/_templates/main.js.jinja @@ -370,17 +370,10 @@ function sortSitemapVersions(sitemap) { function addDropdowns(sitemap) { let [branches, versions] = sortSitemapVersions(sitemap); - // set the "old version" message if this page is a version number, but not the latest one + // reveal the "old version" message if this page is a version number, but not the latest one // this isn't a dropdown, but it's here since we have the data anyway if (versions.slice(1).includes(VERSION)) { - // thanks for the idea petra - let oldVersionNotice = document.createElement("i"); - oldVersionNotice.textContent = "The past is a foreign country; they do things differently there."; - - document.getElementById("old-version-notice").append( - document.createElement("br"), - oldVersionNotice, - ); + document.getElementById("old-version-notice").classList.remove("hidden") } // versions