Skip to content

Commit 21f659d

Browse files
Adjust PageFind - fixes #27
1 parent c2a1f6e commit 21f659d

File tree

5 files changed

+17
-15
lines changed

5 files changed

+17
-15
lines changed

web/src/components/ItemDescription.astro

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,13 @@ path = path.endsWith('/') ? path.slice(0, -1) : path;
1414
// Also remove anything before the last slash, effectively removing folders
1515
path = path.substring(path.lastIndexOf('/'));
1616
---
17-
{incomplete && (
18-
<p style="color: var(--sl-color-orange); font-size: 1.6rem;"><strong>This page is incomplete! Help wanted!</strong></p>
19-
<p style="color: var(--sl-color-orange); font-size: 1.25rem;">Please finish this page using the <a target="_blank" href={"https://wiki.multitheftauto.com/wiki" + path}>corresponding Old Wiki article</a>.
20-
<br>Go to <a target="_blank" href="https://github.com/multitheftauto/wiki.multitheftauto.com/blob/main/CONTRIBUTING.md">Contribution guidelines</a> for more information.</p>
21-
<hr>
22-
)}
17+
<div pagefind-weight="6">
18+
{incomplete && (
19+
<p style="color: var(--sl-color-orange); font-size: 1.6rem;"><strong>This page is incomplete! Help wanted!</strong></p>
20+
<p style="color: var(--sl-color-orange); font-size: 1.25rem;">Please finish this page using the <a target="_blank" href={"https://wiki.multitheftauto.com/wiki" + path}>corresponding Old Wiki article</a>.
21+
<br>Go to <a target="_blank" href="https://github.com/multitheftauto/wiki.multitheftauto.com/blob/main/CONTRIBUTING.md">Contribution guidelines</a> for more information.</p>
22+
<hr>
23+
)}
2324

24-
<EnhancedMarkdown content={description} />
25+
<EnhancedMarkdown content={description} />
26+
</div>

web/src/overrides/PageTitle.astro

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
---
22
import { functionTypePrettyName } from '@src/utils/functions';
33
---
4-
<div class="page-title-container" data-pagefind-ignore>
4+
<div class="page-title-container">
55
<h1>{Astro.locals.starlightRoute.entry.data.title}</h1>
66

7-
<div class="type-badge type-badge--client">{functionTypePrettyName['client']}</div>
8-
<div class="type-badge type-badge--server">{functionTypePrettyName['server']}</div>
9-
<div class="type-badge type-badge--shared">{functionTypePrettyName['shared']}</div>
7+
<div data-pagefind-ignore class="type-badge type-badge--client">{functionTypePrettyName['client']}</div>
8+
<div data-pagefind-ignore class="type-badge type-badge--server">{functionTypePrettyName['server']}</div>
9+
<div data-pagefind-ignore class="type-badge type-badge--shared">{functionTypePrettyName['shared']}</div>
1010
</div>
1111

1212
<style is:global>

web/src/pages/Incomplete_Pages.astro

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ const unfinishedEvents = getUnfinishedPages('events');
1717
class="guidelines-link">Contribution guidelines</a></p>
1818

1919
<h3>Unfinished Function Pages</h3>
20-
<section>
20+
<section data-pagefind-ignore>
2121
{unfinishedFunctions.length === 0 ? (
2222
<p>There are currently no unfinished function pages 😄</p>
2323
) : (
@@ -36,7 +36,7 @@ const unfinishedEvents = getUnfinishedPages('events');
3636
</section>
3737

3838
<h3>Unfinished Event Pages</h3>
39-
<section>
39+
<section data-pagefind-ignore>
4040
{unfinishedEvents.length === 0 ? (
4141
<p>There are currently no unfinished event pages 😄</p>
4242
) : (

web/src/pages/reference/Element.astro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ const elementsByCategory = getElementsByCategory();
1616
An <strong>element</strong> is a generic class that can represent almost all in-game entities.
1717
The built-in element types are:</p>
1818

19-
<div class="mtaflex">
19+
<div class="mtaflex" data-pagefind-ignore>
2020
{Object.entries(elementsByCategory).map(([category, elements]) => (
2121
<div class="mtabox">
2222
<span class="mtabox_title" id={category}>{category} elements <a href={"#"+category}><Icon

web/src/pages/reference/Entity.astro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ const entities = elementsByCategory['Entity'] || [];
1515
}}>
1616
<p>An <strong>entity</strong> is an element that has a position and a physical representation in the world. The following elements are entities:</p>
1717

18-
<div class="mtagrid">
18+
<div class="mtagrid" data-pagefind-ignore>
1919
{Array.from({ length: Math.ceil(entities.length / 10) }, (_, i) => (
2020
<ul class="mtabox">
2121
{entities.slice(i * 10, i * 10 + 10).map(entity => (

0 commit comments

Comments
 (0)