Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 13 additions & 3 deletions src/components/StructureSelector.svelte
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<script lang="ts">
import { goto } from '$app/navigation'
import { page } from '$app/state'
import { STRUCTURES } from '$lib/client/config'
import type { Structure } from '$lib/commons/types'

Expand All @@ -10,10 +11,19 @@
let { structure }: Props = $props()

function handle_change() {
goto(`/${value}`)
}
const path = page.url.pathname
const singular = structure === 'categories' ? 'category' : 'functor'

let value = $derived(structure)
if (path.endsWith('-implications')) {
goto(`/${singular}-implications`)
} else if (path.endsWith('-properties')) {
goto(`/${singular}-properties`)
} else if (path.endsWith('-search')) {
goto(`/${singular}-search`)
} else {
goto(`/${structure}`)
}
}
</script>

<label for="structure_selector">Structure</label>
Expand Down
2 changes: 1 addition & 1 deletion src/routes/categories/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
)
</script>

<MetaData title="List of categories" description="All available categories" />
<MetaData title="List of categories" />

<section>
<h2>List of categories</h2>
Expand Down
5 changes: 1 addition & 4 deletions src/routes/categories/[tag]/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,7 @@
let { data } = $props()
</script>

<MetaData
title="List of categories tagged with '{data.tag}'"
description="Categories tagged with '{data.tag}'"
/>
<MetaData title="List of categories tagged with '{data.tag}'" />

<h2>List of categories tagged with '{data.tag}'</h2>

Expand Down
5 changes: 1 addition & 4 deletions src/routes/category-comparison/[...ids]/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,7 @@
})
</script>

<MetaData
title="Comparison of categories"
description={compared_categories.map((c) => c.name).join(', ')}
/>
<MetaData title="Comparison of categories" />

<h2>Comparison of categories</h2>

Expand Down
7 changes: 2 additions & 5 deletions src/routes/category-implications/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,9 @@
)
</script>

<MetaData
title="List of implications"
description="Implications of categorical properties"
/>
<MetaData title="Implications of categories" />

<h2>List of implications</h2>
<h2>Implications of categories</h2>

<SearchFilter bind:search />

Expand Down
7 changes: 2 additions & 5 deletions src/routes/category-properties/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,9 @@
)
</script>

<MetaData
title="List of properties of categories"
description="All categorical properties"
/>
<MetaData title="Properties of categories" />

<h2>List of properties of categories</h2>
<h2>Properties of categories</h2>

<SearchFilter bind:search />

Expand Down
2 changes: 1 addition & 1 deletion src/routes/contribute/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import SuggestionForm from '$components/SuggestionForm.svelte'
</script>

<MetaData title="How to contribute" description="Options to contribute to CatDat" />
<MetaData title="How to contribute to CatDat" />

<h2>How to contribute</h2>

Expand Down
7 changes: 2 additions & 5 deletions src/routes/functor-implications/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,9 @@
let { data } = $props()
</script>

<MetaData
title="List of implications of functors"
description="Implications of functorial properties"
/>
<MetaData title="Implications of functors" />

<h2>List of implications of functors</h2>
<h2>Implications of functors</h2>

<!-- TODO: add search feature if the list grows in the future -->
<!-- TODO: add dualized-toggle if the list grows in the future -->
Expand Down
5 changes: 1 addition & 4 deletions src/routes/functor-properties/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,7 @@
let { data } = $props()
</script>

<MetaData
title="List of properties of functors"
description="All functorial properties"
/>
<MetaData title="Properties of functors" />

<h2>Properties of Functors</h2>

Expand Down
2 changes: 1 addition & 1 deletion src/routes/functors/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
let { data } = $props()
</script>

<MetaData title="List of functors" description="All available functors" />
<MetaData title="List of functors" />

<h2>List of functors</h2>

Expand Down
2 changes: 1 addition & 1 deletion src/routes/missing/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

<MetaData
title="Missing data in CatDat"
description="Missing properties, missing special morphisms, and more."
description="Missing properties, missing special morphisms, missing combinations, and more."
/>

<h2>Missing data</h2>
Expand Down
4 changes: 2 additions & 2 deletions src/routes/resources/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
import MetaData from '$components/MetaData.svelte'
</script>

<MetaData title="Resources" description="Resources on category theory" />
<MetaData title="Resources on Category Theory" />

<h2>Resources</h2>
<h2>Resources on Category Theory</h2>

<p>This is an (incomplete) list of resources on category theory.</p>

Expand Down