Improve transition

This commit is contained in:
the1812 2019-04-07 21:24:34 +08:00
parent 2cc7b50e05
commit 0fc5fefd73
6 changed files with 17 additions and 11 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1 +1 @@
<div class=custom-navbar><ul><li v-for="component of components"v-bind:class="{disabled: component.disabled}"v-bind:style="{flex: component.flex}"v-on:pointerover=requestPopup(component)><a class=main-content v-bind:href=component.href v-html=component.html></a><div class=popup v-bind:class="{'no-padding': component.noPadding}"v-if="component.popupHtml && component.requestedPopup"v-html=component.popupHtml></div></ul></div>
<div class=custom-navbar><ul><li v-for="component of components"v-bind:class="{disabled: component.disabled}"v-bind:style="{flex: component.flex}"v-on:pointerover=requestPopup(component)><a class=main-content v-bind:href=component.href v-html=component.html></a><div class=popup v-if=component.popupHtml v-bind:class="{'no-padding': component.noPadding}"><div v-if=component.requestedPopup v-html=component.popupHtml></div></div></ul></div>

File diff suppressed because one or more lines are too long

View File

@ -3,8 +3,8 @@
<li v-for="component of components" v-bind:class="{disabled: component.disabled}"
v-bind:style="{flex: component.flex}" v-on:pointerover="requestPopup(component)">
<a class="main-content" v-bind:href="component.href" v-html="component.html"></a>
<div class="popup" v-bind:class="{'no-padding': component.noPadding}"
v-if="component.popupHtml && component.requestedPopup" v-html="component.popupHtml">
<div class="popup" v-if="component.popupHtml" v-bind:class="{'no-padding': component.noPadding}">
<div v-if="component.requestedPopup" v-html="component.popupHtml"></div>
</div>
</li>
</ul>

View File

@ -73,6 +73,7 @@ class Category extends NavbarComponent
{
super();
this.html = `主站`;
this.requestedPopup = true;
this.popupHtml = /*html*/`
<ul id="custom-navbar-home-popup">
<li class="category-item" v-for="item of info">
@ -188,7 +189,7 @@ class Category extends NavbarComponent
}
class Iframe extends NavbarComponent
{
constructor(name, link, { src, width, height })
constructor(name, link, { src, width, height, lazy })
{
super();
this.html = name;
@ -197,6 +198,7 @@ class Iframe extends NavbarComponent
<iframe src="${src}" frameborder="0" width="${width}" height="${height}"></iframe>
`;
this.noPadding = true;
this.requestedPopup = lazy ? false : true;
}
}
@ -225,11 +227,13 @@ class Iframe extends NavbarComponent
src: `https://www.bilibili.com/page-proxy/game-nav.html`,
width: `680px`,
height: `260px`,
lazy: true,
}),
new Iframe("直播", "https://live.bilibili.com", {
src: `https://live.bilibili.com/blackboard/dropdown-menu.html`,
width: `528px`,
height: `266px`,
lazy: true,
}),
new SimpleLink("会员购", "https://show.bilibili.com/platform/home.html?msource=pc_web"),
new SimpleLink("漫画", "https://manga.bilibili.com"),
@ -238,11 +242,13 @@ class Iframe extends NavbarComponent
src: `https://message.bilibili.com/pages/nav/index`,
width: `110px`,
height: `210px`,
lazy: false,
}),
new Iframe("动态", "https://t.bilibili.com/", {
src: `https://t.bilibili.com/pages/nav/index`,
width: `380px`,
height: `422px`,
lazy: true,
}),
new Upload,
];