Module:WPMILHIST Infobox style: Difference between revisions
Appearance
Content deleted Content added
HJ Mitchell (talk | contribs) m Protected Module:WPMILHIST Infobox style: High-risk Lua module ([Edit=Allow only template editors and admins] (indefinite) [Move=Allow only template editors and admins] (indefinite)) |
add missing ; at end of each style. These are needed so that they work when combined with more styles. |
||
Line 1: | Line 1: | ||
local retval = { |
local retval = { |
||
main_box_raw_auto_width = 'float:right;clear:right;border-spacing:2px;font-size:90%', |
main_box_raw_auto_width = 'float:right;clear:right;border-spacing:2px;font-size:90%;', |
||
header_raw = 'background-color:#B0C4DE;text-align:center;vertical-align:middle;font-size:110%', |
header_raw = 'background-color:#B0C4DE;text-align:center;vertical-align:middle;font-size:110%;', |
||
sub_header_raw = 'background-color:#DCDCDC;text-align:center;vertical-align:middle', |
sub_header_raw = 'background-color:#DCDCDC;text-align:center;vertical-align:middle;', |
||
header_color = 'background-color:#B0C4DE', |
header_color = 'background-color:#B0C4DE;', |
||
nav_box = 'margin:0;float:right;clear:right;width:315px;margin-bottom:0.5em;margin-left:1em', |
nav_box = 'margin:0;float:right;clear:right;width:315px;margin-bottom:0.5em;margin-left:1em;', |
||
nav_box_child = 'margin:0;float:right;clear:right;width:305px;margin-bottom:0.5em', |
nav_box_child = 'margin:0;float:right;clear:right;width:305px;margin-bottom:0.5em;', |
||
nav_box_wide = '', |
nav_box_wide = '', |
||
nav_box_header = 'background-color:#B0C4DE', |
nav_box_header = 'background-color:#B0C4DE;', |
||
nav_box_wide_header = 'background-color:#B0C4DE', |
nav_box_wide_header = 'background-color:#B0C4DE;', |
||
nav_box_label = 'background-color:#DCDCDC', |
nav_box_label = 'background-color:#DCDCDC;', |
||
image_box_raw = 'text-align:center;font-size:90%;border-bottom:1px solid #aaa;line-height:1.5em', |
image_box_raw = 'text-align:center;font-size:90%;border-bottom:1px solid #aaa;line-height:1.5em;', |
||
image_box_plain_raw = 'text-align:center;font-size:90%;line-height:1.5em', |
image_box_plain_raw = 'text-align:center;font-size:90%;line-height:1.5em;', |
||
internal_border = '1px dotted #aaa', |
internal_border = '1px dotted #aaa;', |
||
section_border = '1px solid #aaa' |
section_border = '1px solid #aaa;' |
||
} |
} |
||
Revision as of 12:50, 17 April 2015
![]() | This module is rated as ready for general use. It has reached a mature form and is thought to be relatively bug-free and ready for use wherever appropriate. It is ready to mention on help pages and other Wikipedia resources as an option for new users to learn. To reduce server load and bad output, it should be improved by sandbox testing rather than repeated trial-and-error editing. |
![]() | This module is subject to page protection. It is a highly visible module in use by a very large number of pages, or is substituted very frequently. Because vandalism or mistakes would affect many pages, and even trivial editing might cause substantial load on the servers, it is protected from editing. |
Usage
This module is invoked by {{WPMILHIST Infobox style}}; see template documentation for usage.
Used also as a meta-module in Module:Military navigation in the following manner:
local styles = mw.loadData('Module:WPMILHIST Infobox style')
local retval = {
main_box_raw_auto_width = 'float:right;clear:right;border-spacing:2px;font-size:90%;',
header_raw = 'background-color:#B0C4DE;text-align:center;vertical-align:middle;font-size:110%;',
sub_header_raw = 'background-color:#DCDCDC;text-align:center;vertical-align:middle;',
header_color = 'background-color:#B0C4DE;',
nav_box = 'margin:0;float:right;clear:right;width:315px;margin-bottom:0.5em;margin-left:1em;',
nav_box_child = 'margin:0;float:right;clear:right;width:305px;margin-bottom:0.5em;',
nav_box_wide = '',
nav_box_header = 'background-color:#B0C4DE;',
nav_box_wide_header = 'background-color:#B0C4DE;',
nav_box_label = 'background-color:#DCDCDC;',
image_box_raw = 'text-align:center;font-size:90%;border-bottom:1px solid #aaa;line-height:1.5em;',
image_box_plain_raw = 'text-align:center;font-size:90%;line-height:1.5em;',
internal_border = '1px dotted #aaa;',
section_border = '1px solid #aaa;'
}
retval.main_box_raw = 'width:315px;' .. retval.main_box_raw_auto_width
retval.header_bar = 'style="' .. retval.header_raw .. '"'
retval.sub_header_bar = 'style="' .. retval.sub_header_raw .. '"'
retval.image_box = 'style="' .. retval.image_box_raw .. '"'
retval.image_box_plain = 'style="' .. retval.image_box_plain_raw .. '"'
return retval