Template:Pagecover/doc: Difference between revisions

Jump to navigation Jump to search
Content added Content deleted
sims>LostInRiverview
No edit summary
sims>LostInRiverview
No edit summary
Line 7: Line 7:


;Code
;Code
The full code of the template is provided here, for easy copy-and-paste:
The following is the ''basic code'' of the template, including its most common uses. Simply copy-and-paste this code onto the page and fill in the parameters to use it.
<code><pre>
{{Pagecover
|image =
|pagetype =
|subtitle =
|height =
|offset =
|
}}
</pre></code>


The following is the ''"noname"'' version of the template, with the title box removed so that the template only displays an image. This code can be used to add a pagecover without a title, and only relevant parameters have been included here.

<code><pre>
{{Pagecover
|image =
|noname = yes
|width =
|height =
|offset =
|toc =
}}
</pre></code>


The following is the ''full code'' for the template, excluding <noname>. The full code may be useful in limited circumstances but most of the time all the parameters aren't needed at the same time. Simply copy-and-paste this code to use it on a page.

<code><pre>
<code><pre>
{{Pagecover
{{Pagecover
Line 25: Line 53:
* ''<image> - The image selected should be close to, if not as large as, 690px (width) by 300px (height). Images smaller than 690 x 300px are stretched to fit, and images larger than 690 x 300px are cropped. The maximum height of the image may need to be adjusted if large amounts of text are included in the Subtitle parameter.
* ''<image> - The image selected should be close to, if not as large as, 690px (width) by 300px (height). Images smaller than 690 x 300px are stretched to fit, and images larger than 690 x 300px are cropped. The maximum height of the image may need to be adjusted if large amounts of text are included in the Subtitle parameter.


;Optional parameters
;Useful parameters
These parameters aren't necessary for the template to be useable, but they increase its usefulness. These parameters are frequently used when the template is added to a page.
* <name> - The name shown on the title line of the cover can be changed by filling in this parameter. If the parameter is left empty, the name used defaults to the name of the page the template is used on.

* <pagetype> - This text appears right-aligned on the top level of the cover, to the left of any game icons (see below). This field can be filled in to describe the type of article the cover is being used on. If left blank, nothing will appear for this parameter.
* <pagetype> - This text appears right-aligned on the top level of the cover, to the left of any game icons (see below). This field can be filled in to describe the type of article the cover is being used on. If left blank, nothing will appear for this parameter.
* <subtitle> - This text appears directly below the title line. The text is a larger font size than the text used for <pagetype>.
* <subtitle> - This text appears directly below the title line. The text is a larger font size than the text used for <pagetype>.
* <width> - The horizontal width of the template (in pixels) can be set with this parameter. Setting this parameter also changes the size of the image used in the template. By default, the normal width is 690px.
* <height> - The vertical width of the template (in pixels) can be set with this parameter. Note that changing this setting will not change the size of the image used in the template, so if the height is set too large there may be empty space at the bottom of the template. Height is set to 300px by default.
* <height> - The vertical width of the template (in pixels) can be set with this parameter. Note that changing this setting will not change the size of the image used in the template, so if the height is set too large there may be empty space at the bottom of the template. Height is set to 300px by default.
* <offset> - The image used within the template can be moved "up" by filling this parameter (in pixels). Use the preview button to check the offset before publishing, as setting the offset too high might show an empty space below the image. There is no offset by default.
* <offset> - The image used within the template can be moved "up" by filling this parameter (in pixels). Use the preview button to check the offset before publishing, as setting the offset too high might show an empty space below the image. There is no offset by default.
* <noname> - If this parameter is filled with any non-empty characters, the gray text box and all text included in it will not be displayed. You can use this parameter to display a large image box without the text on top of it. ''Note that filling this parameter makes all other parameters redundant except <image>, <height>, <width>, <offset> and <toc>.''
* <toc> - This parameter can be used to create a right-aligned table of contents on the page. By default, the table of contents is left-aligned (note that this has changed from earlier versions of the template - see the change log for details).


Additionally, if the template is being used on a page for game features that span multiple titles, game icons can be included, by appending the appropriate vgcode (as found in [[Template:Era]]) to the template. This parameter does not have a name. Presently the template can accommodate up to eight icons.
Additionally, if the template is being used on a page for game features that span multiple titles, game icons can be included, by appending the appropriate vgcode (as found in [[Template:Era]]) to the template. This parameter does not have a name. Presently the template can accommodate up to eight icons.

;Additional parameters
The template can be further customized on a case-by-case basis by using the following parameters. These parameters may not be needed under every circumstance.

* <name> - The name shown on the title line of the cover can be changed by filling in this parameter. If the parameter is left empty, the name used defaults to the name of the page the template is used on.
* <width> - The horizontal width of the template (in pixels) can be set with this parameter. Setting this parameter also changes the size of the image used in the template. By default, the normal width is 690px.
* <toc> - This parameter can be used to create a right-aligned table of contents on the page. By default, the table of contents is left-aligned (note that this has changed from earlier versions of the template - see the change log for details).



;Samples
;Samples
Line 78: Line 114:
* 22 August 2013 - Fixed a bug where the cover image would re-size incorrectly if a non-default width is used. Images should now "scale" properly in these cases, but it may affect previous uses of the template with non-default widths.
* 22 August 2013 - Fixed a bug where the cover image would re-size incorrectly if a non-default width is used. Images should now "scale" properly in these cases, but it may affect previous uses of the template with non-default widths.
* 13 February 2014 - Added <offset> and <height> parameters. Offset will move an image "up" within the template itself, while height adjusts the vertical size of the template. Note that adjusting the height will not adjust the size of the image.
* 13 February 2014 - Added <offset> and <height> parameters. Offset will move an image "up" within the template itself, while height adjusts the vertical size of the template. Note that adjusting the height will not adjust the size of the image.
* 20 December 2014 - Added <noname> parameter. When filled with a non-empty character, parameter will remove the gray text box from in front of the image, allowing a display of the image and bounding box alone.


;Attribution and Credit
;Attribution and Credit