This commit is contained in:
Vanessa 2022-10-24 10:59:35 +08:00
parent 0168f4395f
commit 60024c65f5
2 changed files with 24 additions and 16 deletions

View file

@ -219,19 +219,22 @@
opacity: 1;
}
.protyle-background__img:hover .protyle-icons {
opacity: .86;
}
&:hover > .protyle-background__iconw > .protyle-icons {
opacity: .86;
}
.protyle-background__img:hover .protyle-icons,
&:hover > .protyle-background__iconw > .protyle-icons,
.protyle-background__icon:hover {
opacity: .86;
}
}
&--mobileshow {
.protyle-background__iconw > .protyle-icons,
.protyle-background__img .protyle-icons,
.protyle-background__tags .item svg {
opacity: .86;
}
}
&__icon {
height: 80px;
width: 80px;
@ -464,12 +467,4 @@
}
}
}
.protyle-background--enable {
.protyle-background__iconw > .protyle-icons,
.protyle-background__img .protyle-icons,
.protyle-background__tags .item svg {
opacity: .86;
}
}
}

View file

@ -336,6 +336,19 @@ export class Background {
target = target.parentElement;
}
});
this.element.addEventListener("touchstart", (event) => {
// https://github.com/siyuan-note/siyuan/issues/6328
if (protyle.disabled) {
return;
}
const target = event.target as HTMLElement;
if (hasClosestByClassName(target, "protyle-icons") ||
hasClosestByClassName(target, "item") ||
target.classList.contains("protyle-background__icon")) {
return;
}
this.element.classList.toggle("protyle-background--mobileshow");
});
}
public render(ial: IObject, rootId: string) {