MediaWiki:Common.less/leaflet.less: Difference between revisions

Jump to navigation Jump to search
Content added Content deleted
No edit summary
No edit summary
Line 30: Line 30:
@aggressive: #D75650;
@aggressive: #D75650;


// classname color icon shape
@icons: guard inherit @circle,
@icons: guard inherit Guard @circle,
chef chef @square,
chef chef Chef @square,
fisher fisher @circle,
fisher fisher Fisher @circle,
forager forager @square,
alchemist alchemist @square,
forager forager Forager @square,
alchemist alchemist Alchemist @square,
scout inherit @circle,
scout inherit Scout @circle,
gatherer gatherer @square,
woodcutter woodcutter @square,
gatherer gatherer Gatherer @square,
carpenter carpenter @square,
woodcutter woodcutter Woodcutter @square,
carpenter carpenter Carpenter @square,
minefighter inherit @circle,
minefighter inherit Minefighter @circle,
bonewright bonewright @square,
miner miner @square,
bonewright bonewright Bonewright @square,
blacksmith blacksmith @square,
miner miner Miner @square,
stonemason stonemason @square,
blacksmith blacksmith Blacksmith @square,
stonemason stonemason Stonemason @square,
watchperson inherit @circle,
watchperson inherit Watchperson @circle,
detective detective @square,
leatherworker leatherworker @square,
detective detective Detective @square,
merchant merchant @square,
leatherworker leatherworker Leatherworker @square,
bank inherit @square,
merchant merchant Merchant @square,
clipboard chef @square,
bank inherit Bank @square,
clipboard chef Chef @square,
enchant item @circle,
hairdresser interactable @circle,
enchant item Enchant @circle,
interactable interactable @square,
hairdresser interactable Hairdresser @circle,
interactable interactable Interactable @square,
item item @square,
talk item @circle,
item item Item @square,
obelisk item @square,
talk item Talk @circle,
palette palette @square,
obelisk item Obelisk @square,
portal_stone item @square,
palette palette Palette @square,
search item @square,
portal_stone item Portal_Stone @square,
search item Search @square,
shop inherit @circle,
shop inherit Shop @circle,
strange_stone item @square;
strange_stone item Strange_Stone @square;


@themes: aggressive aggressive,
@themes: aggressive aggressive,
Line 66: Line 67:
neutral neutral;
neutral neutral;


.generate-map-icon-rules(@classname, @color, @image, @shape) {
.image(@str) {
@first: to-upper-case(extract(@str, 1));
@rest: to-lower-case(extract(@str, 2));
@image: ~'/images/@{first}@{rest}_small_icon.png';
}

.generate-map-icon-rules(@classname, @color, @shape) {
.image(@classname);
.leaflet-marker-icon-icon-@{classname} {
.leaflet-marker-icon-icon-@{classname} {
background: @color url(@image) no-repeat center / contain;
background: @color url(@image) no-repeat center / contain;
Line 91: Line 85:
@classname: extract(@value, 1);
@classname: extract(@value, 1);
@color: extract(@value, 2);
@color: extract(@value, 2);
@shape: extract(@value, 3);
@image: extract(@value, 3);
@shape: extract(@value, 4);
.generate-map-icon-rules(@classname, @color, @shape);
.generate-map-icon-rules(@classname, @color, @image, @shape);
});
});
each(@themes, {
each(@themes, {