@jlpereira/taxonpages-panel-etymology
v0.0.1
Published
A TaxonPages panel that displays etymology information for a given taxon
Readme
PanelEtymology
A TaxonPages panel that displays gender, part of speech, and etymology information for a given taxon. It pulls Latinized classifications from the TaxonWorks API and renders the taxon's etymology with Markdown support.
Panel ID: panel:etymology
Supported rank groups by default: GenusGroup, SpeciesGroup, SpeciesAndInfraspeciesGroup
Installation
Via npm
npm install @jlpereira/taxonpages-panel-etymologyManual
Copy the PanelEtymology/ folder into your project's panels/ directory:
panels/
PanelEtymology/Usage
Add the panel to your config/taxa_page.yml:
taxa_page:
overview:
panels:
- - - panel:etymologyHow it works
Fetching classifications — Requests
/taxon_name_classificationsfiltered bytaxon_name_idand keeps only those of typeTaxonNameClassification::Latinized::*(gender and part of speech).Human-readable labels — Maps each classification type to a readable label and joins them as a comma-separated list (e.g.
Masculine, Adjective).| Classification type | Label | | ------------------------------------------------------------ | ---------------------- | |
Latinized::Gender::Masculine| Masculine | |Latinized::Gender::Feminine| Feminine | |Latinized::Gender::Neuter| Neuter | |Latinized::PartOfSpeech::Adjective| Adjective | |Latinized::PartOfSpeech::Participle| Participle | |Latinized::PartOfSpeech::NounInApposition| Noun in apposition | |Latinized::PartOfSpeech::NounInGenitiveCase| Noun in genitive case |Gendered forms — When the taxon belongs to the species group (rank includes
SpeciesGrouporSpeciesAndInfraspecies) and is classified as an adjective or participle, the panel renders themasculine_name,feminine_name, andneuter_nameproperties of the taxon as a comma-separated list.Etymology — If the taxon has an
etymologyfield, it is rendered below the classifications using Markdown (HTML enabled).Visibility — The card is hidden entirely when the taxon has no etymology, no gendered names, and no Latinized classifications.
Project structure
PanelEtymology/
├── main.js # Panel entry point and registration
└── PanelEtymology.vue # Main panel component