Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into 1969/action-patch
Browse files Browse the repository at this point in the history
  • Loading branch information
HeikoTheissen committed Sep 2, 2024
2 parents be92e04 + 12d0448 commit dde111a
Show file tree
Hide file tree
Showing 39 changed files with 1,827 additions and 1,238 deletions.
42 changes: 40 additions & 2 deletions docs/odata-csdl-json/odata-csdl-json.html
Original file line number Diff line number Diff line change
Expand Up @@ -93,14 +93,52 @@
ready() {
MathJax.startup.defaultReady();
MathJax.startup.document.outputJax.font.variant.monospace.chars
[0x2019] = [.611, -.287, .525, {f: "T", c: "'"}];
[0x2019] = [.611, -.287, .525, {f: "T", c: ""}];
}
}};
</script>
<script type="text/javascript">
document.addEventListener("DOMContentLoaded", function () {
function darkmode_auto() {
if (darkmode_switch.value === "auto") {
if (darkmode_query.matches) document.documentElement.classList.add("darkmode");
else document.documentElement.classList.remove("darkmode");
}
}

function darkmode_manual() {
localStorage.setItem("odata-specs/darkmode", darkmode_switch.value);
switch (darkmode_switch.value) {
case "off":
document.documentElement.classList.remove("darkmode");
break;
case "on":
document.documentElement.classList.add("darkmode");
break;
case "auto":
darkmode_auto();
break;
}
}

const darkmode_query = matchMedia("(prefers-color-scheme: dark)");
darkmode_query.addEventListener("change", darkmode_auto);
const darkmode_switch = document.getElementById("darkmode");
darkmode_switch.value =
localStorage.getItem("odata-specs/darkmode") || "off";
darkmode_switch.addEventListener("change", darkmode_manual);
darkmode_manual();
});
</script>
<script src="https://cdnjs.cloudflare.com/polyfill/v3/polyfill.min.js?features=es6"></script>
<script src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-chtml-full.js" type="text/javascript"></script>
</head>
<body>
<select id="darkmode">
<option value="off" title="Light mode">&#x263C;</option>
<option value="on" title="Dark mode">&#x263D;</option>
<option value="auto" title="Follow device mode">&#x25D1;</option>
</select>
<p><img src="https://docs.oasis-open.org/templates/OASISLogo-v3.0.png" alt="OASIS Logo" /></p>
<hr />
<h1 id="odata-common-schema-definition-language-csdl-json-representation-version-402">OData Common Schema Definition Language (CSDL) JSON Representation Version 4.02</h1>
Expand Down Expand Up @@ -462,7 +500,7 @@ <h3 id="122-acronyms-and-abbreviations"><a name="AcronymsandAbbreviations" href=
<details open><summary>
<h3 id="123-document-conventions"><a name="DocumentConventions" href="#DocumentConventions">1.2.3 Document Conventions</a></h3>
</summary>
<p>Keywords defined by this specification use <code>this monospaced font</code>.</p>
<p>Keywords defined by this specification use <code>this monospaced font</code>.</p>
<p>Some sections of this specification are illustrated with non-normative examples.</p>
<div class="example">
<p>Example 1: text describing an example uses this paragraph style</p>
Expand Down
2 changes: 1 addition & 1 deletion docs/odata-csdl-json/odata-csdl-json.md
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ Section | Feature / Change | Issue

### <a name="DocumentConventions" href="#DocumentConventions">1.2.3 Document Conventions</a>

Keywords defined by this specification use `this monospaced font`.
Keywords defined by this specification use `this monospaced font`.

Some sections of this specification are illustrated with non-normative examples.

