Skip to content

Commit cd1ba63

Browse files
committed
Add direct PDF download reports for TotalRisk, BestFit, and LifeSim
1 parent 3f92934 commit cd1ba63

11 files changed

Lines changed: 103 additions & 29 deletions

File tree

src/components/ContentBox.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ const ContentBox = ({ contentData }) => {
1616
doc_name={data.doc_name}
1717
active={data.active}
1818
preserveIconColor={data.preserveIconColor}
19+
downloadUrl={data.downloadUrl}
20+
draft={data.draft}
1921
/>
2022
))}
2123
</div>

src/components/ContentBubble.js

Lines changed: 31 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,18 @@
11
import ThemedImage from '@theme/ThemedImage';
22
import '../css/custom.css';
33

4-
const ContentBubble = ({ icon, iconLight, iconDark, IconComponent, doc_location, doc_name, active, preserveIconColor = false }) => {
4+
const ContentBubble = ({
5+
icon,
6+
iconLight,
7+
iconDark,
8+
IconComponent,
9+
doc_location,
10+
doc_name,
11+
active,
12+
preserveIconColor = false,
13+
downloadUrl,
14+
draft = false,
15+
}) => {
516
const iconFilter = preserveIconColor ? '' : 'brightness-0 invert';
617
const baseClasses = `
718
flex min-h-[90px] xl:min-h-[130px] items-center overflow-hidden rounded-xl
@@ -27,10 +38,9 @@ const ContentBubble = ({ icon, iconLight, iconDark, IconComponent, doc_location,
2738
`;
2839

2940
// Build <ThemedImage /> sources, with fallback to legacy `icon`
30-
const sources =
31-
iconLight || icon ? { light: iconLight ?? icon, dark: iconDark ?? iconLight ?? icon } : null;
41+
const sources = iconLight || icon ? { light: iconLight ?? icon, dark: iconDark ?? iconLight ?? icon } : null;
3242

33-
const Inner = ({ comingSoon = false }) => (
43+
const Inner = ({ comingSoon = false, pdfDownload = false, isDraft = false }) => (
3444
<div className="flex items-center gap-[16px] px-[16px] py-[10px] xl:gap-[20px] xl:px-[20px] xl:py-[14px]">
3545
{IconComponent ? (
3646
<div className="frosted-glass-circle flex h-[44px] w-[44px] shrink-0 items-center justify-center rounded-full xl:h-[60px] xl:w-[60px]">
@@ -42,21 +52,31 @@ const ContentBubble = ({ icon, iconLight, iconDark, IconComponent, doc_location,
4252
</div>
4353
) : null}
4454
<div>
45-
<p className="mb-0 font-usace text-[1rem] leading-[1.2] no-underline text-white xl:text-[1.15rem]">
46-
{doc_name}
47-
</p>
55+
<p className="mb-0 font-usace text-[1rem] leading-[1.2] text-white no-underline xl:text-[1.15rem]">{doc_name}</p>
4856
{comingSoon && (
49-
<span className="mt-2 inline-block rounded-full bg-white/20 px-3 py-0.5 font-usace text-[0.7rem] leading-none text-white/70">
50-
Coming Soon
51-
</span>
57+
<span className="mt-2 inline-block rounded-full bg-white/20 px-3 py-0.5 font-usace text-[0.7rem] text-white/70">Coming Soon</span>
58+
)}
59+
{pdfDownload && (
60+
<span className="mt-2 inline-block rounded-full bg-white/20 px-3 py-0.5 font-usace text-[0.7rem] text-white/70">PDF Download</span>
61+
)}
62+
{isDraft && (
63+
<span className="ml-2 mt-2 inline-block rounded-full bg-amber-400/30 px-3 py-0.5 font-usace text-[0.7rem] text-amber-100">Draft</span>
5264
)}
5365
</div>
5466
</div>
5567
);
5668

69+
if (active && downloadUrl) {
70+
return (
71+
<a href={downloadUrl} download className={`${baseClasses} ${activeClasses}`}>
72+
<Inner pdfDownload isDraft={draft} />
73+
</a>
74+
);
75+
}
76+
5777
return active ? (
5878
<a href={doc_location} className={`${baseClasses} ${activeClasses}`}>
59-
<Inner />
79+
<Inner isDraft={draft} />
6080
</a>
6181
) : (
6282
<div className={`${baseClasses} ${inactiveClasses}`}>

src/pages/changelog.js

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,23 @@ export default function Changelog() {
1515
</div>
1616
<div className="mx-auto max-w-[1600px] px-6 pb-16 pt-8 lg:px-12">
1717
<TableChangelog
18-
dates={['March 2026']}
19-
categories={['Website Update']}
20-
documents={['-']}
21-
versions={['-']}
22-
descriptions={['Initial launch of the RMC Software Documentation website.']}
18+
dates={['March 25, 2026', 'March 25, 2026', 'March 25, 2026', 'March 25, 2026', 'March 12, 2026']}
19+
categories={['PDF Download', 'PDF Download', 'PDF Download', 'PDF Download', 'Website Update']}
20+
documents={[
21+
'RMC TotalRisk Verification Report (Draft)',
22+
'RMC TotalRisk Technical Reference Manual (Draft)',
23+
'RMC-BestFit Verification Report',
24+
'LifeSim Technical Reference Manual',
25+
'-',
26+
]}
27+
versions={['-', '-', '-', '-', '-']}
28+
descriptions={[
29+
'Added as direct PDF download.',
30+
'Added as direct PDF download.',
31+
'Added as direct PDF download.',
32+
'Added as direct PDF download.',
33+
'Initial launch of the RMC Software Documentation website.',
34+
]}
2335
/>
2436
</div>
2537
</main>

src/pages/desktop-applications/lifesim.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,14 @@ const lifeSimData = [
2323
active: true,
2424
draft: false,
2525
},
26+
{
27+
icon: 'img/LifeSim.png',
28+
preserveIconColor: true,
29+
doc_name: 'LifeSim Technical Reference Manual',
30+
active: true,
31+
draft: false,
32+
downloadUrl: '/RMC-Software-Documentation/source-documents/desktop-applications/lifesim/technical-reference-manual/LifeSim Technical Reference Manual.pdf',
33+
},
2634
{
2735
icon: 'img/LifeSim.png',
2836
preserveIconColor: true,
@@ -50,7 +58,7 @@ export default function LifeSim() {
5058
icon: addBaseUrl(doc.icon),
5159
iconLight: addBaseUrl(doc.iconLight),
5260
iconDark: addBaseUrl(doc.iconDark),
53-
doc_location: addBaseUrl(`docs/${doc.doc_location}/${latestVersions[doc.doc_location.replace(/^docs\//, '')]}/preface`),
61+
doc_location: doc.downloadUrl ? undefined : addBaseUrl(`docs/${doc.doc_location}/${latestVersions[doc.doc_location.replace(/^docs\//, '')]}/preface`),
5462
}));
5563

5664
return (

src/pages/desktop-applications/rmc-bestfit.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,14 @@ const bestFitData = [
1515
active: true,
1616
draft: false,
1717
},
18+
{
19+
icon: 'img/BestFit.png',
20+
preserveIconColor: true,
21+
doc_name: 'RMC-BestFit Verification Report',
22+
active: true,
23+
draft: false,
24+
downloadUrl: '/RMC-Software-Documentation/source-documents/desktop-applications/rmc-bestfit/verification-report/RMC-BestFit Verification Report.pdf',
25+
},
1826
];
1927

2028
export const bestFitDocs = bestFitData;
@@ -35,7 +43,7 @@ export default function BestFit() {
3543
icon: addBaseUrl(doc.icon),
3644
iconLight: addBaseUrl(doc.iconLight),
3745
iconDark: addBaseUrl(doc.iconDark),
38-
doc_location: addBaseUrl(`docs/${doc.doc_location}/${latestVersions[doc.doc_location.replace(/^docs\//, '')]}/preface`),
46+
doc_location: doc.downloadUrl ? undefined : addBaseUrl(`docs/${doc.doc_location}/${latestVersions[doc.doc_location.replace(/^docs\//, '')]}/preface`),
3947
}));
4048

4149
return (

src/pages/desktop-applications/rmc-totalrisk.js

Lines changed: 20 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,19 +18,29 @@ const totalRiskData = [
1818
{
1919
icon: 'img/TotalRisk.png',
2020
preserveIconColor: true,
21-
doc_location: 'desktop-applications/rmc-totalrisk/applications-guide',
22-
doc_name: 'RMC TotalRisk Applications Guide',
23-
active: false,
21+
doc_name: 'RMC TotalRisk Verification Report',
22+
active: true,
2423
draft: true,
24+
downloadUrl:
25+
'/RMC-Software-Documentation/source-documents/desktop-applications/rmc-totalrisk/verification-report/RMC-TotalRisk Verification Report.pdf',
2526
},
26-
/*{
27+
{
2728
icon: 'img/TotalRisk.png',
2829
preserveIconColor: true,
29-
doc_location: 'desktop-applications/rmc-totalrisk/vertification-report',
30-
doc_name: 'RMC TotalRisk Verification Report',
30+
doc_name: 'RMC TotalRisk Technical Reference Manual',
31+
active: true,
32+
draft: true,
33+
downloadUrl:
34+
'/RMC-Software-Documentation/source-documents/desktop-applications/rmc-totalrisk/technical-reference-manual/RMC-TotalRisk Technical Reference Manual.pdf',
35+
},
36+
{
37+
icon: 'img/TotalRisk.png',
38+
preserveIconColor: true,
39+
doc_location: 'desktop-applications/rmc-totalrisk/applications-guide',
40+
doc_name: 'RMC TotalRisk Applications Guide',
3141
active: false,
3242
draft: true,
33-
},*/
43+
},
3444
];
3545

3646
export const totalRiskDocs = totalRiskData;
@@ -51,7 +61,9 @@ export default function TotalRisk() {
5161
icon: addBaseUrl(doc.icon),
5262
iconLight: addBaseUrl(doc.iconLight),
5363
iconDark: addBaseUrl(doc.iconDark),
54-
doc_location: addBaseUrl(`docs/${doc.doc_location}/${latestVersions[doc.doc_location.replace(/^docs\//, '')]}/preface`),
64+
doc_location: doc.downloadUrl
65+
? undefined
66+
: addBaseUrl(`docs/${doc.doc_location}/${latestVersions[doc.doc_location.replace(/^docs\//, '')]}/preface`),
5567
}));
5668

5769
return (

src/theme/Layout/buildNavLinks.js

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,20 @@ export default function buildNavLinks(useBaseUrl, latestVersions = {}) {
2121
const trAppHref = useBaseUrl(
2222
`/docs/desktop-applications/rmc-totalrisk/applications-guide/${latestVersions['desktop-applications/rmc-totalrisk/applications-guide'] || 'v1.0'}/preface`,
2323
);
24-
const trVerifHref = useBaseUrl(
25-
`/docs/desktop-applications/rmc-totalrisk/verification-report/${latestVersions['desktop-applications/rmc-totalrisk/verification-report'] || 'v1.0'}/preface`,
24+
const trVerifPdfHref = useBaseUrl(
25+
'/source-documents/desktop-applications/rmc-totalrisk/verification-report/RMC-TotalRisk Verification Report.pdf',
26+
);
27+
const trTechRefPdfHref = useBaseUrl(
28+
'/source-documents/desktop-applications/rmc-totalrisk/technical-reference-manual/RMC-TotalRisk Technical Reference Manual.pdf',
2629
);
2730

2831
/* RMC-BestFit document links (third level) */
2932
const bestFitUserGuideHref = useBaseUrl(
3033
`/docs/desktop-applications/rmc-bestfit/users-guide/${latestVersions['desktop-applications/rmc-bestfit/users-guide'] || 'v1.0'}/preface`,
3134
);
35+
const bestFitVerifPdfHref = useBaseUrl(
36+
'/source-documents/desktop-applications/rmc-bestfit/verification-report/RMC-BestFit Verification Report.pdf',
37+
);
3238

3339
/* RMC-RFA document links (third level) */
3440
const rfaUserGuideHref = useBaseUrl(
@@ -45,6 +51,9 @@ export default function buildNavLinks(useBaseUrl, latestVersions = {}) {
4551
const lifeSimAppGuideHref = useBaseUrl(
4652
`/docs/desktop-applications/lifesim/applications-guide/${latestVersions['desktop-applications/lifesim/applications-guide'] || 'v1.0'}/preface`,
4753
);
54+
const lifeSimTechRefPdfHref = useBaseUrl(
55+
'/source-documents/desktop-applications/lifesim/technical-reference-manual/LifeSim Technical Reference Manual.pdf',
56+
);
4857

4958
/* -------------------------------------------------------------------------------------------------------------------------------------------------------------- */
5059

@@ -167,7 +176,8 @@ export default function buildNavLinks(useBaseUrl, latestVersions = {}) {
167176
href: totalRiskHref,
168177
children: [
169178
{ id: 'tr-users-guide', text: "RMC-TotalRisk User's Guide", href: trUserGuideHref },
170-
// Optionally add trAppHref/trVerifHref if needed in the menu
179+
{ id: 'tr-verif-pdf', text: 'RMC-TotalRisk Verification Report (PDF)', href: trVerifPdfHref, target: '_blank', rel: 'noopener noreferrer' },
180+
{ id: 'tr-tech-ref-pdf', text: 'RMC-TotalRisk Technical Reference Manual (PDF)', href: trTechRefPdfHref, target: '_blank', rel: 'noopener noreferrer' },
171181
],
172182
},
173183
{
@@ -180,6 +190,7 @@ export default function buildNavLinks(useBaseUrl, latestVersions = {}) {
180190
text: "RMC-BestFit User's Guide",
181191
href: bestFitUserGuideHref,
182192
},
193+
{ id: 'bestfit-verif-pdf', text: 'RMC-BestFit Verification Report (PDF)', href: bestFitVerifPdfHref, target: '_blank', rel: 'noopener noreferrer' },
183194
],
184195
},
185196
{
@@ -199,6 +210,7 @@ export default function buildNavLinks(useBaseUrl, latestVersions = {}) {
199210
text: 'LifeSim Validation Studies',
200211
href: lifeSimValStudiesHref,
201212
},
213+
{ id: 'lifesim-tech-ref-pdf', text: 'LifeSim Technical Reference Manual (PDF)', href: lifeSimTechRefPdfHref, target: '_blank', rel: 'noopener noreferrer' },
202214
/* {
203215
id: 'lifesim-applications-guide',
204216
text: 'LifeSim Applications Guide',

0 commit comments

Comments
 (0)