黄豆可以和什么一起打豆浆| 顶到子宫是什么感觉| 蛋白粉吃多了有什么危害| 蓝莓葡萄是什么品种| 经常感冒发烧是什么原因| 副局级是什么级别| mar是什么意思| 想是什么意思| 神经根型颈椎病吃什么药| 水瓶座是什么星象| 农历4月是什么星座| 年抛是什么意思| 轻医美是什么| 梦见自己手机丢了是什么意思| 中国移动增值业务费是什么| 什么药治灰指甲最有效| 崩溃什么意思| 松鼠是什么生肖| 雀神是什么意思| 腹泻恶心想吐是什么原因| 为什么手会发麻| ercp是什么检查| 北极熊的毛是什么颜色| 脚麻什么原因| 来月经吃什么水果| 带状疱疹用什么药| 心得安又叫什么名| 女生月经不规律的原因是什么| 舌头上有裂纹是什么原因| 双鱼座跟什么星座最配| 惘然什么意思| 老人身上痒是什么原因| 光年是什么单位| 书五行属性是什么| 13数字代表什么意思| 9月28号什么星座| mz是什么意思| 肝气郁结吃什么药| 1.7号是什么星座| 儿童用什么牙膏最好可以保护牙齿| 1953年属什么生肖| glu是什么氨基酸| 人体缺硒会有什么症状| 什么样的人能镇住凶宅| 红酒是什么味道| 什么时候洗头是最佳时间| 总是口腔溃疡是什么原因| 直肠给药对小孩身体有什么影响| 什么是植物油| 什么是普洱茶| 黄色裤子配什么颜色上衣| 舌裂是什么原因造成的| 什么伤肝| 轻微脑震荡有什么表现| diqua是什么牌子| 肟是什么意思| A型血为什么是完美血型| yuki是什么意思| 木堂念什么| 什么叫非甾体抗炎药| 雌二醇高有什么症状| 望眼欲穿什么意思| 西康省是现在什么地方| 4月26是什么星座| 脑多普勒检查什么| 鬼压床是什么原因| 猴跟什么生肖相冲| fujixerox是什么牌子| 父亲的弟弟叫什么| 向日葵的花语是什么| 中央委员是什么级别| 受是什么意思| 隐形眼镜半年抛是什么意思| 茜是什么意思| 夜间睡觉流口水是什么原因| 碱性磷酸酶高是什么意思| 什么叫肺大泡| 农历六月十三是什么星座| 2005年属什么| 梦见很多棺材是什么征兆| 暴力倾向的人有什么表现| 糖尿病病人吃什么水果| 无花果为什么叫无花果| 吃什么促进腺样体萎缩| 迷糊是什么意思| 心跳过缓吃什么药| 三个牛读什么字| 老是出汗是什么原因| diy是什么| 什么叫肾阴虚和肾阳虚| 备孕吃什么药| 弘字五行属什么| 今天生肖冲什么| 嗳气吃什么药| 奶篓子是什么意思| 什么是开光| 姜什么时候种植最好| 塔罗牌正位和逆位是什么意思| 五台山在什么地方| 野鸡大学是什么意思| 82年属什么的| 4个火读什么| 脑梗有什么症状前兆| 使婢差奴过一生是什么意思| soe咖啡是什么意思| 五月二十一号是什么星座| 老学究什么意思| 白羊跟什么星座最配| 劳士顿手表什么档次| 姓林的女孩取什么名字好| 胃属于什么科室| 姜黄粉是什么做的| 血压高什么原因| 天麻主治什么病| 勃艮第红是什么颜色| 手掌像什么| 海黄瓜是什么| 废电池乱丢对人体可能造成什么中毒| 农历八月是什么月| 贫血去医院挂什么科| 甲状腺与甲亢有什么区别| 三元是什么意思| 发低烧是什么原因| 婴儿什么时候开始说话| 强身之道的强是什么意思| 青黛色是什么颜色| 夏至是什么生肖| 电脑一体机什么牌子好| 慢性肾炎吃什么药| 人为什么会做梦科学解释| 嘉字属于五行属什么| 做梦梦见死去的亲人是什么意思| 脚趾甲变黑是什么原因| 辽宁舰舰长是什么军衔| 男士皮带什么品牌好| 遗精是什么原因引起的| 脖子右侧疼是什么原因| 才高八斗是指什么生肖| 金刚石是由什么构成的| 砭石是什么东西| 蟑螂长什么样| 昆仑雪菊有什么作用| 迷糊是什么意思| 江苏有什么烟| 天珠是什么做的| 腻歪是什么意思| 女人大把掉头发是什么原因| futa是什么意思| 现在的节气是什么| 狗狗冠状是什么症状| 歇后语是什么意思| 肺纹理增强是什么意思| pmid是什么意思| 孕妇甲胎蛋白偏高说明什么| 人尽可夫什么意思| 点了斑不能吃什么| 猪生肠是什么部位| 梦见自己拉了好多屎是什么意思| 冷暴力是什么| 伏吟是什么意思| 翻过山越过海是什么歌| 627是什么意思| 人为什么会便秘| 解脲支原体阳性是什么意思| 玫瑰和月季有什么区别| 刚需房是什么意思| 增强免疫力的针叫什么| 迪丽热巴是什么族| 骄阳似火是什么意思| 心率失常是什么意思| 扁导体发炎吃什么药| 磁共振平扫检查什么| 7月8号是什么星座的| 香港脚是什么| 高材生是什么意思| 暗物质和暗能量是什么| 盥洗室什么意思| msms筛查是什么意思| 酒干倘卖无什么意思| 喉炎是什么原因引起的| 乘务员是干什么的| 阴茎长水泡是什么原因| 痘痘肌肤适合用什么牌子的护肤品| 为国为民是什么生肖| 11月16号是什么星座| 备孕前需要做什么检查| 星星是什么的眼睛| 梦见找孩子什么预兆| 维生素b12治什么病| 1比1是什么意思| 钡餐造影能查出什么| 跳蚤最怕什么药| 早期教育是什么专业| 糖类抗原125偏高是什么意思| 五红汤什么时候喝最好| 肺结节不能吃什么食物| 私生子什么意思| 粉色裤子搭什么上衣| 早醒是什么原因造成的| 丝丝入扣是什么意思| 胃炎吃什么药效果最好| 什么运动可以让孩子长高| 9月份怀孕预产期是什么时候| 黄金的动物是什么生肖| 钧鉴是什么意思| 孤臣是什么意思| 什么星座最疼射手座| 头不自觉的晃动是什么原因| 什么是翻墙软件| 三克油是什么意思| 007什么意思| 送枕头代表什么意思| 十一月四日是什么星座| 梧桐树的叶子像什么| 中学校长什么级别| 写字楼是干什么的| 蛋白质有什么作用| 身上肉疼是什么原因| 吃什么解酒| 秋葵与什么菜相克| 华国锋为什么辞职| 火字旁跟什么有关| 白色念珠菌是什么| 放屁是什么意思| 水疱疹什么药最快能治好| 什么季节减肥效果最快最好| 后背有痣代表什么| 血管紧张素是什么意思| 腰疼挂什么科室| 生活防水是什么意思| 1997年出生属什么| 唐氏综合症是什么| 来大姨妈喝酒有什么影响| 三月十三是什么星座| 常吃火龙果有什么好处| 梅毒病有什么症状| 乌龟吃什么| 尿痛什么原因引起的| 查血铅挂什么科| 香茅是什么东西| 右下腹疼是什么原因| 脚指甲盖凹凸不平是什么原因| 油性头发用什么洗发水| 山楂泡水有什么好处| 口苦是什么问题| 脸颊为什么会凹陷| 女人肝火旺吃什么好| 骄阳似火是什么意思| 下加一笔是什么字| 孟母三迁的故事告诉我们什么道理| 查性激素六项挂什么科| 白带多是什么情况| 贫血喝什么茶| 两面三刀是什么生肖| 猪肝有什么功效| hcc是什么意思| 方寸之地什么意思| 绝望的绝是什么意思| 扒灰是什么意思| 5.13是什么星座| 犬瘟吃什么药管用| 着相什么意思| 馒头是什么做的| 搬家送什么水果| 百度Pāriet uz saturu

