From d3e73ddb0b5f9cb9723df0295893b6eb1bd28046 Mon Sep 17 00:00:00 2001 From: "Steven R. Loomis" Date: Thu, 12 Sep 2024 18:27:22 -0500 Subject: [PATCH] CLDR-17934 site: use sitemap.tsv MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - add a ❱ marker for pages that have subpages - fix navigation detection --- docs/site/assets/css/page.css | 22 +++++++++++----------- docs/site/assets/js/cldrsite.js | 4 +++- 2 files changed, 14 insertions(+), 12 deletions(-) diff --git a/docs/site/assets/css/page.css b/docs/site/assets/css/page.css index a3a6119b2e7..6f5b50aa896 100644 --- a/docs/site/assets/css/page.css +++ b/docs/site/assets/css/page.css @@ -41,22 +41,22 @@ header .nav a.uplink { } header .nav div.subpages { - box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2); - z-index: 1; - background-color: white; - position: absolute; - color: black; - padding: 0.5em; + box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2); + z-index: 1; + background-color: white; + position: absolute; + color: black; + padding: 0.5em; } div.subpages .hamburger { - left: 1em; - top: 1em; - color: darkslateblue; + left: 1em; + top: 1em; + color: darkslateblue; } .subpages .hamburger:hover { - color: gray; + color: gray; } header .nav ul b { @@ -80,7 +80,7 @@ header .nav ul li { } .subpages .li a { - color: black !important; + color: black !important; } header .message { diff --git a/docs/site/assets/js/cldrsite.js b/docs/site/assets/js/cldrsite.js index 67b505dddc2..54f1422ec83 100644 --- a/docs/site/assets/js/cldrsite.js +++ b/docs/site/assets/js/cldrsite.js @@ -38,7 +38,7 @@ function dropmd(p) { /** replace a/b/c.html with a/b/c */ function drophtml(p) { - return p.replace(/\.html$/, ""); + return p.replace(/\.html$/, "").replace(/\/$/, ""); } /** load and cook the site data */ @@ -147,6 +147,7 @@ const app = Vue.createApp( path, href: path2url(path), title: usermap[path]?.title || path, + children: (usermap[path].children ?? []).length > 0, })); }, ancestorPages() { @@ -208,6 +209,7 @@ const app = Vue.createApp(
  • {{ subpage.title }} +