mirror of
https://github.com/the1812/Bilibili-Evolved.git
synced 2025-11-04 21:22:45 +08:00
Add hover to view border
This commit is contained in:
parent
b6fea71931
commit
606a30eacb
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
2
min/custom-navbar.min.css
vendored
2
min/custom-navbar.min.css
vendored
File diff suppressed because one or more lines are too long
2
min/custom-navbar.min.js
vendored
2
min/custom-navbar.min.js
vendored
File diff suppressed because one or more lines are too long
@ -138,12 +138,12 @@ li.nav-item[report-id='playpage_dynamic'] .i-frame,
|
||||
.custom-navbar>ul>li.view-border::before
|
||||
{
|
||||
content: "";
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
width: 94%;
|
||||
height: 94%;
|
||||
border: 2px dashed #888a;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
top: 3%;
|
||||
left: 3%;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.custom-navbar>ul>li:not(.disabled)
|
||||
|
||||
@ -45,6 +45,8 @@ const attributes = {
|
||||
props: ["item"],
|
||||
template: /*html*/`
|
||||
<li v-bind:style="{order: item.order}"
|
||||
v-on:pointerover="viewBorder(true)"
|
||||
v-on:pointerout="viewBorder(false)"
|
||||
v-bind:class="{hidden: hidden()}">
|
||||
<i class="mdi mdi-menu"></i>
|
||||
{{item.displayName}}
|
||||
@ -59,6 +61,14 @@ const attributes = {
|
||||
{
|
||||
return settings.customNavbarHidden.includes(this.item.name);
|
||||
},
|
||||
viewBorder(view)
|
||||
{
|
||||
const navbarItem = document.querySelector(`.custom-navbar li[data-name='${this.item.name}']`);
|
||||
if (navbarItem !== null)
|
||||
{
|
||||
navbarItem.classList[view ? "add" : "remove"]("view-border");
|
||||
}
|
||||
},
|
||||
toggleHidden()
|
||||
{
|
||||
const isHidden = this.hidden();
|
||||
|
||||
Loading…
Reference in New Issue
Block a user