Skip to content

Commit

Permalink
CLDR-17934 site: use sitemap.tsv
Browse files Browse the repository at this point in the history
 - add a ❱ marker for pages that have subpages
 - fix navigation detection
  • Loading branch information
srl295 committed Sep 12, 2024
1 parent 1c0c19f commit d3e73dd
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 12 deletions.
22 changes: 11 additions & 11 deletions docs/site/assets/css/page.css
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -80,7 +80,7 @@ header .nav ul li {
}

.subpages .li a {
color: black !important;
color: black !important;
}

header .message {
Expand Down
4 changes: 3 additions & 1 deletion docs/site/assets/js/cldrsite.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down Expand Up @@ -147,6 +147,7 @@ const app = Vue.createApp(
path,
href: path2url(path),
title: usermap[path]?.title || path,
children: (usermap[path].children ?? []).length > 0,
}));
},
ancestorPages() {
Expand Down Expand Up @@ -208,6 +209,7 @@ const app = Vue.createApp(
<li v-for="subpage of children" :key="subpage.path">
<a v-bind:href="subpage.href">
{{ subpage.title }}
<span class="hamburger" v-if="subpage.children">❱</span>
</a>
</li>
</ul>
Expand Down

0 comments on commit d3e73dd

Please sign in to comment.