diff --git a/site/app.js b/site/app.js
index 8bd03f5..149a017 100644
--- a/site/app.js
+++ b/site/app.js
@@ -599,6 +599,11 @@ function wireGlobal() {
});
for (const tab of els.tabs) tab.addEventListener('click', () => setView(tab.dataset.view));
document.getElementById('print').addEventListener('click', () => window.print());
+ // The PDF and PNG are rendered by CI next to the deployed site; local previews don't have them.
+ for (const link of document.querySelectorAll('[data-download]')) {
+ fetch(link.getAttribute('href'), { method: 'HEAD', cache: 'no-cache' })
+ .then((response) => { link.hidden = !response.ok; }, () => {});
+ }
// Printing always produces the diagram, whatever view is open.
let viewBeforePrint = null;
window.addEventListener('beforeprint', () => {
diff --git a/site/index.html b/site/index.html
index affd77d..24a61bf 100644
--- a/site/index.html
+++ b/site/index.html
@@ -38,6 +38,12 @@
+
+ PDF
+
+
+ PNG
+
diff --git a/site/styles.css b/site/styles.css
index bc65a48..77da515 100644
--- a/site/styles.css
+++ b/site/styles.css
@@ -351,6 +351,16 @@ button {
background: var(--chip-hover);
}
+.text-btn {
+ width: auto;
+ grid-auto-flow: column;
+ gap: 6px;
+ padding: 0 11px;
+ font-size: 13px;
+ font-weight: 600;
+ text-decoration: none;
+}
+
/* Layout */
.layout {
@@ -1109,6 +1119,23 @@ button {
.brand-text {
display: none;
}
+
+ .actions {
+ gap: 6px;
+ }
+
+ /* Phones get the PDF download instead of printing. */
+ #print {
+ display: none;
+ }
+
+ .text-btn {
+ padding: 0 9px;
+ }
+
+ .text-btn svg {
+ display: none;
+ }
}
@media (prefers-reduced-motion: reduce) {