Expand Down
24 changes: 16 additions & 8 deletions docs/odata-csdl-json/styles/odata.css
Original file line number Diff line number Diff line change
Expand Up @@ -149,16 +149,9 @@ table {

p code,
li code,
h1 code,
h2 code,
h3 code,
h4 code,
h5 code,
h6 code,
td > code {
font-family: MJXZERO, MJXTEX-T;
font-size: 1em;
line-height: 0;
font-weight: bold;
}

.example p code,
Expand Down Expand Up @@ -208,6 +201,17 @@ hr:first-of-type {
}

@media screen {
#darkmode {
position: fixed;
top: 0;
right: 0;
}

html.darkmode {
background-color: #f2eee8;
filter: invert(100%);
}

details:not([open]) > summary {
list-style: disclosure-closed;
}
Expand All @@ -218,6 +222,10 @@ hr:first-of-type {
}

@media print {
#darkmode {
display: none;
}

details > summary {
list-style: none;
}
Expand Down
42 changes: 40 additions & 2 deletions docs/odata-csdl-xml/odata-csdl-xml.html
Original file line number Diff line number Diff line change
Expand Up @@ -93,14 +93,52 @@
ready() {
MathJax.startup.defaultReady();
MathJax.startup.document.outputJax.font.variant.monospace.chars
[0x2019] = [.611, -.287, .525, {f: "T", c: "'"}];
[0x2019] = [.611, -.287, .525, {f: "T", c: ""}];
}
}};
</script>
<script type="text/javascript">
document.addEventListener("DOMContentLoaded", function () {
function darkmode_auto() {
if (darkmode_switch.value === "auto") {
if (darkmode_query.matches) document.documentElement.classList.add("darkmode");
else document.documentElement.classList.remove("darkmode");
}
}

function darkmode_manual() {
localStorage.setItem("odata-specs/darkmode", darkmode_switch.value);
switch (darkmode_switch.value) {
case "off":
document.documentElement.classList.remove("darkmode");
break;
case "on":
document.documentElement.classList.add("darkmode");
break;
case "auto":
darkmode_auto();
break;
}
}

const darkmode_query = matchMedia("(prefers-color-scheme: dark)");
darkmode_query.addEventListener("change", darkmode_auto);
const darkmode_switch = document.getElementById("darkmode");
darkmode_switch.value =
localStorage.getItem("odata-specs/darkmode") || "off";
darkmode_switch.addEventListener("change", darkmode_manual);
darkmode_manual();
});
</script>
<script src="https://cdnjs.cloudflare.com/polyfill/v3/polyfill.min.js?features=es6"></script>
<script src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-chtml-full.js" type="text/javascript"></script>
</head>
<body>
<select id="darkmode">
<option value="off" title="Light mode">&#x263C;</option>
<option value="on" title="Dark mode">&#x263D;</option>
<option value="auto" title="Follow device mode">&#x25D1;</option>
</select>
<p><img src="https://docs.oasis-open.org/templates/OASISLogo-v3.0.png" alt="OASIS Logo" /></p>
<hr />
<h1 id="odata-common-schema-definition-language-csdl-xml-representation-version-402">OData Common Schema Definition Language (CSDL) XML Representation Version 4.02</h1>
Expand Down Expand Up @@ -466,7 +504,7 @@ <h3 id="122-acronyms-and-abbreviations"><a name="AcronymsandAbbreviations" href=
<details open><summary>
<h3 id="123-document-conventions"><a name="DocumentConventions" href="#DocumentConventions">1.2.3 Document Conventions</a></h3>
</summary>
<p>Keywords defined by this specification use <code>this monospaced font</code>.</p>
<p>Keywords defined by this specification use <code>this monospaced font</code>.</p>
<p>Some sections of this specification are illustrated with non-normative examples.</p>
<div class="example">
<p>Example 1: text describing an example uses this paragraph style</p>
Expand Down
2 changes: 1 addition & 1 deletion docs/odata-csdl-xml/odata-csdl-xml.md
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ Section | Feature / Change | Issue

### <a name="DocumentConventions" href="#DocumentConventions">1.2.3 Document Conventions</a>

Keywords defined by this specification use `this monospaced font`.
Keywords defined by this specification use `this monospaced font`.

Some sections of this specification are illustrated with non-normative examples.

Expand Down
24 changes: 16 additions & 8 deletions docs/odata-csdl-xml/styles/odata.css
Original file line number Diff line number Diff line change
Expand Up @@ -149,16 +149,9 @@ table {

p code,
li code,
h1 code,
h2 code,
h3 code,
h4 code,
h5 code,
h6 code,
td > code {
font-family: MJXZERO, MJXTEX-T;
font-size: 1em;
line-height: 0;
font-weight: bold;
}

.example p code,
Expand Down Expand Up @@ -208,6 +201,17 @@ hr:first-of-type {
}

@media screen {
#darkmode {
position: fixed;
top: 0;
right: 0;
}

html.darkmode {
background-color: #f2eee8;
filter: invert(100%);
}

details:not([open]) > summary {
list-style: disclosure-closed;
}
Expand All @@ -218,6 +222,10 @@ hr:first-of-type {
}

@media print {
#darkmode {
display: none;
}

details > summary {
list-style: none;
}
Expand Down
Loading

0 comments on commit dde111a

Please sign in to comment.