Skip to content

Commit 86daee5

Browse files
committed
breaking change: change routes for category related pages
this is to make it consistent with the functor routes
1 parent e0a9e50 commit 86daee5

26 files changed

Lines changed: 42 additions & 37 deletions

File tree

scripts/deduce-properties.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ async function deduce_satisfied_properties(
101101
const assumption_string = get_assumption_string(implication)
102102
const conclusion_string = get_conclusion_string(implication)
103103

104-
const ref = `(see <a href="/implication/${implication_id}">here</a>)`
104+
const ref = `(see <a href="/category-implication/${implication_id}">here</a>)`
105105
const reason = `Since it ${assumption_string}, it ${conclusion_string} ${ref}.`
106106

107107
reasons[conclusion] = reason
@@ -221,7 +221,7 @@ async function deduce_unsatisfied_properties(
221221
const assumption_string = get_assumption_string(implication)
222222
const conclusion_string = get_conclusion_string(implication)
223223

224-
const ref = `(see <a href="/implication/${implication_id}">here</a>)`
224+
const ref = `(see <a href="/category-implication/${implication_id}">here</a>)`
225225

226226
const reason =
227227
`Assume that it ${prefixes[property]} ${property}. ` +

src/components/ImplicationItem.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
let { implication, highlighted_property }: Props = $props()
1515
</script>
1616

17-
<a href="/implication/{implication.id}" aria-label="details">
17+
<a href="/category-implication/{implication.id}" aria-label="details">
1818
<Fa icon={faInfoCircle} color="var(--secondary-text-color)" />
1919
</a>
2020

src/components/Nav.svelte

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -25,46 +25,47 @@
2525
{
2626
href: '/categories',
2727
text: 'Categories',
28-
nested: '/category',
28+
nested: '/category/',
2929
icon: faDatabase,
3030
mode: 'categories',
3131
},
3232
{
33-
href: '/properties',
33+
href: '/category-properties',
3434
text: 'Properties',
35-
nested: '/property',
35+
nested: '/category-property',
3636
icon: faList,
3737
mode: 'categories',
3838
},
3939
{
40-
href: '/implications',
40+
href: '/category-implications',
4141
text: 'Implications',
42+
nested: '/category-implication',
4243
icon: faArrowsSplitUpAndLeft,
4344
mode: 'categories',
4445
},
4546
{
46-
href: '/compare',
47+
href: '/category-comparison',
4748
text: 'Compare',
4849
icon: faChartBar,
49-
nested: '/compare',
50+
nested: '/category-comparison',
5051
mode: 'categories',
5152
},
5253
{
53-
href: '/search',
54+
href: '/category-search',
5455
text: 'Search',
5556
icon: faSearch,
5657
mode: 'categories',
5758
},
5859
{
5960
href: '/functor-properties',
60-
text: 'Functor properties',
61+
text: 'Properties',
6162
nested: '/functor-property',
6263
icon: faList,
6364
mode: 'functors',
6465
},
6566
{
6667
href: '/functor-implications',
67-
text: 'Functor implications',
68+
text: 'Implications',
6869
nested: '/functor-implication',
6970
icon: faArrowsSplitUpAndLeft,
7071
mode: 'functors',

src/components/NavMobile.svelte

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,28 +44,28 @@
4444
</a>
4545
</li>
4646
<li>
47-
<a href="/properties">
47+
<a href="/category-properties">
4848
Properties
4949
<Fa icon={faList} />
5050
</a>
5151
</li>
5252

5353
<li>
54-
<a href="/implications">
54+
<a href="/category-implications">
5555
Implications
5656
<Fa icon={faArrowsSplitUpAndLeft} />
5757
</a>
5858
</li>
5959

6060
<li>
61-
<a href="/compare">
61+
<a href="/category-comparison">
6262
Compare
6363
<Fa icon={faChartBar} />
6464
</a>
6565
</li>
6666

6767
<li>
68-
<a href="/search">
68+
<a href="/category-search">
6969
Search
7070
<Fa icon={faSearch} />
7171
</a>

src/lib/commons/property.url.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,5 @@ export function decode_property_ID(str: string): string {
2525
}
2626

2727
export function get_property_url(id: string, type: 'category' | 'functor' = 'category') {
28-
if (type === 'category') return `/property/${encode_property_ID(id)}`
29-
return `/functor-property/${encode_property_ID(id)}`
28+
return `/${type}-property/${encode_property_ID(id)}`
3029
}

src/routes/+page.svelte

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,10 @@
4141
</h3>
4242

4343
<p>
44-
A list of <a class="accent" href="/implications">implications</a> between
45-
<a class="accent" href="/properties">properties</a> allows for automatic deduction
46-
of satisfied and unsatisfied properties from more basic ones.
44+
A list of <a class="accent" href="/category-implications">implications</a>
45+
between
46+
<a class="accent" href="/category-properties">properties</a> allows for automatic
47+
deduction of satisfied and unsatisfied properties from more basic ones.
4748
</p>
4849
</article>
4950

@@ -52,8 +53,9 @@
5253
<Fa icon={faSearch} /> Search by properties
5354
</h3>
5455
<p>
55-
You can easily <a class="accent" href="/search">search for categories</a> that satisfy
56-
specific properties while not satisfying others.
56+
You can easily <a class="accent" href="/category-search"
57+
>search for categories</a
58+
> that satisfy specific properties while not satisfying others.
5759
</p>
5860
</article>
5961

@@ -62,8 +64,8 @@
6264
<Fa icon={faChartBar} /> Compare categories
6365
</h3>
6466
<p>
65-
You can <a class="accent" href="/compare">compare categories</a> to see how their
66-
properties align or differ.
67+
You can <a class="accent" href="/category-comparison">compare categories</a> to
68+
see how their properties align or differ.
6769
</p>
6870
</article>
6971

File renamed without changes.

src/routes/compare/+page.svelte renamed to src/routes/category-comparison/+page.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
function compare_categories() {
2929
if (!is_valid_comparison) return
3030
const path = chosen_categories.map((category) => category.id).join('/')
31-
goto(`/compare/${path}`)
31+
goto(`/category-comparison/${path}`)
3232
}
3333
</script>
3434

File renamed without changes.

src/routes/compare/[...ids]/+page.svelte renamed to src/routes/category-comparison/[...ids]/+page.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
<p class="hint" bind:this={paragraph_element}>
4848
Selected:
4949
{compared_categories.map((c) => c.name).join(', ')}.
50-
<a href="/compare">Choose different categories</a>.
50+
<a href="/category-comparison">Choose different categories</a>.
5151
</p>
5252

5353
<table>

0 commit comments

Comments
 (0)