Skip to content

Commit

Permalink
CLDR-17803 site: popup menu for subpages
Browse files Browse the repository at this point in the history
  • Loading branch information
srl295 committed Sep 6, 2024
1 parent 25795ce commit da215f4
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 5 deletions.
22 changes: 19 additions & 3 deletions docs/site/assets/css/page.css
Original file line number Diff line number Diff line change
Expand Up @@ -43,20 +43,36 @@ header .nav ul b {
color: gray;
}

.title ul.subpages {
display: none;
}

.title:hover ul.subpages {
display: block;
}

header .nav .crumb {
color: white;
margin: .5em;
}

header .nav ul {
display: inline-flexbox;
width: 90%;
display: inline;
/* width: 90%; */
box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
z-index: 1;
background-color: navy;
/* background-color: white;
position: absolute; */
padding: 0.53m;
}

header .nav ul li {
display: inline-flex;
display: block;
padding: .5em;
font-size: medium;
margin: 0;
/* color: black !important; */
}

header .message {
Expand Down
9 changes: 7 additions & 2 deletions docs/site/assets/js/cldrsite.js
Original file line number Diff line number Diff line change
Expand Up @@ -204,8 +204,11 @@ const app = Vue.createApp(
<span class="ancestor" v-for="ancestor of ancestorPages" :key="ancestor.href">
<a class="uplink" v-bind:href="ancestor.href">{{ ancestor.title }}</a><span class="crumb">❱</span>
</span>
<span class="title"> {{ ourTitle }} </span>
<ul class="subpages">
<div v-if="!siblingPages || !siblingPages.length" class="title"> {{ ourTitle }} </div>
<div v-else class="title"><span class="hamburger">≡</span>
{{ ourTitle }}
<ul class="subpages">
<li v-for="subpage of siblingPages" :key="subpage.path">
<span v-if="path == subpage.html">
<b>{{ subpage.title }}</b>
Expand All @@ -215,6 +218,8 @@ const app = Vue.createApp(
</a>
</li>
</ul>
</div>
</div>`,
},
{
Expand Down

0 comments on commit da215f4

Please sign in to comment.