Module:Layout/Production/View/Definition
Uiterlijk
Deze module is nog in ontwikkeling (versie 0.0) en wordt getest.
De Module:Layout is bedoeld om snel, consistent en uitgebreid een pagina op te maken.
Er is een op de module afgestemde handleiding over deze onderwijswiki beschikbaar.
De module wordt geïnitialiseerd met de configuratie in Module:Layout/Production/Configuration.
local definition = {};
function definition.main( call )
local frame = call.frame;
return frame.args[ "part" ];
end
function definition.box( definition, background_color )
if not definition then definition = " "; end
local outer_box = mw.html.create('div');
outer_box:css({
['text-align'] = 'center',
['-webkit-border-radius'] = '0% 0% 100% 100% / 0% 0% 8px 8px',
['-webkit-box-shadow'] = 'rgba(0, 0, 0,.30) 0 2px 3px',
['margin-top'] = '16px'
});
local inner_box = mw.html.create('div');
inner_box:css({
['margin'] = '0 auto',
['margin-top'] = '32px',
['margin-bottom'] = '32px',
['height'] = 'auto',
['background'] = background_color,
['border'] = '1px solid #ccc',
['box-shadow'] = '1px 1px 2px #fff inset, -1px -1px 2px #fff inset',
['border-radius'] = '3px/6px'
});
local definition_text = mw.html.create('b');
definition_text:wikitext( definition );
inner_box:node(definition_text);
outer_box:node( inner_box );
return tostring( outer_box );
end
return definition;