forked from MapComplete/MapComplete
Css tweaking
This commit is contained in:
parent
2e7b14061f
commit
ef593654f4
6 changed files with 33 additions and 47 deletions
|
@ -3,6 +3,7 @@ import Translations from "../i18n/Translations";
|
|||
|
||||
export default class Combine extends UIElement {
|
||||
private uiElements: (string | UIElement)[];
|
||||
private clas: string = undefined;
|
||||
|
||||
constructor(uiElements: (string | UIElement)[]) {
|
||||
super(undefined);
|
||||
|
|
|
@ -12,20 +12,24 @@ export class LayerSelection extends UIElement{
|
|||
this._checkboxes = [];
|
||||
|
||||
for (const layer of layers) {
|
||||
this._checkboxes.push(new CheckBox(
|
||||
new Combine([
|
||||
`<svg width="26" height="18" viewBox="0 0 26 18" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
const checkbox = `<svg width="26" height="18" viewBox="0 0 26 18" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M3 7.28571L10.8261 15L23 3" stroke="#003B8B" stroke-width="4" stroke-linejoin="round"/>
|
||||
</svg>`,
|
||||
`<img width="20" height="20" src="${layer.layerDef.icon}" alt="">`,
|
||||
layer.layerDef.name]),
|
||||
new Combine([
|
||||
`<svg width="26" height="18" viewBox="0 0 26 18" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
</svg>`;
|
||||
let icon = "<img >";
|
||||
if (layer.layerDef.icon && layer.layerDef.icon !== "") {
|
||||
icon = `<img width="20" height="20" src="${layer.layerDef.icon}" alt="">`
|
||||
}
|
||||
const name = layer.layerDef.name;
|
||||
|
||||
this._checkboxes.push(new CheckBox(
|
||||
new Combine([checkbox, icon, name]),
|
||||
new Combine([
|
||||
`<svg width="26" height="18" viewBox="0 0 26 18" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M3 7.28571L10.8261 15L23 3" stroke="#ffffff" stroke-width="4" stroke-linejoin="round"/>
|
||||
</svg>`,
|
||||
`<img width="20" height="20" src="${layer.layerDef.icon}" alt="">`,
|
||||
layer.layerDef.name]),
|
||||
layer.isDisplayed));
|
||||
icon,
|
||||
layer.layerDef.name]),
|
||||
layer.isDisplayed));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -75,9 +75,7 @@ export class UserBadge extends UIElement {
|
|||
|
||||
if (user.unreadMessages > 0) {
|
||||
messageSpan = "<span id='messages' class='alert'>" +
|
||||
" <a href='https://www.openstreetmap.org/messages/inbox' target='_blank'><img class='small-userbadge-icon' src='./assets/envelope.svg' alt='msgs'/>" +
|
||||
" " +
|
||||
"" +
|
||||
"<a href='https://www.openstreetmap.org/messages/inbox' target='_blank'><img class='small-userbadge-icon' src='./assets/envelope.svg' alt='msgs'/>" +
|
||||
user.unreadMessages.toString() +
|
||||
"</a></span>";
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue