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 80:
}
.generate-map-theme-rules(@classname, @color) when (@classname = @color) {
.leaflet-marker-icon-theme-@{classname} {
background-color: @color;
|
Revision as of 04:38, 27 November 2024
.leaflet-wiki-coordinates.leaflet-control {
margin: 0;
color: white;
padding: 5px 10px;
filter: drop-shadow(0 0 2px black);
}
@square: 3px;
@circle: 50%;
@inherit: inherit;
@chef: #9C8474;
@fisher: #98D3CC;
@forager: #DDDB93;
@alchemist: #83C8A1;
@gatherer: #C8C87C;
@woodcutter: #78C86C;
@carpenter: #9C8A7C;
@bonewright: #B0B897;
@miner: #749696;
@blacksmith: #B4A432;
@stonemason: #808789;
@detective: #5AB2BE;
@leatherworker: #866E62;
@merchant: #78B492;
@palette: #DEDAD4;
@item: #90908C;
@interactable: #927DCE;
@neutral: #C0925A;
@aggressive: #D75650;
@icons: guard inherit @circle,
chef chef @square,
fisher fisher @circle,
forager forager @square,
alchemist alchemist @square,
scout inherit @circle,
gatherer gatherer @square,
woodcutter woodcutter @square,
carpenter carpenter @square,
minefighter inherit @circle,
bonewright bonewright @square,
miner miner @square,
blacksmith blacksmith @square,
stonemason stonemason @square,
watchperson inherit @circle,
detective detective @square,
leatherworker leatherworker @square,
merchant merchant @square,
bank inherit @square,
clipboard chef @square,
enchant item @circle,
hairdresser interactable @circle,
interactable interactable @square,
item item @square,
talk item @circle,
obelisk item @square,
palette palette @square,
portal_stone item @square,
search item @square,
shop inherit @circle,
strange_stone item @square;
@themes: aggressive aggressive,
interactable interactable,
neutral neutral;
.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} {
background: @color url(@image) no-repeat center / contain;
border-radius: @shape;
}
}
.generate-map-theme-rules(@classname, @color) when (@classname = @color) {
.leaflet-marker-icon-theme-@{classname} {
background-color: @color;
}
}
.leaflet-marker-icon-entity {
background-color: red;
}
.each(@icons, {
@classname: extract(@value, 1);
@color: extract(@value, 2);
@shape: extract(@value, 3);
.generate-map-icon-rules(@classname, @color, @shape);
});
.each(@themes, {
@classname: extract(@value, 1);
@color: extract(@value, 2);
.generate-map-theme-rules(@classname, @color)
});
.leaflet-marker-icon-shape-circle {
border-radius: @circle;
}
.leaflet-marker-icon-shape-square {
border-radius: @square;
}