上升星座代表什么| 柚子是什么季节| 口苦是什么问题| 姐夫的爸爸叫什么| 澳门有什么特产| 神经痛用什么药| 心想事成是什么意思| 卤肉是什么肉| 乳房疼痛什么原因| 手术后吃什么最好| 小肚子左边疼是什么原因| 什么人容易得帕金森| 利率是什么| 寻常疣是什么样子图片| 活检是什么检查| 先天性巨结肠有什么症状| 梦遗是啥意思是什么| 什么是党的性质和宗旨的体现| 宫颈液基细胞学检查是什么| 大便水状是什么原因| 孕妇适合喝什么牛奶| 左眼皮跳代表什么| 高密度脂蛋白是什么| 正常龟头什么样子| 胃不好吃什么好| 重症肌无力是什么病| 心源性哮喘首选什么药| 不割包皮有什么影响| 金丝雀是什么意思| 10月出生的是什么星座| 肠胃炎吃什么水果比较好| 什么是丙肝| 宫腔粘连是什么原因引起的| 脑白质脱髓鞘改变是什么意思| 男人尿道炎吃什么药最好| 深千尺是什么意思| 龋齿和蛀牙有什么区别| 美甲光疗是什么| 同比增长是什么意思| 腰斩什么意思| 发烧41度是什么概念| 沸去掉三点水念什么| 周瑜为什么打黄盖| 董酒是什么香型| 宝宝大便有泡沫是什么原因| 三个火是什么字| 人大副主任是什么级别| 肝脏低密度灶是什么意思| 右手臂酸痛是什么前兆| 睡觉磨牙是什么情况| 牦牛角手串有什么作用| 孕妇吃菠萝对胎儿有什么好处| vans是什么牌子| 眼珠子发黄是什么原因| 什么辣椒香而不辣| 男士内裤什么材质的好| 冒虚汗是什么原因| 1109是什么星座| 玉露茶属于什么茶| 原因是什么| 医是什么结构的字| 长江后浪推前浪是什么生肖| 血糖高早餐吃什么| tiamo是什么意思| 甲状腺结节是什么意思| uin是什么意思| 2015年是什么生肖| 吃什么能去黑眼圈| 红楼梦主要讲了什么| 什么是高脂血症| 中暑为什么不能打点滴| 热疹用什么药膏最好| 邓超的老婆叫什么名字| 台阶是什么意思| by是什么意思| 生长激素分泌的高峰期是什么时候| 角质是什么意思| 早晨5点是什么时辰| 李讷为什么不姓毛| 牙龈变黑是什么原因| 悟空是什么意思| 月经来了腰疼是什么原因| 吃什么可以化掉息肉| 心脏不好吃什么药| 大林木命适合做什么行业| 糖化血红蛋白是检查什么的| 血压正常头晕是什么原因| 现在当兵需要什么条件| 六月初六什么节| 甘油三酯偏高说明什么问题| 什么血型可以生出o型血| 不变应万变是什么意思| 淮山跟山药有什么区别| 冰种翡翠属于什么档次| 女人长期做俯卧撑有什么效果| 圣诞礼物什么时候送| 头发油性大是什么原因| 58年属什么今年多大| 阑尾炎吃什么药见效快| 丑什么意思| 阿西吧是什么意思| 青光眼有什么症状| lively什么意思| 月是什么结构| 睾酮是什么| 50至60岁吃什么钙片好| 喝咖啡困倦是什么原因| 三文鱼有什么营养| 脑瘤有什么症状| 痢疾是什么病| 咬牙齿是什么原因| 眼下长斑是什么原因| 什么网名好听又有内涵| 霸王花煲汤放什么材料| 射频消融术是什么意思| 男头发稀少适合什么发型| 葡萄胎是什么意思| 哥哥的老婆叫什么| 筋膜是什么| 胃酸的主要成分是什么| 大小便失禁是什么原因造成的| 为什么低烧比高烧可怕| 暗的反义词是什么| 男生生理期是什么表现| 综合基础知识考什么| 胃火大吃什么药| 口差念什么| 男人练臀桥有什么用| 什么情况下吃救心丸| 叔叔的儿子叫什么| 舌苔发黄是什么病| 为什么250是骂人的话| 正团级是什么军衔| 明年属什么| 首重是什么意思| 脑疝是什么原因引起的| 眉毛脱落是什么原因造成的| 1866年属什么生肖| 养狗需要注意什么| 做健身教练有什么要求| 马上风为什么拔不出来| 沙中土是什么生肖| 瞬息什么| 荣誉的誉是什么意思| 男性阴囊潮湿是什么病| 上火便秘吃什么最快排便| 梦见和死去的人说话是什么意思| 6月20日是什么日子| 移徙是什么意思| 蛋清加蜂蜜敷脸有什么好处| 梦见自己会开车了是什么意思| 狗咬到什么程度需要打针| 菊花什么时候开| 男性乳头疼是什么原因| 皮肤黄适合穿什么颜色的衣服| 招字五行属什么| 晕车吃什么好| 松子是什么树的果实| 姌是什么意思| 尽性是什么意思| 1069是什么意思| 龙延香是什么| ckd是什么病| 社会是什么意思| 今年是什么年啊| 肚脐眼是什么穴位| 放化疗是什么意思| 提心吊胆是什么生肖| 蚕丝衣服用什么洗最好| 吃地屈孕酮片有什么副作用| 苍蝇喜欢什么味道| 查乳腺挂什么科| 甘草配什么泡水喝最好| 玻尿酸有什么作用| pa什么意思| 芸豆是什么豆| 胆囊结石挂什么科| 扁桃体发炎吃什么| 金灿灿的什么| 什么食物含钾| 芈月和秦始皇是什么关系| 泄是什么意思| 一个斤一个页念什么| 尿道炎吃什么消炎药| 头部检查挂什么科| 五行大林木是什么意思| cathy什么意思| 国药准字号是什么意思| 酱油的原料是什么| 活菩萨是什么意思| 血压低是什么原因引起的| 梦见丢了一只鞋是什么意思| cst是什么意思| 腮腺炎反复发作是什么原因| 狮子吃什么| 宫颈那囊是什么| pocky是什么意思| 吃什么升血小板最快最好| 245阳性是什么意思| 舌苔发黄厚是什么原因| 125是什么意思| 做梦梦到蜈蚣是什么意思| 发烧应该吃什么药| 眼睛干涩是什么原因引起的| ercp是什么检查| 一个虫一个卑念什么| 血红蛋白高是什么意思| 上焦有火吃什么中成药| 2016年是属什么年| mds医学上是什么意思| 荷花什么季节开| 什么牌子的充电宝好| 干咳无痰吃什么药效果最好| prp是什么意思| 高压低是什么原因| 无名指是什么经络| 凹陷性疤痕用什么药膏| 小孩咳嗽吃什么药好| 排骨蒸什么好吃| 肉苁蓉有什么功能| 芒果有什么好处| 飞舞是什么意思| 维c什么时候吃效果最好| 强盗是什么意思| 高血糖什么原因引起| naomi什么意思| 性激素六项什么时候查最准确| 神隐是什么意思| 冬天有什么水果| 怀孕初期吃什么蔬菜好| 为什么指甲有竖纹| 白细胞酯酶阳性什么意思| 96年属什么的| 1972属什么| 慎重是什么意思| 湿疹擦什么药好| 和田玉对身体有什么好处| 多潘立酮片治什么病| 腰疼吃点什么药| 农历十月份是什么星座| 明天吃什么| 膝盖窝疼是什么原因| 鼻孔流血是什么原因| 手上有湿疹是什么原因引起的| 什么面条好吃| 雪藏是什么意思| 银色山泉香水什么牌子| 吃马齿苋有什么好处| 为什么做b超要憋尿| 88年属什么| 放生乌龟有什么寓意| 吃什么长胎不长肉| 人的牙齿为什么不能再生| 血型o型rh阳性是什么意思| 遗精是什么原因引起的| 排卵日是什么意思| 一个目一个敢念什么| 流产能吃什么水果| 百香果和什么不能一起吃| 恍然大悟什么意思| 中间细胞百分比偏高是什么意思| 皲裂什么意思| 晚上入睡困难是什么原因| 血液生化检查能看出什么病| 百度Lompat ke isi