哈怂是什么意思

Vikipēdijas lapa
Dokumentācijas ikona Modu?a dokumentācija[skatīt] [labot] [hronolo?ija] [pārlādēt]
百度 看到中国球王如此表现,现场球迷一片唏嘘,威尔士实力太强了,武磊在这场比赛中已经丢失信心。

This module implements the templates {{sidebar}} and {{sidebar with collapsible lists}}. See the individual template pages for documentation.

--
-- This module implements {{Sidebar}}
--
require('Modulis:No globals')
local cfg = mw.loadData('Modulis:Sidebar/configuration')

local p = {}

local getArgs = require('Modulis:Arguments').getArgs

--[[
Categorizes calling templates and modules with a 'style' parameter of any sort
for tracking to convert to TemplateStyles.

TODO after a long cleanup: Catch sidebars in other namespaces than Template and Modulis.
TODO would probably want to remove /log and /archive as CS1 does
]]
local function categorizeTemplatesWithInlineStyles(args)
	local title = mw.title.getCurrentTitle()
	if title.namespace ~= 10 and title.namespace ~= 828 then return '' end
	for _, pattern in ipairs (cfg.i18n.pattern.uncategorized_conversion_titles) do
		if title.text:match(pattern) then return '' end
	end
	
	for key, _ in pairs(args) do
		if mw.ustring.find(key, cfg.i18n.pattern.style_conversion) or key == 'width' then
			return cfg.i18n.category.conversion
		end
	end
