Modul:Monument/layout
--Source: https://ru.wikivoyage.org/wiki/Модуль:Monument/layout
local p = {}
function p.monument_header(id2, color2, imagelink, imagedesc, bgcolor)
local id = id2 or local color = color2 or local imagelink = imagelink or 'Village without photo.svg|border' local imagedesc = imagedesk or "Súwret joq" local bgcolor = bgcolor or '#F8F8F8;'
local tmp = if color ~= "" then tmp = 'style="color:' .. color .. ';"' end local t = [[{| id=]] .. id .. [[ class="monument" border=0 style="font-size:97%;width:100%;" |- valign="top" ]] .. tmp
t = t .. '\n| width="160px" | ' .. '
'
t = t .. '\n| style=" background-color:' .. bgcolor .. ' padding-left:10px;" valign="middle" | ' return t
end
function p.monument_title(name, icon, size)
local name = name or local icon = icon or "" local size = size or "" local unesco = "no" local complex = "no" local alt = "" local t = "" if icon ~= then t = t .. "" .. size .. "px " end if unesco == 'yes' then t = t .. " " end if complex == 'yes' then t = t .. ' ' end t = t .. '' t = t .. name return t .. '
';
end
function p.makelabel(title, label, sep)
return "" .. title .. ": " .. label .. sep
end
function p.logolink(logo, link, text, size)
return ' ' .. text .. ''
end
function p.extcoords(link, name)
return p.logolink("Map mag.png", link, name, "17")
end
function p.wikipedialink(lang, wiki, name)
return p.logolink("Wikipedia-logo-v2.svg", lang .. '.wikipedia.org/wiki/' .. mw.uri.encode(wiki, "PATH"), name, "19")
end
function p.wikidatalink(wdid, name)
return p.logolink("Wikidata-logo-without-paddings.svg", 'www.wikidata.org/wiki/' .. mw.uri.encode(wdid, "PATH"), name, "18")
end
function p.commonslink(cat, name)
return p.logolink("Commons-logo.svg", 'commons.wikimedia.org/wiki/Category:' .. mw.uri.encode(cat, "PATH"), name, "13")
end
function p.externallink(link, name)
return p.logolink("P geography 3 b.png", mw.uri.encode(link, "PATH"), name, "22")
end
function p.uploadlink(campaign, uploadbtntext, uploadid, uploadid2, uploaddesc, uploadcat)
local campaign = campaign or 'wlm-uz' local uploadbtntext = uploadbtntext or 'Fayl júklew' local uploadid = uploadid or local uploadid2 = uploadid2 or local uploaddesc = uploaddesc or local uploadcat = uploadcat or
local t = if campaign ~= then t = t .. '\n| class="plainlinks" style="width:10%; text-align:center; vertical-align:middle; background-color:#FFFACD; padding:0 1em" ' t = t .. "| [//commons.wikimedia.org/w/index.php?title=Special:UploadWizard&campaign=" .. mw.uri.encode(campaign, "PATH") t = t .. &id= .. mw.uri.encode(uploadid or , "PATH") t = t .. &id2= .. mw.uri.encode(uploadid2 or , "PATH") t = t .. &caption= .. mw.uri.encode(uploaddesc, "PATH") t = t .. &description= .. mw.uri.encode(uploaddesc, "PATH") t = t .. &categories= .. mw.uri.encode(uploadcat or , "PATH") .. '&uselang=kaa' t = t .. ' ]' end
t = t .. "\n|}
\n"
return t
end
return p;