◆少前百科是非盈利性、非官方的少女前线维基百科。 ◆如果您发现某些内容错误/空缺,请勇于修正/添加!参与进来其实很容易!点这里 加入少前百科。 ◆有任何意见、建议、纠错,欢迎在 GFwiki:反馈与建议 提出和讨论。编辑事务讨论QQ群:597764980,微博@GFwiki少前百科 ◆To foreigners,You can use twitter to contact us. |
“Widget:NewCharPreview”的版本间的差异
(未显示同一用户的1个中间版本) | |||
第6行: | 第6行: | ||
border: none; | border: none; | ||
color: white; | color: white; | ||
− | border-radius: 4px; | + | border-radius: 4px 4px 0 4px; |
− | background- | + | background: linear-gradient(-45deg, #F4C430 4px, transparent 4px); |
} | } | ||
第237行: | 第237行: | ||
document.querySelector("#pcontent").style.transition = "opacity 0.2s"; | document.querySelector("#pcontent").style.transition = "opacity 0.2s"; | ||
document.querySelector("#pcontent").style.opacity = "0"; | document.querySelector("#pcontent").style.opacity = "0"; | ||
− | |||
− | + | loadPreview(targetItem.innerText, dataset); | |
− | + | setTimeout(function() { | |
− | document.querySelector("#pcontent").style.transition = "opacity | + | document.querySelector("#pcontent").style.transition = "opacity 0.2s"; |
document.querySelector("#pcontent").style.opacity = "1"; | document.querySelector("#pcontent").style.opacity = "1"; | ||
− | + | }, 400); | |
+ | }); | ||
if (!document.getElementById("section_0")) { | if (!document.getElementById("section_0")) { | ||
第261行: | 第261行: | ||
function loadPreview(name, dataset) { | function loadPreview(name, dataset) { | ||
− | document.querySelector("a.pname").href = "/w/" + name; | + | setTimeout(function() { |
− | + | document.querySelector("a.pname").href = "/w/" + name; | |
− | + | document.querySelector("a.pname").innerText = name; | |
− | + | document.querySelector("#pimg").src = dataset.src; | |
− | + | document.querySelector("#pimg").alt = name + "预览图"; | |
− | + | document.querySelector("p.pname").innerText = name; | |
− | + | document.querySelector("#pquote").innerText = dataset.quote; | |
− | + | document.querySelector("#ptype").innerText = dataset.type; | |
− | + | document.querySelector("#ppow").innerText = dataset.pow; | |
− | + | document.querySelector("#phit").innerText = dataset.hit; | |
− | + | document.querySelector("#pdodge").innerText = dataset.dodge; | |
− | + | document.querySelector("#prate").innerText = dataset.rate; | |
− | + | document.querySelector("#php").innerText = dataset.hp; | |
− | + | document.querySelector("#pgrowth").innerText = dataset.growth; | |
− | + | if (dataset.armor && dataset.armor != "") { | |
− | + | document.querySelectorAll("#pgrades th")[6].style.display = "table-cell"; | |
− | + | document.getElementById("parmor").style.display = "table-cell"; | |
− | + | document.querySelector("#parmor").innerText = dataset.armor; | |
− | + | } else { | |
− | + | document.querySelectorAll("#pgrades th")[6].style.display = "none"; | |
− | + | document.getElementById("parmor").style.display = "none"; | |
− | + | } | |
+ | document.querySelector("#pgain").innerText = dataset.gain; | ||
+ | }, 200); | ||
} | } | ||
2021年4月10日 (六) 22:32的版本
本部件的预期用途是在活动专题页面中展示新增角色的信息,用例如梦间剧#登场联动角色。
使用
以下用空行分隔开的每一部分是同一角色的信息,如果新角色数量没有那么多,请删去多余的部分。参数的具体说明在本模板之后。
{{#widget:NewCharPreView |name= |pic={{filename:|}} |quote= |type= |pow=N|hit=N|dodge=N|rate=N|life=N|growth=N|armor= |gain= |name= |pic={{filename:|}} |quote= |type= |pow=N|hit=N|dodge=N|rate=N|life=N|growth=N|armor= |gain= |name= |pic={{filename:|}} |quote= |type= |pow=N|hit=N|dodge=N|rate=N|life=N|growth=N|armor= |gain= |name= |pic={{filename:|}} |quote= |type= |pow=N|hit=N|dodge=N|rate=N|life=N|growth=N|armor= |gain= |name= |pic={{filename:|}} |quote= |type= |pow=N|hit=N|dodge=N|rate=N|life=N|growth=N|armor= |gain= |name= |pic={{filename:|}} |quote= |type= |pow=N|hit=N|dodge=N|rate=N|life=N|growth=N|armor= |gain= |name= |pic={{filename:|}} |quote= |type= |pow=N|hit=N|dodge=N|rate=N|life=N|growth=N|armor= |gain= |name= |pic={{filename:|}} |quote= |type= |pow=N|hit=N|dodge=N|rate=N|life=N|growth=N|armor= |gain= }}
模板中为属性评级参数预置值“N”仅仅是为了方便在桌面端编辑时双击选中,请不要在实际使用时填入这个值。
- name – 角色在游戏中的名称
- pic – {{filepath:默认立绘图片名|缩略图宽度,建议512以上}}
- quote – 登场台词
- type – 手枪/冲锋枪/步枪/突击步枪/机枪/霰弹枪
- pow – 伤害评级
- hit – 命中评级
- dodge – 回避评级
- rate – 射速评级
- life – 生命评级
- growth – 成长评级
- armor – 护甲评级,如没有请留空,不要删去
- gain – 获得方式
示例
{{#widget:NewCharPreview |name=UMP40 |pic={{filepath:Pic_UMP40.png|600}} |quote=UMP40,登场了!指挥官,那些过时的家伙,就让我为您一一取代掉吧! |type=冲锋枪 |pow=B|hit=A|dodge=A|rate=B|life=B|growth=A|armor= |gain=打开物资箱概率获得,累计打开777个必定获得。 |name=KLIN |pic={{filepath:Pic_KLIN.png|600}} |quote=长官你要记好了!我就是要成为格里芬NO.1的人形——KLIN! |type=冲锋枪 |pow=B|hit=B|dodge=S|rate=S|life=B|growth=B|armor= |gain=【认知迷云Ⅳ】通关奖励。 }
- UMP40
- KLIN