Die Seite wurde neu angelegt: „local p = {} function p.fotobox(frame) local bild = frame.args[1] or "" local size = frame.args[2] or "300" local text = frame.args[3] or "" local output = string.format([[ <div style="display: inline-block; text-align: center;"> <gallery mode="traditional" widths=%s heights=%s> File:%s </gallery> %s </div> ]], size, size, bild, text) return frame:preprocess(output) end return p“
 
Keine Bearbeitungszusammenfassung
Markierung: Zurückgesetzt
Zeile 5: Zeile 5:
   local size = frame.args[2] or "300"
   local size = frame.args[2] or "300"
   local text = frame.args[3] or ""
   local text = frame.args[3] or ""
 
  -- Feste Hintergrundfarbe (immer gleich)
  local bgcolor = "#f5f5f5"


   local output = string.format([[
   local output = string.format([[
<div style="display: inline-block; text-align: center;">
<div style="display: inline-block; text-align: center; background-color: %s; padding: 10px; border-radius: 8px;">
   <gallery mode="traditional" widths=%s heights=%s>
   <gallery mode="traditional" widths=%s heights=%s>
   File:%s
   File:%s
Zeile 13: Zeile 16:
   %s
   %s
</div>
</div>
]], size, size, bild, text)
]], bgcolor, size, size, bild, text)


   return frame:preprocess(output)
   return frame:preprocess(output)

Version vom 28. Juli 2025, 15:39 Uhr

Die Dokumentation für dieses Modul kann unter Modul:BoxModul/Doku erstellt werden

local p = {}

function p.fotobox(frame)
  local bild = frame.args[1] or ""
  local size = frame.args[2] or "300"
  local text = frame.args[3] or ""
  
  -- Feste Hintergrundfarbe (immer gleich)
  local bgcolor = "#f5f5f5"

  local output = string.format([[
<div style="display: inline-block; text-align: center; background-color: %s; padding: 10px; border-radius: 8px;">
  <gallery mode="traditional" widths=%s heights=%s>
  File:%s
  </gallery>
  %s
</div>
]], bgcolor, size, size, bild, text)

  return frame:preprocess(output)
end

return p