From b3949bdf468dbdf565d0854a9abef8c6bbdcbd88 Mon Sep 17 00:00:00 2001 From: Bellangelo Date: Wed, 18 Dec 2024 23:01:22 +0200 Subject: [PATCH 01/14] Separate main css from build script --- scripts/md2html/main.css | 73 ++++++++++++++++++++++++++++++++++++++ scripts/md2html/md2html.js | 15 +------- 2 files changed, 74 insertions(+), 14 deletions(-) create mode 100644 scripts/md2html/main.css diff --git a/scripts/md2html/main.css b/scripts/md2html/main.css new file mode 100644 index 0000000000..ba4f15bbb9 --- /dev/null +++ b/scripts/md2html/main.css @@ -0,0 +1,73 @@ +#respec-ui { + visibility: hidden; +} + +#title { + color: #578000; +} + +#subtitle { + color: #578000; +} + +.dt-published { + color: #578000; +} + +.dt-published::before { + content: "Published "; +} + +h1, h2, h3, h4, h5, h6 { + color: #578000; + font-weight: normal; + font-style: normal; +} + +a[href] { + color: #45512c; +} + +body:not(.toc-inline) #toc h2 { + color: #45512c; +} + +table { + display: block; + width: 100%; + overflow: auto; +} + +table th { + font-weight: 600; +} + +table th, table td { + padding: 6px 13px; + border: 1px solid #dfe2e5; +} + +table tr { + background-color: #fff; + border-top: 1px solid #c6cbd1; +} + +table tr:nth-child(2n) { + background-color: #f6f8fa; +} + +pre { + background-color: #f6f8fa !important; +} + +code { + color: #c83500 +} + +th code { + color: inherit +} + +a.bibref { + text-decoration: underline; +} \ No newline at end of file diff --git a/scripts/md2html/md2html.js b/scripts/md2html/md2html.js index fd3ec78f69..eccc2259cb 100644 --- a/scripts/md2html/md2html.js +++ b/scripts/md2html/md2html.js @@ -137,20 +137,7 @@ function preface(title,options) { catch (ex) {} preface += ''; preface += ''; preface += `

${title.split('|')[0]}

