Skip to content

Commit

Permalink
Add and delete image files
Browse files Browse the repository at this point in the history
  • Loading branch information
Borys21 committed Dec 22, 2023
1 parent 54c2fce commit 4b694b1
Show file tree
Hide file tree
Showing 74 changed files with 929 additions and 634 deletions.
Binary file modified public/cartography.webp
Binary file not shown.
Binary file added public/icons/artifact-e.webp
Binary file not shown.
Binary file removed public/icons/cannibal-camp.webp
Binary file not shown.
Binary file added public/icons/maintenance_a.webp
Binary file not shown.
Binary file removed public/icons/pond.webp
Binary file not shown.
Binary file modified public/icons/village.webp
Binary file not shown.
File renamed without changes.
Binary file removed public/icons/waterfall.webp
Binary file not shown.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Binary file added public/screenshots/cave_drawing_a.webp
Binary file not shown.
File renamed without changes.
Binary file added public/screenshots/cave_g.webp
Binary file not shown.
Binary file modified public/screenshots/cooking_pot_5.webp
Binary file not shown.
Binary file added public/screenshots/email_attention_all_1.webp
Binary file not shown.
Binary file modified public/screenshots/firefighter_axe.webp
Binary file not shown.
Binary file modified public/screenshots/hoodie_1.webp
Binary file not shown.
Binary file modified public/screenshots/hoodie_2.webp
Binary file not shown.
Binary file added public/screenshots/jianyu_email_printout_1.webp
Binary file not shown.
Binary file added public/screenshots/knight_v_11.webp
Binary file not shown.
Binary file modified public/screenshots/knight_v_3.webp
Binary file not shown.
Binary file modified public/screenshots/knight_v_4.webp
Binary file not shown.
Binary file modified public/screenshots/knight_v_7.webp
Binary file not shown.
Binary file modified public/screenshots/laptop_bunker_b.webp
Binary file not shown.
Binary file removed public/screenshots/large_battery_1.webp
Binary file not shown.
Binary file removed public/screenshots/large_battery_10.webp
Binary file not shown.
Binary file removed public/screenshots/large_battery_11.webp
Binary file not shown.
Binary file removed public/screenshots/large_battery_12.webp
Binary file not shown.
Binary file removed public/screenshots/large_battery_13.webp
Binary file not shown.
Binary file removed public/screenshots/large_battery_14.webp
Binary file not shown.
Binary file removed public/screenshots/large_battery_15.webp
Binary file not shown.
Binary file removed public/screenshots/large_battery_16.webp
Binary file not shown.
Binary file removed public/screenshots/large_battery_17.webp
Binary file not shown.
Binary file removed public/screenshots/large_battery_18.webp
Binary file not shown.
Binary file removed public/screenshots/large_battery_19.webp
Binary file not shown.
Binary file removed public/screenshots/large_battery_2.webp
Binary file not shown.
Binary file removed public/screenshots/large_battery_20.webp
Binary file not shown.
Binary file removed public/screenshots/large_battery_21.webp
Binary file not shown.
Binary file removed public/screenshots/large_battery_22.webp
Binary file not shown.
Binary file removed public/screenshots/large_battery_23.webp
Binary file not shown.
Binary file removed public/screenshots/large_battery_24.webp
Binary file not shown.
Binary file removed public/screenshots/large_battery_25.webp
Binary file not shown.
Binary file removed public/screenshots/large_battery_3.webp
Binary file not shown.
Binary file removed public/screenshots/large_battery_4.webp
Binary file not shown.
Binary file removed public/screenshots/large_battery_5.webp
Binary file not shown.
Binary file removed public/screenshots/large_battery_6.webp
Binary file not shown.
Binary file removed public/screenshots/large_battery_7.webp
Binary file not shown.
Binary file removed public/screenshots/large_battery_8.webp
Binary file not shown.
Binary file removed public/screenshots/large_battery_9.webp
Binary file not shown.
Binary file modified public/screenshots/laser_sight.webp
Binary file not shown.
Binary file modified public/screenshots/maintenance_card.webp
Binary file not shown.
Binary file modified public/screenshots/modern_axe.webp
Binary file not shown.
Binary file added public/screenshots/music_album_cover_2.webp
Binary file not shown.
Binary file added public/screenshots/novel_a.webp
Binary file not shown.
Binary file added public/screenshots/priest_outfit.webp
Binary file not shown.
Binary file removed public/screenshots/radio_10.webp
Binary file not shown.
Binary file removed public/screenshots/radio_11.webp
Binary file not shown.
Binary file removed public/screenshots/radio_13.webp
Binary file not shown.
Binary file removed public/screenshots/radio_14.webp
Binary file not shown.
Binary file removed public/screenshots/radio_15.webp
Binary file not shown.
Binary file removed public/screenshots/radio_4.webp
Binary file not shown.
Binary file removed public/screenshots/radio_5.webp
Binary file not shown.
Binary file removed public/screenshots/radio_6.webp
Binary file not shown.
Binary file removed public/screenshots/radio_7.webp
Binary file not shown.
Binary file removed public/screenshots/radio_9.webp
Binary file not shown.
Binary file modified public/screenshots/tuxedo.webp
Binary file not shown.
39 changes: 20 additions & 19 deletions src/components/Search.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { createElement } from "../lib/elements";
import { t } from "../lib/i18n";
import { getMapLocations } from "../lib/locations";
import { getTypes } from "../lib/nodes";

export default function Search({
panToMarker,
Expand All @@ -14,7 +13,6 @@ export default function Search({
document.querySelector<HTMLDivElement>(".search-results")!;

const locations = getMapLocations();
const types = getTypes();

searchInput.onfocus = () => {
if (searchInput.value.trim().length > 0) {
Expand All @@ -37,14 +35,26 @@ export default function Search({
return;
}
searchResults.classList.add("visible");

const regExp = new RegExp(search, "i");

const result = locations
.filter((location) => location.title.match(regExp))
.filter((location) =>
location.title.match(regExp) || (location.description && location.description.match(regExp)))
.map((location) => {
const type =
types.find((type) => type.value === location.type) || types[0];
const resultElements = [
createElement("span", {
className: "bold",
innerText: location.title,
})
];

if (location.description) {
resultElements.push(createElement("span", {
className: "italic",
innerText: location.description,
}));
}

return createElement(
"a",
Expand All @@ -58,16 +68,7 @@ export default function Search({
searchInput.value = "";
},
},
[
createElement("span", {
className: "bold",
innerText: location.title,
}),
createElement("span", {
className: "italic",
innerText: type.title,
}),
]
resultElements
);
})
.slice(0, 10);
Expand All @@ -82,5 +83,5 @@ export default function Search({
return;
}
searchResults.append(...result);
};
}
}
}
64 changes: 32 additions & 32 deletions src/lib/icons.json

Large diffs are not rendered by default.

Loading

0 comments on commit 4b694b1

Please sign in to comment.