微件:B站用户:修订间差异
来自植物大战僵尸杂交版Wiki
更多操作
创建页面,内容为“<includeonly> <style> .bili-card-iframe { width: 100%; max-width: 420px; height: 120px; border: none; border-radius: 12px; box-shadow: 0 1px 4px rgba(0,0,0,0.06); } </style> <iframe class="bili-card-iframe" src="//www.bilibili.com/read/cv/card?uid=<!--{$uid|escape:'html'}-->" allowfullscreen="false"> </iframe> </includeonly> {{#widget:B站用户|uid=97213827}}” |
无编辑摘要 |
||
| (未显示同一用户的7个中间版本) | |||
| 第1行: | 第1行: | ||
<includeonly> | <includeonly> | ||
<style> | <style> | ||
.bili-card- | .bili-card { | ||
display: flex; | |||
align-items: center; | |||
gap: 12px; | |||
padding: 14px 18px; | |||
background: #fff; | |||
border-radius: 12px; | |||
border: 1px solid #e8e8e8; | |||
max-width: 420px; | |||
width: 100%; | width: 100%; | ||
box-shadow: 0 1px 4px rgba(0,0,0,0.06); | |||
height: | box-sizing: border-box; | ||
} | |||
.bili-card-avatar { | |||
width: 52px; | |||
height: 52px; | |||
border-radius: 50%; | |||
flex-shrink: 0; | |||
object-fit: cover; | |||
border: 2px solid #f0f0f0; | |||
} | |||
.bili-card-info { flex: 1; min-width: 0; } | |||
.bili-card-name { | |||
font-size: 16px; | |||
font-weight: bold; | |||
color: #222; | |||
} | |||
.bili-card-name a { color: #222; text-decoration: none; } | |||
.bili-card-verify { | |||
font-size: 12px; | |||
color: #999; | |||
margin-top: 4px; | |||
} | |||
.bili-card-desc { | |||
font-size: 12px; | |||
color: #aaa; | |||
margin-top: 2px; | |||
} | |||
.bili-card-desc a { color: #6ba7d6; text-decoration: none; } | |||
.bili-card-btn { | |||
padding: 6px 16px; | |||
background: #00a1d6; | |||
color: #fff; | |||
border-radius: 6px; | |||
font-size: 13px; | |||
white-space: nowrap; | |||
flex-shrink: 0; | |||
border: none; | border: none; | ||
cursor: pointer; | |||
transition: all 0.2s; | |||
} | |||
.bili-card-btn:hover { background: #0091c2; } | |||
.bili-card-btn.followed { | |||
background: #f0f0f0; | |||
color: #999; | |||
pointer-events: none; | |||
} | } | ||
</style> | </style> | ||
< | <div class="bili-card"> | ||
<a href="https://space.bilibili.com/<!--{$uid|escape:'html'}-->" target="_blank"> | |||
<img class="bili-card-avatar" src="<!--{$avatar|escape:'html'}-->" alt="头像"> | |||
</ | </a> | ||
<div class="bili-card-info"> | |||
<div class="bili-card-name"> | |||
<a href="https://space.bilibili.com/<!--{$uid|escape:'html'}-->" target="_blank"><!--{$name|default:'B站用户'}--></a> | |||
</div> | |||
<div class="bili-card-verify"><!--{$verify|escape:'html'}--></div> | |||
<div class="bili-card-desc"><!--{$desc|escape:'html'}--></div> | |||
</div> | |||
<button class="bili-card-btn" id="bili-btn-<!--{$uid|escape:'html'}-->" | |||
onclick="followUser('<!--{$uid|escape:'html'}-->', this)"> | |||
+关注 | |||
</button> | |||
</div> | |||
<script> | |||
function followUser(uid, btn) { | |||
btn.textContent = '已关注'; | |||
btn.classList.add('followed'); | |||
localStorage.setItem('bili_followed_' + uid, 'true'); | |||
} | |||
(function() { | |||
var uid = '<!--{$uid|escape:'html'}-->'; | |||
if (!uid) return; | |||
if (localStorage.getItem('bili_followed_' + uid) === 'true') { | |||
var btn = document.getElementById('bili-btn-' + uid); | |||
if (btn) { | |||
btn.textContent = '已关注'; | |||
btn.classList.add('followed'); | |||
} | |||
} | |||
})(); | |||
</script> | |||
</includeonly> | </includeonly> | ||
{{#widget:B站用户|uid=97213827}} | {{#widget:B站用户 | ||
|uid=97213827 | |||
|avatar=https://new.pvzhe.wiki/images/f/f1/%E6%BD%9C%E8%89%87%E4%BC%9F%E4%BC%9F%E8%BF%B7.jpg | |||
|name=潜艇伟伟迷 | |||
|verify=个人认证:2024百大UP主…… | |||
}} | |||