Module:Greek/sandbox
Appearance
| This is the module sandbox page for Module:Greek (diff). |
| This module depends on the following other modules: |
Logic for {{Greek}} and {{Greek block}}.
require('strict')
local p = {} --p stands for package
local getArgs = require('Module:Arguments').getArgs
local yesno = require('Module:Yesno')
local lang = require('Module:Lang')._lang
local wikt_link = require('Module:Wikt')._wikt
function p._greek(args)
local text = args[1]
local wikt = args.wikt or args[2]
local inline = yesno(args.inline) ~= false
local content = text
if wikt and inline then
content = wikt_link({
['link'] = wikt,
['text'] = text,
['anchor'] = 'Ancient Greek'
})
end
return mw.getCurrentFrame():extensionTag('templatestyles', '', {src = 'Template:Greek/styles.css'}) .. lang({
['lang'] = 'grc',
['class'] = 'wst-lang-grc',
['text'] = content,
['inline'] = inline,
['noclose'] = yesno(args.noclose) or false
})
end
function p.greek(frame)
return p._greek(getArgs(frame))
end
return p