Module:Sidebar: Difference between revisions
m update todo; float already works |
add navbar option |
||
| Line 1: | Line 1: | ||
-- This module follows [[User:Ganaram inukshuk/Provisional style guide for Lua]] | -- This module follows [[User:Ganaram inukshuk/Provisional style guide for Lua]] | ||
local getArgs = require("Module:Arguments").getArgs | local getArgs = require("Module:Arguments").getArgs | ||
local navbar = require("Module:Navbar")._navbar | |||
local tiu = require("Module:Template input utils") | local tiu = require("Module:Template input utils") | ||
| Line 41: | Line 42: | ||
table.insert(lines, "|-") | table.insert(lines, "|-") | ||
table.insert(lines, string.format('| style="font-size: 80%%;" | %s', row_content)) | table.insert(lines, string.format('| style="font-size: 80%%;" | %s', row_content)) | ||
return table.concat(lines, "\n") | |||
end | |||
-- Helper function; navbar row | |||
function navbar_row() | |||
local lines = {} | |||
table.insert(lines, '|-') | |||
table.insert(lines, '| style="text-align: center;" | ' .. navbar(name, "mini", "")) | |||
return table.concat(lines, "\n") | return table.concat(lines, "\n") | ||
end | end | ||
| Line 61: | Line 71: | ||
-- Footer | -- Footer | ||
if footer then table.insert(lines, header_footer_row(footer)) end | if footer then table.insert(lines, header_footer_row(footer)) end | ||
if name then table.insert(lines, navbar_row()) end | |||
-- End of table | -- End of table | ||