From 2dbf57071e022a1df429ebdecb04f3c56a6f7a2c Mon Sep 17 00:00:00 2001 From: Steven Clontz Date: Thu, 25 Jun 2026 08:08:03 -0500 Subject: [PATCH 1/3] stub out customization --- packages/viewer/src/constants.ts | 52 ++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) diff --git a/packages/viewer/src/constants.ts b/packages/viewer/src/constants.ts index c1d07495..8b199832 100644 --- a/packages/viewer/src/constants.ts +++ b/packages/viewer/src/constants.ts @@ -4,8 +4,60 @@ const { VITE_BRANCH = 'unknown', VITE_MAIN_BRANCH = 'main', VITE_VERSION = 'unknown', + VITE_CATEGORY = 'topology' } = import.meta.env +interface CategoryConfig { + category: string + objects: string + dataHost: string + contributingUrl: string + helpUrl: string + calloutFeatures: string[] + homeContent: string + showQuestions: boolean + acknowledgement?: { + quote: string + footer: string + dedication: string + } +} + +const topologyConfig:CategoryConfig = { + category: "topology", + objects: "Spaces", + dataHost: "https://pub-65041ca69d744da88ade13abd31ad834.r2.dev", + contributingUrl: "https://code4math.zulipchat.com/#narrow/channel/416467-pi-base/topic/Welcome.20new.20and.20potential.20contributors!.20.F0.9F.91.8B/with/544214230", + helpUrl: "https://github.com/pi-base/data/wiki/", + calloutFeatures: [ + "Search spaces by name/description: [compactifications](https://topology.pi-base.org/spaces?text=compactification)", + "Search spaces by properties: [non-metric continua](https://topology.pi-base.org/spaces?q=compact%20%2B%20connected%20%2B%20t_2%20%2B%20~metrizable)", + "Find counterexamples: [connected spaces need not be path connected](https://topology.pi-base.org/theorems/T000040)", + ], + homeContent: "# Contributing ...", + showQuestions: true, + acknowledgement: { + quote: "Topology is a dense forest of counterexamples. A usable map of the forest is a fine thing.", + footer: "Paraphrased from Mary Ellen Rudin's review of *Counterexamples in Topology*", + dedication: "Dedicated to the memory of our friend and mentor Gary Gruenhage (1947-2023)." + }, +} + +const graphConfig:CategoryConfig = { + category: "graph", + objects: "Graphs", + dataHost: "TODO", + contributingUrl: "TODO", + helpUrl: "https://github.com/pi-base/data-graph/wiki/", + calloutFeatures: [ + "graphs are neat" + ], + homeContent: "# Contributing ...", + showQuestions: false, +} + +export const categoryConfig = VITE_CATEGORY === "graph" ? graphConfig : topologyConfig + export const mainBranch = VITE_MAIN_BRANCH export const defaultHost = VITE_BUNDLE_HOST From 1c9d2d6c4b31dcf3b5089cc71340634ec81e04e4 Mon Sep 17 00:00:00 2001 From: Steven Clontz Date: Thu, 25 Jun 2026 15:34:14 +0000 Subject: [PATCH 2/3] configurable constants for given category --- packages/viewer/package.json | 2 + packages/viewer/src/components/Footer.svelte | 20 +- packages/viewer/src/components/Home.svelte | 146 +++-------- packages/viewer/src/components/Nav.svelte | 16 +- .../components/Search/Results/NotFound.svelte | 4 +- .../viewer/src/components/Shared/Cite.svelte | 9 +- .../src/components/Shared/References.svelte | 4 +- .../src/components/Theorems/Converse.svelte | 4 +- .../viewer/src/components/Traits/Show.svelte | 6 +- packages/viewer/src/constants.ts | 115 ++++++--- packages/viewer/src/errors.ts | 4 +- pnpm-lock.yaml | 233 ++++++++++++------ 12 files changed, 310 insertions(+), 253 deletions(-) diff --git a/packages/viewer/package.json b/packages/viewer/package.json index 4fcda5bb..3d44afa8 100644 --- a/packages/viewer/package.json +++ b/packages/viewer/package.json @@ -32,6 +32,7 @@ "hast-to-hyperscript": "^10.0.3", "hyperscript": "^2.0.2", "jquery": "^3.7.1", + "markdown-it": "^14.2.0", "rehype-katex": "^6.0.3", "remark-rehype": "^10.1.0", "unified": "^10.1.2", @@ -46,6 +47,7 @@ "@types/debug": "^4.1.12", "@types/hyperscript": "0.0.7", "@types/katex": "^0.16.7", + "@types/markdown-it": "^14.1.2", "@types/page": "^1.11.9", "@types/unist": "^2.0.10", "cypress": "^14.3.2", diff --git a/packages/viewer/src/components/Footer.svelte b/packages/viewer/src/components/Footer.svelte index 63f84523..d6eeaf41 100644 --- a/packages/viewer/src/components/Footer.svelte +++ b/packages/viewer/src/components/Footer.svelte @@ -1,20 +1,24 @@
- Data © {new Date().getFullYear()} Steven Clontz and James Dabbs (CC-BY) | Software © {new Date().getFullYear()} James Dabbs (MIT License) | - GitHub + {@html md.renderInline( + categoryConfig.footer(new Date().getFullYear().toString()), + )}
Data last synchonized:
+ + diff --git a/packages/viewer/src/components/Home.svelte b/packages/viewer/src/components/Home.svelte index 74560233..ee4e75f7 100644 --- a/packages/viewer/src/components/Home.svelte +++ b/packages/viewer/src/components/Home.svelte @@ -1,126 +1,48 @@
-

