Module:Documentation: Difference between revisions
m local |
Use TemplateStyles |
||
| Line 78: | Line 78: | ||
body | body | ||
:addClass( badDoc and 'documentation-badDoc' or '' ) | :addClass( badDoc and 'documentation-badDoc' or '' ) | ||
:css | :css('background-color', '#' .. ( badDoc and '888888' or '33333333' )) | ||
:tag( 'div' ) | :tag( 'div' ) | ||
:attr( 'id', 'documentation-header-tools' ) | :attr( 'id', 'documentation-header-tools' ) | ||
| Line 195: | Line 190: | ||
body | body | ||
:addClass( docClass ) | :addClass( docClass ) | ||
:css | :css('background-color', '#' .. colour) | ||
local header = mw.html.create( 'div' ) | local header = mw.html.create( 'div' ) | ||
:addClass( 'documentation-header-top' ) | :addClass( 'documentation-header-top' ) | ||
header | header | ||
:node( links ) | :node( links ) | ||
:tag( 'span' ) | :tag( 'span' ) | ||
: | :addClass('documentation-header-title' ) | ||
:wikitext( 'Documentation' ) | :wikitext( 'Documentation' ) | ||
| Line 246: | Line 223: | ||
:tag( 'div' ) | :tag( 'div' ) | ||
:addClass( 'documentation-header-bottom' ) | :addClass( 'documentation-header-bottom' ) | ||
:node( links ) | :node( links ) | ||
:wikitext( 'The above documentation is transcluded from [[', docPage.fullText, ']].' ) | :wikitext( 'The above documentation is transcluded from [[', docPage.fullText, ']].' ) | ||
| Line 262: | Line 232: | ||
end | end | ||
return tostring( body ) .. tostring( anchor ) | return mw.getCurrentFrame():extensionTag('templatestyles', '', {src='Module:Documentation/styles.css'}) .. tostring( body ) .. tostring( anchor ) | ||
end | end | ||
return p | return p | ||