forked from MapComplete/MapComplete
Themes: add some icons
This commit is contained in:
parent
5f355aa3e2
commit
48df2379bf
4 changed files with 41 additions and 24 deletions
|
@ -111,7 +111,7 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"then": {
|
"then": {
|
||||||
"render": "circle:white;./assets/layers/food/Vegetarian-mark.svg"
|
"render": "./assets/layers/food/Vegetarian-mark.svg"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -684,6 +684,7 @@
|
||||||
"mappings": [
|
"mappings": [
|
||||||
{
|
{
|
||||||
"if": "diet:vegetarian=no",
|
"if": "diet:vegetarian=no",
|
||||||
|
"icon": "./assets/layers/food/Vegetarian-mark.svg;cross_bottom_right:red",
|
||||||
"then": {
|
"then": {
|
||||||
"en": "No vegetarian options are available",
|
"en": "No vegetarian options are available",
|
||||||
"nl": "Geen vegetarische opties beschikbaar",
|
"nl": "Geen vegetarische opties beschikbaar",
|
||||||
|
@ -710,6 +711,7 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"if": "diet:vegetarian=yes",
|
"if": "diet:vegetarian=yes",
|
||||||
|
"icon": "./assets/layers/food/Vegetarian-mark.svg",
|
||||||
"then": {
|
"then": {
|
||||||
"en": "Vegetarian options are available",
|
"en": "Vegetarian options are available",
|
||||||
"nl": "Vegetarische opties zijn beschikbaar",
|
"nl": "Vegetarische opties zijn beschikbaar",
|
||||||
|
@ -723,6 +725,7 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"if": "diet:vegetarian=only",
|
"if": "diet:vegetarian=only",
|
||||||
|
"icon": "./assets/layers/food/Vegetarian-mark.svg",
|
||||||
"then": {
|
"then": {
|
||||||
"en": "All dishes are vegetarian",
|
"en": "All dishes are vegetarian",
|
||||||
"nl": "Enkel vegetarische opties zijn beschikbaar",
|
"nl": "Enkel vegetarische opties zijn beschikbaar",
|
||||||
|
|
|
@ -2069,6 +2069,7 @@
|
||||||
"mappings": [
|
"mappings": [
|
||||||
{
|
{
|
||||||
"if": "internet_access=wlan",
|
"if": "internet_access=wlan",
|
||||||
|
"icon": "wifi",
|
||||||
"then": {
|
"then": {
|
||||||
"en": "This place offers wireless internet access",
|
"en": "This place offers wireless internet access",
|
||||||
"nl": "Deze plaats biedt draadloze internettoegang aan",
|
"nl": "Deze plaats biedt draadloze internettoegang aan",
|
||||||
|
@ -2086,6 +2087,8 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"if": "internet_access=no",
|
"if": "internet_access=no",
|
||||||
|
"icon": "wifi;cross_bottom_right:red",
|
||||||
|
|
||||||
"then": {
|
"then": {
|
||||||
"en": "This place <b>does not</b> offer internet access",
|
"en": "This place <b>does not</b> offer internet access",
|
||||||
"nl": "Deze plaats biedt <b>geen</b> internettoegang aan",
|
"nl": "Deze plaats biedt <b>geen</b> internettoegang aan",
|
||||||
|
@ -2121,6 +2124,7 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"if": "internet_access=terminal",
|
"if": "internet_access=terminal",
|
||||||
|
"icon": "computer",
|
||||||
"then": {
|
"then": {
|
||||||
"en": "This place offers internet access via a terminal or computer",
|
"en": "This place offers internet access via a terminal or computer",
|
||||||
"nl": "Deze plaats biedt internettoegang via een terminal of computer aan",
|
"nl": "Deze plaats biedt internettoegang via een terminal of computer aan",
|
||||||
|
|
|
@ -118,45 +118,49 @@ export default class Constants {
|
||||||
* These are the values that are allowed to use as 'backdrop' icon for a map pin
|
* These are the values that are allowed to use as 'backdrop' icon for a map pin
|
||||||
*/
|
*/
|
||||||
private static readonly _defaultPinIcons = [
|
private static readonly _defaultPinIcons = [
|
||||||
"pin",
|
"addSmall",
|
||||||
|
"brick_wall_round",
|
||||||
|
"brick_wall_square",
|
||||||
"bug",
|
"bug",
|
||||||
"square",
|
|
||||||
"square_rounded",
|
|
||||||
"circle",
|
|
||||||
"checkmark",
|
"checkmark",
|
||||||
|
"checkmark",
|
||||||
|
"circle",
|
||||||
"clock",
|
"clock",
|
||||||
"close",
|
"close",
|
||||||
|
"close",
|
||||||
|
"confirm",
|
||||||
|
"computer",
|
||||||
|
"cross_bottom_right",
|
||||||
"crosshair",
|
"crosshair",
|
||||||
|
"desktop",
|
||||||
|
"direction",
|
||||||
"gear",
|
"gear",
|
||||||
|
"gps_arrow",
|
||||||
|
"heart",
|
||||||
|
"heart_outline",
|
||||||
|
"help",
|
||||||
"help",
|
"help",
|
||||||
"home",
|
"home",
|
||||||
"invalid",
|
"invalid",
|
||||||
|
"invalid",
|
||||||
|
"link",
|
||||||
"location",
|
"location",
|
||||||
"location_empty",
|
"location_empty",
|
||||||
"location_locked",
|
"location_locked",
|
||||||
|
"mastodon",
|
||||||
|
"not_found",
|
||||||
"note",
|
"note",
|
||||||
|
"party",
|
||||||
|
"pin",
|
||||||
"resolved",
|
"resolved",
|
||||||
"ring",
|
"ring",
|
||||||
"scissors",
|
"scissors",
|
||||||
|
"square",
|
||||||
|
"square_rounded",
|
||||||
"teardrop",
|
"teardrop",
|
||||||
"teardrop_with_hole_green",
|
"teardrop_with_hole_green",
|
||||||
"triangle",
|
"triangle",
|
||||||
"brick_wall_square",
|
"wifi"
|
||||||
"brick_wall_round",
|
|
||||||
"gps_arrow",
|
|
||||||
"checkmark",
|
|
||||||
"help",
|
|
||||||
"close",
|
|
||||||
"invalid",
|
|
||||||
"heart",
|
|
||||||
"heart_outline",
|
|
||||||
"link",
|
|
||||||
"confirm",
|
|
||||||
"direction",
|
|
||||||
"not_found",
|
|
||||||
"mastodon",
|
|
||||||
"party",
|
|
||||||
"addSmall",
|
|
||||||
] as const
|
] as const
|
||||||
public static readonly defaultPinIcons: string[] = <any>Constants._defaultPinIcons
|
public static readonly defaultPinIcons: string[] = <any>Constants._defaultPinIcons
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
import Brick_wall_square from "../../assets/svg/Brick_wall_square.svelte"
|
import Brick_wall_square from "../../assets/svg/Brick_wall_square.svelte"
|
||||||
import Brick_wall_round from "../../assets/svg/Brick_wall_round.svelte"
|
import Brick_wall_round from "../../assets/svg/Brick_wall_round.svelte"
|
||||||
import Gps_arrow from "../../assets/svg/Gps_arrow.svelte"
|
import Gps_arrow from "../../assets/svg/Gps_arrow.svelte"
|
||||||
import { HeartIcon } from "@babeard/svelte-heroicons/solid"
|
import { HeartIcon, WifiIcon } from "@babeard/svelte-heroicons/solid"
|
||||||
import { HeartIcon as HeartOutlineIcon } from "@babeard/svelte-heroicons/outline"
|
import { HeartIcon as HeartOutlineIcon } from "@babeard/svelte-heroicons/outline"
|
||||||
import Confirm from "../../assets/svg/Confirm.svelte"
|
import Confirm from "../../assets/svg/Confirm.svelte"
|
||||||
import Not_found from "../../assets/svg/Not_found.svelte"
|
import Not_found from "../../assets/svg/Not_found.svelte"
|
||||||
|
@ -37,6 +37,7 @@
|
||||||
import Cross_bottom_right from "../../assets/svg/Cross_bottom_right.svelte"
|
import Cross_bottom_right from "../../assets/svg/Cross_bottom_right.svelte"
|
||||||
import { Utils } from "../../Utils"
|
import { Utils } from "../../Utils"
|
||||||
import Gear from "../../assets/svg/Gear.svelte"
|
import Gear from "../../assets/svg/Gear.svelte"
|
||||||
|
import { DesktopComputerIcon } from "@rgossiaux/svelte-heroicons/solid"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Renders a single icon.
|
* Renders a single icon.
|
||||||
|
@ -46,7 +47,8 @@
|
||||||
|
|
||||||
export let icon: string | undefined
|
export let icon: string | undefined
|
||||||
export let color: string | undefined = undefined
|
export let color: string | undefined = undefined
|
||||||
export let clss: string | undefined = undefined
|
export let clss: string | undefined = ""
|
||||||
|
clss ??= ""
|
||||||
export let emojiHeight = 40
|
export let emojiHeight = 40
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
@ -124,7 +126,7 @@
|
||||||
{:else if icon === "party"}
|
{:else if icon === "party"}
|
||||||
<Party {color} class={clss} />
|
<Party {color} class={clss} />
|
||||||
{:else if icon === "cross_bottom_right"}
|
{:else if icon === "cross_bottom_right"}
|
||||||
<Cross_bottom_right {color} class={clss} />
|
<Cross_bottom_right {color} class={"m-0 "+clss} />
|
||||||
{:else if icon === "addSmall"}
|
{:else if icon === "addSmall"}
|
||||||
<AddSmall {color} class={clss} />
|
<AddSmall {color} class={clss} />
|
||||||
{:else if icon === "gear"}
|
{:else if icon === "gear"}
|
||||||
|
@ -133,6 +135,10 @@
|
||||||
<LinkIcon style="--svg-color: {color}" class={twMerge(clss, "apply-fill")} />
|
<LinkIcon style="--svg-color: {color}" class={twMerge(clss, "apply-fill")} />
|
||||||
{:else if icon === "popout"}
|
{:else if icon === "popout"}
|
||||||
<LinkIcon style="--svg-color: {color}" />
|
<LinkIcon style="--svg-color: {color}" />
|
||||||
|
{:else if icon === "wifi"}
|
||||||
|
<WifiIcon class={"m-0 " +clss} {color} />
|
||||||
|
{:else if icon === "computer"}
|
||||||
|
<DesktopComputerIcon class={"m-0 "+clss} {color} />
|
||||||
{:else if Utils.isEmoji(icon)}
|
{:else if Utils.isEmoji(icon)}
|
||||||
<span style={`font-size: ${emojiHeight}px; line-height: ${emojiHeight}px`}>
|
<span style={`font-size: ${emojiHeight}px; line-height: ${emojiHeight}px`}>
|
||||||
{icon}
|
{icon}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue