Skip to content

Commit 7c34ba6

Browse files
Merge branch 'develop' into fix-1025
2 parents 458ce17 + ad1e7ba commit 7c34ba6

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+2583
-529
lines changed

.github/workflows/ci.yml

Lines changed: 48 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -676,10 +676,49 @@ jobs:
676676
mkdir -p ../build/docs-local
677677
cp -vr build/site/* ../build/docs-local
678678
679-
- name: Generate Demos
679+
- name: Clone Beman.Optional
680+
uses: actions/checkout@v4
681+
with:
682+
repository: steve-downey/optional
683+
ref: main
684+
path: beman-optional
685+
686+
- name: Clone Fmt
687+
uses: actions/checkout@v4
688+
with:
689+
repository: fmtlib/fmt
690+
ref: master
691+
path: fmt
692+
693+
- name: Clone Nlohmann.Json
694+
uses: actions/checkout@v4
695+
with:
696+
repository: nlohmann/json
697+
ref: develop
698+
path: nlohmann-json
699+
700+
- name: Patch Demo Projects
701+
shell: bash
680702
run: |
703+
set -euo pipefail
681704
set -x
682705
706+
for project in beman-optional fmt nlohmann-json; do
707+
src="./examples/third-party/$project"
708+
dst="./$project"
709+
710+
[ -d "$src" ] || { echo "Source not found: $src" >&2; exit 1; }
711+
mkdir -p "$dst"
712+
713+
# Mirror contents of $src into $dst, overwriting existing files
714+
tar -C "$src" -cf - . | tar -C "$dst" -xpf -
715+
done
716+
717+
718+
- name: Generate Demos
719+
run: |
720+
set -x
721+
683722
declare -a generators=(
684723
"adoc"
685724
"xml"
@@ -691,16 +730,22 @@ jobs:
691730
for generator in "${generators[@]}"; do
692731
[[ $generator = xml && $variant = multi ]] && continue
693732
[[ $variant = multi ]] && multipage="true" || multipage="false"
694-
# mrdocs boost.url demo
733+
# boost.url demo
695734
mrdocs --config="$(pwd)/boost/libs/url/doc/mrdocs.yml" "../CMakeLists.txt" --output="$(pwd)/demos/boost-url/$variant/$generator" --multipage=$multipage --generator="$generator" --log-level=debug
696735
echo "Number of files in demos/boost-url/$variant/$generator: $(find demos/boost-url/$variant/$generator -type f | wc -l)"
736+
# beman.optional demo
737+
mrdocs --config="$(pwd)/beman-optional/docs/mrdocs.yml" --output="$(pwd)/demos/beman-optional/$variant/$generator" --multipage=$multipage --generator="$generator" --log-level=debug
738+
# nlohmann-json demo
739+
mrdocs --config="$(pwd)/nlohmann-json/docs/mrdocs.yml" --output="$(pwd)/demos/nlohmann-json/$variant/$generator" --multipage=$multipage --generator="$generator" --log-level=debug
740+
# fmt demo
741+
mrdocs --config="$(pwd)/fmt/doc/mrdocs.yml" --output="$(pwd)/demos/fmt/$variant/$generator" --multipage=$multipage --generator="$generator" --log-level=debug
697742
# mrdocs documenting mrdocs demo
698743
mrdocs --config="$(pwd)/docs/mrdocs.yml" "$(pwd)/CMakeLists.txt" --output="$(pwd)/demos/mrdocs/$variant/$generator" --multipage=$multipage --generator="$generator" --log-level=debug
699744
done
700745
701746
# Render the asciidoc files to html using asciidoctor
702747
if [[ ${{ runner.os }} == 'Linux' ]]; then
703-
for project in boost-url mrdocs; do
748+
for project in boost-url beman-optional mrdocs fmt nlohmann-json; do
704749
root="$(pwd)/demos/$project/$variant"
705750
src="$root/adoc"
706751
dst="$root/adoc-asciidoc"

docs/extensions/mrdocs-demos.js

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,17 @@ function humanizeLibrary(library) {
130130
{
131131
return 'Beman.Optional';
132132
}
133+
if (library === 'nlohmann-json')
134+
{
135+
return 'Nlohmann.JSON';
136+
}
137+
if (library === 'boost-scope') {
138+
return 'Boost.Scope';
139+
}
140+
if (library === 'fmt') {
141+
return 'Fmt';
142+
}
143+
// Match boost-<library> and convert to Boost.<Library> (capitalized)
133144
const boostLibrary = library.match(/boost-([\w]+)/);
134145
if (boostLibrary) {
135146
const capitalized = boostLibrary[1].charAt(0).toUpperCase() + boostLibrary[1].slice(1);
@@ -143,6 +154,12 @@ function libraryLink(library) {
143154
return 'https://github.com/boostorg/url[Boost.URL,window=_blank]';
144155
} else if (library === 'boost-scope') {
145156
return 'https://github.com/boostorg/scope[Boost.Scope,window=_blank]';
157+
} else if (library === 'nlohmann-json') {
158+
return 'https://www.github.com/nlohmann/json[Nlohmann.JSON,window=_blank]';
159+
} else if (library === 'beman-optional') {
160+
return 'https://www.github.com/steve-downey/optional[Beman.Optional,window=_blank]';
161+
} else if (library === 'fmt') {
162+
return 'https://github.com/fmtlib/fmt[fmt,window=_blank]';
146163
}
147164
return humanizeLibrary(library);
148165
}
Lines changed: 1 addition & 0 deletions
Loading
Lines changed: 1 addition & 0 deletions
Loading

docs/modules/ROOT/pages/design-notes.adoc

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,16 @@ Tools like Doxygen typically require workarounds and manual intervention via pre
2323
These workarounds are problematic because they result in two versions of the code: the well-formed and the ill-formed versions.
2424
This subverts the single source of truth for the code.
2525

26+
27+
2628
|===
2729
| | Mr. Docs | Automatic | Manual | No Reference
2830

29-
| No workarounds | | | |
30-
| Nice for users | | | |
31-
| Single Source of Truth | | | |
32-
| Less Work for Developers | | | |
33-
| Always up-to-date | | | |
31+
| No workarounds | image:icons/yes.svg[Yes,width=16,height=16] | image:icons/no.svg[No,width=16,height=16] | image:icons/yes.svg[Yes,width=16,height=16] | image:icons/no.svg[No,width=16,height=16]
32+
| Nice for users | image:icons/yes.svg[Yes,width=16,height=16] | image:icons/yes.svg[Yes,width=16,height=16] | image:icons/yes.svg[Yes,width=16,height=16] | image:icons/no.svg[No,width=16,height=16]
33+
| Single Source of Truth | image:icons/yes.svg[Yes,width=16,height=16] | image:icons/no.svg[No,width=16,height=16] | image:icons/no.svg[No,width=16,height=16] | image:icons/no.svg[No,width=16,height=16]
34+
| Less Work for Developers | image:icons/yes.svg[Yes,width=16,height=16] | image:icons/no.svg[No,width=16,height=16] | image:icons/no.svg[No,width=16,height=16] | image:icons/yes.svg[Yes,width=16,height=16]
35+
| Always up-to-date | image:icons/yes.svg[Yes,width=16,height=16] | image:icons/yes.svg[Yes,width=16,height=16] | image:icons/no.svg[No,width=16,height=16] | image:icons/no.svg[No,width=16,height=16]
3436
|===
3537

3638
* By providing no reference to users, they are forced to read header files to understand the API.

docs/shared/logo.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
font-weight: 700;
2626
color: #fff;
2727
white-space: nowrap;
28+
font-size: 1rem;
2829
}
2930

3031
@media (max-width: 576px) {

docs/ui/src/css/base.css

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ html {
1616
radial-gradient(ellipse 100% 100% at 80% 100%, rgba(89, 36, 99, 0.8), transparent 60%),
1717
linear-gradient(135deg, #124b83, #124b83, #124b83);
1818
background-attachment: fixed;
19-
background-blend-mode: screen;
2019
background-size: cover;
2120
background-repeat: no-repeat;
2221
}
@@ -118,7 +117,7 @@ object[type="image/svg+xml"]:not([width]) {
118117
}
119118

120119
::placeholder {
121-
opacity: 0.5;
120+
opacity: 0.75;
122121
}
123122

124123
@media (pointer: fine) {

docs/ui/src/css/doc.css

Lines changed: 81 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
.doc {
2-
color: var(--doc-font-color);
2+
color: var(--doc-font-color) !important;
33
font-size: var(--doc-font-size);
44
hyphens: auto;
55
line-height: var(--doc-line-height);
@@ -250,6 +250,14 @@
250250
margin-top: 1.5rem;
251251
}
252252

253+
.doc table.tableblock tr:first-child {
254+
background-color: rgba(0, 0, 0, 0.1);
255+
}
256+
257+
.doc table.tableblock thead ~ tbody tr:first-child {
258+
background-color: transparent;
259+
}
260+
253261
.doc table.tableblock {
254262
font-size: calc(15 / var(--rem-base) * 1rem);
255263
}
@@ -277,7 +285,7 @@
277285

278286
.doc table.tableblock,
279287
.doc table.tableblock > * > tr > * {
280-
border: 0 solid var(--table-border-color);
288+
border: 0 solid rgba(255, 255, 255, 0.4);
281289
}
282290

283291
.doc table.grid-all > * > tr > * {
@@ -407,13 +415,13 @@
407415

408416
.doc .admonitionblock td.icon i {
409417
align-items: center;
410-
border-radius: 0.45rem;
411418
display: inline-flex;
412419
filter: initial;
413420
height: 1.25rem;
414421
padding: 0 0.5rem;
415422
vertical-align: initial;
416423
width: fit-content;
424+
box-shadow: 2px 2px #000;
417425
}
418426

419427
.doc .admonitionblock td.icon i::after {
@@ -1067,6 +1075,38 @@
10671075
margin: 2rem 0 0;
10681076
}
10691077

1078+
.doc table.tableblock a img {
1079+
width: 28px !important;
1080+
height: 28px !important;
1081+
}
1082+
1083+
.doc table.tableblock a img[src*="asciidoc.svg"] {
1084+
width: 20px !important;
1085+
height: 20px !important;
1086+
}
1087+
1088+
.doc table.tableblock td:has(a):hover {
1089+
background-color: rgba(0, 0, 0, 0.3);
1090+
cursor: pointer;
1091+
}
1092+
1093+
.doc table.tableblock td:has(a) p {
1094+
margin: 0;
1095+
padding: 0;
1096+
}
1097+
1098+
.doc table.tableblock td:has(.image a) .image a {
1099+
display: block;
1100+
width: 100%;
1101+
height: 100%;
1102+
text-align: center;
1103+
}
1104+
1105+
.doc table.tableblock td:has(.image) {
1106+
text-align: center;
1107+
vertical-align: middle;
1108+
}
1109+
10701110
#footnotes hr {
10711111
border-top-width: 1px;
10721112
margin-top: 0;
@@ -1087,3 +1127,41 @@
10871127
text-align: right;
10881128
width: 1.5em;
10891129
}
1130+
1131+
.tableblock [style*="color: darkblue"],
1132+
.paragraph[id] [style*="color: darkblue"] {
1133+
color: #fff5b3 !important;
1134+
}
1135+
1136+
.paragraph span[style*="color: darkblue"] {
1137+
color: #fff !important;
1138+
}
1139+
1140+
.tableblock [style*="color: darkgreen"],
1141+
.paragraph[id] [style*="color: darkgreen"] {
1142+
color: #fff !important;
1143+
}
1144+
1145+
.paragraph span[style*="color: darkgreen"] {
1146+
color: #fff !important;
1147+
}
1148+
1149+
.paragraph span[style*="color: red"] {
1150+
color: #fff !important;
1151+
font-style: italic;
1152+
}
1153+
1154+
.paragraph li span[style*="color: orangered"] {
1155+
color: #fff !important;
1156+
font-weight: bold;
1157+
}
1158+
1159+
.tableblock [style*="color: orangered"],
1160+
.paragraph[id] [style*="color: orangered"] {
1161+
color: #fff !important;
1162+
}
1163+
1164+
.tableblock [style*="color: red"],
1165+
.paragraph[id] [style*="color: red"] {
1166+
color: #fff !important;
1167+
}

docs/ui/src/css/header.css

Lines changed: 28 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -24,20 +24,27 @@ body {
2424
text-decoration: none;
2525
}
2626

27+
.navbar-item:hover:not(.search),
28+
.navbar-item:focus:not(.search) {
29+
color: var(--color-white);
30+
transform: translateY(-1px);
31+
transition: all 0.2s ease-in-out;
32+
}
33+
2734
.navbar-brand {
2835
display: flex;
2936
flex: auto;
3037
padding-left: 1rem;
3138
}
3239

3340
.navbar-brand .navbar-item {
34-
color: var(--navbar-font-color);
41+
color: var(--color-white-60);
3542
}
3643

3744
.navbar-brand .navbar-item:first-child {
3845
align-self: center;
3946
padding: 0;
40-
font-size: calc(22 / var(--rem-base) * 1rem);
47+
font-size: calc(18 / var(--rem-base) * 1rem);
4148
flex-wrap: wrap;
4249
line-height: 1;
4350
}
@@ -47,10 +54,6 @@ body {
4754
word-wrap: normal;
4855
}
4956

50-
.navbar-brand .navbar-item:first-child :not(:last-child) {
51-
padding-right: 0.375rem;
52-
}
53-
5457
.navbar-brand .navbar-item.search {
5558
flex: auto;
5659
justify-content: flex-end;
@@ -185,13 +188,20 @@ body {
185188
.navbar .button {
186189
display: inline-flex;
187190
align-items: center;
188-
background: var(--navbar-button-background);
189-
border: 1px solid var(--navbar-button-border-color);
190-
border-radius: 0.15rem;
191+
background: rgb(229, 190, 51);
191192
height: 1.75rem;
192-
color: var(--navbar-button-font-color);
193+
color: #0e0e0e;
194+
font-weight: var(--body-font-weight-bold);
193195
padding: 0 0.75em;
194196
white-space: nowrap;
197+
box-shadow: 4px 4px 0 #000;
198+
transition: background-color 0.2s ease, transform 0.1s ease, box-shadow 0.1s ease;
199+
}
200+
201+
.navbar .button:hover {
202+
background: rgb(255, 215, 0);
203+
transform: translateY(-2px);
204+
box-shadow: 6px 6px 0 #000;
195205
}
196206

197207
@media screen and (max-width: 768.5px) {
@@ -218,8 +228,8 @@ body {
218228
}
219229

220230
.navbar-menu {
221-
background: var(--navbar-menu-background);
222231
box-shadow: 0 8px 16px rgba(10, 10, 10, 0.1);
232+
background-color: rgb(47 47 94);
223233
max-height: var(--body-min-height);
224234
overflow-y: auto;
225235
overscroll-behavior: none;
@@ -232,7 +242,9 @@ body {
232242

233243
.navbar-menu a.navbar-item:hover,
234244
.navbar-menu .navbar-link:hover {
235-
background: var(--navbar-menu_hover-background);
245+
color: var(--color-white);
246+
transform: translateY(-1px);
247+
transition: all 0.2s ease-in-out;
236248
}
237249
}
238250

@@ -280,14 +292,15 @@ body {
280292

281293
.navbar-end > .navbar-item,
282294
.navbar-end .navbar-link {
283-
color: var(--navbar-font-color);
295+
color: var(--color-white-60);
284296
}
285297

286298
.navbar-end > a.navbar-item:hover,
287299
.navbar-end .navbar-link:hover,
288300
.navbar-end .navbar-item.has-dropdown:hover .navbar-link {
289-
background: var(--navbar_hover-background);
290-
color: var(--navbar-font-color);
301+
color: var(--color-white);
302+
transform: translateY(-1px);
303+
transition: all 0.2s ease-in-out;
291304
}
292305

293306
.navbar-end .navbar-link::after {

0 commit comments

Comments
 (0)