diff --git a/doc/decimal-playbook.yml b/doc/decimal-playbook.yml index f32b60b45..258b070bc 100644 --- a/doc/decimal-playbook.yml +++ b/doc/decimal-playbook.yml @@ -10,5 +10,9 @@ output: dir: html ui: bundle: - url: https://github.com/boostorg/website-v2-docs/releases/download/ui-master/ui-bundle.zip + url: https://gitlab.com/antora/antora-ui-default/-/jobs/artifacts/HEAD/raw/build/ui-bundle.zip?job=bundle-stable output_dir: decimal/_ + supplemental_files: ./supplemental-ui +antora: + extensions: + - '@antora/lunr-extension' diff --git a/doc/modules/ROOT/pages/examples.adoc b/doc/modules/ROOT/pages/examples.adoc index d3f02aa62..1ef36338b 100644 --- a/doc/modules/ROOT/pages/examples.adoc +++ b/doc/modules/ROOT/pages/examples.adoc @@ -263,6 +263,9 @@ Scientific Format with Specified Precision and Padding: We can make one final change to our `` example where instead of using `std::cout`, we use pass:[C++23's] ``. This example can be found in the `examples/` folder as https://github.com/cppalliance/decimal/blob/develop/examples/print.cpp[print.cpp]. + +.`` Example +==== [source, c++] ---- #include @@ -280,8 +283,10 @@ int main() } ---- -Expected Output: ----- +.Expected Output: +.... 03.140e+00 03.141e+00 ----- +.... +==== + diff --git a/doc/package-lock.json b/doc/package-lock.json index 46a8a8868..cc53461e0 100644 --- a/doc/package-lock.json +++ b/doc/package-lock.json @@ -4,9 +4,12 @@ "requires": true, "packages": { "": { + "dependencies": { + "@antora/lunr-extension": "^1.0.0-alpha.12" + }, "devDependencies": { - "@antora/site-generator": "3.1.14", "@antora/cli": "3.1.14", + "@antora/site-generator": "3.1.14", "antora": "3.1.14" } }, @@ -205,16 +208,18 @@ "node": ">=16.0.0" } }, - "node_modules/@antora/logger": { - "version": "3.1.10", - "resolved": "https://registry.npmjs.org/@antora/logger/-/logger-3.1.10.tgz", - "integrity": "sha512-WSuIxEP2tVrhWtTj/sIrwBDjpi4ldB/1Kpiu4PXmY4/qeWP8thW6u8nXdwdDcWss5zqkZWjourvWKwVq7y8Wjg==", - "dev": true, + "node_modules/@antora/lunr-extension": { + "version": "1.0.0-alpha.12", + "resolved": "https://registry.npmjs.org/@antora/lunr-extension/-/lunr-extension-1.0.0-alpha.12.tgz", + "integrity": "sha512-iiEXpJae8tCH22ao7kZ4I+eyQ/3IeFIFK1G5I9QLpkCezaVPotI8eLFY7e0xDI+zsqJEfCOsfoZGYXso6xCYlA==", + "license": "MPL-2.0", + "workspaces": [ + "." + ], "dependencies": { - "@antora/expand-path-helper": "~3.0", - "pino": "~9.2", - "pino-pretty": "~11.2", - "sonic-boom": "~4.0" + "htmlparser2": "~9.1", + "lunr": "~2.3", + "lunr-languages": "~1.10" }, "engines": { "node": ">=16.0.0" @@ -264,21 +269,6 @@ "node": ">=16.0.0" } }, - "node_modules/@antora/playbook-builder": { - "version": "3.1.10", - "resolved": "https://registry.npmjs.org/@antora/playbook-builder/-/playbook-builder-3.1.10.tgz", - "integrity": "sha512-UB8UmRYfkKgActTUlotdVS4FKGjaZgTnSXE7Fns1xb3/3HRanWvI+Yze1OmCkGC33cTpoQFnSYp7ySEH8LaiBw==", - "dev": true, - "dependencies": { - "@iarna/toml": "~2.2", - "convict": "~6.2", - "js-yaml": "~4.1", - "json5": "~2.2" - }, - "engines": { - "node": ">=16.0.0" - } - }, "node_modules/@antora/redirect-producer": { "version": "3.1.14", "resolved": "https://registry.npmjs.org/@antora/redirect-producer/-/redirect-producer-3.1.14.tgz", @@ -1101,6 +1091,61 @@ "dev": true, "license": "MIT" }, + "node_modules/dom-serializer": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-2.0.0.tgz", + "integrity": "sha512-wIkAryiqt/nV5EQKqQpo3SToSOV9J0DnbJqwK7Wv/Trc92zIAYZ4FlMu+JPFW1DfGFt81ZTCGgDEabffXeLyJg==", + "license": "MIT", + "dependencies": { + "domelementtype": "^2.3.0", + "domhandler": "^5.0.2", + "entities": "^4.2.0" + }, + "funding": { + "url": "https://github.com/cheeriojs/dom-serializer?sponsor=1" + } + }, + "node_modules/domelementtype": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.3.0.tgz", + "integrity": "sha512-OLETBj6w0OsagBwdXnPdN0cnMfF9opN69co+7ZrbfPGrdpPVNBUj02spi6B1N7wChLQiPn4CSH/zJvXw56gmHw==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/fb55" + } + ], + "license": "BSD-2-Clause" + }, + "node_modules/domhandler": { + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-5.0.3.tgz", + "integrity": "sha512-cgwlv/1iFQiFnU96XXgROh8xTeetsnJiDsTc7TYCLFd9+/WNkIqPTxiM/8pSd8VIrhXGTf1Ny1q1hquVqDJB5w==", + "license": "BSD-2-Clause", + "dependencies": { + "domelementtype": "^2.3.0" + }, + "engines": { + "node": ">= 4" + }, + "funding": { + "url": "https://github.com/fb55/domhandler?sponsor=1" + } + }, + "node_modules/domutils": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/domutils/-/domutils-3.2.2.tgz", + "integrity": "sha512-6kZKyUajlDuqlHKVX1w7gyslj9MPIXzIFiz/rGu35uC1wMi+kMhQwGhl4lt9unC9Vb9INnY9Z3/ZA3+FhASLaw==", + "license": "BSD-2-Clause", + "dependencies": { + "dom-serializer": "^2.0.0", + "domelementtype": "^2.3.0", + "domhandler": "^5.0.3" + }, + "funding": { + "url": "https://github.com/fb55/domutils?sponsor=1" + } + }, "node_modules/dunder-proto": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz", @@ -1125,6 +1170,18 @@ "once": "^1.4.0" } }, + "node_modules/entities": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/entities/-/entities-4.5.0.tgz", + "integrity": "sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==", + "license": "BSD-2-Clause", + "engines": { + "node": ">=0.12" + }, + "funding": { + "url": "https://github.com/fb55/entities?sponsor=1" + } + }, "node_modules/es-define-property": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.1.tgz", @@ -1464,6 +1521,25 @@ "node": ">=14" } }, + "node_modules/htmlparser2": { + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-9.1.0.tgz", + "integrity": "sha512-5zfg6mHUoaer/97TxnGpxmbR7zJtPwIYFMZ/H5ucTlPZhKvtum05yiPK3Mgai3a0DyVxv7qYqoweaEd2nrYQzQ==", + "funding": [ + "https://github.com/fb55/htmlparser2?sponsor=1", + { + "type": "github", + "url": "https://github.com/sponsors/fb55" + } + ], + "license": "MIT", + "dependencies": { + "domelementtype": "^2.3.0", + "domhandler": "^5.0.3", + "domutils": "^3.1.0", + "entities": "^4.5.0" + } + }, "node_modules/ieee754": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", @@ -1647,6 +1723,18 @@ "integrity": "sha512-H5ZhCF25riFd9uB5UCkVKo61m3S/xZk1x4wA6yp/L3RFP6Z/eHH1ymQcGLo7J3GMPfm0V/7m1tryHuGVxpqEBQ==", "dev": true }, + "node_modules/lunr": { + "version": "2.3.9", + "resolved": "https://registry.npmjs.org/lunr/-/lunr-2.3.9.tgz", + "integrity": "sha512-zTU3DaZaF3Rt9rhN3uBMGQD3dD2/vFQqnvZCDv4dl5iOzq2IZQqTxu90r4E5J+nP70J3ilqVCrbho2eWaeW8Ow==", + "license": "MIT" + }, + "node_modules/lunr-languages": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/lunr-languages/-/lunr-languages-1.10.0.tgz", + "integrity": "sha512-BBjKKcwrieJlzwwc9M5H/MRXGJ2qyOSDx/NXYiwkuKjiLOOoouh0WsDzeqcLoUWcX31y7i8sb8IgsZKObdUCkw==", + "license": "MPL-1.1" + }, "node_modules/math-intrinsics": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz", @@ -1969,6 +2057,7 @@ "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==", "dev": true, + "peer": true, "engines": { "node": ">=0.4.0" } diff --git a/doc/package.json b/doc/package.json index a90ff8b01..4b00fd905 100644 --- a/doc/package.json +++ b/doc/package.json @@ -3,5 +3,8 @@ "@antora/cli": "3.1.14", "@antora/site-generator": "3.1.14", "antora": "3.1.14" + }, + "dependencies": { + "@antora/lunr-extension": "^1.0.0-alpha.12" } } diff --git a/doc/supplemental-ui/css/site-extra.css b/doc/supplemental-ui/css/site-extra.css new file mode 100644 index 000000000..f723e8c70 --- /dev/null +++ b/doc/supplemental-ui/css/site-extra.css @@ -0,0 +1,171 @@ +/* Overall code block styling - Modern dark theme */ +.listingblock .content pre, +.listingblock .content pre.highlight, +pre.highlight code.language-c\+\+ { + background-color: #1e1e2e !important; + border: 1px solid #313244 !important; + border-radius: 8px !important; + padding: 1.25rem !important; + overflow-x: auto !important; + font-family: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace !important; + font-size: 0.9rem !important; + line-height: 1.6 !important; + box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15) !important; +} + +/* Base code color */ +.listingblock code, +code.language-c\+\+, +code.hljs { + color: #cdd6f4 !important; + background: transparent !important; +} + +/* C++ Syntax Highlighting - highlight.js classes */ + +/* Keywords (int, if, else, while, return, constexpr, etc.) */ +.hljs-keyword, +.hljs-selector-tag { + color: #cba6f7 !important; /* Purple */ + font-weight: 600 !important; +} + +/* Built-in types and namespaces (std, boost, etc.) */ +.hljs-built_in { + color: #89dceb !important; /* Cyan */ +} + +/* Strings */ +.hljs-string, +.hljs-selector-attr, +.hljs-selector-pseudo { + color: #a6e3a1 !important; /* Green */ +} + +/* Comments */ +.hljs-comment, +.hljs-quote { + color: #6c7086 !important; /* Gray */ + font-style: italic !important; +} + +/* Preprocessor directives (#include, #define, #ifndef, etc.) */ +.hljs-meta { + color: #f9e2af !important; /* Yellow */ +} + +/* Meta keywords inside preprocessor (include, define, etc.) */ +.hljs-meta-keyword { + color: #fab387 !important; /* Peach */ + font-weight: 500 !important; +} + +/* Meta strings (header files in #include) */ +.hljs-meta-string { + color: #a6e3a1 !important; /* Green */ +} + +/* Types and class names */ +.hljs-type, +.hljs-class .hljs-title, +.hljs-title.class_ { + color: #89dceb !important; /* Cyan */ + font-weight: 500 !important; +} + +/* Function names */ +.hljs-function .hljs-title, +.hljs-title.function_ { + color: #89b4fa !important; /* Blue */ + font-weight: 500 !important; +} + +/* Numbers */ +.hljs-number, +.hljs-literal { + color: #fab387 !important; /* Peach */ +} + +/* Operators and punctuation */ +.hljs-operator, +.hljs-punctuation { + color: #94e2d5 !important; /* Teal */ +} + +/* Variables and parameters */ +.hljs-variable, +.hljs-params { + color: #cdd6f4 !important; /* Light gray */ +} + +/* Template parameters */ +.hljs-template-tag { + color: #f5c2e7 !important; /* Pink */ +} + +/* Attributes */ +.hljs-attribute { + color: #f38ba8 !important; /* Red */ +} + +/* Selection highlighting */ +.listingblock ::selection, +.hljs ::selection { + background-color: #45475a !important; + color: #f5e0dc !important; +} + +/* Optional: Line numbers if you add them later */ +.listingblock .linenos, +.hljs-ln-numbers { + color: #585b70 !important; + margin-right: 1rem !important; + padding-right: 0.5rem !important; + border-right: 1px solid #313244 !important; + user-select: none !important; +} + +/* Make sure inline code also gets styled */ +code.hljs-inline { + background-color: #313244 !important; + padding: 0.2em 0.4em !important; + border-radius: 3px !important; + font-size: 0.85em !important; +} + +/* Plain listing blocks (output blocks without syntax highlighting) */ +.doc .listingblock:not(:has(.hljs)) > .content > pre, +.doc .listingblock > .content > pre:not(.highlight), +.doc .literalblock > pre { + background-color: #f8f9fa !important; /* Light background */ + color: #24292e !important; /* Dark text */ + border: 1px solid #e1e4e8 !important; + border-radius: 6px !important; + padding: 1rem !important; + font-family: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace !important; + font-size: 0.875rem !important; + line-height: 1.5 !important; +} + +/* Ensure text in plain blocks is dark */ +.doc .listingblock:not(:has(.hljs)) code, +.doc .literalblock code { + color: #24292e !important; /* Dark text */ + background: transparent !important; +} + +/* Alternative: Target blocks that come after "Expected Output:" text */ +.paragraph:has(> p:contains("Expected Output")) + .listingblock > .content > pre { + background-color: #f8f9fa !important; + color: #24292e !important; + border: 1px solid #d73a49 !important; /* Red border for output */ +} + +/* If the blocks have a specific role or class, use this more specific selector */ +.listingblock.output > .content > pre, +.listingblock .content > pre.output { + background-color: #fafbfc !important; + color: #24292e !important; + border-left: 4px solid #28a745 !important; /* Green left border */ + border-radius: 4px !important; +} diff --git a/doc/supplemental-ui/partials/footer-content.hbs b/doc/supplemental-ui/partials/footer-content.hbs new file mode 100644 index 000000000..e69de29bb diff --git a/doc/supplemental-ui/partials/head-styles.hbs b/doc/supplemental-ui/partials/head-styles.hbs new file mode 100644 index 000000000..6b488beb1 --- /dev/null +++ b/doc/supplemental-ui/partials/head-styles.hbs @@ -0,0 +1,6 @@ + + + diff --git a/doc/supplemental-ui/partials/header-content.hbs b/doc/supplemental-ui/partials/header-content.hbs new file mode 100644 index 000000000..12efb2cf6 --- /dev/null +++ b/doc/supplemental-ui/partials/header-content.hbs @@ -0,0 +1,50 @@ +
+ +
+ diff --git a/doc/supplemental-ui/partials/pagination.hbs b/doc/supplemental-ui/partials/pagination.hbs new file mode 100644 index 000000000..902e4a890 --- /dev/null +++ b/doc/supplemental-ui/partials/pagination.hbs @@ -0,0 +1,16 @@ +{{#if (or page.previous page.next)}} + +{{/if}} diff --git a/doc/supplemental-ui/partials/toolbar.hbs b/doc/supplemental-ui/partials/toolbar.hbs new file mode 100644 index 000000000..cf076165a --- /dev/null +++ b/doc/supplemental-ui/partials/toolbar.hbs @@ -0,0 +1,9 @@ +