π-Base

-

a community database of topological counterexamples

-
-

- ➜ Search spaces by name/description: - compactifications -

-

- ➜ Search spaces by properties: - non-metric continua -

-

- ➜ Find counterexamples: - connected spaces need not be path connected -

+

π-Base: {categoryConfig.subject}

+

{categoryConfig.slogan}

+
+ {#each categoryConfig.calloutFeatures as feature} +

+ ➜ {@html md.renderInline(feature)} +

+ {/each}
-
-

- Topology is a dense forest of counterexamples. A usable map of the forest - is a fine thing. -

-
- Paraphrased from Mary Ellen Rudin's review of - Counterexamples in Topology -
-

- - Dedicated to the memory of our friend and mentor Gary Gruenhage - (1947-2023). - -

-
-
-

Contributing

-

- π-Base's data and software are open-sourced on GitHub. We rely on - volunteers like yourself - to contribute new spaces, properties, and theorems. -

-

About Us

-

- The π-Base was founded in 2014 by its lead maintainer - James Dabbs. π-Base's lead - mathematical editor and contributing research software engineer - Steven Clontz - joined the project in 2017. -

-

Community

-

- The π-Base is part of the - code4math - community. Join the conversation on either the - code4math Zulip - or the - - π-Base GitHub Discussion board. -

-

- More databases may be discovered at the - Index of Mathematical DataBases. -

-

Special Acknowledgements

-

- Many people have contributed to this project, but a few individuals and - organizations deserve particular recognition: -

- + {#if categoryConfig.acknowledgement} +
+

+ {categoryConfig.acknowledgement.quote} +

+
+ {categoryConfig.acknowledgement.footer} +
+

+ + {categoryConfig.acknowledgement.dedication} + +

+
+
+ {/if} + {@html md.render(categoryConfig.homeContent)}
+ + diff --git a/packages/viewer/src/components/Nav.svelte b/packages/viewer/src/components/Nav.svelte index 7ab55cba..627c336d 100644 --- a/packages/viewer/src/components/Nav.svelte +++ b/packages/viewer/src/components/Nav.svelte @@ -1,7 +1,7 @@
Cite as: - The pi-Base Community. - {title}. + The π-Base Community. + {categoryConfig.citeTitle}. Available at: {$page.url} (Accessed: {new Date().toISOString().split('T')[0]}). diff --git a/packages/viewer/src/components/Shared/References.svelte b/packages/viewer/src/components/Shared/References.svelte index 91318f16..da01cd96 100644 --- a/packages/viewer/src/components/Shared/References.svelte +++ b/packages/viewer/src/components/Shared/References.svelte @@ -1,7 +1,7 @@ @@ -14,7 +14,7 @@ {:else}
  • No references available. If appropriate, please consider contributingcontributing a reference.
  • {/each} diff --git a/packages/viewer/src/components/Theorems/Converse.svelte b/packages/viewer/src/components/Theorems/Converse.svelte index 8f346d39..1ec33aa2 100644 --- a/packages/viewer/src/components/Theorems/Converse.svelte +++ b/packages/viewer/src/components/Theorems/Converse.svelte @@ -1,6 +1,6 @@