AMD RX 500显卡国行价格公布 1399元起售良心升级

Dari Wikipedia bahasa Indonesia, ensiklopedia bebas
百度 奇怪,这队给我一种这样的感觉:仿佛对他们来说,队长莫雷诺能不能去俄罗斯,比申花赢不赢更重要。

-- This module implements [[Template:Class]], [[Template:Class/icon]] and
-- [[Template:Class/colour]].

local mArguments -- lazily loaded
local definitions = mw.loadJsonData('Module:Class/definition.json')

local p = {}

--------------------------------------------------------------------------------
-- Local configuration and messages
--------------------------------------------------------------------------------

local cfg = {
	defaultCode = 'DEFAULT',
	classPrefix = 'assess-',
	globalClass = 'assess',
	defaultClassSuffix = 'default',
	unboldClassSuffix = 'unbold',
	catRootFormat = '%s %s',
	catTopicFormat = '%s %s articles',
	catBasicFormat = '%s articles',
	categoryFormat = '[[:Category:%s|%s]]',
	templateLocation = 'Template:Class',
	iconTemplateLocation = 'Template:Class/icon',
	colourTemplateLocation = 'Template:Class/colour',
	stylesLocation = 'Module:Class/styles.css',
	baseColourPath = {'colour', 'base'},
	iconPath = {"icon", "file"},
	iconDefaultPath = {"icon", "default"},
	iconAttribPath = {"icon", "requiresAttribution"},
	fullLabelPath = {"labels", "full"},
	shortLabelPath = {"labels", "short"},
	categoryRootPath = {"categoryRoot"},
	tooltipPath = {"labels", "tooltip"},
	yes = "yes",
	no = "no", 
	argumentNames = {
		class = "class",
		style = "style"
	},
	getOptions = {
		--First item is localized argument name, second is case-sensitivity
		bold = {"bold", false},
		header = {"header", false},
		image = {"image", false},
		rowspan = {"rowspan", false},
		fullcategory = {"fullcategory", true},
		category = {"category", true},
		topic = {"topic", true}
	}
}

