mirror of
https://github.com/NohamR/Pocket-Bird.git
synced 2026-05-25 12:17:22 +00:00
Add latin names to the birds
This commit is contained in:
73
dist/obsidian/main.js
vendored
73
dist/obsidian/main.js
vendored
@@ -242,6 +242,8 @@ module.exports = class PocketBird extends Plugin {
|
||||
"bluebird": {
|
||||
"name": "Eastern Bluebird",
|
||||
"description": "Native to North American and very social, though can be timid around people.",
|
||||
"latinName": "Sialia sialis",
|
||||
"url": "https://en.wikipedia.org/wiki/Eastern_bluebird",
|
||||
"colors": {
|
||||
"foot": "#af8e75",
|
||||
"face": "#639bff",
|
||||
@@ -254,6 +256,8 @@ module.exports = class PocketBird extends Plugin {
|
||||
"shimaEnaga": {
|
||||
"name": "Shima Enaga",
|
||||
"description": "Small, fluffy birds found in the snowy regions of Japan, these birds are highly sought after by ornithologists and nature photographers.",
|
||||
"latinName": "Aegithalos caudatus",
|
||||
"url": "https://en.wikipedia.org/wiki/Long-tailed_tit",
|
||||
"colors": {
|
||||
"foot": "#af8e75",
|
||||
"face": "#ffffff",
|
||||
@@ -267,6 +271,8 @@ module.exports = class PocketBird extends Plugin {
|
||||
"tuftedTitmouse": {
|
||||
"name": "Tufted Titmouse",
|
||||
"description": "Native to the eastern United States, full of personality, and notably my wife's favorite bird.",
|
||||
"latinName": "Baeolophus bicolor",
|
||||
"url": "https://en.wikipedia.org/wiki/Tufted_titmouse",
|
||||
"colors": {
|
||||
"foot": "#af8e75",
|
||||
"face": "#c7cad7",
|
||||
@@ -283,6 +289,8 @@ module.exports = class PocketBird extends Plugin {
|
||||
"europeanRobin": {
|
||||
"name": "European Robin",
|
||||
"description": "Native to western Europe, this is the quintessential robin. Quite friendly, you'll often find them searching for worms.",
|
||||
"latinName": "Erithacus rubecula",
|
||||
"url": "https://en.wikipedia.org/wiki/European_robin",
|
||||
"colors": {
|
||||
"foot": "#af8e75",
|
||||
"face": "#ffaf34",
|
||||
@@ -297,6 +305,8 @@ module.exports = class PocketBird extends Plugin {
|
||||
"redCardinal": {
|
||||
"name": "Red Cardinal",
|
||||
"description": "Native to the eastern United States, this strikingly red bird is hard to miss.",
|
||||
"latinName": "Cardinalis cardinalis",
|
||||
"url": "https://en.wikipedia.org/wiki/Red_cardinal",
|
||||
"colors": {
|
||||
"beak": "#d93619",
|
||||
"foot": "#af8e75",
|
||||
@@ -316,6 +326,8 @@ module.exports = class PocketBird extends Plugin {
|
||||
"americanGoldfinch": {
|
||||
"name": "American Goldfinch",
|
||||
"description": "Coloured a brilliant yellow, this bird feeds almost entirely on the seeds of plants such as thistle, sunflowers, and coneflowers.",
|
||||
"latinName": "Spinus tristis",
|
||||
"url": "https://en.wikipedia.org/wiki/American_goldfinch",
|
||||
"colors": {
|
||||
"beak": "#ffaf34",
|
||||
"foot": "#af8e75",
|
||||
@@ -332,6 +344,8 @@ module.exports = class PocketBird extends Plugin {
|
||||
"barnSwallow": {
|
||||
"name": "Barn Swallow",
|
||||
"description": "Agile birds that often roost in man-made structures, these birds are known to build nests near Ospreys for protection.",
|
||||
"latinName": "Hirundo rustica",
|
||||
"url": "https://en.wikipedia.org/wiki/Barn_swallow",
|
||||
"colors": {
|
||||
"foot": "#af8e75",
|
||||
"face": "#db7c4d",
|
||||
@@ -345,6 +359,8 @@ module.exports = class PocketBird extends Plugin {
|
||||
"mistletoebird": {
|
||||
"name": "Mistletoebird",
|
||||
"description": "Native to Australia, these birds eat mainly mistletoe and in turn spread the seeds far and wide.",
|
||||
"latinName": "Dicaeum hirundinaceum",
|
||||
"url": "https://en.wikipedia.org/wiki/Mistletoebird",
|
||||
"colors": {
|
||||
"foot": "#6c6a7c",
|
||||
"face": "#352e6d",
|
||||
@@ -357,6 +373,8 @@ module.exports = class PocketBird extends Plugin {
|
||||
"scarletRobin": {
|
||||
"name": "Scarlet Robin",
|
||||
"description": "Native to Australia, this striking robin can be found in Eucalyptus forests.",
|
||||
"latinName": "Petroica boodang",
|
||||
"url": "https://en.wikipedia.org/wiki/Scarlet_robin",
|
||||
"colors": {
|
||||
"foot": "#494949",
|
||||
"face": "#3d3d3d",
|
||||
@@ -371,6 +389,8 @@ module.exports = class PocketBird extends Plugin {
|
||||
"americanRobin": {
|
||||
"name": "American Robin",
|
||||
"description": "While not a true robin, this social North American bird is so named due to its orange coloring. It seems unbothered by nearby humans.",
|
||||
"latinName": "Turdus migratorius",
|
||||
"url": "https://en.wikipedia.org/wiki/American_robin",
|
||||
"colors": {
|
||||
"beak": "#e89f30",
|
||||
"foot": "#9f8075",
|
||||
@@ -385,6 +405,8 @@ module.exports = class PocketBird extends Plugin {
|
||||
"carolinaWren": {
|
||||
"name": "Carolina Wren",
|
||||
"description": "Native to the eastern United States, these little birds are known for their curious and energetic nature.",
|
||||
"latinName": "Thryothorus ludovicianus",
|
||||
"url": "https://en.wikipedia.org/wiki/Carolina_wren",
|
||||
"colors": {
|
||||
"foot": "#af8e75",
|
||||
"face": "#edc7a9",
|
||||
@@ -399,6 +421,8 @@ module.exports = class PocketBird extends Plugin {
|
||||
"blackCappedChickadee": {
|
||||
"name": "Black-capped Chickadee",
|
||||
"description": "Native to North America, these small and curious birds are known for their distinctive call from which they get their name.",
|
||||
"latinName": "Poecile atricapillus",
|
||||
"url": "https://en.wikipedia.org/wiki/Black-capped_chickadee",
|
||||
"colors": {
|
||||
"hood": "#363636",
|
||||
"cheek": "#363636",
|
||||
@@ -418,6 +442,8 @@ module.exports = class PocketBird extends Plugin {
|
||||
"blueJay": {
|
||||
"name": "Blue Jay",
|
||||
"description": "This loud and rambunctious bird is native to North America and is known for challenging anything in its path.",
|
||||
"latinName": "Cyanocitta cristata",
|
||||
"url": "https://en.wikipedia.org/wiki/Blue_jay",
|
||||
"colors": {
|
||||
"foot": "#5a626b",
|
||||
"face": "#ebf2ff",
|
||||
@@ -437,6 +463,8 @@ module.exports = class PocketBird extends Plugin {
|
||||
"darkEyedJunco": {
|
||||
"name": "Dark-eyed Junco",
|
||||
"description": "Native across North America, these social birds will often be seen hopping along the ground in winter.",
|
||||
"latinName": "Junco hyemalis",
|
||||
"url": "https://en.wikipedia.org/wiki/Dark-eyed_junco",
|
||||
"colors": {
|
||||
"face": "#55565e",
|
||||
"wing": "#5c5f69",
|
||||
@@ -450,6 +478,8 @@ module.exports = class PocketBird extends Plugin {
|
||||
"houseFinch": {
|
||||
"name": "House Finch",
|
||||
"description": "Native to North America, these highly social birds sing cheerful songs and are often seen at bird feeders.",
|
||||
"latinName": "Haemorhous mexicanus",
|
||||
"url": "https://en.wikipedia.org/wiki/House_finch",
|
||||
"colors": {
|
||||
"face": "#cc3a3f",
|
||||
"wing": "#ae8e78",
|
||||
@@ -466,6 +496,8 @@ module.exports = class PocketBird extends Plugin {
|
||||
"pigeon": {
|
||||
"name": "Pigeon",
|
||||
"description": "Descended from the Rock Dove, these once domesticated birds are often found in cities worldwide. Quite friendly and intelligent, they were favored companions of Nikola Tesla.",
|
||||
"latinName": "Columba livia",
|
||||
"url": "https://en.wikipedia.org/wiki/Rock_dove",
|
||||
"colors": {
|
||||
"foot": "#ef6e5b",
|
||||
"face": "#5a6c91",
|
||||
@@ -479,6 +511,8 @@ module.exports = class PocketBird extends Plugin {
|
||||
"redAvadavat": {
|
||||
"name": "Red Avadavat",
|
||||
"description": "Native to India and southeast Asia, these birds are also known as Strawberry Finches due to their speckled plumage.",
|
||||
"latinName": "Amandava amandava",
|
||||
"url": "https://en.wikipedia.org/wiki/Red_avadavat",
|
||||
"colors": {
|
||||
"beak": "#f71919",
|
||||
"foot": "#af7575",
|
||||
@@ -494,6 +528,8 @@ module.exports = class PocketBird extends Plugin {
|
||||
"pinkRobin": {
|
||||
"name": "Pink Robin",
|
||||
"description": "Native to Australia, these bubblegum-pink puffballs are quieter than most, instead relying on their vibrant colours to attract partners.",
|
||||
"latinName": "Petroica rodinogaster",
|
||||
"url": "https://en.wikipedia.org/wiki/Pink_robin",
|
||||
"colors": {
|
||||
"face": "#403a46",
|
||||
"wing": "#38333d",
|
||||
@@ -508,6 +544,8 @@ module.exports = class PocketBird extends Plugin {
|
||||
"redWarbler": {
|
||||
"name": "Red Warbler",
|
||||
"description": "Endemic to the highlands of Mexico, this bird has the rare distinction of being one of the very few toxic birds in the world.",
|
||||
"latinName": "Cardellina rubra",
|
||||
"url": "https://en.wikipedia.org/wiki/Red_warbler",
|
||||
"colors": {
|
||||
"face": "#e80a28",
|
||||
"belly": "#d90921",
|
||||
@@ -527,6 +565,8 @@ module.exports = class PocketBird extends Plugin {
|
||||
"elegantEuphonia": {
|
||||
"name": "Elegant Euphonia",
|
||||
"description": "This vividly coloured finch is found throughout Central America and is known for the distinctive blue hood that crowns its head.",
|
||||
"latinName": "Chlorophonia elegantissima",
|
||||
"url": "https://en.wikipedia.org/wiki/Elegant_euphonia",
|
||||
"colors": {
|
||||
"wing": "#101480",
|
||||
"wing-edge": "#070956",
|
||||
@@ -654,13 +694,17 @@ module.exports = class PocketBird extends Plugin {
|
||||
/**
|
||||
* @param {string} name
|
||||
* @param {string} description
|
||||
* @param {string} latinName
|
||||
* @param {string} url
|
||||
* @param {Record<string, string>} colors
|
||||
* @param {string[]} [tags]
|
||||
* @param {Rarity} [rarity]
|
||||
*/
|
||||
constructor(name, description, colors, tags = [], rarity = RARITY.FAMILIAR) {
|
||||
constructor(name, description, latinName, url, colors, tags = [], rarity = RARITY.FAMILIAR) {
|
||||
this.name = name;
|
||||
this.description = description;
|
||||
this.latinName = latinName;
|
||||
this.url = url;
|
||||
const defaultColors = {
|
||||
[PALETTE.TRANSPARENT]: "transparent",
|
||||
[PALETTE.OUTLINE]: "#000000",
|
||||
@@ -754,7 +798,7 @@ module.exports = class PocketBird extends Plugin {
|
||||
const SPECIES = Object.fromEntries(
|
||||
Object.entries(species).map(([id, data]) => [
|
||||
id,
|
||||
new BirdType(data.name, data.description, data.colors, data.tags, data.rarity)
|
||||
new BirdType(data.name, data.description, data.latinName, data.url, data.colors, data.tags, data.rarity)
|
||||
]),
|
||||
);
|
||||
|
||||
@@ -2362,6 +2406,13 @@ module.exports = class PocketBird extends Plugin {
|
||||
color: #7c6c4b;
|
||||
}
|
||||
|
||||
.birb-field-guide-latin-name {
|
||||
text-decoration: underline;
|
||||
font-style: italic;
|
||||
font-weight: bold;
|
||||
color: inherit;
|
||||
}
|
||||
|
||||
#birb-feather {
|
||||
cursor: pointer;
|
||||
}
|
||||
@@ -3130,14 +3181,26 @@ module.exports = class PocketBird extends Plugin {
|
||||
const boldName = document.createElement("b");
|
||||
boldName.textContent = type.name;
|
||||
|
||||
const spacer = document.createElement("div");
|
||||
spacer.style.height = "0.3em";
|
||||
|
||||
const spacerOne = document.createElement("div");
|
||||
spacerOne.style.height = "0.3em";
|
||||
|
||||
const latinName = document.createElement("a");
|
||||
latinName.className = "birb-field-guide-latin-name";
|
||||
latinName.textContent = type.latinName;
|
||||
latinName.href = type.url;
|
||||
latinName.target = "_blank";
|
||||
|
||||
const spacerTwo = document.createElement("div");
|
||||
spacerTwo.style.height = "0.3em";
|
||||
|
||||
const descText = document.createTextNode(!unlocked ? "Not yet unlocked" : type.description);
|
||||
|
||||
const fragment = document.createDocumentFragment();
|
||||
fragment.appendChild(boldName);
|
||||
fragment.appendChild(spacer);
|
||||
fragment.appendChild(spacerOne);
|
||||
fragment.appendChild(latinName);
|
||||
fragment.appendChild(spacerTwo);
|
||||
fragment.appendChild(descText);
|
||||
|
||||
return fragment;
|
||||
|
||||
Reference in New Issue
Block a user