2023年政策修订增补工作正在进行中,欢迎参与!
  • Moegirl.ICU:萌娘百科流亡社群 581077156(QQ),欢迎对萌娘百科运营感到失望的编辑者加入
  • Moegirl.ICU:账号认领正在试运行,有意者请参照账号认领流程

Module:Sandbox/BearBin/B站动态

萌娘百科,万物皆可萌的百科全书!转载请标注来源页面的网页链接,并声明引自萌娘百科。内容不可商用。
跳转到导航 跳转到搜索
Template-info.svg 模块文档  [查看] [编辑] [历史] [刷新]
{{#invoke:Sandbox/BearBin/B站动态|main
|ulink=https://space.bilibili.com/3461576839400339
|tlink=https://t.bilibili.com/739489146902413317
|avatar=https://s2.loli.net/2022/12/26/8M3XiltKG6cVAgo.jpg
|user=萌百视觉小说研究会
|time=2022-12-14 18:35
|content=今日条目推送:苍之彼方的四重奏<br>https://zh.moegirl.org.cn/_?curid=120918 <br><br>sprite于2014年发售的游戏,以虚构运动“空竞(Flying Circus )”为主题叙述主角们的故事。<br>《苍彼》的发行十分成功,在2014当年获得了萌赏的大赏、Getchu赏的综合部门第2名(第1名是那个女人)和其他多个部门的奖项,PSVita版也在Fami通上得到了8/10的评分(4名评委皆为8分)。<br>在《苍彼》发售后,sprite就再未推出过新的游戏系列,不断推出多个平台移植版本、续作、广播剧CD等衍生作品(炒一部作品的冷饭让一个会社活了四年甚至还能复活(bushi)),也使得sprite有了“苍彼社”的绰号。2016年,TV动画(图2)开始放送。<br>后天,苍彼EX2的中文版也将要发售。
|img1=https://img.moegirl.org.cn/common/a/a2/Aokana2.png
|img2=https://img.moegirl.org.cn/common/a/a2/Aokana2.png
|img3=https://img.moegirl.org.cn/common/a/a2/Aokana2.png
|like_user=[[Template:萌百芳文社相关条目编辑组|萌娘百科芳文组]]、[https://space.bilibili.com/39471072/ StuartRiki_鍵視]
|hot_comment_user=[[User:BearBin|BearBin]]
|hot_comment=aaaaa
|forward=3
|comment=10
|like=153
}}
今日条目推送:苍之彼方的四重奏
https://zh.moegirl.org.cn/_?curid=120918

sprite于2014年发售的游戏,以虚构运动“空竞(Flying Circus )”为主题叙述主角们的故事。
《苍彼》的发行十分成功,在2014当年获得了萌赏的大赏、Getchu赏的综合部门第2名(第1名是那个女人)和其他多个部门的奖项,PSVita版也在Fami通上得到了8/10的评分(4名评委皆为8分)。
在《苍彼》发售后,sprite就再未推出过新的游戏系列,不断推出多个平台移植版本、续作、广播剧CD等衍生作品(炒一部作品的冷饭让一个会社活了四年甚至还能复活(bushi)),也使得sprite有了“苍彼社”的绰号。2016年,TV动画(图2)开始放送。
后天,苍彼EX2的中文版也将要发售。
3
10
153
{{#invoke:Sandbox/BearBin/B站动态|main
|upage=User:BearBin
|avatar=大萌字.png
|user=BearBin
|time=2022-12-26 21:41:00
|content=欢迎各位前来尝试使用[[User:BearBin/公告|高仿公告模板]]!
|forward=114
|comment=514
|like=1919810
|img1=Aokana2.png
}}
2022-12-26 21:41:00
欢迎各位前来尝试使用高仿公告模板
Aokana2.png
114
514
1919810
{{#invoke:Sandbox/BearBin/B站动态|main
|content=a
}}
Sandbox
2023-01-06 18:14:47
a
转发
评论
点赞
local getArgs = require('Module:Arguments').getArgs
local p = {}

-- 图片内链转外链(真的有必要吗……)
function pic_i2e(img)
	local eternal = mw.getCurrentFrame():callParserFunction('filepath', img)

	if eternal == '' then
		return img
	else
		return eternal
	end
end

function p.main(frame)
	local args = getArgs(frame)
	return p._main(args)
end

function p._main(args)
	--默认参数设置
	if not args.user then
		args.user = mw.getCurrentFrame():preprocess('{{ROOTPAGENAME}}')
	end
	if not args.avatar then
		args.avatar = 'Transparent Akkarin Transparentized.png'
	end
	if not args.time then
		args.time = mw.getCurrentFrame():preprocess('{{#time:Y-m-d H:i:s|{{REVISIONTIMESTAMP}}}}')
	end
	if not args.forward then
		args.forward = '转发'
	end
	if not args.comment then
		args.comment = '评论'
	end
	if not args.like then
		args.like = '点赞'
	end

	--外层容器
	local box = mw.html.create():tag('div'):addClass('bili-dyn-box')

	--头像
	local avatar = box:tag('div'):addClass('bili-dyn-avatar')
	
	local user_link = args.ulink
	if args.upage and args.upage ~= '' then
		user_link = mw.getCurrentFrame():callParserFunction('fullurl', args.upage)
	end
	local avatar_img = pic_i2e(args.avatar)
	if user_link then
		avatar
			:wikitext('[' .. user_link .. ' ')
			:tag('img'):attr('src', avatar_img):done()
			:wikitext(']')
	else
		avatar:tag('img'):attr('src', avatar_img)
	end

	--用户名
	local head = box:tag('div'):addClass('bili-dyn-head')

	local username = head:tag('div'):addClass('bili-dyn-username')
	if user_link then
		username:wikitext('[' .. user_link .. ' ' .. args.user .. ']')
	else
		username:wikitext(args.user)
	end

	--时间
	local time = head:tag('div'):addClass('bili-dyn-time')
	if args.tlink then
		time:wikitext('[' .. args.tlink .. ' ' .. args.time .. ']')
	else
		time:wikitext(args.time)
	end

	--内容
	local content = box:tag('div'):addClass('bili-dyn-content')
	content:wikitext(args.content)

	--图片
	local pic = box:tag('div'):addClass('bili-dyn-pic')
	for i = 1, 9 do
		if args['img' .. i] then
			if mw.getCurrentFrame():callParserFunction('filepath', args['img' .. i]) ~='' then
				pic
					:tag('div')
					:wikitext('[[File:' .. args['img' .. i] .. ']]')
			else
				pic
					:tag('div')
					:wikitext('[' .. args['img' .. i] .. ' ')
					:tag('img')
					:attr('src', args['img' .. i])
					:done()
					:wikitext(']')
			end
			pic:done()
		end
	end
	
	--点赞的人、热评
	if args.like_user or args.hot_comment then
		local interaction = box:tag('div'):addClass('bili-dyn-interaction')
		if args.like_user then
			interaction
				:tag('div')
				:tag('div'):addClass('interaction-icon')
				:tag('img'):attr('src', 'https://s2.loli.net/2022/12/26/OitfTym2v7VnJjN.png'):attr('alt', '')
				:done():done()
				:tag('div'):addClass('interaction-content')
				:tag('span'):addClass('like-user')
				:wikitext(args.like_user)
				:done()
				:tag('span'):wikitext('&nbsp;赞了')
				:allDone()
		end
		if args.hot_comment then
			interaction
				:tag('div')
				:tag('div'):addClass('interaction-icon')
				:tag('img'):attr('src', 'https://s2.loli.net/2022/12/26/z7DtRP5WNQoBbfc.png'):attr('alt', '')
				:done():done()
				:tag('div'):addClass('interaction-content')
				:tag('span'):addClass('like-user')
				:wikitext(args.hot_comment_user .. ":")
				:done()
				:tag('span'):wikitext(args.hot_comment)
				:allDone()
				
		end
	end

	--转发、评论、点赞
	local bottom = box:tag('div'):addClass('bili-dyn-bottom')
	bottom
		:tag('div'):addClass('bili-dyn-action')
		:tag('img'):attr('src', 'https://s2.loli.net/2022/12/26/DPzJvEZ5i2Ytlks.png'):done()
		:tag('span'):wikitext(args.forward)
		:done()
		:done()
		:tag('div'):addClass('bili-dyn-action')
		:tag('img'):attr('src', 'https://s2.loli.net/2022/12/26/z7DtRP5WNQoBbfc.png'):done()
		:tag('span'):wikitext(args.comment)
		:done()
		:done()
		:tag('div'):addClass('bili-dyn-action')
		:tag('img'):attr('src', 'https://s2.loli.net/2022/12/26/OitfTym2v7VnJjN.png'):done()
		:tag('span'):wikitext(args.like)

	return box
end

return p