Skip to content

Commit

Permalink
CLDR-18001 site: move sitemap to separate page
Browse files Browse the repository at this point in the history
  • Loading branch information
srl295 committed Oct 2, 2024
1 parent 00dd586 commit 801d82e
Show file tree
Hide file tree
Showing 9 changed files with 254 additions and 123 deletions.
1 change: 0 additions & 1 deletion docs/site/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,5 @@
/assets/json
/assets/vendor
/sitemap.xml
/sitemap.md


5 changes: 2 additions & 3 deletions docs/site/_layouts/page.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,15 @@
<link rel="stylesheet" href="/assets/css/page.css" />
</head>

<body>
<body class="page">
<!-- <h1>{{ page.title }}</h1> -->
<header>
<header class="pageheader">
<div class="navparent">
<div id="nav" class="nav">
<!-- Vue mount here -->
</div>
</div>
<div class="message"><i>This navigation UI is temporary, just to give access to the pages.</i></div>
<!-- <div class="bar"><a href="/sitemap" class="bar">Site Map</a></div> -->
</header>


Expand Down
40 changes: 40 additions & 0 deletions docs/site/_layouts/sitemap.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
<!doctype html>
<html>

<head>
<meta charset="utf-8">
<title>{{ page.title }}</title>
<link rel="stylesheet" href="/assets/css/reports-v2.css" />
<link rel="stylesheet" href="/assets/css/page.css" />
</head>

<body class="sitemappage">
<!-- <h1>{{ page.title }}</h1> -->
<header>
<div class="navparent">
<div id="nav" class="nav">
<!-- Vue mount here for normal navigation -->
</div>
</div>
<div class="message"><i>This navigation UI is temporary, just to give access to the pages.</i></div>
<!-- <div class="bar"><a href="/sitemap" class="bar">Site Map</a></div> -->
</header>

<section class="body">
{{ content }}
</section>

<div id="sitemap">
<!-- sitemap goes here-->
</div>

<footer>
© 1991-2024 Unicode, Inc. Unicode and the Unicode Logo are registered trademarks of Unicode, Inc. in the U.S. and other countries. See <a href="https://www.unicode.org/copyright.html">Terms of Use</a>.
</footer>
<!-- workaround for cloudflare content-type issue -->
<script src="/assets/vendor/vue.global.prod.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/anchor-js/5.0.0/anchor.min.js" integrity="sha512-byAcNWVEzFfu+tZItctr+WIMUJvpzT2kokkqcBq+VsrM3OrC5Aj9E2gh+hHpU0XNA3wDmX4sDbV5/nkhvTrj4w==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
<script src="/assets/js/cldrsite.js"></script>
</body>

</html>
31 changes: 25 additions & 6 deletions docs/site/assets/css/page.css
Original file line number Diff line number Diff line change
Expand Up @@ -40,19 +40,31 @@ header .nav a.uplink {
color: white;
}