`; From f583ff93b89458680821ce9a54dd66c0173d20ee Mon Sep 17 00:00:00 2001 From: Bellangelo Date: Thu, 19 Dec 2024 08:52:55 +0200 Subject: [PATCH 02/14] Add dark mode styling --- scripts/md2html/main.css | 55 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) diff --git a/scripts/md2html/main.css b/scripts/md2html/main.css index ba4f15bbb9..b644246afa 100644 --- a/scripts/md2html/main.css +++ b/scripts/md2html/main.css @@ -70,4 +70,59 @@ th code { a.bibref { text-decoration: underline; +} + +@media (prefers-color-scheme: dark) { + body.darkmode { + --toclink-underline: #6a9000; + --toclink-visited-underline: #fff; + } + + body.darkmode a, + body.darkmode .tocxref, + body.darkmode .u-url { + color: #6a9000; + } + + body.darkmode code { + color: #e66c33; + } + + body.darkmode:not(.toc-inline) #toc h2, + body.darkmode h1, + body.darkmode h2, + body.darkmode h3, + body.darkmode h4, + body.darkmode h5, + body.darkmode h6, + body.darkmode #title, + body.darkmode #subtitle, + body.darkmode .toc-inline, + body.darkmode .dt-published { + color: #7bb01c; + } + + body.darkmode pre, + body.darkmode table tr:nth-child(2n), + body.darkmode table tr { + background-color: #1e1e1e !important; + color: #dcdcdc; + } + + body.darkmode img { + background: transparent; + } + + body.darkmode .logo img { + display: none; + } + + body.darkmode .logo::before { + content: ""; + display: inline-block; + height: 48px; + width: 175px; + background: url("https://raw.githubusercontent.com/OAI/OpenAPI-Style-Guide/refs/heads/main/graphics/bitmap/OpenAPI_Logo_Pantone.png") no-repeat center / contain; + vertical-align: middle; + } } \ No newline at end of file From 15aee4290ea612bc2b2656ca66d9904b91e39bd2 Mon Sep 17 00:00:00 2001 From: Bellangelo Date: Thu, 19 Dec 2024 08:54:13 +0200 Subject: [PATCH 03/14] Enable dark mode functionality --- scripts/md2html/md2html.js | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/md2html/md2html.js b/scripts/md2html/md2html.js index eccc2259cb..f2ae056919 100644 --- a/scripts/md2html/md2html.js +++ b/scripts/md2html/md2html.js @@ -129,6 +129,7 @@ function preface(title,options) { preface += ''; // ReSpec + preface += ''; preface += ''; preface += ``; try { From c94652ed8a241c0d60121133ad345f5bed64b7ae Mon Sep 17 00:00:00 2001 From: Bellangelo Date: Thu, 19 Dec 2024 09:17:45 +0200 Subject: [PATCH 04/14] Update tests --- tests/md2html/fixtures/basic-new.html | 2 +- tests/md2html/fixtures/basic-old.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/md2html/fixtures/basic-new.html b/tests/md2html/fixtures/basic-new.html index c1b911743b..da23ccaf8a 100644 --- a/tests/md2html/fixtures/basic-new.html +++ b/tests/md2html/fixtures/basic-new.html @@ -1,4 +1,4 @@ -OpenAPI Specification v30.0.1 | Introduction, Definitions, & More

OpenAPI Specification v30.0.1

What is the OpenAPI Specification?

The OpenAPI Specification (OAS) defines a standard, programming language-agnostic interface description for HTTP APIs, which allows both humans and computers to discover and understand the capabilities of a service without requiring access to source code, additional documentation, or inspection of network traffic. When properly defined via OpenAPI, a consumer can understand and interact with the remote service with a minimal amount of implementation logic. Similar to what interface descriptions have done for lower-level programming, the OpenAPI Specification removes guesswork in calling a service.

Status of This Document

The source-of-truth for this specification is the HTML file referenced above as This version.
+OpenAPI Specification v30.0.1 | Introduction, Definitions, & More

OpenAPI Specification v30.0.1

What is the OpenAPI Specification?

The OpenAPI Specification (OAS) defines a standard, programming language-agnostic interface description for HTTP APIs, which allows both humans and computers to discover and understand the capabilities of a service without requiring access to source code, additional documentation, or inspection of network traffic. When properly defined via OpenAPI, a consumer can understand and interact with the remote service with a minimal amount of implementation logic. Similar to what interface descriptions have done for lower-level programming, the OpenAPI Specification removes guesswork in calling a service.

Status of This Document

The source-of-truth for this specification is the HTML file referenced above as This version.

Heading 1

Text for first chapter

Version 30.0.1

diff --git a/tests/md2html/fixtures/basic-old.html b/tests/md2html/fixtures/basic-old.html index a80b4489fb..c2e7708da9 100644 --- a/tests/md2html/fixtures/basic-old.html +++ b/tests/md2html/fixtures/basic-old.html @@ -1,4 +1,4 @@ -OpenAPI Specification v30.0.1 | Introduction, Definitions, & More

OpenAPI Specification v30.0.1

What is the OpenAPI Specification?

The OpenAPI Specification (OAS) defines a standard, programming language-agnostic interface description for HTTP APIs, which allows both humans and computers to discover and understand the capabilities of a service without requiring access to source code, additional documentation, or inspection of network traffic. When properly defined via OpenAPI, a consumer can understand and interact with the remote service with a minimal amount of implementation logic. Similar to what interface descriptions have done for lower-level programming, the OpenAPI Specification removes guesswork in calling a service.

Status of This Document

The source-of-truth for this specification is the HTML file referenced above as This version.
+OpenAPI Specification v30.0.1 | Introduction, Definitions, & More

OpenAPI Specification v30.0.1

What is the OpenAPI Specification?

The OpenAPI Specification (OAS) defines a standard, programming language-agnostic interface description for HTTP APIs, which allows both humans and computers to discover and understand the capabilities of a service without requiring access to source code, additional documentation, or inspection of network traffic. When properly defined via OpenAPI, a consumer can understand and interact with the remote service with a minimal amount of implementation logic. Similar to what interface descriptions have done for lower-level programming, the OpenAPI Specification removes guesswork in calling a service.

Status of This Document

The source-of-truth for this specification is the HTML file referenced above as This version.

Heading 1

Text for first chapter

Version 30.0.1

From 2e1267ba105bf32db51c2161fdce28e6b0b02963 Mon Sep 17 00:00:00 2001 From: Bellangelo Date: Thu, 19 Dec 2024 09:19:01 +0200 Subject: [PATCH 05/14] Update tests --- tests/md2html/fixtures/basic-old.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/md2html/fixtures/basic-old.html b/tests/md2html/fixtures/basic-old.html index c2e7708da9..9e31bdeded 100644 --- a/tests/md2html/fixtures/basic-old.html +++ b/tests/md2html/fixtures/basic-old.html @@ -1,4 +1,4 @@ -OpenAPI Specification v30.0.1 | Introduction, Definitions, & More

OpenAPI Specification v30.0.1

What is the OpenAPI Specification?

The OpenAPI Specification (OAS) defines a standard, programming language-agnostic interface description for HTTP APIs, which allows both humans and computers to discover and understand the capabilities of a service without requiring access to source code, additional documentation, or inspection of network traffic. When properly defined via OpenAPI, a consumer can understand and interact with the remote service with a minimal amount of implementation logic. Similar to what interface descriptions have done for lower-level programming, the OpenAPI Specification removes guesswork in calling a service.

Status of This Document

The source-of-truth for this specification is the HTML file referenced above as This version.
+OpenAPI Specification v30.0.1 | Introduction, Definitions, & More

OpenAPI Specification v30.0.1

What is the OpenAPI Specification?

The OpenAPI Specification (OAS) defines a standard, programming language-agnostic interface description for HTTP APIs, which allows both humans and computers to discover and understand the capabilities of a service without requiring access to source code, additional documentation, or inspection of network traffic. When properly defined via OpenAPI, a consumer can understand and interact with the remote service with a minimal amount of implementation logic. Similar to what interface descriptions have done for lower-level programming, the OpenAPI Specification removes guesswork in calling a service.

Status of This Document

The source-of-truth for this specification is the HTML file referenced above as This version.

Heading 1

Text for first chapter

Version 30.0.1

From 973999a6a7c1e774b72ca44aa24cf53d4647f782 Mon Sep 17 00:00:00 2001 From: Bellangelo Date: Thu, 19 Dec 2024 13:09:41 +0200 Subject: [PATCH 06/14] Preferred color is not always the selected one --- scripts/md2html/main.css | 66 +++++++++++++++++++--------------------- 1 file changed, 32 insertions(+), 34 deletions(-) diff --git a/scripts/md2html/main.css b/scripts/md2html/main.css index b644246afa..2c3b6b57b4 100644 --- a/scripts/md2html/main.css +++ b/scripts/md2html/main.css @@ -72,7 +72,6 @@ a.bibref { text-decoration: underline; } -@media (prefers-color-scheme: dark) { body.darkmode { --toclink-underline: #6a9000; --toclink-visited-underline: #fff; @@ -88,41 +87,40 @@ a.bibref { color: #e66c33; } - body.darkmode:not(.toc-inline) #toc h2, - body.darkmode h1, - body.darkmode h2, - body.darkmode h3, - body.darkmode h4, - body.darkmode h5, - body.darkmode h6, - body.darkmode #title, - body.darkmode #subtitle, - body.darkmode .toc-inline, - body.darkmode .dt-published { - color: #7bb01c; - } +body.darkmode:not(.toc-inline) #toc h2, +body.darkmode h1, +body.darkmode h2, +body.darkmode h3, +body.darkmode h4, +body.darkmode h5, +body.darkmode h6, +body.darkmode #title, +body.darkmode #subtitle, +body.darkmode .toc-inline, +body.darkmode .dt-published { + color: #7bb01c; +} - body.darkmode pre, - body.darkmode table tr:nth-child(2n), - body.darkmode table tr { - background-color: #1e1e1e !important; - color: #dcdcdc; - } +body.darkmode pre, +body.darkmode table tr:nth-child(2n), +body.darkmode table tr { + background-color: #1e1e1e !important; + color: #dcdcdc; +} - body.darkmode img { - background: transparent; - } +body.darkmode img { + background: transparent; +} - body.darkmode .logo img { - display: none; - } +body.darkmode .logo img { + display: none; +} - body.darkmode .logo::before { - content: ""; - display: inline-block; - height: 48px; - width: 175px; - background: url("https://raw.githubusercontent.com/OAI/OpenAPI-Style-Guide/refs/heads/main/graphics/bitmap/OpenAPI_Logo_Pantone.png") no-repeat center / contain; - vertical-align: middle; - } +body.darkmode .logo::before { + content: ""; + display: inline-block; + height: 48px; + width: 175px; + background: url("https://raw.githubusercontent.com/OAI/OpenAPI-Style-Guide/refs/heads/main/graphics/bitmap/OpenAPI_Logo_Pantone.png") no-repeat center / contain; + vertical-align: middle; } \ No newline at end of file From a2394b1c66217098eef2367f7d1d7357a4479a4f Mon Sep 17 00:00:00 2001 From: Bellangelo Date: Thu, 19 Dec 2024 13:10:09 +0200 Subject: [PATCH 07/14] Format code --- scripts/md2html/main.css | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/scripts/md2html/main.css b/scripts/md2html/main.css index 2c3b6b57b4..680199a953 100644 --- a/scripts/md2html/main.css +++ b/scripts/md2html/main.css @@ -72,20 +72,20 @@ a.bibref { text-decoration: underline; } - body.darkmode { - --toclink-underline: #6a9000; - --toclink-visited-underline: #fff; - } - - body.darkmode a, - body.darkmode .tocxref, - body.darkmode .u-url { - color: #6a9000; - } - - body.darkmode code { - color: #e66c33; - } +body.darkmode { + --toclink-underline: #6a9000; + --toclink-visited-underline: #fff; +} + +body.darkmode a, +body.darkmode .tocxref, +body.darkmode .u-url { + color: #6a9000; +} + +body.darkmode code { + color: #e66c33; +} body.darkmode:not(.toc-inline) #toc h2, body.darkmode h1, From 2372f3012281da1eb368fff0c4366f3386082fef Mon Sep 17 00:00:00 2001 From: Bellangelo Date: Thu, 19 Dec 2024 13:13:51 +0200 Subject: [PATCH 08/14] Update tests --- tests/md2html/fixtures/basic-new.html | 2 +- tests/md2html/fixtures/basic-old.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/md2html/fixtures/basic-new.html b/tests/md2html/fixtures/basic-new.html index da23ccaf8a..cb075b4dd1 100644 --- a/tests/md2html/fixtures/basic-new.html +++ b/tests/md2html/fixtures/basic-new.html @@ -1,4 +1,4 @@ -OpenAPI Specification v30.0.1 | Introduction, Definitions, & More

OpenAPI Specification v30.0.1

What is the OpenAPI Specification?

The OpenAPI Specification (OAS) defines a standard, programming language-agnostic interface description for HTTP APIs, which allows both humans and computers to discover and understand the capabilities of a service without requiring access to source code, additional documentation, or inspection of network traffic. When properly defined via OpenAPI, a consumer can understand and interact with the remote service with a minimal amount of implementation logic. Similar to what interface descriptions have done for lower-level programming, the OpenAPI Specification removes guesswork in calling a service.

Status of This Document

The source-of-truth for this specification is the HTML file referenced above as This version.
+OpenAPI Specification v30.0.1 | Introduction, Definitions, & More

OpenAPI Specification v30.0.1

What is the OpenAPI Specification?

The OpenAPI Specification (OAS) defines a standard, programming language-agnostic interface description for HTTP APIs, which allows both humans and computers to discover and understand the capabilities of a service without requiring access to source code, additional documentation, or inspection of network traffic. When properly defined via OpenAPI, a consumer can understand and interact with the remote service with a minimal amount of implementation logic. Similar to what interface descriptions have done for lower-level programming, the OpenAPI Specification removes guesswork in calling a service.

Status of This Document

The source-of-truth for this specification is the HTML file referenced above as This version.

Heading 1

Text for first chapter

Version 30.0.1

diff --git a/tests/md2html/fixtures/basic-old.html b/tests/md2html/fixtures/basic-old.html index 9e31bdeded..426e9287e9 100644 --- a/tests/md2html/fixtures/basic-old.html +++ b/tests/md2html/fixtures/basic-old.html @@ -1,4 +1,4 @@ -OpenAPI Specification v30.0.1 | Introduction, Definitions, & More

OpenAPI Specification v30.0.1

What is the OpenAPI Specification?

The OpenAPI Specification (OAS) defines a standard, programming language-agnostic interface description for HTTP APIs, which allows both humans and computers to discover and understand the capabilities of a service without requiring access to source code, additional documentation, or inspection of network traffic. When properly defined via OpenAPI, a consumer can understand and interact with the remote service with a minimal amount of implementation logic. Similar to what interface descriptions have done for lower-level programming, the OpenAPI Specification removes guesswork in calling a service.

Status of This Document

The source-of-truth for this specification is the HTML file referenced above as This version.
+OpenAPI Specification v30.0.1 | Introduction, Definitions, & More

OpenAPI Specification v30.0.1

What is the OpenAPI Specification?

The OpenAPI Specification (OAS) defines a standard, programming language-agnostic interface description for HTTP APIs, which allows both humans and computers to discover and understand the capabilities of a service without requiring access to source code, additional documentation, or inspection of network traffic. When properly defined via OpenAPI, a consumer can understand and interact with the remote service with a minimal amount of implementation logic. Similar to what interface descriptions have done for lower-level programming, the OpenAPI Specification removes guesswork in calling a service.

Status of This Document

The source-of-truth for this specification is the HTML file referenced above as This version.

Heading 1

Text for first chapter

Version 30.0.1

From 2dc8bdfd855ea71d7dcaf6d46c4d8763169a037a Mon Sep 17 00:00:00 2001 From: Bellangelo Date: Thu, 19 Dec 2024 13:19:51 +0200 Subject: [PATCH 09/14] Update tests --- tests/md2html/fixtures/basic-new.html | 2 +- tests/md2html/fixtures/basic-old.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/md2html/fixtures/basic-new.html b/tests/md2html/fixtures/basic-new.html index cb075b4dd1..8906dfe988 100644 --- a/tests/md2html/fixtures/basic-new.html +++ b/tests/md2html/fixtures/basic-new.html @@ -1,4 +1,4 @@ -OpenAPI Specification v30.0.1 | Introduction, Definitions, & More

OpenAPI Specification v30.0.1

What is the OpenAPI Specification?

The OpenAPI Specification (OAS) defines a standard, programming language-agnostic interface description for HTTP APIs, which allows both humans and computers to discover and understand the capabilities of a service without requiring access to source code, additional documentation, or inspection of network traffic. When properly defined via OpenAPI, a consumer can understand and interact with the remote service with a minimal amount of implementation logic. Similar to what interface descriptions have done for lower-level programming, the OpenAPI Specification removes guesswork in calling a service.

Status of This Document

The source-of-truth for this specification is the HTML file referenced above as This version.
+OpenAPI Specification v30.0.1 | Introduction, Definitions, & More

OpenAPI Specification v30.0.1

What is the OpenAPI Specification?

The OpenAPI Specification (OAS) defines a standard, programming language-agnostic interface description for HTTP APIs, which allows both humans and computers to discover and understand the capabilities of a service without requiring access to source code, additional documentation, or inspection of network traffic. When properly defined via OpenAPI, a consumer can understand and interact with the remote service with a minimal amount of implementation logic. Similar to what interface descriptions have done for lower-level programming, the OpenAPI Specification removes guesswork in calling a service.

Status of This Document

The source-of-truth for this specification is the HTML file referenced above as This version.

Heading 1

Text for first chapter

Version 30.0.1

diff --git a/tests/md2html/fixtures/basic-old.html b/tests/md2html/fixtures/basic-old.html index 426e9287e9..71e6f7a1bc 100644 --- a/tests/md2html/fixtures/basic-old.html +++ b/tests/md2html/fixtures/basic-old.html @@ -1,4 +1,4 @@ -OpenAPI Specification v30.0.1 | Introduction, Definitions, & More

OpenAPI Specification v30.0.1

What is the OpenAPI Specification?

The OpenAPI Specification (OAS) defines a standard, programming language-agnostic interface description for HTTP APIs, which allows both humans and computers to discover and understand the capabilities of a service without requiring access to source code, additional documentation, or inspection of network traffic. When properly defined via OpenAPI, a consumer can understand and interact with the remote service with a minimal amount of implementation logic. Similar to what interface descriptions have done for lower-level programming, the OpenAPI Specification removes guesswork in calling a service.

Status of This Document

The source-of-truth for this specification is the HTML file referenced above as This version.
+OpenAPI Specification v30.0.1 | Introduction, Definitions, & More

OpenAPI Specification v30.0.1

What is the OpenAPI Specification?

The OpenAPI Specification (OAS) defines a standard, programming language-agnostic interface description for HTTP APIs, which allows both humans and computers to discover and understand the capabilities of a service without requiring access to source code, additional documentation, or inspection of network traffic. When properly defined via OpenAPI, a consumer can understand and interact with the remote service with a minimal amount of implementation logic. Similar to what interface descriptions have done for lower-level programming, the OpenAPI Specification removes guesswork in calling a service.

Status of This Document

The source-of-truth for this specification is the HTML file referenced above as This version.

Heading 1

Text for first chapter

Version 30.0.1

From 3c8a5f604a9353ce2df8fdffc258c37db9d7c17a Mon Sep 17 00:00:00 2001 From: Bellangelo Date: Thu, 19 Dec 2024 13:24:39 +0200 Subject: [PATCH 10/14] Update tests --- tests/md2html/fixtures/basic-old.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/md2html/fixtures/basic-old.html b/tests/md2html/fixtures/basic-old.html index 71e6f7a1bc..552eb5cde4 100644 --- a/tests/md2html/fixtures/basic-old.html +++ b/tests/md2html/fixtures/basic-old.html @@ -1,4 +1,4 @@ -OpenAPI Specification v30.0.1 | Introduction, Definitions, & More

OpenAPI Specification v30.0.1

What is the OpenAPI Specification?

The OpenAPI Specification (OAS) defines a standard, programming language-agnostic interface description for HTTP APIs, which allows both humans and computers to discover and understand the capabilities of a service without requiring access to source code, additional documentation, or inspection of network traffic. When properly defined via OpenAPI, a consumer can understand and interact with the remote service with a minimal amount of implementation logic. Similar to what interface descriptions have done for lower-level programming, the OpenAPI Specification removes guesswork in calling a service.

Status of This Document

The source-of-truth for this specification is the HTML file referenced above as This version.
+OpenAPI Specification v30.0.1 | Introduction, Definitions, & More

OpenAPI Specification v30.0.1

What is the OpenAPI Specification?

The OpenAPI Specification (OAS) defines a standard, programming language-agnostic interface description for HTTP APIs, which allows both humans and computers to discover and understand the capabilities of a service without requiring access to source code, additional documentation, or inspection of network traffic. When properly defined via OpenAPI, a consumer can understand and interact with the remote service with a minimal amount of implementation logic. Similar to what interface descriptions have done for lower-level programming, the OpenAPI Specification removes guesswork in calling a service.

Status of This Document

The source-of-truth for this specification is the HTML file referenced above as This version.

Heading 1

Text for first chapter

Version 30.0.1

From e25d7530c2a6a5d7c5397b6da4cdb93758e98076 Mon Sep 17 00:00:00 2001 From: Bellangelo Date: Thu, 19 Dec 2024 17:11:42 +0200 Subject: [PATCH 11/14] Add dark.css contents directly to the main.css --- scripts/md2html/main.css | 111 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 111 insertions(+) diff --git a/scripts/md2html/main.css b/scripts/md2html/main.css index 680199a953..5c42caf7f3 100644 --- a/scripts/md2html/main.css +++ b/scripts/md2html/main.css @@ -123,4 +123,115 @@ body.darkmode .logo::before { width: 175px; background: url("https://raw.githubusercontent.com/OAI/OpenAPI-Style-Guide/refs/heads/main/graphics/bitmap/OpenAPI_Logo_Pantone.png") no-repeat center / contain; vertical-align: middle; +} + +/** This contains the content of the https://www.w3.org/StyleSheets/TR/2021/dark.css file */ +body.darkmode { + --text: #ddd; + --bg: black; + + /* Absolute URLs due to https://bugs.webkit.org/show_bug.cgi?id=230243 */ + --unofficial-watermark: url(https://www.w3.org/StyleSheets/TR/2021/logos/UD-watermark-dark-unofficial); + --draft-watermark: url(https://www.w3.org/StyleSheets/TR/2021/logos/UD-watermark-dark-draft); + + --logo-bg: #1a5e9a; + --logo-active-bg: #c00; + --logo-text: white; + + --tocnav-normal-text: #999; + --tocnav-normal-bg: var(--bg); + --tocnav-hover-text: var(--tocnav-normal-text); + --tocnav-hover-bg: #080808; + --tocnav-active-text: #f44; + --tocnav-active-bg: var(--tocnav-normal-bg); + + --tocsidebar-text: var(--text); + --tocsidebar-bg: #080808; + --tocsidebar-shadow: rgba(255,255,255,.1); + --tocsidebar-heading-text: hsla(203,20%,40%,.7); + + --toclink-text: var(--text); + --toclink-underline: #6af; + --toclink-visited-text: var(--toclink-text); + --toclink-visited-underline: #054572; + + --heading-text: #8af; + + --hr-text: var(--text); + + --algo-border: #456; + + --del-text: #f44; + --del-bg: transparent; + --ins-text: #4a4; + --ins-bg: transparent; + + --a-normal-text: #6af; + --a-normal-underline: #555; + --a-visited-text: var(--a-normal-text); + --a-visited-underline: var(--a-normal-underline); + --a-hover-bg: rgba(25%, 25%, 25%, .2); + --a-active-text: #f44; + --a-active-underline: var(--a-active-text); + + --borderedblock-bg: rgba(255, 255, 255, .05); + + --blockquote-border: silver; + --blockquote-bg: var(--borderedblock-bg); + --blockquote-text: currentcolor; + + --issue-border: #e05252; + --issue-bg: var(--borderedblock-bg); + --issue-text: var(--text); + --issueheading-text: hsl(0deg, 70%, 70%); + + --example-border: hsl(50deg, 90%, 60%); + --example-bg: var(--borderedblock-bg); + --example-text: var(--text); + --exampleheading-text: hsl(50deg, 70%, 70%); + + --note-border: hsl(120deg, 100%, 35%); + --note-bg: var(--borderedblock-bg); + --note-text: var(--text); + --noteheading-text: hsl(120, 70%, 70%); + --notesummary-underline: silver; + + --advisement-border: orange; + --advisement-bg: #222218; + --advisement-text: var(--text); + --advisementheading-text: #f84; + + --amendment-border: #330099; + --amendment-bg: var(--borderedblock-bg); + --amendment-text: var(--text); + --amendmentheading-text: #a086ff; + + --amendment-border: #330099; + --amendment-bg: #080010; + --amendment-text: var(--text); + --amendmentheading-text: #cc00ff; + + --warning-border: red; + --warning-bg: hsla(40,100%,20%,0.95); + --warning-text: var(--text); + + --def-border: #8ccbf2; + --def-bg: #080818; + --def-text: var(--text); + --defrow-border: #136; + + --datacell-border: silver; + + --indexinfo-text: #aaa; + + --indextable-hover-text: var(--text); + --indextable-hover-bg: #181818; + + --outdatedspec-bg: rgba(255, 255, 255, .5); + --outdatedspec-text: black; + --outdated-bg: maroon; + --outdated-text: white; + --outdated-shadow: red; + + --editedrec-bg: darkorange; } \ No newline at end of file From d5f765eaa96f2bd367e6d583cb66cbbdd42bcbfe Mon Sep 17 00:00:00 2001 From: Bellangelo Date: Sat, 21 Dec 2024 00:52:56 +0200 Subject: [PATCH 12/14] Remove unnecessarily request --- scripts/md2html/build.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/md2html/build.sh b/scripts/md2html/build.sh index f716e815bc..54f57b93fb 100755 --- a/scripts/md2html/build.sh +++ b/scripts/md2html/build.sh @@ -48,7 +48,9 @@ for filename in $(ls -1 ../../versions/[23456789].*.md | sort -r) ; do echo -e "\n=== v$version ===" node md2html.js --maintainers ./history/MAINTAINERS_v$version.md ${filename} > $tempfile - npx respec --use-local --src $tempfile --out ../../deploy/oas/v$version.html + npx respec --use-local --src $tempfile --out $tempfile + # Dark theme css is directly inserted into the main.css + sed '//d' $tempfile > ../../deploy/oas/v$version.html rm $tempfile if [ $version = $latest ]; then From ffa5176bc27e721624a43430fad3f0378799063e Mon Sep 17 00:00:00 2001 From: Bellangelo Date: Sat, 21 Dec 2024 00:57:35 +0200 Subject: [PATCH 13/14] Update tests --- tests/md2html/fixtures/basic-new.html | 2 +- tests/md2html/fixtures/basic-old.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/md2html/fixtures/basic-new.html b/tests/md2html/fixtures/basic-new.html index 8906dfe988..e12d79bb65 100644 --- a/tests/md2html/fixtures/basic-new.html +++ b/tests/md2html/fixtures/basic-new.html @@ -1,4 +1,4 @@ -OpenAPI Specification v30.0.1 | Introduction, Definitions, & More

OpenAPI Specification v30.0.1

What is the OpenAPI Specification?

The OpenAPI Specification (OAS) defines a standard, programming language-agnostic interface description for HTTP APIs, which allows both humans and computers to discover and understand the capabilities of a service without requiring access to source code, additional documentation, or inspection of network traffic. When properly defined via OpenAPI, a consumer can understand and interact with the remote service with a minimal amount of implementation logic. Similar to what interface descriptions have done for lower-level programming, the OpenAPI Specification removes guesswork in calling a service.

Status of This Document

The source-of-truth for this specification is the HTML file referenced above as This version.
+OpenAPI Specification v30.0.1 | Introduction, Definitions, & More

OpenAPI Specification v30.0.1

What is the OpenAPI Specification?

The OpenAPI Specification (OAS) defines a standard, programming language-agnostic interface description for HTTP APIs, which allows both humans and computers to discover and understand the capabilities of a service without requiring access to source code, additional documentation, or inspection of network traffic. When properly defined via OpenAPI, a consumer can understand and interact with the remote service with a minimal amount of implementation logic. Similar to what interface descriptions have done for lower-level programming, the OpenAPI Specification removes guesswork in calling a service.

Status of This Document

The source-of-truth for this specification is the HTML file referenced above as This version.

Heading 1

Text for first chapter

Version 30.0.1

diff --git a/tests/md2html/fixtures/basic-old.html b/tests/md2html/fixtures/basic-old.html index 552eb5cde4..e28f0ac360 100644 --- a/tests/md2html/fixtures/basic-old.html +++ b/tests/md2html/fixtures/basic-old.html @@ -1,4 +1,4 @@ -OpenAPI Specification v30.0.1 | Introduction, Definitions, & More

OpenAPI Specification v30.0.1

What is the OpenAPI Specification?

The OpenAPI Specification (OAS) defines a standard, programming language-agnostic interface description for HTTP APIs, which allows both humans and computers to discover and understand the capabilities of a service without requiring access to source code, additional documentation, or inspection of network traffic. When properly defined via OpenAPI, a consumer can understand and interact with the remote service with a minimal amount of implementation logic. Similar to what interface descriptions have done for lower-level programming, the OpenAPI Specification removes guesswork in calling a service.

Status of This Document

The source-of-truth for this specification is the HTML file referenced above as This version.
+OpenAPI Specification v30.0.1 | Introduction, Definitions, & More

OpenAPI Specification v30.0.1

What is the OpenAPI Specification?

The OpenAPI Specification (OAS) defines a standard, programming language-agnostic interface description for HTTP APIs, which allows both humans and computers to discover and understand the capabilities of a service without requiring access to source code, additional documentation, or inspection of network traffic. When properly defined via OpenAPI, a consumer can understand and interact with the remote service with a minimal amount of implementation logic. Similar to what interface descriptions have done for lower-level programming, the OpenAPI Specification removes guesswork in calling a service.

Status of This Document

The source-of-truth for this specification is the HTML file referenced above as This version.

Heading 1

Text for first chapter

Version 30.0.1

From 7027e0fbdae0ec73a169b5281920d8170accc69b Mon Sep 17 00:00:00 2001 From: Bellangelo Date: Sat, 21 Dec 2024 02:06:19 +0200 Subject: [PATCH 14/14] dark.css is used by the dark mode toggle in fixup.js --- scripts/md2html/build.sh | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/scripts/md2html/build.sh b/scripts/md2html/build.sh index 54f57b93fb..f716e815bc 100755 --- a/scripts/md2html/build.sh +++ b/scripts/md2html/build.sh @@ -48,9 +48,7 @@ for filename in $(ls -1 ../../versions/[23456789].*.md | sort -r) ; do echo -e "\n=== v$version ===" node md2html.js --maintainers ./history/MAINTAINERS_v$version.md ${filename} > $tempfile - npx respec --use-local --src $tempfile --out $tempfile - # Dark theme css is directly inserted into the main.css - sed '//d' $tempfile > ../../deploy/oas/v$version.html + npx respec --use-local --src $tempfile --out ../../deploy/oas/v$version.html rm $tempfile if [ $version = $latest ]; then