--------------------------------------------------------------------------------
-- Argument helper functions
--------------------------------------------------------------------------------

local function getRawArgs(frame, wrapper)
	--Retrieves the arguments from the frame
	mArguments = mArguments or require('Module:Arguments')
	return mArguments.getArgs(frame, {
		wrappers = wrapper,
		trim = false,
		removeBlanks = false
	})
end

local function makeInvokeFunction(func, wrapper)
	--Wraps a general function into an invokable version
	return function (frame)
		local args = getRawArgs(frame, wrapper)
		return func(args)
	end
end

--------------------------------------------------------------------------------
-- String helper functions
--------------------------------------------------------------------------------

local function trim(str)
	--Trims strings, passes through non-strings without modification
	return (type(str) == 'string') and mw.text.trim(str) or str
end

local function normalizeValue(val)
	--Normalizes strings, particularly class codes
	if type(val) == 'string' then val = trim(val):lower() end
	if val == '' then val = nil end
	return val
end

local function ucfirst(str)
	--Capitalizes the first character of a string
	return mw.ustring.upper(mw.ustring.sub(str, 1, 1)) .. mw.ustring.sub(str, 2)
end

--------------------------------------------------------------------------------
-- Definition helper functions
--------------------------------------------------------------------------------

local function getDefinition(code)
	--Retrieves the definition and canonical class code for a given code.
	--Returns two values: the definition object and the canonical class code
	--string.
	local canonicalCode = normalizeValue(code)
	if code == cfg.defaultCode then canonicalCode = code end
	local class = definitions[canonicalCode]
	while class and class.alias do
		canonicalCode = class.alias
		class = definitions[class.alias]
	end
	if not class then
		return nil, nil
	end
	return class, canonicalCode
end

local function getDefault()
	--Shortcut function for retrieving the default definition
	return getDefinition(cfg.defaultCode) end

local function getProperty(class, default, map)
	--Retrieves a given property from a string given a class definition, a
	--default class definition, and a map for the path to traverse through the
	--class object. The map should be a sequential table of string property
	--names, e.g. {"colour", "base"} would retrieve someClass.colour.base
	local prop, dProp = class, default
	for k, v in ipairs(map) do
		prop = ((type(prop) == 'table') or nil) and prop[v]
		dProp = ((type(dProp) == 'table') or nil) and dProp[v]
	end
	if prop == nil then prop = dProp end
	return prop
end

--------------------------------------------------------------------------------
-- Color functions
--------------------------------------------------------------------------------

function p._colour(code)
	--Retrieves the base colour for a given code
	return getProperty(getDefinition(code), getDefault(), cfg.baseColourPath)
end

function p.colour(frame)
	--Retrieves the base colour for a given code; is invokable
	local args = getRawArgs(frame, cfg.colourTemplateLocation)
	-- Nowiki tags prevent output beginning with "#" from triggering bug 14974.
	return frame:extensionTag('nowiki', p._colour(args[1]))
end

--------------------------------------------------------------------------------
-- Icon functions
--------------------------------------------------------------------------------

