🎉 First off, thanks for taking the time to contribute! 🎉
If you would like to add a new paragraph for people to try out names and pronouns with, follow this guide.
- Create a new Issue using the "Suggest a Paragraph" template.
- Read the instructions in the template
- Replace any existing pronouns with the provided placeholders
- A maintainer (likely April) will review your issue within a week.
- Once your request is approved, see Adding an Approved Paragraph.
-
Create a branch of the repository and clone it locally
-
Create a new
.svelte
file in/src/lib/paragraphs/
-
Add the below
<script>
tag<script lang="ts"> import { getDataStore } from '$lib/data.svelte'; import type { prnData } from '$lib'; const dataStore = getDataStore(); let dataObj: prnData = $state(dataStore.data); </script>
-
Create a
<p>
tag with thept-6
andpx-4
classes- Write your paragraph in this tag, using the placeholders you used in the issue, but with
dataObj.
prepended (EX:{subj}
becomes{dataObj.subj}
) - Ensure you add plurality support for pronouns like 'they' by using an
{#if}
block to check ifdataObj.plural
is true. See examples of this in the existingParagraphX.svelte
files.
- Write your paragraph in this tag, using the placeholders you used in the issue, but with
-
Add the below
<p>
tag, and replace YOURUSERNAME and YOURURL with your preferred username and url.<p class="text-xs px-4"> Authored by <a class="underline text-primary-500" href="YOURURL">YOURUSERNAME</a> </p>
-
If a sentence starts with one of the variables, add capitalization
- Import capitalize
import { capatialize } from '$lib';
- Replace the variable with
{{capatialize(dataObj.VARIABLE)}}
- Import capitalize
-
Format files with prettier by running
npm run format
-
Commit your changes and create a pull request