Images directory to web page.
function dom.DIV(opt)
local opt = opt or {}
local url = opt.url
local link = opt.link
local text = opt.text
local style = opt.style
local class = opt.class
local content = opt.content
local DIV = {}
table.insert(DIV, '<DIV')
if class then table.insert(DIV, addClass(class)) end
if style then table.insert(DIV, addStyle(style)) end
if url then
local img ='background-image: url(' .. url .. ');'
local style = ' style="'..img..'"'
table.insert(DIV, addImg(url))
end
table.insert(DIV, '>')
if text then table.insert(DIV, text) end
if content then table.insert(DIV, content) end
table.insert(DIV, '</DIV>')
DIV = table.concat(DIV)
if link then
return addLink({
link = link,
content = DIV,
})
else
return DIV
end
end
You can @mention a GitHub username to generate a link to their profile. The resulting <a>
element will link to the contributor's GitHub Profile. For example: In 2007, Chris Wanstrath (@defunkt), PJ Hyett (@pjhyett), and Tom Preston-Werner (@mojombo) founded GitHub.