Məzmuna keç

Modul:Citation

Vikipediya, azad ensiklopediya

Bu modulun sənədləşdirmə səhifəsi Modul:Citation/doc səhifəsində yaradıla bilər

local p = {}
local param  = require('Modul:Citation/Parameters')
local render = require('Modul:Citation/Render')

local function styleTag(frame)
	return frame:extensionTag('templatestyles', '', { src = 'Modul:Citation/styles.css' })
end

local function make(ctype, defaults)
	return function(frame)
		local args = param.get(frame, ctype)
		if defaults then
			for key, value in pairs(defaults) do
				if not args[key] or args[key] == '' then
					args[key] = value
				end
			end
		end
		return styleTag(frame) .. render.render(args, ctype)
	end
end

p.web = make('veb')
p.book = make('kitab')
p.journal = make('jurnal')
p.newspaper = make('qəzet')
p.encyclopedia = make('ensiklopediya')
p.magazine = make('jurnal')
p.report = make('hesabat')
p.document = make('sənəd')
p.thesis = make('tezis')
p.press_release = make('veb', { type = 'Press-reliz' })
p.conference = make('konfrans')
p.sign = make('işarə')
p.map = make('xəritə')
p.speech = make('nitq')
p.newsgroup = make('xəbərqrupu')
p.interview = make('müsahibə')
p.tech_report = make('texniki_hesabat')
p.arxiv = make('arxiv')
p.biorxiv = make('biorxiv')
p.citeseerx = make('citeseerx')
p.av_media = make('audiovizual')
p.av_media_notes = make('audiovizual_qeyd')
p.episode = make('epizod')
p.mailing_list = make('mailing_list')
p.medrxiv = make('medrxiv')
p.podcast = make('podkast')
p.serial = make('serial')
p.ssrn = make('ssrn')

p.cite_web = p.web
p.cite_news = p.newspaper
p.cite_journal = p.journal
p.cite_magazine = p.magazine
p.cite_encyclopedia = p.encyclopedia
p.cite_report = p.report
p.cite_document = p.document
p.cite_thesis = p.thesis
p.cite_press_release = p.press_release
p.cite_conference = p.conference
p.cite_sign = p.sign
p.cite_map = p.map
p.cite_speech = p.speech
p.cite_newsgroup = p.newsgroup
p.cite_interview = p.interview
p.cite_tech_report = p.tech_report
p.cite_arxiv = p.arxiv
p.cite_biorxiv = p.biorxiv
p.cite_citeseerx = p.citeseerx
p.cite_av_media = p.av_media
p.cite_av_media_notes = p.av_media_notes
p.cite_episode = p.episode
p.cite_mailing_list = p.mailing_list
p.cite_medrxiv = p.medrxiv
p.cite_podcast = p.podcast
p.cite_serial = p.serial
p.cite_ssrn = p.ssrn
p.news = p.newspaper

return p