Modul:Navbar: Perbedaan antara revisi
add templatestyles for hlist
dw>Hidayatsrf (sejarah > riwayat) |
dw>Izno (add templatestyles for hlist) |
||
Baris 63: | Baris 63: | ||
-- link_descriptions should be easier... | -- link_descriptions should be easier... | ||
local link_descriptions = { | local link_descriptions = { | ||
{ ['mini'] = ' | { ['mini'] = 'v', ['full'] = 'view', ['html_title'] = 'View this template', | ||
['link'] = title.fullText, ['url'] = false }, | ['link'] = title.fullText, ['url'] = false }, | ||
{ ['mini'] = ' | { ['mini'] = 't', ['full'] = 'talk', ['html_title'] = 'Discuss this template', | ||
['link'] = talkpage, ['url'] = false }, | ['link'] = talkpage, ['url'] = false }, | ||
{ ['mini'] = ' | { ['mini'] = 'e', ['full'] = 'edit', ['html_title'] = 'Edit this template', | ||
['link'] = title:fullUrl('action=edit'), ['url'] = true }, | ['link'] = title:fullUrl('action=edit'), ['url'] = true }, | ||
{ ['mini'] = ' | { ['mini'] = 'h', ['full'] = 'hist', ['html_title'] = 'History of this template', | ||
['link'] = title:fullUrl('action=history'), ['url'] = true }, | ['link'] = title:fullUrl('action=history'), ['url'] = true }, | ||
{ ['mini'] = 'm', ['full'] = ' | { ['mini'] = 'm', ['full'] = 'move', ['html_title'] = 'Move this template', | ||
['link'] = mw.title.new('Special:Movepage'):fullUrl('target='..title.fullText), ['url'] = true }, | ['link'] = mw.title.new('Special:Movepage'):fullUrl('target='..title.fullText), ['url'] = true }, | ||
{ ['mini'] = 'w', ['full'] = ' | { ['mini'] = 'w', ['full'] = 'watch', ['html_title'] = 'Watch this template', | ||
['link'] = title:fullUrl('action=watch'), ['url'] = true } | ['link'] = title:fullUrl('action=watch'), ['url'] = true } | ||
} | } | ||
Baris 151: | Baris 151: | ||
end | end | ||
local frame = mw.getCurrentFrame() | |||
-- hlist -> navbar is best-effort to preserve old Common.css ordering. | |||
return frame:extensionTag{ | |||
name = 'templatestyles', args = { src = cfg.hlist_templatestyles } | |||
} .. frame:extensionTag{ | |||
name = 'templatestyles', args = { src = cfg.templatestyles } | name = 'templatestyles', args = { src = cfg.templatestyles } | ||
} .. tostring(div:done()) | } .. tostring(div:done()) |