Module:Lib boîte déroulante
local p = {}
-- -- Fonctions locales --
local function cadreGeneral( texteBouton )
return '
end
local function bandeauTitre( couleurBandeau, titre )
return '.. (titre or )
.. 'end
local function debutContenu( centrage ) local alignement = centrage == 'center' and 'center' or 'left'
return '' -- NavContent .. '' .. '' -- NavFrame
end
-- -- Fonctions appelables --
function p.boiteDeroulante( canari, titre, texte, couleurBandeau, texteBouton, centrage ) if canari ~= nil then error( 'la fonction « boiteDeroulante » ne doit pas être utilisée directement' ) end
return cadreGeneral( texteBouton ) .. bandeauTitre( couleurBandeau, titre ) .. debutContenu( centrage ) .. (texte or ) .. fermetureDiv() end
function p.boiteDeroulanteDebut( canari, titre, couleurBandeau, texteBouton, centrage ) if canari ~= nil then error( 'la fonction « boiteDeroulanteDebut » ne doit pas être utilisée directement' ) end
return cadreGeneral( texteBouton ) .. bandeauTitre( couleurBandeau, titre ) .. debutContenu( centrage ) end
function p.boiteDeroulanteFin( canari ) if canari ~= nil then error( 'la fonction « boiteDeroulanteFin » ne doit pas être utilisée directement' ) end
return fermetureDiv() end
return p