div.showmap {
body.page .showmap a,
body.page .showmap a:visited {
color: white;
text-decoration-color: white;
text-decoration-style: none;
}

body.sitemappage .showmap a,
body.sitemappage .showmap a:visited {
color: gray;
text-decoration-color: gray;
font-weight: bold;
}

.showmap {
position: absolute;
right: 1em;
color: white;
}

div.showmap:hover {
.showmap:hover {
text-decoration: underline;
color: white;
}

header .nav div.subpages,
div.sitemap {
header .nav div.subpages {
box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
z-index: 1;
background-color: white;
Expand All @@ -61,14 +73,21 @@ div.sitemap {
padding: 0.5em;
}

div.sitemap {
padding: 1em;
}

div.submap {
margin-left: 1em;
border-left: 1px solid gray;
padding-left: 0.5em;
}

div.subpages > .hamburger,
div.sitemap .hamburger {
display: none;
}

div.subpages > .hamburger {
position: absolute;
right: 1em;
top: 1em;
Expand Down
106 changes: 53 additions & 53 deletions docs/site/assets/css/reports-v2.css
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
/*
Style sheet for web-based Unicode Standard Annexes, Technical Standards and Technical Reports
Style sheet for web-based Unicode Standard Annexes, Technical Standards and Technical Reports
M.Davis and A.Freytag
Last edited: 2015-04-06 AF, 2015-04-15 KW
removed all "-web" and "-book" suffixes
To use, in <head>...
To use, in <head>...
insert:<link REL="stylesheet" HREF="../reports-v2.css" TYPE="text/css">
*/


/* conditional display */
body { margin: 0; font-family: Arial, Geneva, sans-serif;
color: black; background-color: white; background-repeat:repeat;
color: black; background-color: white; background-repeat:repeat;
background-attachment: scroll; background-position: 0%; }
div.body { margin: 3em; } /* margin for body only */

blockquote { margin: 20px; }
/* for quoting from the standard */
blockquote.tus { font-size: 11pt; font-family: Times New Roman, serif; }
Expand All @@ -37,19 +37,19 @@ li {margin-top: 0.25em; margin-bottom: 0.25em; }
.lightgray { background-color: #E4E4E4 !important; } /*not sure we need this one */
.vlightgray { background-color: #F8F8F8 !important; }
.sandstone { background-color: #ECE8E0 !important; }

span.codepoint { font-family: monospace; }
span.charSample { font-size: 200%; }
span.name { text-transform: lowercase;
span.name { text-transform: lowercase;
font-variant: small-caps; font-size: 75%; }

span.section { font-style: italic; }
span.secno { font-style: italic; }

p.caption { page-break-after: avoid; font-weight: bold; text-align: center; }
p.rule { font-style:italic; background-color: #ECE8E0; }
p.rule { font-style:italic; background-color: #ECE8E0; }
td.rule, th.rule { font-style:italic; font-weight: 400 !important; padding: 3px !important; margin:2px !important; }
td.rule, th.rule { background-color: #ECE8E0 !important; border: 1px solid #F2F2F2 !important; }
td.rule, th.rule { background-color: #ECE8E0 !important; border: 1px solid #F2F2F2 !important; }


/* from UAX#29 */
Expand All @@ -74,7 +74,7 @@ td.icon { border-style: none; border-width: 0; padding: 2px; margin: 0;
background-color: #5555FF; color: white;
font-size: 100%; text-align: left;
font-weight: bold; font-family: Arial, Geneva, sans-serif; }

td.gray { border-style: none; border-width: 0; padding: 0px; margin: 0;
background-color: #EEEEFE; color: white;
font-size: 6pt; }
Expand All @@ -94,10 +94,10 @@ table.border th, table.border td { border-style: solid !important; border-width:


/* Tables should inherit from body, but do not seem to in NN */
a:link { color: #3030FF; text-decoration:none; }
a:active { color: #3030FF; }
a:visited { color: #3030FF; text-decoration:none; }
a:hover { text-decoration:underline; }
section.body a:link { color: #3030FF; text-decoration:none; }
section.body a:active { color: #3030FF; }
section.body a:visited { color: #3030FF; text-decoration:none; }
section.body a:hover { text-decoration:underline; }

/* HEADERS and RELATED STYLES */
h1, h2, h3, h4, h5, h6 { font-weight: bold; margin-top: 8px; }
Expand All @@ -113,11 +113,11 @@ h6 { font-size: small; font-style: italic; }
/* don't color links on headers and captions, unless hovering */
h2 a:link, h3 a:link, h4 a:link, h5 a:link, p.caption a:link, caption a:link,
h2 a:visited, h3 a:visited, h4 a:visited, h5 a:visited, p.caption a:visited, caption a:visited {
color:black;
color:black;
text-decoration:none;
}
h2 a:hover, h3 a:hover, h4 a:hover, h5 a:hover, p.caption a:hover, caption a:hover {
color: #3030FF;
color: #3030FF;
text-decoration:underline;
}

Expand All @@ -141,13 +141,13 @@ h3.summary { margin-top: 1em; }
h4.contents {}
h4.status {}


/* link style for character class */
a.charclass { font-weight:bold; text-decoration: none; color: #808080 }


/* syntax coloring for C source code samples */

.CKeyword {color: rgb(0,0,255); }
.CComment {color: rgb(0,128,0); }
.CCommand { font-weight:bold; color: rgb(255,0,0); }
Expand All @@ -164,20 +164,20 @@ span.removedspan { text-decoration: line-through; background-color: #FFFF00; bor
.reviewnote { background-color: #FFFF80; color: #CC0000; border-style: dashed;
border-width: 1px; }



/* table w/o a grid, except for lines in first and last row like in TR#25 */

table.gray { border-collapse: collapse; border-style: none; border-width: medium; }
th.grayfirst, td.grayfirst { border-left-style: none; border-left-width: medium; border-right-style: none;

th.grayfirst, td.grayfirst { border-left-style: none; border-left-width: medium; border-right-style: none;
border-right-width: medium; border-top: 1.5pt solid gray;
border-bottom: .75pt solid gray; padding-left: 5.4pt;
padding-right: 5.4pt; padding-top: 0in; padding-bottom: 0in }
th.graymiddle, td.graymiddle { border-style: none; border-width: medium; padding-left: 5.4pt;
th.graymiddle, td.graymiddle { border-style: none; border-width: medium; padding-left: 5.4pt;
padding-right:5.4pt; padding-top: 0in; padding-bottom: 0in; }

th.graylast, td.graylast { border-left-style: none; border-left-width: medium; border-right-style: none;
th.graylast, td.graylast { border-left-style: none; border-left-width: medium; border-right-style: none;
border-right-width: medium; border-top-style: none;
border-top-width: medium; border-bottom: 1.5pt solid gray;
padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in;
Expand All @@ -187,12 +187,12 @@ th.graylast, td.graylast { border-left-style: none; border-left-width: medium; b
/* list styles that work well in table of contents */
ul.toc { list-style-position: outside; list-style-type: none; margin-left: 1em; margin-bottom: 0pt;
margin-top: 0pt; line-height: 90%; }

ol.toc { list-style-type: decimal; margin-bottom: 0pt; }

ol ul.toc { list-style-position: outside; list-style-type: none; margin-left: 0em; margin-bottom: 0pt;
margin-top: 0pt; line-height: 90%; }

ul ul.toc { list-style-position: outside; list-style-type: none; margin-left: 1.3em; margin-bottom: 0pt;
margin-top: 0pt; line-height: 90%; }
ul.toc li { margin-left: 0; }
Expand All @@ -202,15 +202,15 @@ ol ul { list-style-type: disc; }
ul.nobullet { list-style-type: none; }

/* is the preceding needed for web ? */

.right { text-align: right; }
.left { text-align: Left; }
.center { text-align: center; }


/* UAX#14 specific styles, duplicated here in case they are applicable elsehwere */
table.pair { border:1px solid; font-size:8pt; }
table.pair th { text-align:center; font-size:8pt; }
table.pair th { text-align:center; font-size:8pt; }
table.pair th.pairItem { background-color:#800080; }
.nb-la { width:7em; border-style: none; border-width: 0; padding-left: 0.2em; background-color:#ECE8E0; }
.nb-lb { border-style: none; border-width: 0; padding-left: 0.2em; background-color:#F0F0F0; }
Expand All @@ -230,42 +230,42 @@ span.symbol { font-size: 90%; font-family: Arial, Geneva, sans-serif } /* same a
/* the -nb variants are the same but w/o borders */

table.simple { border-width:1px; border-style:solid; border-color:#A0A0A0;
border-collapse:collapse; padding:0.2em; font-size:1em}
border-collapse:collapse; padding:0.2em; font-size:1em}
table.simple th { border-width:1px; border-style:solid; border-color:#A0A0A0;
font-weight:bold; padding:5px; text-align: left; }
font-weight:bold; padding:5px; text-align: left; }
table.simple td {border-width:1px; border-style:solid; border-color:#A0A0A0;
padding:5px; text-align: left; }


table.subtle { border-width:1px; border-style:solid; border-color:#A0A0A0;
border-collapse:collapse; padding:0.2em; font-size:1em}
border-collapse:collapse; padding:0.2em; font-size:1em}
table.subtle th { border-width:1px; border-style:solid; border-color:#A0A0A0;
font-weight:bold; padding:5px; text-align: left; }
font-weight:bold; padding:5px; text-align: left; }
table.subtle td {border-width:1px; border-style:solid; border-color:#A0A0A0;
padding:5px; text-align: left; }


table.subtle-nb { border-style:none; border-width:0; border-collapse:collapse; }
table.subtle-nb th { border:solid 1px #F2F2F2; font-weight:bold; padding:5px; text-align:left; }
table.subtle-nb { border-style:none; border-width:0; border-collapse:collapse; }
table.subtle-nb th { border:solid 1px #F2F2F2; font-weight:bold; padding:5px; text-align:left; }
table.subtle-nb td { border-style:none; border-width: 0; font-weight:normal; padding:5px; text-align:left; }

table.subtle-nb table.subtle th { border-width:1px; border-style:solid; border-color:#A0A0A0; }
table.subtle-nb table.subtle td { border-width:1px; border-style:solid; border-color:#A0A0A0; }
table.subtle-nb table.subtle th { border-width:1px; border-style:solid; border-color:#A0A0A0; }
table.subtle-nb table.subtle td { border-width:1px; border-style:solid; border-color:#A0A0A0; }
table.subtle-nb table.simple th { color: #000000; background-color: #FFFFFF; /* was: #FFFFFF; */
border-width:1px; border-style:solid;
border-width:1px; border-style:solid;
border-color:#A0A0A0; }
table.subtle-nb table.simple td { border-width:1px; border-style:solid; border-color:#A0A0A0; }
table.subtle table.simple th { color: #000000; background-color:#FFFFFF; } /*was #FFFFFF */

table.subtle th { color: #606060; background-color:#ECE8E0;}
table.subtle-nb th { color: #606060; background-color:#ECE8E0;}

table.subtle th p { color: #606060; background-color:#ECE8E0; }
table.subtle-nb tr th p { color: #606060; background-color:#ECE8E0; }

table.simple th p { margin:0; }
table.subtle th p { margin:0; }
table.subtle-nb th p { margin:0; }
table.subtle th { color: #606060; background-color:#ECE8E0;}
table.subtle-nb th { color: #606060; background-color:#ECE8E0;}

table.subtle th p { color: #606060; background-color:#ECE8E0; }
table.subtle-nb tr th p { color: #606060; background-color:#ECE8E0; }

table.simple th p { margin:0; }
table.subtle th p { margin:0; }
table.subtle-nb th p { margin:0; }


/* first-child selector only works in IE if DOCTYPE has a URL (standards mode) */
Expand All @@ -275,10 +275,10 @@ table.simple td>p:first-child { margin: 0; }
table.simple td>p { margin-top: 1.5em; }

table.subtle td>p:first-child { margin:0; }
table.subtle td>p { margin-top:1.5em; }
table.subtle td>p { margin-top:1.5em; }

table.subtle-nb td>p:first-child { margin:0; }
table.subtle-nb td>p { margin-top:1.5em; }
table.subtle-nb td>p { margin-top:1.5em; }

table.simple td>ul:first-child { margin-top:0; margin-bottom:0; }
table.simple td>ol:first-child { margin-top:0; margin-bottom:0; }
Expand All @@ -297,7 +297,7 @@ table.subtle-nb td>ol { margin-top:1.5em; margin-bottom:0.5em; }

/* override the default padding use with table style "simple" */
table.nopad { padding: 0; }
table.nopad th, table.nopad td { padding:0;}
table.nopad th, table.nopad td { padding:0;}

table.loose th, table.loose td { padding-top: 8px; padding-bottom: 8px; }

Expand Down
4 changes: 2 additions & 2 deletions docs/site/assets/js/build.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { Dirent } from "node:fs";
// utilities and constants

// files to skip
const SKIP_THESE = /(node_modules|\.jekyll-cache|^sitemap.*)/;
const SKIP_THESE = /(node_modules|\.jekyll-cache|^sitemap.tsv)/;

// final URL of site
const SITE = "https://cldr.unicode.org";
Expand All @@ -31,7 +31,7 @@ const coll = new Intl.Collator(["und"]);
async function processFile(d, fullPath, out) {
const f = await fs.readFile(fullPath, "utf-8");
const m = matter(f);
fullPath = fullPath.replace(/\\/g, '/'); // backslash with slash, for win
fullPath = fullPath.replace(/\\/g, "/"); // backslash with slash, for win
if (m && m.data) {
const { data } = m;
out.all.push({ ...data, fullPath });
Expand Down
Loading

0 comments on commit 801d82e

Please sign in to comment.