end

--[[
For compatibility with the original {{sidebar with collapsible lists}}
implementation, which passed some parameters through {{#if}} to trim their
whitespace. This also triggered the automatic newline behavior.
]]
-- See ([[meta:Help:Newlines and spaces#Automatic newline]])
local function trimAndAddAutomaticNewline(s)
	s = mw.ustring.gsub(s, "^%s*(.-)%s*$", "%1")
	if mw.ustring.find(s, '^[#*:;]') or mw.ustring.find(s, '^{|') then
		return '\n' .. s
	else
		return s
	end
end

--[[
Finds whether a sidebar has a subgroup sidebar.
]]
local function hasSubgroup(s)
	if mw.ustring.find(s, cfg.i18n.pattern.subgroup) then
		return true
	else
		return false
	end
end

--[[
Main sidebar function. Takes the frame, args, and an optional collapsibleClass.
The collapsibleClass is and should be used only for sidebars with collapsible
lists, as in p.collapsible.
]]
function p.sidebar(frame, args, collapsibleClass)
	if not args then
		args = getArgs(frame)
	end
	local root = mw.html.create()
	local child = args.child and mw.text.trim(args.child) == cfg.i18n.child_yes

	root = root:tag('table')
	if not child then
		root 
			:addClass(cfg.i18n.class.sidebar)
			-- force collapsibleclass to be sidebar-collapse otherwise output nothing
			:addClass(collapsibleClass == cfg.i18n.class.collapse and cfg.i18n.class.collapse or nil)
			:addClass('nomobile')
			:addClass(args.float == cfg.i18n.float_none and cfg.i18n.class.float_none or nil)
			:addClass(args.float == cfg.i18n.float_left and cfg.i18n.class.float_left or nil)
			:addClass(args.wraplinks == cfg.i18n.wrap_true and cfg.i18n.class.wraplinks or nil)
			:addClass(args.bodyclass or args.class)
			:css('width', args.width or nil)
			:cssText(args.bodystyle or args.style)

		if args.outertitle then
			root
				:tag('caption')
					:addClass(cfg.i18n.class.outer_title)
					:addClass(args.outertitleclass)
					:cssText(args.outertitlestyle)
					:wikitext(args.outertitle)
		end

		if args.topimage then
			local imageCell = root:tag('tr'):tag('td')

			imageCell
				:addClass(cfg.i18n.class.top_image)
				:addClass(args.topimageclass)
				:cssText(args.topimagestyle)
				:wikitext(args.topimage)

			if args.topcaption then
				imageCell
					:tag('div')
						:addClass(cfg.i18n.class.top_caption)
						:cssText(args.topcaptionstyle)
						:wikitext(args.topcaption)
			end
		end

		if args.pretitle then
			root
				:tag('tr')
					:tag('td')
						:addClass(args.topimage and cfg.i18n.class.pretitle_with_top_image
							or cfg.i18n.class.pretitle)
						:addClass(args.pretitleclass)
						:cssText(args.basestyle)
						:cssText(args.pretitlestyle)
						:wikitext(args.pretitle)
		end
	else
		root
			:addClass(cfg.i18n.class.subgroup)
			:addClass(args.bodyclass or args.class)
			:cssText(args.bodystyle or args.style)
	end

	if args.title then
		if child then
			root
				:wikitext(args.title)
		else
			root
				:tag('tr')
					:tag('th')
						:addClass(args.pretitle and cfg.i18n.class.title_with_pretitle
							or cfg.i18n.class.title)
						:addClass(args.titleclass)
						:cssText(args.basestyle)
						:cssText(args.titlestyle)
						:wikitext(args.title)
		end
	end

	if args.image then
		local imageCell = root:tag('tr'):tag('td')

		imageCell
			:addClass(cfg.i18n.class.image)
			:addClass(args.imageclass)
			:cssText(args.imagestyle)
			:wikitext(args.image)

		if args.caption then
			imageCell
				:tag('div')
					:addClass(cfg.i18n.class.caption)
					:cssText(args.captionstyle)
					:wikitext(args.caption)
		end
	end

	if args.above then
		root
			:tag('tr')
				:tag('td')
					:addClass(cfg.i18n.class.above)
					:addClass(args.aboveclass)
					:cssText(args.abovestyle)
					:newline() -- newline required for bullet-points to work
					:wikitext(args.above)
	end

	local rowNums = {}
	for k, v in pairs(args) do
		k = '' .. k
		local num = k:match('^heading(%d+)$') or k:match('^content(%d+)$')
		if num then table.insert(rowNums, tonumber(num)) end
	end
	table.sort(rowNums)
	-- remove duplicates from the list (e.g. 3 will be duplicated if both heading3
	-- and content3 are specified)
	for i = #rowNums, 1, -1 do
		if rowNums[i] == rowNums[i - 1] then
			table.remove(rowNums, i)
		end
	end

	for i, num in ipairs(rowNums) do
		local heading = args['heading' .. num]
		if heading then
			root
				:tag('tr')
					:tag('th')
						:addClass(cfg.i18n.class.heading)
						:addClass(args.headingclass)
						:addClass(args['heading' .. num .. 'class'])
						:cssText(args.basestyle)
						:cssText(args.headingstyle)
						:cssText(args['heading' .. num .. 'style'])
						:newline()
						:wikitext(heading)
		end

		local content = args['content' .. num]
		if content then
			root
				:tag('tr')
					:tag('td')
						:addClass(hasSubgroup(content) and cfg.i18n.class.content_with_subgroup
							or cfg.i18n.class.content)
						:addClass(args.contentclass)
						:addClass(args['content' .. num .. 'class'])
						:cssText(args.contentstyle)
						:cssText(args['content' .. num .. 'style'])
						:newline()
						:wikitext(content)
						:done()
					 -- Without a linebreak after the </td>, a nested list like
					 -- "* {{hlist| ...}}" doesn't parse correctly.
					:newline()
		end
	end

	if args.below then
		root
			:tag('tr')
				:tag('td')
					:addClass(cfg.i18n.class.below)
					:addClass(args.belowclass)
					:cssText(args.belowstyle)
					:newline()
					:wikitext(args.below)
	end

	if not child then
		if args.navbar ~= cfg.i18n.navbar_none and args.navbar ~= cfg.i18n.navbar_off and
			(args.name or frame:getParent():getTitle():gsub(cfg.i18n.pattern.sandbox, '') ~=
			cfg.i18n.title_not_to_add_navbar) then
			root
				:tag('tr')
					:tag('td')
						:addClass(cfg.i18n.class.navbar)
						:cssText(args.navbarstyle)
						:wikitext(require('Modulis:Navbar')._navbar{
							args.name,
							mini = 1,
							fontstyle = args.navbarfontstyle
						})
		end
	end
	
	local base_templatestyles = frame:extensionTag{
		name = 'templatestyles', args = { src = cfg.i18n.templatestyles }
	}
	
	local templatestyles = ''
	if args['templatestyles'] and args['templatestyles'] ~= '' then
		templatestyles = frame:extensionTag{
			name = 'templatestyles', args = { src = args['templatestyles'] }
		}
	end
	
	local child_templatestyles = ''
	if args['child templatestyles'] and args['child templatestyles'] ~= '' then
		child_templatestyles = frame:extensionTag{
			name = 'templatestyles', args = { src = args['child templatestyles'] }
		}
	end
	
	local grandchild_templatestyles = ''
	if args['grandchild templatestyles'] and args['grandchild templatestyles'] ~= '' then
		grandchild_templatestyles = frame:extensionTag{
			name = 'templatestyles', args = { src = args['grandchild templatestyles'] }
		}
	end

	return table.concat({
		base_templatestyles,
		templatestyles,
		child_templatestyles,
		grandchild_templatestyles,
		tostring(root),
		(child and cfg.i18n.category.child or ''),
		categorizeTemplatesWithInlineStyles(args)
	})
end

local function list_title(args, is_centered_list_titles, num)
	
	local title_text = trimAndAddAutomaticNewline(args['list' .. num .. 'title']
		or cfg.i18n.default_list_title)

	local title
	if is_centered_list_titles then
		-- collapsible can be finicky, so provide some CSS/HTML to support
		title = mw.html.create('div')
			:addClass(cfg.i18n.class.list_title_centered)
			:wikitext(title_text)
	else
		title = mw.html.create()
			:wikitext(title_text)
	end
		
	local title_container = mw.html.create('div')
		:addClass(cfg.i18n.class.list_title)
		-- don't /need/ a listnumtitleclass because you can do
		-- .templateclass .listnumclass .sidebar-list-title
		:addClass(args.listtitleclass)
		:cssText(args.basestyle)
		:cssText(args.listtitlestyle)
		:cssText(args['list' .. num .. 'titlestyle'])
		:node(title)
		:done()
	
	return title_container
end

--[[
Main entry point for sidebar with collapsible lists.
Does the work of creating the collapsible lists themselves and including them
into the args.
]]
function p.collapsible(frame)
	local args = getArgs(frame)
	if not args.name and
		frame:getParent():getTitle():gsub(cfg.i18n.pattern.collapse_sandbox, '') ==
		cfg.i18n.collapse_title_not_to_add_navbar then
		args.navbar = cfg.i18n.navbar_none
	end

	local contentArgs = {}
	
	local is_centered_list_titles
	if args['centered list titles'] and args['centered list titles'] ~= '' then
		is_centered_list_titles = true
	else
		is_centered_list_titles = false
	end

	for k, v in pairs(args) do
		local num = string.match(k, '^list(%d+)$')
		if num then
			local expand = args.expanded and
				(args.expanded == 'all' or args.expanded == args['list' .. num .. 'name'])
			local row = mw.html.create('div')
			row
				:addClass(cfg.i18n.class.list)
				:addClass('mw-collapsible')
				:addClass((not expand) and 'mw-collapsed' or nil)
				:addClass(args['list' .. num .. 'class'])
				:cssText(args.listframestyle)
				:cssText(args['list' .. num .. 'framestyle'])
				:node(list_title(args, is_centered_list_titles, num))
				:tag('div')
					:addClass(cfg.i18n.class.list_content)
					:addClass('mw-collapsible-content')
					-- don't /need/ a listnumstyleclass because you can do
					-- .templatename .listnumclass .sidebar-list
					:addClass(args.listclass)
					:cssText(args.liststyle)
					:cssText(args['list' .. num .. 'style'])
					:wikitext(trimAndAddAutomaticNewline(args['list' .. num]))

			contentArgs['content' .. num] = tostring(row)
		end
	end

	for k, v in pairs(contentArgs) do
		args[k] = v
	end

	return p.sidebar(frame, args, cfg.i18n.class.collapse)
end

return p
初字五行属什么 刑警队是干什么的 风骚什么意思 什么是越位 cco是什么意思
盘古是一个什么样的人 白塞氏吃什么药 大腿根部痒用什么药膏 model是什么牌子 月经期体重增加是什么原因
碘吃多了有什么危害 脉搏细是什么原因 elf是什么意思 赵云的马叫什么 红斑是什么皮肤病
什么血型 什么叫意识 扁平疣是什么原因引起的 梦见蟒蛇是什么意思 血清果糖胺测定是什么
529是什么意思hcv8jop1ns4r.cn 黑色素瘤是什么hcv9jop3ns8r.cn 兔子的天敌是什么动物hcv8jop8ns6r.cn 缺黄体酮会有什么症状hcv7jop5ns5r.cn 什么情况会染上鼠疫hcv8jop3ns7r.cn
人为什么会低血糖hcv7jop7ns3r.cn 江西有什么好玩的地方hcv8jop0ns2r.cn 强化是什么意思hcv9jop5ns1r.cn 为什么会得尿毒症hcv9jop2ns5r.cn 2024年属什么hcv8jop2ns4r.cn
学分是什么意思hcv7jop6ns8r.cn 想法是什么意思hcv9jop7ns0r.cn 辣椒有什么营养价值hcv8jop9ns0r.cn 咳嗽什么东西不能吃hcv8jop2ns4r.cn 强势是什么意思hcv9jop5ns8r.cn
价值连城是什么意思0297y7.com 喝酒对身体有什么好处和坏处hcv9jop1ns5r.cn 天使轮是什么意思hcv9jop1ns0r.cn 什么水果是钙中之王dayuxmw.com 局座是什么梗hcv9jop3ns0r.cn
百度