function p._icon(args)
	--Retrieves an icon image and formats it as wikitext
	local class = getDefinition(args[cfg.argumentNames.class] or args[1])
	local default = getDefault()
	local file = getProperty(class, default, cfg.iconPath)
	local label = 
		getProperty(class, default, cfg.tooltipPath) or
		ucfirst(getProperty(class, default, cfg.fullLabelPath))
	local attrib = getProperty(class, default, cfg.iconAttribPath)
	local size = args.size or '16px'
	local span = mw.html.create('span')

	span
		:cssText(args[cfg.argumentNames.style])
		:attr('title', label)
		:wikitext(
			string.format(
				'[[File:%s|%s|' .. size .. '%s|class=noviewer|alt=]]',
				file,
				label,
				attrib and '' or '|link='
			)
		)
	return tostring(span)
end

p.icon = makeInvokeFunction(p._icon, cfg.iconTemplateLocation)
--Invokable version of p._icon

--------------------------------------------------------------------------------
-- Class functions
--------------------------------------------------------------------------------

function p._class(args)
	--Parses its arguments into a table cell with an optional icon, a name
	--linked to an appropriate category, and appropriate colour styling
	local classDef, classCode =
		getDefinition(args[cfg.argumentNames.class] or args[1])
	local default = getDefault()
	local iconDefault = getProperty(classDef, default, cfg.iconDefaultPath)
	local shortLabel = getProperty(classDef, default, cfg.shortLabelPath)
	local categoryRoot = getProperty(classDef, default, cfg.categoryRootPath)
	--o is short for "options", go for "get options". Bool true → case-sensitive
	local o, go = {}, cfg.getOptions
	for k, v in pairs(go) do
		o[k] = v[2] and trim(args[v[1]]) or normalizeValue(args[v[1]])
	end

	local cell = mw.html.create(o.header and 'th' or 'td')
	--image=yes forces icon, image=no disables it, otherwise checks default
	local icon = iconDefault and (o.image ~= cfg.no) or (o.image == cfg.yes)
	icon = icon and p.icon(args) .. ' ' or ''

	local category
	if o.fullcategory then
		category = o.fullcategory
	elseif o.category then
		category = string.format(cfg.catRootFormat, categoryRoot, o.category)
	elseif o.topic then
		category = string.format(cfg.catTopicFormat, categoryRoot, o.topic)
	else
		category = string.format(cfg.catBasicFormat, categoryRoot)
	end
	local text = string.format(cfg.categoryFormat, category, shortLabel)
	cell
		:addClass(cfg.globalClass)
		:addClass(
			o.bold == cfg.no and cfg.classPrefix .. cfg.unboldClassSuffix or nil
		)
		:addClass(cfg.classPrefix .. (classCode or cfg.defaultClassSuffix))
		:attr('rowspan', tonumber(o.rowspan))
		:wikitext(mw.getCurrentFrame():extensionTag{ name = 'templatestyles', args = {src = cfg.stylesLocation} }, icon, text)

	return tostring(cell)
end

p.class = makeInvokeFunction(p._class, cfg.templateLocation)
--Invokable version of p._class

return p
甲状腺结节是什么 浓绿的什么 什么时候跳绳减肥效果最好 伊拉克是什么人种 教头菜有什么功效
为什么胸一碰就疼 嬴政姓什么 女性检查甲功是什么病 液体敷料有什么作用 口红用什么能洗掉
经常口腔溃疡是什么原因引起的 瑞舒伐他汀什么时候吃最好 闭麦是什么意思 吃什么补硒最快最好 生物钟是什么
贾赦和贾政是什么关系 什么时机塞给医生红包 抑郁症为什么会想死 妈妈的哥哥叫什么 看淋巴挂什么科室
吃什么可以增强记忆力hcv9jop4ns1r.cn 葵花宝典是什么意思hcv7jop5ns6r.cn 五音是什么hcv7jop5ns2r.cn 为什么会全身酸痛hcv7jop5ns5r.cn 高密度脂蛋白偏高是什么原因hcv7jop9ns8r.cn
老是觉得口渴是什么原因引起的hcv8jop3ns2r.cn zoom 是什么意思hcv8jop9ns8r.cn 轩字属于五行属什么chuanglingweilai.com 开心果为什么叫开心果hcv9jop2ns3r.cn 指鹿为马的反义词是什么hcv8jop2ns1r.cn
婴儿为什么戴银不戴金cl108k.com 头疼恶心想吐吃什么药hcv8jop0ns8r.cn 安全期一般是什么时候hcv7jop9ns7r.cn 三月初八是什么星座hcv8jop3ns1r.cn 对什么有好处的英文hcv8jop6ns2r.cn
ccu病房什么意思hcv8jop1ns4r.cn 不言而喻的喻是什么意思hcv8jop3ns7r.cn 胰岛素偏低是什么原因hcv9jop0ns3r.cn 晕倒是什么原因引起的hcv8jop2ns3r.cn 颈椎增生吃什么药hcv8jop8ns1r.cn
百度