Module:Sandbox/BrownHairedGirl/GenericDecadeCatNav v01: Difference between revisions

Content deleted Content added
maxwidth
max-width
 
(4 intermediate revisions by the same user not shown)
Line 5:
local textSize = '90%'
local tableClass="infobox"
local tableFallbackWidthtableFallbackMaxWidth="75%auto"
local tableWidthtableMaxWidth="calc(100% - 300px)"
local tableStyle="margin-left:auto; margin-right:auto; clear:left; float:left;"
local RowStyle = ""
Line 45:
tableRowNum = 0
local myTable = '<table class="' .. tableClass .. '"'
myTable = myTable .. ' style="' .. tableStyle .. '; font-size:' .. textSize .. '; maxwidthmax-width:' .. tableFallbackWidthtableFallbackMaxWidth .. '; maxwidthmax-width:' .. tableWidthtableMaxWidth ..'">\n'
myTable = myTable .. makeTableRow("")
myTable = myTable .. "</table>\n"
Line 51:
end
 
function makeDecade(x)
 
end
 
-- Make a piped link to a decade category, if it exists
Line 94 ⟶ 90:
function parsePagename(pn)
debugLog(1, "parsePagename: [" .. pn .. "]")
match_prefix, match_decade, match_suffix = mw.ustring.match(pn, "^(.*-)(%d+0s BC)(.*)$")
if match_decade == nil then
match_prefix, match_decade, match_suffix = mw.ustring.match(pn, "^(.*-)(%d+0s)(.*)$")
end
if match_decade == nil then
Line 102 ⟶ 98:
return false
end
debugLog(2, 'Split [' .. pn .. ']: /' .. match_prefix .. '/' .. match_decade ..'/' .. match_suffix ..'/')
if (match_prefix ~= nil) and (match_prefix ~= "") then
if (mw.ustring.sub(match_prefix, -1 ) ~= ' ') then