Module:JournalInfobox: verschil tussen versies
Uiterlijk
Geen bewerkingssamenvatting Label: Teruggedraaid |
Geen bewerkingssamenvatting |
||
| (4 tussenliggende versies door dezelfde gebruiker niet weergegeven) | |||
| Regel 2: | Regel 2: | ||
function p.infobox(frame) | function p.infobox(frame) | ||
local args = frame.args | |||
local title = args["title"] or "Unknown" | |||
local year = args["year"] or "" | |||
local pages = args["pages"] or "" | |||
local ocr = args["ocr"] or "" | |||
-- Use the CSS class instead of inline background colors | |||
local out = '{| class="journal-infobox"\n' | |||
out = out .. '|-\n! colspan="2" | ' .. title .. '\n' | |||
if year ~= "" then | |||
out = out .. '|-\n| Year || ' .. year .. '\n' | |||
end | |||
if pages ~= "" then | |||
out = out .. '|-\n| Pages || ' .. pages .. '\n' | |||
end | |||
if ocr ~= "" then | |||
out = out .. '|-\n| OCR Extract || ' .. ocr .. '\n' | |||
end | |||
out = out .. '|}' | |||
return out | |||
end | end | ||
return p | return p | ||
Huidige versie van 10 dec 2025 18:49
Documentatie voor deze module kan aangemaakt worden op de volgende pagina: Module:JournalInfobox/doc
local p = {}
function p.infobox(frame)
local args = frame.args
local title = args["title"] or "Unknown"
local year = args["year"] or ""
local pages = args["pages"] or ""
local ocr = args["ocr"] or ""
-- Use the CSS class instead of inline background colors
local out = '{| class="journal-infobox"\n'
out = out .. '|-\n! colspan="2" | ' .. title .. '\n'
if year ~= "" then
out = out .. '|-\n| Year || ' .. year .. '\n'
end
if pages ~= "" then
out = out .. '|-\n| Pages || ' .. pages .. '\n'
end
if ocr ~= "" then
out = out .. '|-\n| OCR Extract || ' .. ocr .. '\n'
end
out = out .. '|}'
return out
end
return p